how to set doc-string of new-style classes
__peter__ at web.de
Tue Jan 11 13:37:46 EST 2005
harold fellermann wrote:
> programm execution and should therefore be forbidden!" But, I cannot
> even find out a way to set the doc string, when I CREATE a class using
> type(name,bases,dict) ... At least this should be possible, IMHO.
That's what the dict parameter is for:
>>> T = type("T", (object,), dict(__doc__="what you want"))
'what you want'
More information about the Python-list