PEP 354: Enumerations in Python

Paul Rubin http
Mon Feb 27 20:45:03 EST 2006


Ben Finney <bignose+hates-spam at benfinney.id.au> writes:
> By way of explanation, my earlier implementations of this didn't have
> enumerations as sequences. Now that the design has converged more on a
> sequence and container idiom, I agree with you.

say that 
   Weekdays = enum('mon', 'tue', ...)

What is the type of Weekdays.mon supposed to be?

Do you anticipate having parameters like socket.AF_INET that are
currently integers, become enumeration members in future releases?



More information about the Python-list mailing list