Hacker News new | ask | show | jobs
by kazinator 3051 days ago
That Python doesn't look like abstract syntax; it's an intermediate form full of additional semantic objects geared toward further translation or interpretation.

A Lisp compiler might build up something like that, from a fully macro-expanded body of code. That's not usually accessible to programs.

Like the fact that n is converted to a Name() node, where it has a ctx property indicating Store() has nothing to do with syntax; it is the result of an analysis arising from how x is being used semantically. The user didn't specify any such attributes on the x just that x is assigned and that is already recorded by something like Assign(x, 5).