Message1946
Jython allowed to creat Weak ref for List , Tuple and Dict object ...
And does not work properly once we create proxy object to it...
Python does not support Weak Ref for List ,Tuple and Dict Objects..
i am pasting some work around here...
Python behavior :-
>>> import weakref as w
>>> a=(1,2,3,4)
>>> b=w.proxy(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: cannot create weak reference to 'tuple' object
jython behavior :-
>>> import weakref as w
>>> a=(1,2,3,4)
>>> b=w.proxy(a)
>>> b
<weakref 1 to 'tuple' object 2>
>>> a=None
>>> b
<weakref 1 to 'tuple' object 2>
:- here b sud be None Type because a is None..
but it does not work at all because in java it is depends on the mood of Garbage collector. :)
|
|
Date |
User |
Action |
Args |
2008-02-20 17:18:03 | admin | link | issue1803227 messages |
2008-02-20 17:18:03 | admin | create | |
|