![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: Documenting extension modules?
From: Francois De Serres <fdeserres@gmx.net>
Date: Fri Jul 15 2005 - 14:31:03 CEST
Simon Dahlbacka wrote:
>Re: assigning a PyStr object to __doc__, take a look at Py_InitModule3,
>Then you have the PyDoc_STRVAR macro in python.h that you might want to
PS: The following snip from http://python.fyxm.net/peps/pep-0007.html
- Use the PyDoc_STR() or PyDoc_STRVAR() macro for docstrings to
For C code that needs to support versions of Python older than
#ifndef PyDoc_STR
- The first line of each fuction docstring should be a "signature
PyDoc_STRVAR(myfunction__doc__,
Always include a blank line between the signature line and the
If the return value for the function is always None (because
- When writing multi-line docstrings, be sure to always use
PyDoc_STRVAR(myfunction__doc__,
Though some C compilers accept string literals without either:
/* BAD -- don't do this! */
not all do; the MSVC compiler is known to complain about this.
|