-----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-----

_______________________________________________
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

Reply via email to