]> granicus.if.org Git - python/commit
bpo-34854: Fix compiling string annotations containing lambdas. (GH-9645)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 30 Sep 2018 18:07:05 +0000 (21:07 +0300)
committerGitHub <noreply@github.com>
Sun, 30 Sep 2018 18:07:05 +0000 (21:07 +0300)
commit2a2940e5c3e6d92f4fac5e9d361a1e224bb2f12e
treef703ecf4a37603fcc39e4d30bbec30c0f262e3f0
parentd5bd036138881bb90a803397d992870a46fbdc2d
bpo-34854: Fix compiling string annotations containing lambdas. (GH-9645)

* Compiling a string annotation containing a lambda with keyword-only
argument without default value caused a crash.

* Remove the final "*" (it is incorrect syntax) in the representation of
lambda without *args and keyword-only arguments when compile from AST.

* Improve the representation of lambda without arguments.
Lib/test/test_future.py
Misc/NEWS.d/next/Core and Builtins/2018-09-30-19-27-13.bpo-34854.6TKTcB.rst [new file with mode: 0644]
Python/ast_unparse.c