Solved

As a Rule of Thumb, When Should You Include an __Eq__

Question 26

Multiple Choice

As a rule of thumb, when should you include an __eq__ method in a class?


A) Always, because the comparison for equality is not compatible with classes.
B) Whenever a comparison for equality uses criterion other than object identity.
C) Only when you need to be able to make a comparison based on object identity.
D) Only if you plan to export the class as part of a module.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions