[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

Pablo Galindo Salgado report at bugs.python.org
Wed Dec 30 21:04:42 EST 2020


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> I'll work on finding out when this got messed up and fix it.

Apparently is 

commit bca701403253379409dece03053dbd739c0bd059 (HEAD)
Author: Lysandros Nikolaou <lisandrosnik at gmail.com>
Date:   Tue Oct 27 00:42:04 2020 +0200

    bpo-42123: Run the parser two times and only enable invalid rules on the second run (GH-22111)


~/github/python/master v3.10.0a2~61 9s
❯ ./python -c "(*x), y = 1,2"

~/github/python/master v3.10.0a2~61
❯ git checkout HEAD^
Previous HEAD position was bca7014032 bpo-42123: Run the parser two times and only enable invalid rules on the second run (GH-22111)
HEAD is now at c8c4200b65 bpo-42157: Convert unicodedata.UCD to heap type (GH-22991)

~/github/python/master remotes/welikeparsers/master
❯ make -j -s
 CC='gcc -pthread' LDSHARED='gcc -pthread -shared    ' OPT='-g -Og -Wall'       _TCLTK_INCLUDES='' _TCLTK_LIBS=''       ./python -E ./setup.py -q build

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  atexit                pwd
time


~/github/python/master remotes/welikeparsers/master
❯ ./python -c "(*x), y = 1,2"
  File "<string>", line 1
    (*x), y = 1,2
     ^
SyntaxError: can't use starred expression here

----------

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


More information about the Python-bugs-list mailing list