On 11.01.2005, at 19:35, Alex Martelli wrote:
harold fellermann <[EMAIL PROTECTED]> wrote:
...
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.
x=type('x',(),dict(__doc__='hi there'))
x.__doc__
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", (o
harold fellermann <[EMAIL PROTECTED]> wrote:
...
> 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.
>>> x=type('x',(),dict(__doc__='hi there'))
>>> x.__doc__
'hi there'
Alex
--
http://m
Hello,
does anyone know a way to set the __doc__ string of a new style class?
Any attempt I tried results in the following error:
Python 2.4 (#1, Dec 30 2004, 08:00:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more informati