]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34854: Fix compiling string annotations containing lambdas. (GH-9645)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 30 Sep 2018 18:19:15 +0000 (11:19 -0700)
committerGitHub <noreply@github.com>
Sun, 30 Sep 2018 18:19:15 +0000 (11:19 -0700)
commit0f161b307969f86b4f8f31baf38f53f5462a9874
treed3022e1d7d2630a3af06ac69eef1f0a8abe046d3
parentb0b8f9bd4e6f78ac7383b4e56cfb6cbacc77da89
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.
(cherry picked from commit 2a2940e5c3e6d92f4fac5e9d361a1e224bb2f12e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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