From: SourceForge.net <no...@so...> - 2007-09-27 05:14:08
|
Bugs item #1803227, was opened at 2007-09-27 05:13 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1803227&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: keshav upadhyaya (ukeshav) Assigned to: Nobody/Anonymous (nobody) Summary: Jython allowed to creat weak Ref for List ,Tuple and Dict Initial Comment: 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. :) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1803227&group_id=12867 |