[issue23896] lib2to3 doesn't provide a grammar where exec is a function

Eli Bendersky report at bugs.python.org
Thu Apr 9 15:49:42 CEST 2015


New submission from Eli Bendersky:

lib2to3 helpfully provides pygram.python_grammar_no_print_statement for parsing Python 3 ('print' has the semantics of an identifier, not a keyword)

However, the same courtesy is not extended to 'exec', which also turns from a statement to an identifier in Python 3.

I'd propose adding something like python_grammar_no_print_and_exec_statement 

The name's a handful, but it's explicit and I can't think of anything else, given that we don't want to change the lib2to3 API at this time to rename these grammars using some other convention.

----------
components: Library (Lib)
messages: 240326
nosy: eli.bendersky
priority: normal
severity: normal
stage: needs patch
status: open
title: lib2to3 doesn't provide a grammar where exec is a function
type: behavior
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23896>
_______________________________________


More information about the Python-bugs-list mailing list