Jeffrey Harper added the comment:
Martin,
Thanks for your response. I didn't know it was possible to pass freevars and cellvars to new.code. I think the documentation needs to be updated. The documentation for 2.7.3 located at http://docs.python.org/library/new.html?highlight=new#new.code is as follows:
new.code(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab)
After I got your reply to this bug report I did help(new.code) and I see that it includes freevars and cellvars as optional arguments.
----------
assignee: -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
_______________________________________
Python tracker
http://bugs.python.org/issue15251
_______________________________________