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:
Pradeep Kumar 2022-02-15 12:40:49 -08:00 committed by GitHub
parent 53d8f247ca
commit b57ebdbd81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
PEP: 675
Title: Arbitrary Literal Strings
Title: Arbitrary Literal String Type
Version: $Revision$
Last-Modified: $Date$
Author: Pradeep Kumar Srinivasan <gohanpra@gmail.com>, Graham Bleaney <gbleaney@gmail.com>
@ -10,14 +10,14 @@ Type: Standards Track
Content-Type: text/x-rst
Created: 30-Nov-2021
Python-Version: 3.11
Post-History:
Post-History: 07-Feb-2022
Abstract
========
Using static type annotations, there is currently no way to specify
that a function parameter can be of any literal string type.
We have to specify the precise literal string, such as
There is currently no way to specify, using type annotations, that a
function parameter can be of any literal string type. We have to
specify a precise literal string type, such as
``Literal["foo"]``. This PEP introduces a supertype of literal string
types: ``LiteralString``. This allows a function to accept arbitrary
literal string types, such as ``Literal["foo"]`` or