A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-March/152475.html below:

[Python-Dev] Replacing self.__dict__ in __init__

[Python-Dev] Replacing self.__dict__ in __init__ [Python-Dev] Replacing self.__dict__ in __init__Tin Tvrtković tinchester at gmail.com
Sun Mar 25 11:08:49 EDT 2018
That's reassuring, thanks.

On Sat, Mar 24, 2018 at 5:20 PM Raymond Hettinger <
raymond.hettinger at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180325/6fd924f5/attachment-0001.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4