Python: Objects comparison

One of the most common questions I get asked by python beginners, is “how do you compare between objects of a class?”

To answer this question, let’s have a look on the following class:

class Ball(object):

    def __init__(self, color, size):
        self.color = color
        self.size = size
Continue reading “Python: Objects comparison”