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/125633.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 libraryLarry Hastings larry at hastings.org
Sat Apr 27 18:11:14 CEST 2013
On 04/26/2013 02:41 PM, Guido van Rossum wrote:
> I am still optimistic that we can come up with a rule that
> works well enough in practice (and the Zen rule to which I was
> referring was, of course, "practicality beats purity").

The rule I liked best is "ignore callables, descriptors, and anything 
with leading & trailing double underscores". Personally I'd modify that 
to simply "anything with two leading underscores" so you can have 
private variables.  It seems Pythonic to me in that classes already 
treat all those things special.  And if you want enums of any of those 
things you can instantiate & insert them by hand after the class definition.

Does that fail in an important way?


//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130427/decbd71f/attachment.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