[Python-Dev] PEP 448 (almost finished!) — Question regarding test_ast

Neil Girdhar mistersheik at gmail.com
Tue Jan 20 18:10:07 CET 2015


Thanks!

On Tue, Jan 20, 2015 at 12:09 PM, Benjamin Peterson <benjamin at python.org>
wrote:

> $ ./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.
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150120/ed42f557/attachment.html>


More information about the Python-Dev mailing list