From 81b888df5419dbdd9e44363e194f97bbf807e165 Mon Sep 17 00:00:00 2001 From: Timothy Poon <62692924+ptim0626@users.noreply.github.com> Date: Sat, 8 Aug 2026 02:42:23 +0100 Subject: [PATCH] gh-155339: Document the change of behaviour about parsing negative numbers from 3.14 in argparse (GH-155340) (cherry picked from commit 8ed1479619a3487af72a7c44bf61c9711370d4da) Co-authored-by: Timothy Poon <62692924+ptim0626@users.noreply.github.com> Co-authored-by: Savannah Ostrowski --- Doc/library/argparse.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 9709d7e4435770..6e3d0fea9ec9b0 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1601,6 +1601,11 @@ argument:: See also :ref:`the argparse howto on ambiguous arguments ` for more details. +.. versionchanged:: 3.14 + Negative-number matching was expanded to include numbers in scientific + notation (``-2.5e-6``), numbers containing underscores (``-1_234.5``), + and complex numbers (``-1.2e-3j``). + .. _prefix-matching: Argument abbreviations (prefix matching)