Lamdba forms

Ant antroy at gmail.com
Thu Apr 20 03:11:57 EDT 2006


Why does the function have to be unnamed? you can easly nest function
definitions and refer to them. IIRC the lambda form is probably going
to be removed at some point, as it is not needed:

def outerfn():
    dostuff()
    def inner(x,y):
        out = (x^y)
        print out
        return out

    my_local_function = inner
    my_local_function(3,4)

outerfn()




More information about the Python-list mailing list