[issue43942] RawDescriptionHelpFormatter seems to be ignored for argument descriptions

2021-05-04 Thread Reuben Thomas
Reuben Thomas added the comment: D'oh! Sorry for the noise. And congratulations to the author/designer of `RawDescriptionHelpFormatter` for designing/implementing exactly what I wanted all along! -- resolution: -> not a bug stage: -> resolved status: ope

[issue43942] RawDescriptionHelpFormatter seems to be ignored for argument descriptions

2021-04-26 Thread Reuben Thomas
Reuben Thomas added the comment: (Tested with Python 3.9.4.) -- ___ Python tracker <https://bugs.python.org/issue43942> ___ ___ Python-bugs-list mailin

[issue43942] RawDescriptionHelpFormatter seems to be ignored for argument descriptions

2021-04-26 Thread Reuben Thomas
New submission from Reuben Thomas : The documentation seems very clear on this subject: "RawTextHelpFormatter maintains whitespace for all sorts of help text, including argument descriptions. However, multiple new lines are replaced with one." But consider the following code:

[issue43875] glob.glob with ** does not always detect symlink loops

2021-04-16 Thread Reuben Thomas
Change by Reuben Thomas : -- title: path.glob with ** does not always detect symlink loops -> glob.glob with ** does not always detect symlink loops ___ Python tracker <https://bugs.python.org/issu

[issue43875] path.glob with ** does not always detect symlink loops

2021-04-16 Thread Reuben Thomas
Change by Reuben Thomas : -- components: +Library (Lib) versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue43875> ___ ___ Python-bugs-list m

[issue43875] path.glob with ** does not always detect symlink loops

2021-04-16 Thread Reuben Thomas
New submission from Reuben Thomas : Example session: $ mkdir foo $ cd foo $ ln -s .. bar $ ln -s .. baz $ python3.9 Python 3.9.0+ (default, Oct 20 2020, 08:43:38) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more informa

[issue41854] argparse.add_mutually_exclusive_group fails for optional positional arguments

2020-10-17 Thread Reuben Thomas
Reuben Thomas added the comment: Thanks for the hint; could this be documented, please? -- ___ Python tracker <https://bugs.python.org/issue41854> ___ ___ Pytho

[issue41856] argparse: auto-generated synopsis omits REMAINDER argument

2020-09-24 Thread Reuben Thomas
Reuben Thomas added the comment: A workaround to help users for now is: >>> parser.add_argument('args', metavar='...', nargs=argparse.REMAINDER) as then at least the help entry corresponds to the synopsis: positional arguments: command ... And with

[issue41856] argparse: auto-generated synopsis omits REMAINDER argument

2020-09-24 Thread Reuben Thomas
New submission from Reuben Thomas : Consider the following example from the Python documentation: >>> parser = argparse.ArgumentParser(prog='PROG') >>> parser.add_argument('--foo') >>> parser.add_argument('command') >>> parser

[issue41854] argparse.add_mutually_exclusive_group fails for optional positional arguments

2020-09-24 Thread Reuben Thomas
New submission from Reuben Thomas : The following code: group = parser.add_mutually_exclusive_group() group.add_argument('--install-only', action='store_true', help='just install the program, do not run it') group.add_argument('args'

[issue37062] `AutoNumber` class in enum documentation: support *args in constructor

2020-09-21 Thread Reuben Thomas
Reuben Thomas added the comment: That's the one I was thinking of: the example in the docs. -- ___ Python tracker <https://bugs.python.org/issue37062> ___ ___

[issue37571] Incorrect use of c_char_p in example code

2019-07-12 Thread Reuben Thomas
New submission from Reuben Thomas : The CTypes documentation has this example: >>> s = c_char_p() >>> s.value = "abc def ghi" >>> s.value 'abc def ghi' >>> s.value is s.value False >>> It appears not to have been updated since

[issue37062] `AutoNumber` class in enum documentation: support *args in constructor

2019-05-26 Thread Reuben Thomas
Reuben Thomas added the comment: Just to be clear, the proposed change to the documentation is simply to add ", *args" to the argument list of AutoNumber.__new__. -- ___ Python tracker <https://bugs.python.o

[issue37062] `AutoNumber` class in enum documentation: support *args in constructor

2019-05-26 Thread Reuben Thomas
New submission from Reuben Thomas : By changing one line of AutoNumber: def __new__(cls): to def __new__(cls, *args): Enums derived from AutoNumber can now support constructors that take named arguments; for example: class Color(AutoNumber): def __init__(self, pantone=None

[issue36799] Typo in ctypes documentation

2019-05-05 Thread Reuben Thomas
Reuben Thomas added the comment: No, as I'm not an active Python contributor, do not aspire to be one, and don't really want to have to learn yet another contribution system to a major project just to fix a trivial typo. Sorry! --

[issue36799] Typo in ctypes documentation

2019-05-04 Thread Reuben Thomas
New submission from Reuben Thomas : "It is possible to defined" → "It is possible to define" -- assignee: docs@python components: Documentation messages: 341419 nosy: docs@python, rrt priority: normal severity: normal status: open title: Typo in ctypes documentation

[issue32666] Valgrind documentation seems to need updating

2018-11-03 Thread Reuben Thomas
Reuben Thomas added the comment: Victor, thanks; that's precisely the sort of thing that would make a useful addition to the docs. -- ___ Python tracker <https://bugs.python.org/is

[issue32666] Valgrind documentation seems to need updating

2018-01-25 Thread Reuben Thomas
New submission from Reuben Thomas : I have just been trying to use Valgrind (in my case, to debug code in a library being tested via a Cython module). It is working fine, but there seem to be some discrepancies between the documentation in README.valgrind and valgrind-python.supp on the one

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-07 Thread Reuben Thomas
Reuben Thomas added the comment: Thanks, that's a simple, robust workaround. I'll duck out now and leave the Python experts to sort out the underlying problem, if they can; I think it's still well worth sorting out, though documenting the problem and workaround would be m

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-06 Thread Reuben Thomas
Reuben Thomas added the comment: > Try `nargs='?'` or try providing a `default` along with the '*'. Why would I do that? I want 0 or more arguments, and there's no default value. > Including your ARGUMENT action in the error message is intentional. It will like

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-04 Thread Reuben Thomas
Reuben Thomas added the comment: Thanks very much for this. It would be great if the redundancy I referred to in the usage message could also be removed, so that instead of "[ARGUMENT [ARGUMENT ...]]" it just said "[ARGUMENT ...]". (Similarly, for a '+' argumen

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-04 Thread Reuben Thomas
New submission from Reuben Thomas: In Python 3.5.2, with a positional argument with nargs='*', running the program with no arguments gives an error like this: usage: caffeinate [-h] [-V] COMMAND [ARGUMENT [ARGUMENT ...]] caffeinate: error: the following arguments are require