Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
701: List items in order of the bullets, and add a link to f-strings
  • Loading branch information
AA-Turner committed Sep 21, 2023
commit df9d1b340e0b0068aa7855230070302c95353029
9 changes: 5 additions & 4 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ New Features
PEP 701: Syntactic formalization of f-strings
---------------------------------------------

:pep:`701` lifts some restrictions on the usage of f-strings. Expression components
inside f-strings can now be any valid Python expression including backslashes,
unicode escaped sequences, multi-line expressions, comments and strings reusing the
same quote as the containing f-string. Let's cover these in detail:
:pep:`701` lifts some restrictions on the usage of :term:`f-strings <f-string>`.
Expression components inside f-strings can now be any valid Python expression,
including strings reusing the same quote as the containing f-string,
multi-line expressions, comments, backslashes, and unicode escape sequences.
Let's cover these in detail:

* Quote reuse: in Python 3.11, reusing the same quotes as the containing f-string
raises a :exc:`SyntaxError`, forcing the user to either use other available
Expand Down