All pastes #758213 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-11-02 00:18 UTC
rendered paste body
>>> class Foo(object):
...     pass
... 
>>> def bind(x):
...     def foo(self):
...         print x
...     Foo.foo = foo
... 
>>> bind(1)
>>> f = Foo()
>>> f.foo()
1
>>> f.foo.im_func.func_closure
(<cell at 0x56e50: int object at 0x1803988>,)