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 magu
Recipients magu
Date 2016-03-08.21:55:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457474155.28.0.06785872232.issue26514@psf.upfronthosting.co.za>
In-reply-to
Content
I propose to change __ne__ of `object` in the following form:

	class NewObject(object):
		def __ne__(self, other):
			return not self.__eq__(other)

Currently overwriting the `__eq__` method requires also overwriting `__ne__`. In a vast majority of cases this results in some boilerplate code as:

    (a == b) ^ (a != b) == True

to reduce surprises. Changing the default behavior still allows for the limited number of use cases where we want to implement __ne__ differently.


In short I propose the same behavior than __str__ and __repr__ have for __eq__ and __ne__.
(https://docs.python.org/3/reference/datamodel.html#object.__str__)
History
Date User Action Args
2016-03-08 21:55:55magusetrecipients: + magu
2016-03-08 21:55:55magusetmessageid: <1457474155.28.0.06785872232.issue26514@psf.upfronthosting.co.za>
2016-03-08 21:55:55magulinkissue26514 messages
2016-03-08 21:55:54magucreate