Solved

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

Question 47

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents