docstrings

Moshe Zadka moshez at math.huji.ac.il
Thu Apr 20 15:40:12 EDT 2000


On Thu, 20 Apr 2000, Ben Wolfson wrote:

> is there a way to use %c and %s within a docstring, or to add strings
> together in a docstring, so that if some strings are used in all
> docstrings, but might be changed, I can simply change one or two
> variables?

Short answer: no

Long answer: of course, but it'll take some doing.

class a:

	__doc__ = 'hello '*3+'world'

Works fine...

--
Moshe Zadka <mzadka at geocities.com>. 
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com





More information about the Python-list mailing list