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