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 pdox
Recipients pdox, serhiy.storchaka
Date 2017-10-15.07:25:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1508052324.28.0.213398074469.issue31791@psf.upfronthosting.co.za>
In-reply-to
Content
serhiy.storchaka:

1) Where tp_as_number would normally be NULL, instead it would point to a fixed PyNumberMethods structure containing the default functions. This would make the memory increase negligible, as all non-number types would use the same structure.

2) If this is behavior we want to formally support, then we should provide macros for it. (all they must do is compare against the default pointer value, rather than NULL). Are there particular extension(s) you suspect may be doing this?

3) This has to be handled on a case-by-case basis. I would not remove inlined optimizations. If there are some fields that truly benefit from remaining NULL, those can be left alone. I would like to focus on the functions for which the common case (in code without type errors) is to make the indirect call.
History
Date User Action Args
2017-10-15 07:25:24pdoxsetrecipients: + pdox, serhiy.storchaka
2017-10-15 07:25:24pdoxsetmessageid: <1508052324.28.0.213398074469.issue31791@psf.upfronthosting.co.za>
2017-10-15 07:25:24pdoxlinkissue31791 messages
2017-10-15 07:25:23pdoxcreate