From 19ad9f01983d3aa7142565cbd76ec2cf990ce211 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 31 May 2023 13:22:13 +0200 Subject: [PATCH] Update quoting section for Python 3.12 --- en.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/en.ipynb b/en.ipynb index 7206550..6029b40 100644 --- a/en.ipynb +++ b/en.ipynb @@ -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:" ] }, {