[New-bugs-announce] [issue36826] ast_unparser.c doesn't handle := expressions

Eric V. Smith report at bugs.python.org
Tue May 7 04:39:53 EDT 2019


New submission from Eric V. Smith <eric at trueblade.com>:

If either of these lines are added to test_annotations() in Lib/test/test_future.py, a SystemError will be raised:

        eq("(x:=10)")
        eq("f'{(x:=10):=10}'")

Traceback (most recent call last):
  File "/Users/eric/local/python/cpython/Lib/test/test_future.py", line 258, in test_annotations
    eq("(x:=10)")
  File "/Users/eric/local/python/cpython/Lib/test/test_future.py", line 134, in assertAnnotationEqual
    actual = self.getActual(annotation)
  File "/Users/eric/local/python/cpython/Lib/test/test_future.py", line 121, in getActual
    exec(self.template.format(ann=annotation), {}, scope)
SystemError: unknown expression kind

----------
components: Interpreter Core
messages: 341699
nosy: emilyemorehouse, eric.smith, lukasz.langa
priority: release blocker
severity: normal
stage: needs patch
status: open
title: ast_unparser.c doesn't handle := expressions
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36826>
_______________________________________


More information about the New-bugs-announce mailing list