motivate the use of [...] instead of various alternatives.
This commit is contained in:
parent
d9c3ed0cce
commit
f25aa6ef73
14
pep-0318.txt
14
pep-0318.txt
|
@ -206,6 +206,20 @@ effects of the list, is already legal and thus creates a special case.
|
|||
http://python.org/sf/926860
|
||||
|
||||
|
||||
Why [...]?
|
||||
----------
|
||||
|
||||
For syntax options which use a list-like syntax to specify the
|
||||
decorators a few alternatives have been proposed: '[|...|]',
|
||||
'*[...]*', and '<...>'. None have gained traction. The alternatives
|
||||
which involve square brackets only serve to make it obvious that the
|
||||
decorator construct is not a list. They do nothing to make parsing
|
||||
any easier. The '<...>' alternative presents parsing problems because
|
||||
'<' and '>' already parse as un-paired. They present a further
|
||||
parsing ambiguity because a right angle bracket might be a greater
|
||||
than symbol instead of a closer for the decorators.
|
||||
|
||||
|
||||
Current Implementation
|
||||
======================
|
||||
|
||||
|
|
Loading…
Reference in New Issue