jweinst1
10/23/2015 - 10:16 PM

class that keeps track of number changes.

class that keeps track of number changes.

#test class

class intbot(object):
    
    def __init__(self, val):
        self.val = val
        self.memo = []
    def __setattr__(self, name, value):
        try:
            self.__dict__[name] = value
            self.memo.append(value)
        except AttributeError:
            self.__dict__[name] = value
    def __repr__(self):
        return str(self.val)
    def __add__(self, other):
        self.val = self.val + other