Hacker News new | ask | show | jobs
by yorwba 2953 days ago
A large part of the Python standard library is actually written in Python itself. You can even use inspect.getsource to look at the source of inspect.getsource itself.

So if you can already compile arbitrary Python, you only need to reimplement the parts that are written in C, or maybe just rewrite them to use a different FFI API.

1 comments

It can't compile arbitrary Python, it's only a subset of Python (removing some of the dynamic features that might be used in the standard library).