STINNER Victor added the comment:

When Python is compiled by Visual Studio 10 in PGUpdate mode, duplicated 
functions are merged to become the same unique function. The C code of 
wrap_binaryfunc() and wrap_binaryfunc_l() functions is the same and so both 
functions get the same address.

For "class List(list): pass", type_new() fills type->tp_as_number->nb_add to 
list_concat() because "d->d_base->wrapper == p->wrapper" is True whereas it 
should be False (wrap_binaryfunc vs wrap_binaryfunc_l).

A workaround is to use a different code for wrap_binaryfunc() and 
wrap_binaryfunc_l(). A real fix is to use something else than the address of 
the wrapper to check the type of the operator (left, right, or the 3rd type).

----------
nosy: +haypo

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

Reply via email to