On 4/27/2016 7:24 AM, Ian Kelly wrote:
Some other great questions to ask yourself are "do I really want len(my_object) to return the number of items in this dict" and "do I really want list(my_object) to return all the keys in this dict"? If the answer to all those is yes, then it's probably fair to say that your object is-a dict and should be modeled as such.

These questions are more useful for me to consider. For my chess piece base class, the answer is no.

Thank you,

Chris R.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to