This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients docs@python, loewis, pitrou
Date 2010-10-04.21:45:47
SpamBayes Score 5.8281697e-05
Marked as misclassified No
Message-id <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za>
In-reply-to
Content
In http://docs.python.org/dev/extending/newtypes.html, you can read:

“To enable object creation, we have to provide a tp_new implementation. In this case, we can just use the default implementation provided by the API function PyType_GenericNew(). We’d like to just assign this to the tp_new slot, but we can’t, for portability sake, On some platforms or compilers, we can’t statically initialize a structure member with a function defined in another C module, so, instead, we’ll assign the tp_new slot in the module initialization function just before calling PyType_Ready()”

But the thing is, we ourselves (CPython) do exactly what is discouraged here, both in built-in types and dynamically loaded extensions.
So is this piece of advice still necessary?
History
Date User Action Args
2010-10-04 21:45:52pitrousetrecipients: + pitrou, loewis, docs@python
2010-10-04 21:45:51pitrousetmessageid: <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za>
2010-10-04 21:45:49pitroulinkissue10024 messages
2010-10-04 21:45:47pitroucreate