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
Reuben Thomas added the comment:
(Tested with Python 3.9.4.)
--
___
Python tracker
<https://bugs.python.org/issue43942>
___
___
Python-bugs-list mailin
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:
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
Change by Reuben Thomas :
--
components: +Library (Lib)
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue43875>
___
___
Python-bugs-list m
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
Reuben Thomas added the comment:
Thanks for the hint; could this be documented, please?
--
___
Python tracker
<https://bugs.python.org/issue41854>
___
___
Pytho
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
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
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'
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>
___
___
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
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
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
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!
--
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
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
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
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
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
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
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
22 matches
Mail list logo