[New-bugs-announce] [issue34854] Crash in string annotations in lambda with keyword-only argument without default value
Serhiy Storchaka
report at bugs.python.org
Sun Sep 30 12:25:00 EDT 2018
New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:
Compiling a string annotation containing a lambda with keyword-only argument without default value causes a crash.
from __future__ import annotations
def f() -> (lambda *, x: x): pass
The following PR fixes this crash. It also fixes other errors:
* Removes a space between "lambda" and ":" in the representation of lambda without argument.
* Removes the final "*" (it is incorrect syntax) in the representation of lambda without *args and keyword-only arguments when compile from AST.
----------
components: Interpreter Core
messages: 326730
nosy: gvanrossum, lukasz.langa, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Crash in string annotations in lambda with keyword-only argument without default value
type: crash
versions: Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34854>
_______________________________________
More information about the New-bugs-announce
mailing list