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 serhiy.storchaka
Recipients pdox, serhiy.storchaka
Date 2017-10-15.06:59:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1508050770.07.0.213398074469.issue31791@psf.upfronthosting.co.za>
In-reply-to
Content
1. This will increase the size of type object. Most types are not numbers, not collections and don't support the buffer protocol, thus save memory for tp_as_number, tp_as_sequence, tp_as_mapping and tp_as_buffer. This also can increase the time of type creation.

2. This will make harder testing that the particular protocol is supported (e.g. see PyIndex_Check or PyObject_CheckBuffer). And this will break any third-party code that does this directly, without using C API.

3. Calling function instead of executing inlined code after checking can increase stack consumption and slow down execution (see the usage of tp_descr_get).
History
Date User Action Args
2017-10-15 06:59:30serhiy.storchakasetrecipients: + serhiy.storchaka, pdox
2017-10-15 06:59:30serhiy.storchakasetmessageid: <1508050770.07.0.213398074469.issue31791@psf.upfronthosting.co.za>
2017-10-15 06:59:30serhiy.storchakalinkissue31791 messages
2017-10-15 06:59:29serhiy.storchakacreate