rogerb at rogerbinns.com
Fri Nov 14 06:23:19 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Something has been baffling me and is still present in py3.0 -rc2.
When initializing a (non-variable) PyTypeObject in Python 2,
PyObject_HEAD_INIT is used. The docs for Python 3 still show that:
However if you try to use it you get all sorts of severe warnings (it
looks like structure members don't line up). Looking through the Python
3.0 source, *all* initialization is done using
PyVarObject_HEAD_INIT(NULL, 0) instead - PyObject_HEAD_INIT is not used
at all. The Python 2.3 source shows the latter form being used almost
exclusively so at some point someone changed a lot of code.
It would seem that common practise, the examples and the documentation
don't all match each other!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Python-3000