None

Daniel Schüle for_usenet2000 at yahoo.de
Sat Nov 1 16:00:29 EST 2003


Hi NG



def executer(func, para):
 func(para)

def foo():
 print "function without parameter"

def bar(a):
 print "function with 1 parameter"
 print a

#executer(foo, None)    #error

executer(bar, 100)

print type(foo)
print type(bar)
#seem to have the same type, though one takes parameter and the other doesnt


does this mean that None *is* a value
some special value to show that variable cant be initialized with more
appreciate value
at this stage?

is there a way to allow parameterless functions as parameter in executer?

--
Daniel






More information about the Python-list mailing list