On Monday 27 February 2006 02:49, Ben Finney wrote:
> Coercing a value from an enumeration to a ``str`` results in the
> string that was specified for that value when constructing the
> enumeration::
That sentence seems to assume that all enumeration values will have been
specified as strings. Thats reasonable, but your description of the creation
of an enumeration doesnt specify that.
> An enumerated type is created from a sequence of arguments to the
> type's constructor::
>
> >>> Weekdays = enum('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat')
> >>> Grades = enum('A', 'B', 'C', 'D', 'F')
s/arguments/strings/
?
--
Toby Dickenson
--
http://mail.python.org/mailman/listinfo/python-list