Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Lovely dynamic typing
import random
class BadIdea(object):
def __getattr__(self, key):
return random.randint(0, 1000)
def __setattr__(self, key, value):
x = BadIdea()
print = 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.