[Python-Dev] constant/enum type in stdlib

Nick Coghlan ncoghlan at gmail.com
Wed Nov 24 15:08:04 CET 2010


On Wed, Nov 24, 2010 at 10:30 PM, Michael Foord
<fuzzyman at voidspace.org.uk> wrote:
> Based on a non-exhaustive search, Python standard library modules currently
> using integers for constants:

Thanks for that review. I think following up on the "NamedConstant"
idea may make more sense than pursuing enums in their own right. That
way we could get the debugging benefits on the Python side regardless
of any type constraints on the value (e.g. needing to be an integer in
order to interface to C code), without needing to design an enum API
that suited all purposes.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list