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

2013年2月26日 11:28:41 -0800

On 2013年2月26日 08:03:40 -0800
Ethan Furman <[email protected]> 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.
Regards
Antoine.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to