Amaury Forgeot d'Arc added the comment:

>From the macro posted earlier:
  Py##child##ArrType_Type.tp_base = &Py##parent2##ArrType_Type;

tp_base is *not* PyInt_Type, so I was wrong when I said that the dominant base 
was int.
This is wrong IMO: tp_base should be int, for the type to be correctly 
initialized.

Compare:
>>> from numpy import *
>>> print int_.__bases__, int_.__base__
(<type 'numpy.signedinteger'>, <type 'int'>) <type 'numpy.signedinteger'>
>>> class C(signedinteger, int):
...     pass
... 
>>> print C.__bases__, C.__base__
(<type 'numpy.signedinteger'>, <type 'int'>) <type 'int'>

----------

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

Reply via email to