Skip to content

Python 3.9 - Swapped '__eq__()'-function call for membership operator "in"  #88

@elmax0

Description

@elmax0

In Python 3.9 the "in"-operator apparently changed the __eq__() function call so that:

x in y will check for every element e in y if e.__eq__(x)

The documentation says otherwise but testing and debugging showed, that it doesn't work properly like intended.

This may cause the add_observer()function in base.py line 124 to break when trying to connect two modules.

To make it work in Python 3.9, line 150 in base.py has to be changed like:
if topic in sink.input_topics: -> if any(topic is e or topic == e for e in sink.input_topics):

Needs to be checked for higher versions too!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions