[Python-Dev] C++ for CPython 3? (Re: str.count is slow)

martin at v.loewis.de martin at v.loewis.de
Fri Mar 3 05:36:41 CET 2006

Zitat von Fredrik Lundh <fredrik at pythonware.com>:

> > I'm not saying Python 3 should be written in C++, I'm only saying
> > that doing so would have not just disadvantages.
> someone also pointed out in private mail (I think; it doesn't seem to
> have made it to this list) that CPython's extensive use of "inheritance
> by aggregation" is invalid C.
> switching to C++ would be one way to address that, of course.

My preferred way of fixing it is to do it the "proper" C way, i.e.
make PyObject the first member of each derived type.


More information about the Python-Dev mailing list