[Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Feb 26 00:53:03 CET 2013


Barry Warsaw wrote:

>>> Colors = make('Colors', 'red green blue'.split()) >>> Animals = make('Animals', 'ant bee cat'.split()) >>> Colors.green == Animals.bee

The currently suggested solution to that seems to be to make comparison non-transitive, so that Colors.green == 1 and Animals.bee == 1 but Colors.green != Animals.bee. And then hope that this does not create a quantum black hole that sucks us all into a logical singularity...

-- Greg



More information about the Python-Dev mailing list