[issue1059] *args and **kwargs in function definitions

Georg Brandl report at bugs.python.org
Thu Aug 30 10:05:16 CEST 2007


Georg Brandl added the comment:

Lars Gustäbel schrieb:

> For example in tarfile.rst and logging.rst there are function
> definitions using *args and/or **kwargs like:
> 
> .. function:: debug(msg[, *args[, **kwargs]])
> 
> The * and ** should be escaped IMO, so that they are not mistaken as
> reStructuredText markup, which confuses the syntax coloring of my Vim.
> While escaping * with a backslash works fine in normal text, it does not
> work in a function definition and the backslash appears in the HTML output.

This was done deliberately since for C function descriptions

.. cfunction:: PyObject *Py_DoSomething(PyObject *obj1, ...)

it's a PITA to escape all the stars.

The reST highlighting of Vim seems to be insufficient not only in this
regard (inline markup can't span paragraphs); may I convince you to
use a real editor like Emacs? :)

*ducks* Fine, fine, I'll see if I can add backslash processing there.
But I won't add backslashes for all of the existing definitions.

----------
nosy: +georg.brandl

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1059>
__________________________________


More information about the Python-bugs-list mailing list