[Compiler-sig] dipping my toe in...
Skip Montanaro
skip@pobox.com
Tue, 16 Apr 2002 17:03:13 -0500
SM> Does the "?" imply the preceeding fields must be present if that is?
SM> For example, if we have an "inst", does that imply we also have a
SM> "type" the same way optional args work in Python?
Jeremy> It's not that powerful. It just says that the type is optional.
Jeremy> So the Raise ctor above would actually accept a raise statement
Jeremy> with only a traceback.
So the parser is the "guard at the gate" to prevent such stuff from turning
up in the AST?
I ask these because I'm still a little confused about what exactly this
stuff does. Looking at test.py
import ast
print ast.transform("""global a, b, c
a + b - c * 3
""")
suggests that somehow it's parsing the Python code, but that's not what's
happening. Still, it's not clear why ast_transform always returns None.
Sorry for the frontal lobe density...
Skip