[C++-sig] pyste and C++ namespaces
Daniel Holth
dholth at fastmail.fm
Tue Jan 27 19:49:04 CET 2004
> This patch allows any keyword arguments to Function() and Class(); if
> you add a doc="the documentation" argument, it adds the docstring to the
> wrapper.
The main downside so far is that if you misspell a keyword argument,
Python will not complain.
Whoops, there should be an additional comma (',') in that docstring
patch.
def escape_docstring(d):
# crude escaping; we should also escape " and special characters.
# we could also expose the function's true name etc. with named
# replacements, %(foo)s and so on.
doc = ', "' + "\\n".join(d.splitlines()) + '"'
return doc
More information about the Cplusplus-sig
mailing list