[Python-ideas] {Python-ideas] C-API exposure

Eric Snow ericsnowcurrently at gmail.com
Tue Mar 29 19:47:50 CEST 2011


As I have been toying around with a few things, I have noticed that the
C-API provides a lot more functionality than is exposed in Python.  Much of
the functionality can be reproduced one way or another.  However, I was
wondering if it would be feasible (and tractable) to expose every bit of the
C-API in python.

If it happened, then everything in there could be written in pure python
relative to all the other exposed pieces.  This would allow easier
prototyping of new language features.  It would not be practical from a
performance standpoint for most stuff, but it would help people understand
how python works underneath.  As well, exposing all the pieces would provide
a way to test the C-API completely from pure python.

While I see several good things, I also see the size of the task.  Just
exposing the C-API would be a feat.  On top of that, emulating the innards
of each piece in pure python using the other exposed pieces would be a big
job.  Would it be worth it?  Would it expose things we actually don't want
exposed?

I think it would be really cool, but half the time that is a good warning
sign.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110329/88be28e5/attachment.html>


More information about the Python-ideas mailing list