[issue41980] Argparse documentation is slightly misleading
Yannick Gingras added the comment: Raymond, I would love to submit the PR if we reach a consensus on what the new message should be. I'm a bit out of touch with how things work these days. Is Github the best place to submit the PR? Paul, very good digging! Reading the coding and running a few examples, I understand that the ``prog`` of the subparser is always the name of the main program with the name of the subcommand *unless* a usage string is supplied, in which case it overrides prog. I suspect that the intent is to favour the programmer supplied usage string and that copying the usage string in the prog of the subparser is an implementation detail. I think we can reword the documentation to describe the expected behavior with more emphasis on the common cases. -- ___ Python tracker <https://bugs.python.org/issue41980> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41980] Argparse documentation is slightly misleading
New submission from Yannick Gingras : In argparse.rst, while documenting ArgumentParser.add_subparsers, ``prog`` is described on line 1630 as: usage information that will be displayed with sub-command help, by default the name of the program and any positional arguments before the subparser argument This is confusing since ``prog`` is actually a very small prefix of the usage message. Describing this parameter as "name of the program" or event "name of the program with sub-commands" would be more clear. -- components: Library (Lib) messages: 378316 nosy: ygingras priority: normal severity: normal status: open title: Argparse documentation is slightly misleading versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue41980> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2204] document ConfigParser behaviour when a file has same section multiple times
Yannick Gingras yging...@ygingras.net added the comment: The attached patch is a proof of concept for throwing an exception. As discussed on the mailing list [1], it has some shortcomings that should be addressed before it is merged. [1]: http://mail.python.org/pipermail/python-dev/2009- -- keywords: +patch nosy: +ygingras Added file: http://bugs.python.org/file12938/no-dups-configparser.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__()
New submission from Yannick Gingras [EMAIL PROTECTED]: EnvironmentError and its subclass OSError add the value of errno in their error message. This value is an integer but the specific value in an implementation detail and the C runtime recommends that programmers use the symbolic values instead. Ex: one should use ENODATA instead of 61. For the same reason, the Python interpreter should try to return the symbolic value or errno when possible. The attached patch replaces errno in EnvironmentError.__str__() by its symbolic value when possible. -- components: Interpreter Core files: python-26-sympolic-errno.diff keywords: patch messages: 67074 nosy: ygingras severity: normal status: open title: Patch to print symbolic value or errno in EnvironmentError.__str__() versions: Python 2.6 Added file: http://bugs.python.org/file10377/python-26-sympolic-errno.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2920 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com