PEP 701: Fix typos (#3054)

This commit is contained in:
Marta Gómez Macías 2023-03-13 23:45:02 +01:00 committed by GitHub
parent f7332e7226
commit 3cd0c13c86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -477,9 +477,9 @@ Here are some of the arguments in favour:
* Code generators (like `ast.unparse <https://docs.python.org/3/library/ast.html#ast.unparse>`_ from standard library) in their
current form rely on complicated algorithms to ensure expressions within an f-string are properly suited for the context in
which they are being used. These non-trivial algorithms come with challanges such as finding an unused quote type (by tracking
which they are being used. These non-trivial algorithms come with challenges such as finding an unused quote type (by tracking
the outer quotes), and generating string representations which would not include backslashes if possible. Allowing quote reuse
and backslashes would simplify the code generators which deals with f-strings considerably, as the regular Python expression logic
and backslashes would simplify the code generators which deal with f-strings considerably, as the regular Python expression logic
can be used inside and outside of f-strings without any special treatment.
* Limiting quote reuse will considerably increase the complexity of the implementation of the proposed changes. This is because
@ -559,7 +559,7 @@ Rejected Ideas
>>> f'Useless use of lambdas: { lambda x: x*2 }'
SyntaxError: unexpected EOF while parsing
The reason is that this would this will introduce a considerable amount of
The reason is that this will introduce a considerable amount of
complexity for no real benefit. This is due to the fact that the ``:`` character
normally separates the f-string format specification. This format specification
is currently tokenized as a string. As the tokenizer MUST tokenize what's on the