Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- class Loggable:
- def log(self, msg):
- print(str(time.ctime()) + ": " + str(msg))
- class LoggableList(list, Loggable):
- def append(self, count):
- x = super(LoggableList, self).append(count)
- self.log(count)
- return x
Add Comment
Please, Sign In to add comment