anonymous functions? class?

Peoter Veliki peoter_veliki at
Thu Nov 15 23:08:11 CET 2001

I'd like to be able to use a function as an argument without declaring it externally.  
This is what I don't want to do:

def func():

I want to do this:

callFunc(def func():pass)

I'm guessing this can't be done because of python's indentation syntax.  In ECMAscript (JavaScript) you can do this:

callFunc( new func(){ blah blah } ) 

or something like that. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list