New submission from Nick Coghlan <[EMAIL PROTECTED]>:

>From the discussion of issue 643841:

>>> class Demo:
...   def __index__(self):
...     return 1
...
>>> a = Demo()
>>> b = weakref.proxy(a)
>>> operator.index(a)
1
>>> operator.index(b)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'weakproxy' object cannot be interpreted as an index

The weakref proxy types need to be updated to delegate 2.5's new
tp_index slot.

----------
components: Library (Lib)
messages: 65182
nosy: ncoghlan
severity: normal
status: open
title: weakref.proxy fails to delegate tp_index slot
versions: Python 2.5, Python 2.6, Python 3.0

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2592>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to