Re: [Python-Dev] enum discussion: can someone please summarize open issues?

2013年5月03日 23:12:10 -0700

Am 04.05.2013 01:22, schrieb Antoine Pitrou:
> On 2013年5月04日 11:15:17 +1200
> Greg Ewing <[email protected]> wrote:
>> Eli Bendersky wrote:
>> > I'm just curious what it is about enums that sets everyone on a "let's 
>> > make things safer" path. Python is about duck typing, it's absolutely 
>> > "unsafe" in the static typing sense, in the most fundamental ways 
>> > imaginable.
>> 
>> This isn't about catching bugs in the program, it's
>> about validating user input. That's a common enough
>> task that it deserves to have a convenient way to
>> do it correctly.
> 
> +1. An enum is basically a bidirectional mapping between some raw
> values and some "nice" instances, so it deserves a well-defined lookup
> operation in each direction.
Agreed.
Georg
_______________________________________________
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