def bar(self):
    print('method bar() called')
f = Foo()
f.bar()
print(f.timestamp)
time.sleep(5)
f.bar()
print(f.timestamp)
What's the most elegant way of keeping track of the last time a python object is accessed?