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/2004-April/044161.html below:

[Python-Dev] PEP 318: Singleton decorator

[Python-Dev] PEP 318: Singleton decorator [Python-Dev] PEP 318: Singleton decoratorSkip Montanaro skip at pobox.com
Thu Apr 8 17:29:27 EDT 2004
(Still catching up.  I guess no help with the substance of the PEP will be
forthcoming, so I'll try to get to things as I can.)

       ... [snip] ...

    Ping> But i don't think this is a good way to write a singleton, because
    Ping> then the user of the class has to get instances by saying
    Ping> "MyClass" instead of "MyClass()".  Better would be:

       ... [snip] ...

    Ping> I respectfully suggest that the PEP use the latter implementation
    Ping> in its singleton example instead.

Done.

Skip

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