Message18393
[forwarded from http://bugs.debian.org/211129]
>>> import weakref
>>> class Foo:
... def bar(self):
... print 'Hello'
...
>>> x=Foo()
>>> y=weakref.ref(x.bar)
>>> y
<weakref at 0x4021cb94; dead>
This behavior is self-evidently wrong, and seems to
be due to an
implementation detail of Python. There is a workaround
available here:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81253
(I haven't
examined it closely, but it looks like it should work)
Nevertheless, this
should be fixed eventually IMO.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:17:15 | admin | link | issue813299 messages |
2007-08-23 14:17:15 | admin | create | |
|