On Thu, Aug 20, 2009 at 6:11 PM, "Martin v. Löwis" wrote:
> Couldn't you just generate a check function for your tree that
> would be invoked before you try to process a tree that a
> script got access to?
That would be one way, though now that I understand CPython's AST
design better, I am tempted
> x = compile("def foo():pass", "foo", "exec", _ast.PyCF_ONLY_AST)
>
> Does x contain real AST nodes or does it contain mirror structures
> (feel free to just tell me: don't be lazy, go read the code).
It only contains a mirror structure. See
pythonrun.c:Py_CompileStringFlags, and the (generated)
On Thu, Aug 20, 2009 at 06:20, Frank Wierzbicki wrote:
> On Wed, Aug 19, 2009 at 5:00 PM, "Martin v. Löwis" wrote:
>>> Now on to the complaints: Though I recently added support for this in
>>> Jython, I don't like that nodes can be defined without required
>>> attributes, for example:
>>>
>>> node
On Wed, Aug 19, 2009 at 5:00 PM, "Martin v. Löwis" wrote:
>> Now on to the complaints: Though I recently added support for this in
>> Jython, I don't like that nodes can be defined without required
>> attributes, for example:
>>
>> node = ast.Assign()
>
> I think we disagree in two points in our ev
> Now on to the complaints: Though I recently added support for this in
> Jython, I don't like that nodes can be defined without required
> attributes, for example:
>
> node = ast.Assign()
I think we disagree in two points in our evaluation of this behavior:
a) ast.Assign is *not* a node of the
2009/8/19 Frank Wierzbicki :
> Before I start complaining, I want to mention what a huge help it has
> been to be able to directly compare the AST exposed by ast.py in
> making Jython a better Python. Thanks for that!
>
> Now on to the complaints: Though I recently added support for this in
> Jyth
On Wed, Aug 19, 2009 at 11:10, Frank Wierzbicki wrote:
> Before I start complaining, I want to mention what a huge help it has
> been to be able to directly compare the AST exposed by ast.py in
> making Jython a better Python. Thanks for that!
>
> Now on to the complaints: Though I recently added