That's reassuring, thanks. On Sat, Mar 24, 2018 at 5:20 PM Raymond Hettinger < raymond.hettin...@gmail.com> wrote:
> This should work. I've seen it done in other production tools without any > ill effect. > > 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. > > Still, you should look at whether this would affect static type checkers, > lint tools, and other tooling. > > > Raymond
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com