Skip to content

Instantly share code, notes, and snippets.

@marcusway
Created October 5, 2015 16:01
Show Gist options
  • Save marcusway/d6eaf688260801daa3ff to your computer and use it in GitHub Desktop.
Save marcusway/d6eaf688260801daa3ff to your computer and use it in GitHub Desktop.
from time import sleep
import __builtin__
VISCOSITY = 0.5
def stickify(fn, *args, **kwargs):
def sticky_fn(*args, **kwargs):
sleep(VISCOSITY)
return fn(*args, **kwargs)
return sticky_fn
for k, v in __builtin__.__dict__.iteritems():
__builtin__.__dict__[k] = stickify(v)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment