Skip to content

Instantly share code, notes, and snippets.

@k-bx
Created June 18, 2012 11:12
Show Gist options
  • Save k-bx/2947907 to your computer and use it in GitHub Desktop.
Save k-bx/2947907 to your computer and use it in GitHub Desktop.
python
class A(object):
def __init__(self):
self.foo = 'foofoo'
def print_foo(self):
print self.foo
pf = A().print_foo
pf()
# output: foofoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment