PEP 614: Final (#1437)
This commit is contained in:
parent
a34d674365
commit
89d5db95cf
18
pep-0614.rst
18
pep-0614.rst
|
@ -4,13 +4,13 @@ Version: $Revision$
|
|||
Last-Modified: $Date$
|
||||
Author: Brandt Bucher <brandtbucher@gmail.com>
|
||||
Sponsor: Guido van Rossum <guido@python.org>
|
||||
Status: Accepted
|
||||
Status: Final
|
||||
Type: Standards Track
|
||||
Content-Type: text/x-rst
|
||||
Created: 10-Feb-2020
|
||||
Python-Version: 3.9
|
||||
Post-History: 11-Feb-2020
|
||||
Resolution:
|
||||
Post-History: 11-Feb-2020, 18-Feb-2020, 03-Mar-2020
|
||||
Resolution: https://mail.python.org/archives/list/python-dev@python.org/thread/VSR66MOTCDCY7ZFH4IG7QVFI2JXQQZQ5
|
||||
|
||||
|
||||
Abstract
|
||||
|
@ -27,7 +27,7 @@ Motivation
|
|||
When decorators were first being introduced, `Guido described
|
||||
<https://mail.python.org/archives/list/python-dev@python.org/message/P3JD24UFFPZUUDANOAI6GZAPIGY4CVK7>`_
|
||||
the motivation to limit their syntax as a preference, not a technical
|
||||
requirement:
|
||||
requirement:
|
||||
|
||||
I have a gut feeling about this one. I'm not sure where it comes
|
||||
from, but I have it... So while it would be quite easy to change
|
||||
|
@ -48,7 +48,7 @@ would become more readable, idiomatic, and maintainable if the
|
|||
existing restrictions were relaxed. Slightly modified::
|
||||
|
||||
buttons = [QPushButton(f'Button {i}') for i in range(10)]
|
||||
|
||||
|
||||
# Do stuff with the list of buttons...
|
||||
|
||||
@buttons[0].clicked.connect
|
||||
|
@ -58,7 +58,7 @@ existing restrictions were relaxed. Slightly modified::
|
|||
@buttons[1].clicked.connect
|
||||
def eggs():
|
||||
...
|
||||
|
||||
|
||||
# Do stuff with the list of buttons...
|
||||
|
||||
Currently, these decorations must be rewritten as something like::
|
||||
|
@ -167,7 +167,7 @@ Named Expressions *Need Not* Be Parenthesized
|
|||
Here, the the choice of syntax is unambiguous. :pep:`572` explains
|
||||
why it requires parentheses around top-level expression statements:
|
||||
|
||||
This rule is included to simplify the choice for the user between
|
||||
This rule is included to simplify the choice for the user between
|
||||
an assignment statement and an assignment expression -- there is
|
||||
no syntactic position where both are valid.
|
||||
|
||||
|
@ -205,8 +205,8 @@ exists.
|
|||
Reference Implementation
|
||||
========================
|
||||
|
||||
The author has drafted a CPython implementation, which can be found on
|
||||
`GitHub <https://github.com/brandtbucher/cpython/tree/decorators>`_.
|
||||
The author has written a `CPython implementation
|
||||
<https://github.com/python/cpython/pull/18570>`_.
|
||||
|
||||
|
||||
Copyright
|
||||
|
|
Loading…
Reference in New Issue