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/2013-April/125620.html below:

[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library

[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard libraryGreg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 27 03:22:53 CEST 2013
Guido van Rossum wrote:
> If we had access to the syntax used for the definition, this would be
> simple: assignments define items, def statements define methods. But
> at run time we only see the final object resulting from the
> definition,

Another way we could tell the difference is if the def
statement used a different protocol for making bindings
than assignment.

Suppose a def statement used in a class body called
__defitem__, if it exists, instead of __setitem__. Then
the metaclass would be able to do different things for
defs and assignments.

-- 
Greg
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