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/124368.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, as [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, asEthan Furman ethan at stoneleaf.us
Tue Feb 26 21:16:35 CET 2013
On 02/26/2013 11:17 AM, Antoine Pitrou wrote:
> On Tue, 26 Feb 2013 08:03:40 -0800
> Ethan Furman <ethan at stoneleaf.us> wrote:
>> I'm beginning to see why enums as a class has not yet been added to Python.  We don't want to complicate the language
>> with too many choices, yet there is no One Obvious Enum to fit the wide variety of use-cases:
>>
>>     - named int enums  (http status codes)
>>     - named str enums  (tkinter options)
>>     - named bitmask enums  (file-type options)
>>     - named valueless enums  (any random set of names)
>>     - named valueless-yet-orderable enums  (any not-so-random set of names ;)
>
> I don't think valueless enums have a point. Just make them str enums.

If they're str enums then they would compare equal with strings and be strings and that may not be desired.

--
~Ethan~
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