Maybe a weird question. Say I have code like this:
def foo():
print "Foo"
def bar(x):
print x
func = foo
func()
func = bar
arg = 'a'
func(arg)
is there a way to have an "empty" argument, so that I can call assign foo() to func and then still call func(arg)?
Not just a workaround like
if arg is None:
func()
else:
func(arg)