[ python-Bugs-1170766 ] weakref.proxy incorrect behaviour
SourceForge.net
noreply at sourceforge.net
Fri Mar 25 22:54:32 CET 2005
Bugs item #1170766, was opened at 2005-03-26 00:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1170766&group_id=5470
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Alexander Kozlovsky (kozlovsky)
Assigned to: Nobody/Anonymous (nobody)
Summary: weakref.proxy incorrect behaviour
Initial Comment:
According documentation, proxy in most contexts must
have the same behaviour as object itself.
PROBLEM:
bool(proxy_object) != bool(object_itself)
EXAMPLE:
>>> class X(list): pass # collection class
...
>>> x = X() # empty collection
>>> import weakref
>>> proxy = weakref.proxy(x)
>>> bool(x)
False
>>> bool(proxy)
True
PYTHON VERSION:
2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit
(Intel)]
also tested on:
2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit
(Intel)]
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1170766&group_id=5470
More information about the Python-bugs-list
mailing list