[Python-3000] Draft PEP: Dropping PyObject_HEAD

"Martin v. Löwis" martin at v.loewis.de
Sun Apr 29 12:10:02 CEST 2007


>> I propose the PEP below for Py3k.
> 
> I think it's a good idea.  It would be nice if the PEP included
> something about forwards compatibility.  Ideally, there should be a
> way to write a module that works with both 2.x and 3.x (e.g. using
> preprocessor macros).  Obviously the 3.x design should not be
> compromised for this sake though.

Daniel Stutzbach proposed (in private mail) to preserve PyObject_HEAD,
but define it as "PyObject ob_base;". Technically, that would work just
fine, and I'll revise the PEP in that direction.

I'd still prefer if the core would not use PyObject_HEAD on its own,
because the semicolon-missing macro breaks editors that do indentation
based on the C syntax, but providing this level of compatibility is
easy.

Regards,
Martin


More information about the Python-3000 mailing list