[issue16795] Patch: some changes to AST to make it more useful for static language analysis
Sven Brauch
report at bugs.python.org
Fri Jan 11 00:36:10 CET 2013
Sven Brauch added the comment:
The patch review tool currently throws errors on submitting any form (http://pastie.org/pastes/5665048/text) so please forgive me for answering here once more. I'll copy this information (patch + message) to the review as soon as the website is working again.
> In ast.c, use the LINENO macro for n_lineno.
Done.
> http://bugs.python.org/review/16795/diff/7080/Lib/test/test_ast.py#newcode183
> Lib/test/test_ast.py:183: def _assertTrueorder(self, ast_node,
parent_pos, reverse_check = False):
> Wrap everything here by 80 chars.
Done.
> http://bugs.python.org/review/16795/diff/7080/Lib/test/test_ast.py#newcode198
> Lib/test/test_ast.py:198: self.assertTrue(node_pos <= parent_pos if
> reverse_check else node_pos >= parent_pos)
> Lift the condition out of the assert call.
Done.
> http://bugs.python.org/review/16795/diff/7080/Lib/test/test_ast.py#newcode467
> Lib/test/test_ast.py:467: self.maxDiff = None
> A comment explaining what this is for would be nice.
Sorry, this was for testing purposes only, and I forgot to remove it.
> http://bugs.python.org/review/16795/diff/7080/Lib/test/test_ast.py#newcode589
> Lib/test/test_ast.py:589: 0, 0, 0, 0)
> These extra parameters are optional now, right? They needn't be passed
> then.
Unfortunately not: Altough the question mark in the asdl file is present and I made fairly sure to regenerate all the derived files, the parameters are still mandatory.
URL of the patch review: http://bugs.python.org/review/16795/
----------
Added file: http://bugs.python.org/file28681/full2.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16795>
_______________________________________
More information about the Python-bugs-list
mailing list