summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.8.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/whatsnew/3.8.rst')
-rw-r--r--Doc/whatsnew/3.8.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index d6388f8..874b9b1 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -148,6 +148,20 @@ extensions compiled in release mode and for C extensions compiled with the
stable ABI.
(Contributed by Victor Stinner in :issue:`36722`.)
+f-strings now support = for quick and easy debugging
+-----------------------------------------------------
+
+Add ``=`` specifier to f-strings. ``f'{expr=}'`` expands
+to the text of the expression, an equal sign, then the repr of the
+evaluated expression. So::
+
+ x = 3
+ print(f'{x*9 + 15=}')
+
+Would print ``x*9 + 15=42``.
+
+(Contributed by Eric V. Smith and Larry Hastings in :issue:`36817`.)
+
Other Language Changes
======================