From 99ead5c7ce1e9f7cee2f142643a71adfb2e394e7 Mon Sep 17 00:00:00 2001 From: kovan Date: Tue, 3 Feb 2026 23:11:01 +0100 Subject: [PATCH] gh-69223: Document that add_argument returns an Action object Add documentation noting that ArgumentParser.add_argument() returns an Action object, which can be used for further customization or inspection of argument properties. Co-Authored-By: Claude Opus 4.5 --- Doc/library/argparse.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index f4109fe0e5f2bf..821c8ebe2663ba 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -706,6 +706,10 @@ The add_argument() method * deprecated_ - Whether or not use of the argument is deprecated. + The method returns an :class:`Action` object representing the argument. + This object can be used to further customize behavior or to inspect + argument properties. + The following sections describe how each of these are used.