Toby Dickenson <[EMAIL PROTECTED]> writes: > 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.
True; I'll need to fix the specification so that it does say 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/ s/arguments/string arguments/ :-) -- \ "Too many pieces of music finish too long after the end." -- | `\ Igor Stravinskey | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list