Abhas Bhattacharya writes:

[...]

> If i call one() and two() respectively, i would like to see "one"
> and "two". I dont have much knowledge of lambda functions, neither
> am i going to use them, so that's something I cant answer.

It's not about lambda. The following does not contain lambda. What
should be name(one)? name(two)? name(foo)? name(fun(1))? name(fun(3))?

def foo():
    return 3

def fun(x):
    def foo(): return x
    return foo

one = fun(1)
two = one

Note that fun(1)() is a valid call where fun(1) is not given any name
outside fun.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to