[issue39199] Improve the AST documentation

2021-03-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +23499 pull_request: https://github.com/python/cpython/pull/24727 ___ Python tracker ___ ___

[issue39199] Improve the AST documentation

2020-03-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The first one looks on first inspection "cleaner" but then I tried to look at a random closed bracket/parenthesis like the ones in value=Constant(value=Ellipsis))])])], and trying to guess where that closes an

[issue39199] Improve the AST documentation

2020-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As you worked much with ast.dump(), what multi-line formatting do you prefer, the current Module( body=[ If( test=Name(id='x', ctx=Load()), body=[ Expr(

[issue39199] Improve the AST documentation

2020-03-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 02f64cb79175902705b40e3eaa8ea6c7038754ef by Pablo Galindo in branch 'master': bpo-39199: Use 'eval' mode for the examples with expression nodes (GH-18828) https://github.com/python/cpython/commit/02f64cb79175902705b40e3eaa8ea6c7038754ef

[issue39199] Improve the AST documentation

2020-03-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +18186 pull_request: https://github.com/python/cpython/pull/18828 ___ Python tracker ___ ___

[issue39199] Improve the AST documentation

2020-03-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Would not be better to use mode='eval' for expression nodes? Agreed! I will prepare a PR soon to simplify the expression examples. -- ___ Python tracker __

[issue39199] Improve the AST documentation

2020-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would not be better to use mode='eval' for expression nodes? >>> print(ast.dump(ast.parse('123', mode='eval'), indent=4)) Expression( body=Constant(value=123, kind=None)) -- nosy: +serhiy.storchaka __

[issue39199] Improve the AST documentation

2020-03-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 114081f8adafa16283df30c456716a1bef4758d0 by Pablo Galindo in branch 'master': bpo-39199: Add descriptions of non-deprecated nodes to the AST module documentation (GH-17812) https://github.com/python/cpython/commit/114081f8adafa16283df30c

[issue39199] Improve the AST documentation

2020-01-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +17239 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17812 ___ Python tracker __

[issue39199] Improve the AST documentation

2020-01-03 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : The AST docs need some love as they can be a bit obscure to someone new to the module. Improvements to be considered in this issue: * Document all available nodes (as of 3.8 and not deprecated ones). This helps to know what classes to consider when