Skip to content

Commit

Permalink
Update quoting section for Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed May 31, 2023
1 parent bf89020 commit 19ad9f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion en.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,9 @@
"source": [
"### Quotes usage\n",
"\n",
"If you need to use single quotes inside an f-string, the easiest way is to use double-quotes for the string (and vice-versa), like with ordinary strings:"
"[Starting with Python 3.12](https://docs.python.org/3.12/whatsnew/3.12.html#pep-701-syntactic-formalization-of-f-strings), nested quotes (as well as backslashes) are freely allowed inside of `{...}` in an f-string ([PEP 701 – Syntactic formalization of f-strings](https://peps.python.org/pep-0701/)).\n",
"\n",
"For Python versions before 3.12, if you need to use single quotes inside an f-string, the easiest way is to use double-quotes for the string (and vice-versa), like with ordinary strings:"
]
},
{
Expand Down

0 comments on commit 19ad9f0

Please sign in to comment.