Skip to content

Equality operator fails if lookup for __eq__ in class is unsuccessful #1530

@BCSharp

Description

@BCSharp

For example:

def missing(self):
    raise AttributeError("missing")

class E:
    __eq__ = property(missing)

assert not (E() == E())

raises AttributeError: missing rather than pass the assertion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions