A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/043465.html below:

[Python-Dev] PEP 318 - posting draft

[Python-Dev] PEP 318 - posting draft [Python-Dev] PEP 318 - posting draftGuido van Rossum guido at python.org
Wed Mar 24 11:07:25 EST 2004
> I think this use case is rather elegant:
> 
>     def singleton(cls):
>         return cls()
> 
>     class Foo [singleton]:
>         ...

And how would this be better than

    class Foo(singleton):
        ...

(with a suitable definition of singleton, which could just be 'object'
AFAICT from your example)?

--Guido van Rossum (home page: http://www.python.org/~guido/)

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