-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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: http://docs.python.org/dev/3.0/extending/newtypes.html 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! Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkdC0MACgkQmOOfHg372QRErgCdGPyIr9eLNaoivePS5AhUFzJx KEEAnR8oYK27C5ZueWnmtk+qecOh0bpP =LDdB -----END PGP SIGNATURE----- _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com