This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients kj, paul.j3, rhettinger, sourcedelica
Date 2021-10-25.23:51:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635205863.7.0.520608855602.issue41592@roundup.psfhosted.org>
In-reply-to
Content
A _SubParsersAction is private to the extent that users should not attempt to create it directly, and thus don't need to know the details - beyond what's documented:

"The add_subparsers() method is normally called with no arguments and returns a special action object. This object has a single method, add_parser(), which takes a command name and any ArgumentParser constructor arguments, and returns an ArgumentParser object that can be modified as usual."

All action objects have methods like __call__ and format_usage. The subparsers Action has other methods, but add_parser is the only new "public" method.

There's a tension in writing documentation between getting all details just right, and providing just enough for most users.  As it is, many new users are over whelmed by the documentation.

My understanding is that the "private/public" designation is a convenience for users, and not enforced by Python developers.  

I gather though that some corporate users have policies that prohibit modification of "private" objects, supposedly due to a fear that Python could modify or eliminate those objects without proper notification.  Somehow the "public" documentation sets that part of the code in stone.  My experience here is that it's easier modify the documentation to fit the code than the other way around :)
History
Date User Action Args
2021-10-25 23:51:03paul.j3setrecipients: + paul.j3, rhettinger, sourcedelica, kj
2021-10-25 23:51:03paul.j3setmessageid: <1635205863.7.0.520608855602.issue41592@roundup.psfhosted.org>
2021-10-25 23:51:03paul.j3linkissue41592 messages
2021-10-25 23:51:03paul.j3create