Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib2to3 doesn't provide a grammar where exec is a function #68084

Closed
elibendersky mannequin opened this issue Apr 9, 2015 · 3 comments
Closed

lib2to3 doesn't provide a grammar where exec is a function #68084

elibendersky mannequin opened this issue Apr 9, 2015 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@elibendersky
Copy link
Mannequin

elibendersky mannequin commented Apr 9, 2015

BPO 23896
Nosy @gvanrossum, @benjaminp
PRs
  • bpo-23896: Add a grammar where exec isn't a stmt #13272
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-05-20.20:27:49.880>
    created_at = <Date 2015-04-09.13:49:42.489>
    labels = ['type-bug', 'library']
    title = "lib2to3 doesn't provide a grammar where exec is a function"
    updated_at = <Date 2019-05-20.20:27:49.879>
    user = 'https://bugs.python.org/elibendersky'

    bugs.python.org fields:

    activity = <Date 2019-05-20.20:27:49.879>
    actor = 'gvanrossum'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-05-20.20:27:49.880>
    closer = 'gvanrossum'
    components = ['Library (Lib)']
    creation = <Date 2015-04-09.13:49:42.489>
    creator = 'eli.bendersky'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 23896
    keywords = ['patch']
    message_count = 3.0
    messages = ['240326', '342949', '342951']
    nosy_count = 3.0
    nosy_names = ['gvanrossum', 'benjamin.peterson', 'eli.bendersky']
    pr_nums = ['13272']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue23896'
    versions = ['Python 3.5', 'Python 3.6']

    @elibendersky
    Copy link
    Mannequin Author

    elibendersky mannequin commented Apr 9, 2015

    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.

    @elibendersky elibendersky mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Apr 9, 2015
    @gvanrossum
    Copy link
    Member

    New changeset 4011d86 by Guido van Rossum (Batuhan Taşkaya) in branch 'master':
    bpo-23896: Add a grammar where exec isn't a stmt (bpo-13272)
    4011d86

    @gvanrossum
    Copy link
    Member

    Thanks Batuhan Taşkaya!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant