Skip to content

Commit 93a9286

Browse files
Apply suggestions from code review
Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent 2c3ab81 commit 93a9286

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Doc/whatsnew/3.12.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ inside f-strings can now be any valid Python expression including backslashes,
146146
unicode escaped sequences, multi-line expressions, comments and strings reusing the
147147
same quote as the containing f-string. Let's cover these in detail:
148148

149-
* Quote reuse: in Python 3.11, reusing the same quotes as the contaning f-string
149+
* Quote reuse: in Python 3.11, reusing the same quotes as the containing f-string
150150
raises a :exc:`SyntaxError`, forcing the user to either use other available
151-
quotes (like using double quotes or triple quites if the f-string uses single
152-
quites). In Python 3.12, you can now do things like this:
151+
quotes (like using double quotes or triple quotes if the f-string uses single
152+
quotes). In Python 3.12, you can now do things like this:
153153

154154
>>> songs = ['Take me back to Eden', 'Alkaline', 'Ascensionism']
155155
>>> f"This is the playlist: {", ".join(songs)}"
@@ -158,7 +158,7 @@ same quote as the containing f-string. Let's cover these in detail:
158158
Note that before this change there was no explicit limit in how f-strings can
159159
be nested, but the fact that string quotes cannot be reused inside the
160160
expression component of f-strings made it impossible to nest f-strings
161-
arbitrarily. In fact, this is the most nested-fstring that can be written:
161+
arbitrarily. In fact, this is the most nested f-string that could be written:
162162

163163
>>> f"""{f'''{f'{f"{1+1}"}'}'''}"""
164164
'2'
@@ -1280,10 +1280,10 @@ Changes in the Python API
12801280

12811281
* The output of the :func:`tokenize.tokenize` and :func:`tokenize.generate_tokens`
12821282
functions is now changed due to the changes introduced in :pep:`701`. This
1283-
means that ``STRING`` tokens are not emited anymore for f-strings and the
1283+
means that ``STRING`` tokens are not emitted any more for f-strings and the
12841284
tokens described in :pep:`701` are now produced instead: ``FSTRING_START``,
1285-
``FSRING_MIDDLE`` and ``FSTRING_END`` are now emited for f-string "string"
1286-
parts in addition to the the apropiate tokens for the tokenization in the
1285+
``FSRING_MIDDLE`` and ``FSTRING_END`` are now emitted for f-string "string"
1286+
parts in addition to the appropriate tokens for the tokenization in the
12871287
expression components. For example for the f-string ``f"start {1+1} end"``
12881288
the old version of the tokenizer emitted::
12891289

@@ -1301,7 +1301,7 @@ Changes in the Python API
13011301
1,13-1,17: FSTRING_MIDDLE ' end'
13021302
1,17-1,18: FSTRING_END '"'
13031303

1304-
Aditionally, final ``DEDENT`` tokens are now emited within the bounds of the
1304+
Aditionally, final ``DEDENT`` tokens are now emitted within the bounds of the
13051305
input. This means that for a file containing 3 lines, the old version of the
13061306
tokenizer returned a ``DEDENT`` token in line 4 whilst the new version returns
13071307
the token in line 3.

0 commit comments

Comments
 (0)