On Sat, Jun 28, 2014 at 3:28 PM, Chris Angelico email@example.com wrote:
On Sat, Jun 28, 2014 at 3:00 PM, firstname.lastname@example.org wrote:
On Sun, Jun 22, 2014, at 16:18, Terry Reedy wrote:
- Write pyu.py. It should first translate x.pyu to the equivalent x.py.
What is the equivalent x.py for "BUILD_SET 0" rather than "LOAD_GLOBAL (set), CALL_FUNCTION 0"?
Is there any reason that it has to be normal-looking source code?
Here's a POC translator. Give it a string with the source code for one function, and it'll give back a string that'll generate a similar function. Currently assumes it's working at top level - doesn't handle nested functions, methods, etc, etc. But it seems to work.