Try Python update

jason.lai at gmail.com jason.lai at gmail.com
Wed Jan 4 06:17:36 EST 2006


> I think that the code constructor (types.CodeType) doesn't take
> co_freevars or co_cellvars as an arg, so I can't directly create a new
> code object from the attribute of the old one with co_freevars and
> co_cellvars.

Yay for hidden documentation:

"code(argcount, nlocals, stacksize, flags, codestring, constants,
names, varnames, filename, name, firstlineno, lnotab[, freevars[,
cellvars]])

Create a code object.  Not for the faint of heart."




More information about the Python-list mailing list