On Wed, 8 Feb 2023 at 10:18, Mark Bourne wrote:
>
> Stefan Ram wrote:
> > Mark Bourne writes:
> >> In the second case, eval() only gets the globals and immediate locals,
> >
> >Yes, I think you are right. Curiously, the following program would
> >mislead one to thing that eval /does/ see
Stefan Ram wrote:
Mark Bourne writes:
In the second case, eval() only gets the globals and immediate locals,
Yes, I think you are right. Curiously, the following program would
mislead one to thing that eval /does/ see the intermediate names:
main.py
def f():
x = 22
def g(
Stefan Ram wrote:
When one defines a function, sometimes its name is only
half-existent.
One can implicitly evaluate the name of the function:
main.py
def g():
def f():
print( f )
f()
g()
output
.f at ...
, but one gets an error when one tries to evaluate