- Copy these lines into a Python REPL
# ---8<---
class Wat:
@property
def wat(self):
print("\n...wat...\n...wat!?\n\n ?!?!\n\n")| import time | |
| import sys | |
| from contextlib import contextmanager | |
| @contextmanager | |
| def clockit(msg): | |
| s = time.clock() | |
| yield | |
| print("** %s: %.03f" % (msg, time.clock() - s), file=sys.stderr) |