This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author daniel.urban
Recipients Trundle, alex, benjamin.peterson, brett.cannon, daniel.urban, dmalcolm, eltoder, georg.brandl, mark.dickinson, nadeem.vawda, ncoghlan, pitrou, rhettinger, santoso.wijaya, terry.reedy
Date 2011-03-27.16:26:11
SpamBayes Score 0.00075181894
Marked as misclassified No
Message-id <1301243172.07.0.0253604121916.issue11549@psf.upfronthosting.co.za>
In-reply-to
Content
> not x == 2 can be theoretically optimized to x != 2, ...

I don't think it can:

>>> class X:
...     def __eq__(self, other):
...             return True
...     def __ne__(self, other):
...             return True
... 
>>> x = X()
>>> 
>>> not x == 2
False
>>> x != 2
True
>>>
History
Date User Action Args
2011-03-27 16:26:12daniel.urbansetrecipients: + daniel.urban, brett.cannon, georg.brandl, rhettinger, terry.reedy, mark.dickinson, ncoghlan, pitrou, nadeem.vawda, benjamin.peterson, alex, Trundle, dmalcolm, santoso.wijaya, eltoder
2011-03-27 16:26:12daniel.urbansetmessageid: <1301243172.07.0.0253604121916.issue11549@psf.upfronthosting.co.za>
2011-03-27 16:26:11daniel.urbanlinkissue11549 messages
2011-03-27 16:26:11daniel.urbancreate