D
Daniel Schüle
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?
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?