Message304422
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). |
|
Date |
User |
Action |
Args |
2017-10-15 06:59:30 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pdox |
2017-10-15 06:59:30 | serhiy.storchaka | set | messageid: <1508050770.07.0.213398074469.issue31791@psf.upfronthosting.co.za> |
2017-10-15 06:59:30 | serhiy.storchaka | link | issue31791 messages |
2017-10-15 06:59:29 | serhiy.storchaka | create | |
|