Learning Python: Chapter 15
Thursday, 21 February 2008
A function definition may be put inside an if-block.
if DEBUG:
def do_something():
print ‘useful debug information’
do_some_work()
else:
def do_something():
do_some_work()
Let there be snüppets!
Thursday, 21 February 2008
A function definition may be put inside an if-block.
if DEBUG:
def do_something():
print ‘useful debug information’
do_some_work()
else:
def do_something():
do_some_work()