[Python-ideas] Explicit variable capture list
Stefan Krah
skrah.temporarily at gmail.com
Sat Jan 23 15:03:35 EST 2016
Guido van Rossum <guido at ...> writes:
>> I've never liked the use of "late binding" in this context. The
>> behavior is totally standard for closures that use mutable values.
>
>
> I wonder if the problem isn't that "binding" is a term imported from a
different language philosophy, and the idea there is just fundamentally
different from Python's philosophy about variables.
I think my point is that even if "late binding" is the best term
for Python's symbol resolution scheme, it may not be optimal to
use it as an explanation for this particular closure behavior, since
all languages with mutable closures behave in the same manner (and
most of them would be classified as "early binding" languages).
Stefan Krah
More information about the Python-ideas
mailing list