<div dir="ltr">That's reassuring, thanks.<br><div><br><div class="gmail_quote"><div dir="ltr">On Sat, Mar 24, 2018 at 5:20 PM Raymond Hettinger <<a href="mailto:raymond.hettinger@gmail.com">raymond.hettinger@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This should work. I've seen it done in other production tools without any ill effect.<br>
<br>
The dict can be replaced during __init__() and still get benefits of key-sharing.  That benefit is lost only when the instance dict keys are modified downstream from __init__().  So, from a dict size point of view, your optimization is fine.<br>
<br>
Still, you should look at whether this would affect static type checkers, lint tools, and other tooling.<br>
<br>
<br>
Raymond</blockquote></div></div></div>