[Python-ideas] RFC: PEP: Specialized functions with guards

Yury Selivanov yselivanov.ml at gmail.com
Mon Jan 11 21:24:46 EST 2016



On 2016-01-11 7:47 PM, Nick Coghlan wrote:
> Perhaps the specialisation call should also move to being a pure C
> API, only exposed through _testcapi for testing purposes?
>
> That would move both this and the dict versioning PEP into the same
> territory as the dynamic memory allocator PEP: low level C plumbing
> that enables interesting CPython specific extensions (like
> tracemalloc, in the dynamic allocator case) without committing other
> implementations to emulating features that aren't useful to them in
> any way.

+1.  Exposing 'FunctionType.specialize()'-like APIs to
Python level feels very wrong to me.

Yury


More information about the Python-ideas mailing list