summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2021-09-24 15:18:04 (GMT)
committerGitHub <noreply@github.com>2021-09-24 15:18:04 (GMT)
commit8d8729146f21f61af66e70d3ae9501ea6bdccd09 (patch)
treeed5905df6eb9d2bbab7513b966039cc0642635ca /Misc
parent3f8b23f8ddab75d9b77a3997d54e663187e12cc8 (diff)
downloadcpython-8d8729146f21f61af66e70d3ae9501ea6bdccd09.zip
cpython-8d8729146f21f61af66e70d3ae9501ea6bdccd09.tar.gz
cpython-8d8729146f21f61af66e70d3ae9501ea6bdccd09.tar.bz2
bpo-20524: adds better error message for `.format()` (GH-28310)
It now lists the bad format_spec and the type of the object.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2021-09-13-14-59-01.bpo-20524.PMQ1Fh.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-09-13-14-59-01.bpo-20524.PMQ1Fh.rst b/Misc/NEWS.d/next/Library/2021-09-13-14-59-01.bpo-20524.PMQ1Fh.rst
new file mode 100644
index 0000000..9a41c8e
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2021-09-13-14-59-01.bpo-20524.PMQ1Fh.rst
@@ -0,0 +1,3 @@
+Improves error messages on ``.format()`` operation for ``str``, ``float``,
+``int``, and ``complex``. New format now shows the problematic pattern and
+the object type.