Re: v1.0.2 question
Fri, 06 May 1994 00:08:25 +0200

> >>> f.__members__
> ['func_argcount', 'func_argdefs', 'func_code', 'func_globals', 'func_name']

Warning: func_argcount is usually -1, unless the function has default

> Guido: Know of any other attribute changes we should look for ?

No, I've been pretty conservative (but check ChangeLog to be sure). I
wanted to add a (writable?) func_doc string attribute but we couldn't
agree on the syntax and I dropped the idea for a while. Now that
exprsesions inside functions aren't printed any more maybe someone
could come up with a patch that doesn't require a grammar change -- if
the first statement of the function is a string literal it will be
placed in func_doc, so you can write

def f():
"This function does nothing in particular"

print f.func_doc

and receive output

This function does nothing in particular

> Tommy: Looks like we gotta update newmodule.

That's another one that I won't mind putting in the next release but
"forgot about" in this one...

--Guido van Rossum, CWI, Amsterdam <>
URL: <>