Terry J. Reedy <tjre...@udel.edu> added the comment:

This is definitely not a critical fix for 2.6 ;-)

The weakref.proxy doc says nothing about comparisons:

"weakref.proxy(object[, callback]) 
Return a proxy to object which uses a weak reference. This supports use of the 
proxy in most contexts instead of requiring the explicit dereferencing used 
with weak reference objects. The returned object will have a type of either 
ProxyType or CallableProxyType, depending on whether object is callable. Proxy 
objects are not hashable regardless of the referent; this avoids a number of 
problems related to their fundamentally mutable nature, and prevent their use 
as dictionary keys. callback is the same as the parameter of the same name to 
the ref() function."

so this is not a behavior bug.

A patch for 2.7 could include a note that the behavior changes in 3.x. The 3.x 
patch should only say what the 3.x behavior is. This is assuming that the 
behavior should be defined as in 3.x for all implementations. Since it seems 
straightforward, it seems reasonable to me to do so.

The comparison behavior of 'basic' types is actually defined in the ref manual 
section 5.9 Comparisons (3.1). Cross-type behavior is summarized as "Comparison 
of objects of the differing types depends on whether either of the types 
provide explicit support for the comparison." I think the detailed info for 
weakref proxys belongs with the weakref proxy entry as suggested above.

----------
assignee:  -> d...@python
components: +Documentation
nosy: +d...@python, terry.reedy
stage:  -> needs patch
versions: +Python 3.1, Python 3.2 -Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9658>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to