Eric Snow <ericsnowcurren...@gmail.com> added the comment: See: http://hg.python.org/cpython/file/default/Include/funcobject.h#l34 http://hg.python.org/cpython/file/default/Objects/funcobject.c#l454
454 /* func_new() maintains the following invariants for closures. The 455 closure must correspond to the free variables of the code object. 456 457 if len(code.co_freevars) == 0: 458 closure = NULL 459 else: 460 len(closure) == len(code.co_freevars) 461 for every elt in closure, type(elt) == cell 462 */ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13062> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com