Roundup Tracker - Issues

Issue 2551419

classification
Remove __ne__ methods in classes when they are just ! __eq__
Type: resource usage Severity: minor
Components: Database, Web interface, Mail interface, Command-line interface, User Interface, API Versions:
process
Status: new
:
: rouilj : rouilj
Priority: :

Created on 2026-07-29 15:09 by rouilj, last changed 2026-07-29 15:09 by rouilj.

Messages
msg8464 Author: [hidden] (rouilj) Date: 2026-07-29 15:09
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.
History
Date User Action Args
2026-07-29 15:09:12rouiljcreate