PEP 354: Enumerations in Python

greg greg at cosc.canterbury.ac.nz
Wed Mar 1 10:27:47 CET 2006


Paul Rubin wrote:

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

Since these are derived from values defined
as integers in C, it's probably better to leave
them that way. There may be code that relies
on them being integers or having those integer
values.

--
Greg



More information about the Python-list mailing list