question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

__eq__ not logical

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
k4prancommented, Jul 3, 2018

I agree that it would make sense to determine equality by tag. I was creating custom Units objects and it was sometimes easier to compare than filter() or find_by_tag().

0reactions
hyykingcommented, Jul 3, 2018

This doesn’t solve the issue, you still can’t determine if a commandcenter is in a list/unit-group without having to filter the list/unit-group looking for each commandcenter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logical equality - Wikipedia
Logical equality is a logical operator that corresponds to equality in Boolean algebra and ... This explains why "EQ" is often called "XNOR"...
Read more >
Logic EQ not working. HELP! - Apple Support Communities
Everytime I use the Logic 9 pro in-built EQ and add the lower end cut, when i play the track it just keeps...
Read more >
How I Solved My EQ Woes With These 3 Unlikely Logic Plugins
EQ – the one processor to rule them all. Taking separate, sometimes disparate tracks and fitting them together into one cohesive mix?
Read more >
EQ vs IQ - Difference and Comparison - Diffen
Emotional Intelligence, or emotional quotient (EQ), is defined as an individual's ... IQ covers logical reasoning, word comprehension and math skills.
Read more >
IQ vs. EQ: How Are They Different? - Verywell Mind
Some psychologists believe that standard measures of intelligence (i.e. IQ scores) are too narrow and do not encompass the full range of human ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found