A proposal for a new tool to be implemented -
It is often the case that developer write Code in Python and then
convert to a C extension module for performance regions.
A C extension module has a lot of boiler plate code - for instance the
Structures required for each class, the functions for Module
initialization etc.
My Idea is a simple tool that uses introspection tools to take a Python
module and to generate the relevant boiler plate for the module -
including blank functions for the module classes and for methods. This
tool would use type annotations (if given) to make sensible choices for
parameter and attribute types, including using int and float directly
rather than Internal objects (depending on tool options).
The idea is that the C extension module would present the same 'API' as
the original Python module.
The tool would not attempt to write the C code within the functions/methods.
I am aware of the challenges writing this tool, but I think a tool could
make a good fist of the conversion.
---------------------
What do you think ? Would you use the tool if provided ?
If there is interested I probably could develop a version 0.1, but it
would be useful to know if there is interest and if there is anyone else
interested in joining me in this journey.
--
Anthony Flury
*Moble*: +44 07743 282707
*Home*: +44 (0)1206 391294
*email*: anthony.fl...@btinternet.com
BEGIN:VCARD
VERSION:4.0
EMAIL;PREF=1:anthony.fl...@btinternet.com
FN:Anthony Flury
NICKNAME:Tony
N:Flury;Anthony;;;
TEL;TYPE=home;VALUE=TEXT:01206 391294
TEL;TYPE=cell;VALUE=TEXT:07743282707
UID:c00fc9c3-a56a-4584-8886-6466cf32b9c8
END:VCARD
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/TEGZUBYCSB4IFP6EWMPCPHDILVBNCFML/
Code of Conduct: http://python.org/psf/codeofconduct/