Message282878
Yes, the information that `add_argument` returns a Action object is missing from the documentation. It might be useful addition.
The documentation has many faults. It isn't basic enough to be a tutorial, but many first time users use it as such, and get confused by its complexity. But it also is not a formal reference document. And the automatic 'help(argparse)' isn't much better.
A regular user does not need to use the Action object directly. But as a developer I often test argparse in an interactive shell (IPython), and the 'out' line shows a 'str' of the object (as a summary of its attributes). So assigning that object to a variable is just as natural to me as saving the parser object returned by argparse.ArgumentParser, or the group object returned by parser.add_argument_group. |
|
Date |
User |
Action |
Args |
2016-12-10 21:30:30 | paul.j3 | set | recipients:
+ paul.j3, r.david.murray, Sworddragon |
2016-12-10 21:30:30 | paul.j3 | set | messageid: <1481405430.32.0.263370362098.issue25035@psf.upfronthosting.co.za> |
2016-12-10 21:30:30 | paul.j3 | link | issue25035 messages |
2016-12-10 21:30:29 | paul.j3 | create | |
|