[Python-Dev] PEP 448 (almost finished!) — Question regarding test_ast
Benjamin Peterson
benjamin at python.org
Tue Jan 20 18:09:39 CET 2015
$ ./python Lib/test/test_ast.py -g
exec_results = [
('Module', [('Expr', (1, 0), ('NameConstant', (1, 0), None))]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [],
None, []), [('Pass', (1, 9))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6),
'a', None)], None, [], [], None, []), [('Pass', (1, 10))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6),
'a', None)], None, [], [], None, [('Num', (1, 8), 0)]), [('Pass', (1,
12))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], ('arg', (1,
7), 'args', None), [], [], None, []), [('Pass', (1, 14))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [],
('arg', (1, 8), 'kwargs', None), []), [('Pass', (1, 17))], [], None)]),
....
On Tue, Jan 20, 2015, at 12:06, Neil Girdhar wrote:
> Hi Benjamin,
>
> I'm having trouble finding where it is generating the lines below
>
> #### EVERYTHING BELOW IS GENERATED #####
>
> Neither a call to test_ast nor a make (in case it's generated somewhere
> else) regenerate those lines if they have been removed.
>
> How were those lines generated?
>
> Best,
> Neil
>
>
> On Tue, Jan 20, 2015 at 11:36 AM, Benjamin Peterson <benjamin at python.org>
> wrote:
>
> >
> >
> > On Tue, Jan 20, 2015, at 11:34, Neil Girdhar wrote:
> > > My question first:
> > > test_ast is mostly generated code, but I can't find where it is being
> > > generated. I am pretty sure I know how to fix most of the introduced
> > > problems. Who is generating test_ast??
> >
> > It generates itself.
> >
More information about the Python-Dev
mailing list