A Python newbie question, why is this syntax invalid:
def f(): pass
That is an error because after the colon you have to put the return value, so:
is equal to:
def f(): return pass
that indeed makes no sense and produces a
SyntaxError as well.