> There's a slight inconsistency. The names a code object explicitly > calls out as free variables (i.e. references to cells in outer scopes) > are only a subset of the full set of free variables (every referenced > name that isn't a local variable or an attribute). > > >>> from dis import show_code > >>> def outer(): > ... x, y = 1, 2 > ... def inner(): > ... print (x, y, a, b, c.e) > ... return inner > ... > >>> f = outer() > >>> show_code(f) > Nick, did you know that dis.show_code is neither exported by default from the dis module, nor it's documented in its help() or .rst documentation? Neither is code_info(), which is used by show_code(). I wonder if this is intentional. Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20100910/f1091e85/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4