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:

Verified
Correct Answer:
Verified
Q21: Python has a built-in type for rational
Q22: The str method is a good example
Q23: In the context of Python objects, what
Q24: The attributes of an object are represented
Q25: What are the two parts of a
Q27: Inheritance allows a class to automatically reuse
Q28: In Python, when does an object reach
Q29: The Python interpreter picks out equality from
Q30: A method automatically returns the value None
Q31: What type of programming is defined by