[Python-checkins] [python/cpython] 4c78c5: bpo-29622: Make AST constructor to accept less tha...

GitHub noreply at github.com
Thu Feb 23 12:48:19 EST 2017


 Branch: refs/heads/master
 Home: https://github.com/python/cpython
 Commit: 4c78c527d215c37472145152cb0e95f196cdddc9
 https://github.com/python/cpython/commit/4c78c527d215c37472145152cb0e95f196cdddc9
 Author: INADA Naoki <methane at users.noreply.github.com>
 Date: 2017年02月24日 (2017年2月24日)
 Changed paths:
 M Lib/test/test_ast.py
 M Parser/asdl_c.py
 M Python/Python-ast.c
 Log Message:
 -----------
 bpo-29622: Make AST constructor to accept less than enough number of positional arguments (GH-249)
bpo-29463 added optional "docstring" field to 4 AST types.
While it is optional, it breaks backward compatibility because AST constructor
requires number of positional argument is same to number of fields.
AST types accepts empty arguments, and incomplete keyword arguments.
But it's not big problem because field can be filled after creation, and checked when compiling.
So stop requiring complete set of fields for positional arguments too.


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /