flanker
flanker copied to clipboard
Equality with EmailAddress and String is broken
Flanker's EmailAddress
object implements an __eq__
method to support comparison with strings, which is super convenient, but the missing __ne__
(and friends) creates some crazy behavior:
>>> email_address = address.parse('[email protected]')
>>> email_address == '[email protected]'
True
>>> email_address != '[email protected]'
True
Both of these things can't be true, obviously. The answer here is to implement __ne__
and the rest of the python comparison methods.
Opened PR #79