[issue2551419] Remove __ne__ methods in classes when they are just ! __eq__

John Rouillard <[email protected]> Wed, 29 Jul 2026 15:09:12 +0000
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
New submission from John Rouillard:

Since python 3, __ne__ is defined in terms of __eq__ by the default object class.

It looks like 2 classes in security.py and password.py define an __ne__ as:

   return not self.__eq__(other)

so these two defs can be removed.

The other instances define __ne__ in terms of cmp, return False or add isinstance()
checks before using != operator.

----------
assignee: rouilj
components: API, Command-line interface, Database, Mail interface, User Interface, Web interface
messages: 8464
nosy: rouilj
severity: minor
status: new
title: Remove __ne__ methods in classes when they are just ! __eq__
type: resource usage

_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551419>
_________________________________________________