PEP 675: add "Type" to title and add post history (#2325)
Also adjust the wording of the first line of the Abstract. I changed "static type annotations" to "type annotations" since the "static" part is redundant.
This commit is contained in:
parent
53d8f247ca
commit
b57ebdbd81
10
pep-0675.rst
10
pep-0675.rst
|
@ -1,5 +1,5 @@
|
||||||
PEP: 675
|
PEP: 675
|
||||||
Title: Arbitrary Literal Strings
|
Title: Arbitrary Literal String Type
|
||||||
Version: $Revision$
|
Version: $Revision$
|
||||||
Last-Modified: $Date$
|
Last-Modified: $Date$
|
||||||
Author: Pradeep Kumar Srinivasan <gohanpra@gmail.com>, Graham Bleaney <gbleaney@gmail.com>
|
Author: Pradeep Kumar Srinivasan <gohanpra@gmail.com>, Graham Bleaney <gbleaney@gmail.com>
|
||||||
|
@ -10,14 +10,14 @@ Type: Standards Track
|
||||||
Content-Type: text/x-rst
|
Content-Type: text/x-rst
|
||||||
Created: 30-Nov-2021
|
Created: 30-Nov-2021
|
||||||
Python-Version: 3.11
|
Python-Version: 3.11
|
||||||
Post-History:
|
Post-History: 07-Feb-2022
|
||||||
|
|
||||||
Abstract
|
Abstract
|
||||||
========
|
========
|
||||||
|
|
||||||
Using static type annotations, there is currently no way to specify
|
There is currently no way to specify, using type annotations, that a
|
||||||
that a function parameter can be of any literal string type.
|
function parameter can be of any literal string type. We have to
|
||||||
We have to specify the precise literal string, such as
|
specify a precise literal string type, such as
|
||||||
``Literal["foo"]``. This PEP introduces a supertype of literal string
|
``Literal["foo"]``. This PEP introduces a supertype of literal string
|
||||||
types: ``LiteralString``. This allows a function to accept arbitrary
|
types: ``LiteralString``. This allows a function to accept arbitrary
|
||||||
literal string types, such as ``Literal["foo"]`` or
|
literal string types, such as ``Literal["foo"]`` or
|
||||||
|
|
Loading…
Reference in New Issue