On 12 mar 2011, at 16:30, Massimo Santini wrote:
> For the exact same reason why all modern languages have enumerative
> types: because it's better if the interpreter (or compiler) can
> syntactically control the range of possible values.
>
> Is this convincing?

Interestingly at a PyCon talk yesterday Raymond Hettinger was
discussing named tuples and he showed how you could misuse them
to create Python enums.  He immediately followed up with "Of
course we all agree that we'll never actually do this in Python,
right?"

This isn't to say enums might not have a place in jinja2.  I don't
have an opinion.  But a general appead in regard to "all modern
languages ..." may not be convincing.

Jeff Bauer
Rubicon, Inc.

-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pocoo-libs?hl=en.

Reply via email to