A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-November/155794.html below:

[Python-Dev] Experiment an opt-in new C API for Python? (leave current API unchanged)

[Python-Dev] Experiment an opt-in new C API for Python? (leave current API unchanged)Glenn Linderman v+python at g.nevcal.com
Tue Nov 20 21:02:57 EST 2018
On 11/20/2018 2:17 PM, Victor Stinner wrote:
> Le mar. 20 nov. 2018 à 23:08, Stefan Krah <stefan at bytereef.org> a écrit :
>> Intuitively, it should probably not be part of a limited API, but I never
>> quite understood the purpose of this API, because I regularly need any
>> function that I can get my hands on.
>> (...)
>> Reading typed strings directly into an array with minimal overhead.
> IMHO performance and hiding implementation details are exclusive. You
> should either use the C API with impl. details for best performances,
> or use a "limited" C API for best compatibility.

The "limited" C API concept would seem to be quite sufficient for 
extensions that want to extend Python functionality to include new 
system calls, etc. (pywin32, pyMIDI, pySide, etc.) whereas the numpy and 
decimal might want best performance.

> Since I would like to not touch the C API with impl. details, you can
> imagine to have two compilation modes: one for best performances on
> CPython, one for best compatibility (ex: compatible with PyPy). I'm
> not sure how the "compilation mode" will be selected.

The nicest interface from a compilation point of view would be to have 
two #include files: One to import the limited API, and one to import the 
performance API. Importing both should be allowed and should work.

If you import the performance API, you have to learn more, and be more 
careful.

Of course, there might be appropriate subsets of each API, having 
multiple include files, to avoid including everything, but that is a 
refinement.

>
> Victor
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/v%2Bpython%40g.nevcal.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20181120/86fc64c2/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4