PEP 750: Fix code example and CPython version in abstract (#3902)

This commit is contained in:
Lysandros Nikolaou 2024-08-11 13:55:15 +02:00 committed by GitHub
parent e684657472
commit 5393dd6a15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -34,10 +34,10 @@ Tag functions accept prepared arguments and return a string:
def greet(*args): def greet(*args):
"""Tag function to return a greeting with an upper-case recipient.""" """Tag function to return a greeting with an upper-case recipient."""
salutation, recipient, *_ = args salutation, recipient, *_ = args
_, getvalue = recipient getvalue, *_ = recipient
return f"{salutation.title().strip()} {getvalue().upper()}!" return f"{salutation.title().strip()} {getvalue().upper()}!"
Below you can find richer examples. As a note, an implementation based on CPython 3.12 Below you can find richer examples. As a note, an implementation based on CPython 3.14
exists, as discussed in this document. exists, as discussed in this document.
Relationship With Other PEPs Relationship With Other PEPs