You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PEP 614: Relaxing Grammar Restrictions On Decorators #83883
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:
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/...
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
Activity
brandtbucher commentedon Feb 20, 2020
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
gvanrossum commentedon Mar 3, 2020
New changeset be501ca by Brandt Bucher in branch 'master':
bpo-39702: Relax grammar restrictions on decorators (PEP-614) (GH-18570)
be501ca
gvanrossum commentedon Mar 3, 2020
I'm guessing there's some doc update that needs to happen now the code has landed.
brandtbucher commentedon Mar 4, 2020
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/...
gvanrossum commentedon Mar 4, 2020
Sounds good. If you feel like it you can submit a PR to the devguide, I'm sure Brett will merge it quickly...
gvanrossum commentedon Mar 7, 2020
New changeset 8f13053 by Brandt Bucher in branch 'master':
bpo-39702: Update the Language Reference (PEP-614) (GH-18802)
8f13053
brandtbucher commentedon Apr 8, 2021
New changeset 1e051a2 by Saiyang Gou in branch 'master':
bpo-39702: Remove dotted_name from decorator documentation (GH-25234)
1e051a2
miss-islington commentedon Apr 8, 2021
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