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/124287.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, asBarry Warsaw barry at python.org
Mon Feb 25 05:14:10 CET 2013
On Feb 24, 2013, at 07:32 PM, Ethan Furman wrote:

>I would still like the int subclass, though, as it would be an aid to me on
>the Python side.

I think you'll know what I'm going to say. :)

1) Usually, you won't need it (see the responses from people who don't care
about the value).

2) When you do, wrapping the item in int() doesn't seem too bad to me.

>>> from flufl.enum import make
>>> Colors = make('Colors', 'red green blue'.split())
>>> int(Colors.blue)
3

Cheers,
-Barry
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