[Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Wed Apr 6 16:11:43 CEST 2011
- Previous message: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements
- Next message: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Apr 6, 2011 at 11:59 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
On Tue, 5 Apr 2011 12:57:13 -0700 Raymond Hettinger <raymond.hettinger at gmail.com> wrote:
* I would like to see a restriction on the use of the concrete C API such that it is only used when a exact type match has been found or created (i.e. if someone writes PyListNew(), then it is okay to use PyListSetItem()). That should be qualified. For example, not being able to use PyUnicodeASSTRING in some performance-critical code (such as the io lib) would be a large impediment.
Str/unicode/bytes are really an exception to most rules when it comes to duck-typing. There's so much code out there that only works with "real" strings, nobody is surprised when an API doesn't accept string look-alikes. (There aren't any standard ABCs for those interfaces, and I haven't really encountered anyone clamouring for them, either).
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements
- Next message: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]