[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 4c78c527d215c37472145152cb0e95f196cdddc9 by INADA Naoki in branch 'master': bpo-29622: Make AST constructor to accept less than enough number of positional arguments (GH-249)

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-23 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +240 ___ Python tracker ___

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-23 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-23 Thread INADA Naoki
INADA Naoki added the comment: @mbussonn With PR 249, "import os" and "%timeit" works fine. -- ___ Python tracker ___

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-23 Thread INADA Naoki
INADA Naoki added the comment: Now trailing optional fields are optional arguments of AST type. -- ___ Python tracker ___

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-23 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +216 ___ Python tracker ___ ___

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-22 Thread INADA Naoki
INADA Naoki added the comment: AST type doesn't have any information about optional fields. And I don't know it's worth enough to add it. When AST is instantiated by keyword arguments, there are no check about absence of some fields. I suppose we can just loosen positional arguments too.

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-22 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker ___ ___

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-22 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Duplicating my comment of 29463 who was in a race condition with this issue: thank you for your work on the AST, I know many developers are looking forward to improvement and stabilisation with the hope of having it stable (and documented) in the

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-22 Thread STINNER Victor
New submission from STINNER Victor: The _ast.AST constructor requires a tuple with the same number of items than the fields list. Example with Raise: ASDL: Raise(expr? exc, expr? cause) >>> import _ast >>> _ast.Raise() <_ast.Raise object at 0x7fc2ca7dee90> >>> _ast.Raise(1) Traceback (most