<div dir="ltr"><br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">There&#39;s a slight inconsistency. The names a code object explicitly<br>


calls out as free variables (i.e. references to cells in outer scopes)<br>
are only a subset of the full set of free variables (every referenced<br>
name that isn&#39;t a local variable or an attribute).<br>
<br>
&gt;&gt;&gt; from dis import show_code<br>
&gt;&gt;&gt; def outer():<br>
...   x, y = 1, 2<br>
...   def inner():<br>
...     print (x, y, a, b, c.e)<br>
...   return inner<br>
...<br>
&gt;&gt;&gt; f = outer()<br>
&gt;&gt;&gt; show_code(f)<br></blockquote></div><br>Nick, did you know that dis.show_code is neither exported by default from the dis module, nor it&#39;s documented in its help() or .rst documentation? Neither is code_info(), which is used by show_code(). I wonder if this is intentional.<br>

<br>Eli<br><br></div>