PEP 354: Enumerations in Python
Paul Rubin
http
Mon Feb 27 19:09:21 EST 2006
"I V" <wrongbad at gmail.com> writes:
> I think it does, doesn't it? From the PEP:
>
> "Values within an enumeration cannot be meaningfully compared *except
> with values from the same enumeration*. The comparison operation
> functions return ``NotImplemented`` [#CMP-NOTIMPLEMENTED]_ when a
> value from an enumeration is compared against any value not from the
> same enumeration or of a different type." (my emphasis)
Oh ok, thanks. I didn't understand this before. The link from the
footnote explains it.
More information about the Python-list
mailing list