Skip to content

Instantly share code, notes, and snippets.

@ryazwinski
Created April 28, 2011 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryazwinski/946814 to your computer and use it in GitHub Desktop.
Save ryazwinski/946814 to your computer and use it in GitHub Desktop.
patching example
class Tester():
def a(self):
print 'a'
def b(self):
print 'b'
>>> x=Tester()
>>> y=Tester()
>>> x.a()
a
>>> x.b()
b
>>> x.a=x.b
>>> x.a()
b
>>> x.b()
b
>>> y.a()
a
>>> y.b()
b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment