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/2015-December/142461.html below:

[Python-Dev] Python semantic: Is it ok to replace not x == y with x != y? (no)

[Python-Dev] Python semantic: Is it ok to replace not x == y with x != y? (no) [Python-Dev] Python semantic: Is it ok to replace not x == y with x != y? (no)Nick Coghlan ncoghlan at gmail.com
Wed Dec 16 01:01:14 EST 2015
On 15 December 2015 at 23:11, Victor Stinner <victor.stinner at gmail.com> wrote:
> I guess that the optimizations on "in" and "is" operators are fine,
> but optimizations on all other operations must be removed to not break
> the Python semantic.

Right, this is why we have functools.total_ordering as a class
decorator to "fill in" the other comparison implementations based on
the ones in the class body.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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