PEP 614

E905021

PEP 614 is a Python Enhancement Proposal that relaxes the grammar restrictions on decorator syntax, allowing more flexible and expressive decorator expressions in Python.

Try in SPARQL Jump to: Statements Referenced by

Statements (48)

Predicate Object
instanceOf Python Enhancement Proposal
affects Python grammar specification NERFINISHED
Python parser
allows decorators using attribute access on arbitrary expressions
decorators using comprehensions when they form valid expressions
decorators using conditional expressions
decorators using indexing and slicing
decorators using subscripting expressions
author Anthony Sottile NERFINISHED
Brett Cannon NERFINISHED
Pablo Galindo NERFINISHED
Serhiy Storchaka NERFINISHED
Łukasz Langa NERFINISHED
backwardsCompatibility fully backwards compatible
bdflDelegate Pablo Galindo NERFINISHED
category Core Python NERFINISHED
changes allows any valid expression in decorator position
removes special-casing of dotted names and calls in decorator grammar
createdForVersion Python 3.9 NERFINISHED
discussionsTo python-dev mailing list
doesNotChange meaning of @ symbol in Python
order of decorator evaluation
runtime semantics of decorators
governsSyntaxElement decorator GENERATED
decorator_list in function and class definitions GENERATED
hasTitle Relaxing Grammar Restrictions On Decorators NERFINISHED
implementedInVersion Python 3.9 NERFINISHED
language English
motivation allow arbitrary expressions in decorator syntax
remove unnecessary grammar limitations on decorators
pepNumber 614
proposesChange relax grammar restrictions on decorator syntax
rationale make decorator syntax more consistent with general expression syntax
simplify the grammar for decorators
relatedTo PEP 617 NERFINISHED
Python 3.9 release
relatesToConcept Python decorators
Python grammar
syntax restrictions
relatesToFeature decorator syntax GENERATED
repository Python PEPs repository
requires no code changes for existing decorators
resolution Accepted for Python 3.9
sponsor Pablo Galindo NERFINISHED
status Final
targetsLanguage Python NERFINISHED
type Standards Track
url https://peps.python.org/pep-0614/

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

Python 3.10 implementsPEP PEP 614