trida_op.py 218 Bytes
Newer Older
Mareš Martin's avatar
Objekty    
Mareš Martin committed
1
2
3
4
5
6
7
8
class Zvire:
    def __init__(self, jmeno, zvuk):
        self.jmeno = jmeno
        self.zvuk = zvuk

    def __eq__(self, other):
        return self.jmeno == other.jmeno and \
               self.zvuk == other.zvuk