Skip to content

Instantly share code, notes, and snippets.

@fmobus
Created August 13, 2011 17:47
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 fmobus/1144076 to your computer and use it in GitHub Desktop.
Save fmobus/1144076 to your computer and use it in GitHub Desktop.
>>> class foo(object):
... def bla(self):
... print 1
...
>>> a = foo()
>>> a.bla
<bound method foo.bla of <__main__.foo object at 0xb750dfac>>
>>> del foo.bla
>>> a.bla
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'foo' object has no attribute 'bla'
>>> a.bla()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'foo' object has no attribute 'bla'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment