[Python-Dev] Re: Dynamic nested scopes

Tim Peters tim_one@email.msn.com
Thu, 2 Nov 2000 14:54:05 -0500

> I don't think I buy your explanation that Python uses dynamic scope
> for resolving globals.

It's dynamic in the shallow (but real!) sense that it can't be determined to
which of {module scope, builtin scope} a global name resolves today until
runtime.  Indeed, in

def f():
    print len

the resolving scope for "len" may even change with each invocation of f(),
depending on who's playing games with the containing module's __dict__.
That's not "dynamic scoping" in the proper sense of the term, but it's sure

    y'rs  - tim