Sorry for my fast reply, Google-ing around I found this
http://pycon.blip.tv/file/4883247/
that seems to be a video of Raymond Hettinger you quote.
At 25:10 he says (if I get the english correctly) that one don't need an
enum type in Python since one can use many other solutions such as the
module namespace, a dict, or a class.
This is exactly what I say in my post! The only problem being that none of
such solutions work in the template because you have no (easy and not ugly)
way to take there the "symbols" you defined (be them the module global
variables, the dict keys or class members).
As the post title should suggest, my solution was precisely addressing that
particular problem: how to use enum-like variables in a (Jinja) template –
not in Python (where, as I cited in the post itself, many other solutions
have been suggested and the PEP has been, rightfully, rejected).
Ciao,
Massimo
--
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.