← 输入框|github.com|刷新
Skip to content

PEP 614: Relaxing Grammar Restrictions On Decorators #83883

Closed

Description

@brandtbucher
BPO 39702
Nosy @gvanrossum, @miss-islington, @brandtbucher, @gousaiyang, @shankarj67
PRs
  • bpo-39702: Relax grammar restrictions on decorators (PEP 614). #18570
  • bpo-39702: Update the Language Reference (PEP 614). #18802
  • bpo-39868: Add the documentation for Assignment Expressions (PEP 572). #18851
  • bpo-39702: Remove dotted_name from decorator documentation #25234
  • [3.9] bpo-39702: Remove dotted_name from decorator documentation (GH-25234) #25290
  • 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 = 'https://github.com/brandtbucher'
    closed_at = <Date 2020-03-07.19:13:10.129>
    created_at = <Date 2020-02-20.16:12:25.133>
    labels = ['interpreter-core', 'type-feature', '3.9']
    title = 'PEP 614: Relaxing Grammar Restrictions On Decorators'
    updated_at = <Date 2021-04-08.23:04:03.217>
    user = 'https://github.com/brandtbucher'

    bugs.python.org fields:

    activity = <Date 2021-04-08.23:04:03.217>
    actor = 'miss-islington'
    assignee = 'brandtbucher'
    closed = True
    closed_date = <Date 2020-03-07.19:13:10.129>
    closer = 'brandtbucher'
    components = ['Interpreter Core']
    creation = <Date 2020-02-20.16:12:25.133>
    creator = 'brandtbucher'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39702
    keywords = ['patch']
    message_count = 8.0
    messages = ['362328', '363311', '363312', '363319', '363324', '363612', '390568', '390570']
    nosy_count = 5.0
    nosy_names = ['gvanrossum', 'miss-islington', 'brandtbucher', 'gousaiyang', 'shankarj67']
    pr_nums = ['18570', '18802', '18851', '25234', '25290']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue39702'
    versions = ['Python 3.9']

    Activity

    1. brandtbucher commented on Feb 20, 2020

      @brandtbucher
      MemberAuthor

      The attached PR implements PEP-614's revised grammar for decorators, with tests. In short:

      decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE

      becomes

      decorator: '@' namedexpr_test NEWLINE

      I'm marking it as DO-NOT-MERGE until the PEP is accepted, but code review is still appreciated. Discussion of the PEP itself should go to the Python-Dev thread:

      https://mail.python.org/archives/list/python-dev@python.org/thread/SLKFAR56RA6A533O5ZOZ7XTJ764EMB7I

    2. self-assigned this
      on Feb 20, 2020
    3. added
      interpreter-core
      type-feature
      3.9 (EOL)
      on Feb 20, 2020
    4. self-assigned this
      on Feb 20, 2020
    5. added
      interpreter-core
      type-feature
      on Feb 20, 2020
    6. gvanrossum commented on Mar 3, 2020

      @gvanrossum
      Member

      New changeset be501ca by Brandt Bucher in branch 'master':
      bpo-39702: Relax grammar restrictions on decorators (PEP-614) (GH-18570)
      be501ca

    7. gvanrossum commented on Mar 3, 2020

      @gvanrossum
      Member

      I'm guessing there's some doc update that needs to happen now the code has landed.

    8. brandtbucher commented on Mar 4, 2020

      @brandtbucher
      MemberAuthor

      Agreed. I'll have something up later, hopefully.

      I'll add a tiny blurb to whatsnew, as well as adding the PEP to the "See also:" note in https://docs.python.org/3.9/reference/compound_stmts.html and updating the mini-grammar there. I don't think it needs much else.

      Hmmm. It looks like the page of the docs that I've linked above wasn't ever updated for the walrus. We should probably add updating this part of the docs to https://devguide.python.org/grammar/...

    9. gvanrossum commented on Mar 4, 2020

      @gvanrossum
      Member

      Sounds good. If you feel like it you can submit a PR to the devguide, I'm sure Brett will merge it quickly...

    10. gvanrossum commented on Mar 7, 2020

      @gvanrossum
      Member

      New changeset 8f13053 by Brandt Bucher in branch 'master':
      bpo-39702: Update the Language Reference (PEP-614) (GH-18802)
      8f13053

    11. brandtbucher commented on Apr 8, 2021

      @brandtbucher
      MemberAuthor

      New changeset 1e051a2 by Saiyang Gou in branch 'master':
      bpo-39702: Remove dotted_name from decorator documentation (GH-25234)
      1e051a2

    12. miss-islington commented on Apr 8, 2021

      @miss-islington
      Contributor

      New changeset a9228d0 by Miss Islington (bot) in branch '3.9':
      [3.9] bpo-39702: Remove dotted_name from decorator documentation (GH-25234) (GH-25290)
      a9228d0

    13. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.9 (EOL)interpreter-coretype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions