[issue13540] Document the Action API in argparse

2014-08-23 Thread Jason R. Coombs
Jason R. Coombs added the comment: I have no idea why that would be. I used the same syntax for the Action class as ArgumentParser. From the latest tip: .. class:: ArgumentParser(prog=None, usage=None, description=None, \ epilog=None, parents=[], \

[issue13540] Document the Action API in argparse

2014-08-23 Thread paul j3
paul j3 added the comment: Maybe the problem is with the latest documentation build, not your patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___

[issue13540] Document the Action API in argparse

2014-08-23 Thread paul j3
paul j3 added the comment: You need line continuation characters '\' .. class:: Action(option_strings, dest, nargs=None, const=None, default=None, \ type=None, choices=None, required=False, help=None, \ metavar=None) --

[issue13540] Document the Action API in argparse

2014-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4a6b71d8575e by Terry Jan Reedy in branch '3.4': Issue #13540: add missing markup. http://hg.python.org/cpython/rev/4a6b71d8575e -- ___ Python tracker rep...@bugs.python.org

[issue13540] Document the Action API in argparse

2014-08-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't understand why, but the change worked, and is consistent with similar constructs in the same file. Pushed. Jason -- security-fix-only versions do not get doc patches. They are released as source only. --

[issue13540] Document the Action API in argparse

2014-08-23 Thread paul j3
paul j3 added the comment: While we are talking the Action class, the documentation isn't clear that the 'add_argument' method returns an Action object, specifically one the subclasses. More than once, when answering Stackoverflow questions I've recommended assigning this object to a

[issue13540] Document the Action API in argparse

2014-08-21 Thread paul j3
paul j3 added the comment: The formatting of the descriptor line for this class is not consistent with the classes for this module. It lacks 'class'. It is all bold In contrast class argparse.ArgumentParser(prog=None, ... uses bold for only the name. --

[issue13540] Document the Action API in argparse

2014-08-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: @paul.j3, It wasn't from a different project, it's just that the bug tracker when it does a diff always uses the tip of each branch instead of the most recent common ancestor, so it effectively calculated the the diff of the changes plus the inverse of every

[issue13540] Document the Action API in argparse

2014-08-03 Thread Jason R. Coombs
Changes by Jason R. Coombs jar...@jaraco.com: Removed file: http://bugs.python.org/file36001/9ac347a7f375.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___

[issue13540] Document the Action API in argparse

2014-08-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 956c6d33a57d by Jason R. Coombs in branch '2.7': Issue #13540: Expanded argparse documents to clarify the action API http://hg.python.org/cpython/rev/956c6d33a57d New changeset 008a5473f300 by Jason R. Coombs in branch '2.7': Issue #13540: Removed

[issue13540] Document the Action API in argparse

2014-08-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset e2c9e0a3ef02 by Jason R. Coombs in branch '3.2': Issue #13540: Expanded argparse documents to clarify the action API http://hg.python.org/cpython/rev/e2c9e0a3ef02 New changeset c10a6ca9cb32 by Jason R. Coombs in branch '3.2': Issue #13540: Removed

[issue13540] Document the Action API in argparse

2014-08-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: Commits applied to Python 2.7 and 3.2-3.5. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___

[issue13540] Document the Action API in argparse

2014-07-20 Thread Jason R. Coombs
Changes by Jason R. Coombs jar...@jaraco.com: Added file: http://bugs.python.org/file36001/9ac347a7f375.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___

[issue13540] Document the Action API in argparse

2014-07-20 Thread Jason R. Coombs
Changes by Jason R. Coombs jar...@jaraco.com: Added file: http://bugs.python.org/file36003/b8c09b766e20.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___

[issue13540] Document the Action API in argparse

2014-07-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've made another commit to capture Steven's recommendations. I've also merged the work with the latest 2.7 tip, the result of which is the latest diff. I'll commit this in a week or two if there aren't any objections, though I would appreciate a review and

[issue13540] Document the Action API in argparse

2014-07-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've tried building the docs, but it appears to rely on a local build of Python as well as subversion, neither of which my system can do currently, so I'm hoping someone has a suitable environment to help test the building of the docs. --

[issue13540] Document the Action API in argparse

2014-07-20 Thread paul j3
paul j3 added the comment: I think you want to unlink 9ac347a7f375.diff It's from a different project -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___

[issue13540] Document the Action API in argparse

2014-07-16 Thread Mark Lawrence
Mark Lawrence added the comment: @Paul what is your opinion of this documentation patch? -- nosy: +BreamoreBoy, paul.j3 versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue13540] Document the Action API in argparse

2014-07-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: That's interesting that there's activity on this again. I had forgotten I'd filed it. It's particularly timely, as I just yesterday had this experience again. I looked at the documentation and found it inadequate for me to understand how to implement a

[issue13540] Document the Action API in argparse

2012-03-18 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___ ___

[issue13540] Document the Action API in argparse

2011-12-15 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Sorry about being out of contact (I'm flying back and forth between the US and the EU every 4-5 weeks right now), and thanks Terry for bringing this to my attention. Essentially, the API is: * The argument to action= must be a

[issue13540] Document the Action API in argparse

2011-12-14 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: Most of the Action subclasses in argparse override __init__ and they raise ValueErrors when the parameters aren't as expected for that argument. This was my reason for adding that comment. If the basic Actions require this level of

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: You're right. The documentation isn't incorrect, if you're splitting hairs. But it's not super friendly either. Questions that the documentation should answer: 1) Does the action always need to be a subclass of an Action, or is that

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Changes by Jason R. Coombs jar...@jaraco.com: -- hgrepos: +95 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___ ___ Python-bugs-list mailing

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: I've attached a repository and patch with the recommended changes. I created an additional section that includes the documentation for the Action class (specifically the __init__ and __call__ signatures). I believe this addresses the issues

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Changes by Jason R. Coombs jar...@jaraco.com: -- keywords: +patch Added file: http://bugs.python.org/file23949/956c6d33a57d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___

[issue13540] Document the Action API in argparse

2011-12-13 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: My guess from the way the docs are written now is that subclassing from Action and over-riding just the __call__ method is the intended way, not just the recommended. If so, Action is a quasi-private class, only exposed so it could be

[issue13540] Document the Action API in argparse

2011-12-12 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The doc specified the Action API as the interface inherited from argparse.Action plus the addition of a custom __call__ method with 4 params (5 with self) as described. That seems mostly adequate to me, unless there is something missing in

[issue13540] Document the Action API in argparse

2011-12-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +bethard, eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___ ___

[issue13540] Document the Action API in argparse

2011-12-06 Thread Jason R. Coombs
Changes by Jason R. Coombs jar...@jaraco.com: -- title: Document the Action API - Document the Action API in argparse ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___