[Python-3000] PyObject_HEAD_INIT
Roger Binns
rogerb at rogerbinns.com
Fri Nov 14 11:22:01 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin v. Löwis wrote:
>> It would seem that common practise, the examples and the documentation
>> don't all match each other!
>
> I cannot parse this sentence.
Py2 source: Uses PyObject_HEAD_INIT
Py2 code compiled under Py3: Gives serious warnings
Py3 examples: Say to use PyObject_HEAD_INIT
Py3 reference: Says to use PyObject_HEAD_INIT
Py3 source: Uses PyVarObject_HEAD_INIT
PEP 3123: Says PyVarObject_HEAD_INIT only
Obviously the Python 3 documentation and examples need to be updated.
Also why not remove PyObject_HEAD_INIT from Python 3 headers so that if
it is used then the compile fails?
The Python 3 examples show using PyObject_HEAD_INIT:
http://docs.python.org/dev/3.0/extending/newtypes.html
The Python 3 documentation says to use PyObject_HEAD_INIT:
http://docs.python.org/dev/3.0/search.html?q=PyObject_HEAD_INIT&check_keywords=yes&area=default
There are no matches for PyVarObject_HEAD_INIT:
http://docs.python.org/dev/3.0/search.html?q=PyVarObject_HEAD_INIT
Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkkdUUUACgkQmOOfHg372QSAGwCgvx4N8GAe1ciUgedgu/3QB920
PqkAoMGQ0veEJ/FrkUiWxBJ/ZPw5ugjb
=+hZI
-----END PGP SIGNATURE-----
More information about the Python-3000
mailing list