Mike Meyer <[EMAIL PROTECTED]> wrote: > Ben Finney <[EMAIL PROTECTED]> writes: > > "Since the values of an enumeration are directly reflected in > > the values and attributes, Enum instances are immutable to > > preserve this relationship" > > This justifies making the attributes immutable. But that's old hat - > I had that use case last year. It doesn't justify making the > instances immutable. Or if it does, I missed it.
The Enum class promises that instances will have all the enumeration values as instance attributes, and that all the instance attributes are values in the enumeration. That requires that the set of attributes on the instance not be changed after creation. -- \ "The future always arrives too fast, and in the wrong order." | `\ -- Alvin Toffler | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list