This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author colander_man
Recipients
Date 2004-06-23.15:48:54
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The following code will cause interesting errors:

from weakref import proxy
class a: pass
bool(proxy(a()))

Entered at a prompt, this will not cause a
ReferenceError until another statement is entered (and
will instead return True or 1) in both 2.3 and 2.2.

Run as a script, this will return True and cause a
fatal error in 2.3, but will return 1 and otherwise
exhibit no strange behaviour in 2.2 (even with
additional code accessing the return value).

The equivalent code written using ref rather than proxy
works as expected: bool(ref(a())()) returns False and
creates no errors.
History
Date User Action Args
2007-08-23 14:22:49adminlinkissue978308 messages
2007-08-23 14:22:49admincreate