New submission from Serhiy Storchaka <storchaka+cpyt...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue34854>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to