A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-February/124334.html below:

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

[Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, asTerry Reedy tjreedy at udel.edu
Tue Feb 26 15:50:00 CET 2013
On 2/25/2013 12:35 PM, Ethan Furman wrote:

> But this I don't, and in both mine, Ted's, and Alex's versions enums
> from different groups do not compare equal, regardless of the underlying
> value.  Of course, this does have the potential problem of `green == 1
> == bee` but not `green == bee` which would be a problem with set and
> dicts -- but I'm the only one who has brought up that issue.

I have not been following the discussion in detail so I missed that 
before. Breaking transitivity of equality a no-no. It is basic to 
thought and logic.

decimal(0) == 0 == 0.0 != decimal(0)
was a problem we finally fixed by removing the inequality above.
http://bugs.python.org/issue4087
http://bugs.python.org/issue4090

We should NOT knowingly re-introduce the same problem again! If color 
and animal are isolated from each other, they should each be isolated 
from everything, including int.

-- 
Terry Jan Reedy

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4