import time

class Loggable:
    def log(self, msg):
        print(str(time.ctime()) + ": " + str(msg))

class LoggableList(Loggable, list):
    def append(self, arg):
        super(LoggableList, self).append(arg) # 1 способ
        #list.append(self,arg) # 2 способ
        self.log(arg)

x=LoggableList([1,3,4])
x.append('m')
print(x)


