Scope (?) question
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Wed Jun 16 08:09:07 EDT 2010
On Tue, 15 Jun 2010 15:22:17 -0700, Peter wrote:
> I checked help on execfile and could only find the following
> (mystifying) sentence:
>
> "execfile() cannot be used reliably to modify a function’s locals."
What is mystifying about it? It's short and clear -- execfile cannot be
used to reliably modify a function's local variables.
The *reason* why this is so is complicated, but the fact that it is so is
plain and simple, as you already discovered.
--
Steven
More information about the Python-list
mailing list