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-February/124265.html below:

[Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

[Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, asAntoine Pitrou solipsis at pitrou.net
Sat Feb 23 18:04:52 CET 2013
On Sat, 23 Feb 2013 08:27:50 -0800
Eli Bendersky <eliben at gmail.com> wrote:
> > See also http://bugs.python.org/issue16801#msg178542 for another use
> > case for named values.
> >
> > I've seen an awful lot of code that uses global variables or class
> > attributes primarily to get name validation on constant values, and I
> > think all of that code would be a prime candidate for using Named Values.
> > Some of them are also enum-like, but many of them are not.  So I'm with
> > Nick on this one.
> 
> Any suggestions for places in the stdlib where enums could come useful will
> be most welcome

The constants in the os module (os.SEEK_SET, etc.).
The constants in the socket module (socket.AF_INET, etc.).
And so on :-)

Regards

Antoine.


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