anonymous functions,classes?

Peter Bismuti peterb at cortland.com
Wed Nov 14 11:38:37 EST 2001


Anonymous was the word I was looking for in my previous post.  I want to
pass a function as an argument but don't want to have to define it globally.
The way I don't want to do it:

def foo():
    pass
callFunction(foo)

The way I want to do it:

    callFunction(def foo(): pass)


I'm guessing this can't be done because of Python's indenting syntax.





More information about the Python-list mailing list