<div dir="ltr"><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;"><div><div class="h5">> My intention in this post was to clarify whether I'm misunderstanding<br>
> something or the term 'free' is indeed used for different things in<br>
> different places. If this is the latter, IMHO it's an inconsistency, even if<br>
> a small one. When I read the code I saw 'free' I went to the docs only to<br>
> read that 'free' is something else. This was somewhat confusing.<br>
<br>
</div></div>I'm still not clear if my explanation that globals are a subset of<br>
free variables got rid of the confusion. The full name for what<br>
CPython marks as "free" would be "free but not global" but that's too<br>
much of a mouthful.<br></blockquote><div><br>Yes, I understand it now. The source code of symtable.c has a long comment above the SET_SCOPE macro which says, among other things: "An implicit global is a free variable for which the compiler has found no binding in an enclosing function scope", which is in tune with what you said. <br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Also you're digging awfully deep into the implementation here -- <br></blockquote><div><br>Indeed, it all started when I set to understand how symbol tables are implemented in CPython. The inconsistency in the usage of "free" confused me, so I consulted pydev for clarification. I'm no longer confused :-)<br>
<br>Regards,<br>Eli<br> <br></div></div><br></div>