From 96726c23de6fb8e731e370a2886597ac222747c2 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 1549949c458fe32..9068190617ff872 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1624,6 +1624,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)