Skip to content

__eq__ not logical #69

@hyyking

Description

@hyyking

When you want to check if a COMMANDCENTER is in a list, you need to calculate the tag list instead of checking the list itself. I think this behaviour applies to all units (didn't check). But this adds calculus and lines for nothing.
Enhancement would be:

class XXXX(...): #I don't know the name of the class
    def __eq__(self, other):
        return self.tag == other.tag
    def __ne__(self, other):
        return self.tag != other.tag
    ...etc

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions