#125 Declined
Repository
msabramo
Branch
Requirement_add__ne__
Repository
pypa
Branch
default
Author
  1. Marc Abramowitz
Reviewers
Description

It seems like if the Requirement class has an __eq__ method, it should probably have a __ne__ method.

Otherwise you get into funny situations that seem to violate the space-time continuum like:

(Pdb) req_to_install.satisfied_by.as_requirement() == req_to_install.req
True
(Pdb) req_to_install.satisfied_by.as_requirement() != req_to_install.req
True

I ran into this while working on pip -- see https://github.com/pypa/pip/pull/2493#discussion_r25955295

Comments (2)