Skip to content

Commit 99ead5c

Browse files
kovanclaude
andcommitted
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 <noreply@anthropic.com>
1 parent 7e2c9bd commit 99ead5c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/argparse.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,10 @@ The add_argument() method
706706

707707
* deprecated_ - Whether or not use of the argument is deprecated.
708708

709+
The method returns an :class:`Action` object representing the argument.
710+
This object can be used to further customize behavior or to inspect
711+
argument properties.
712+
709713
The following sections describe how each of these are used.
710714

711715

0 commit comments

Comments
 (0)