From ba2a9295dd7e113f052f1e5ea1d057b662f8ef50 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 15 Feb 2022 02:14:45 +0100 Subject: [PATCH] PEP 675; Establish typing context in the Abstract (#2324) --- pep-0675.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pep-0675.rst b/pep-0675.rst index 272145dbed8..cd88fe88c7a 100644 --- a/pep-0675.rst +++ b/pep-0675.rst @@ -15,11 +15,12 @@ Post-History: Abstract ======== -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 ``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 +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 +``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 ``Literal["bar"]``.