I had a function defined, but it did not have any content apart from its function comments...
def foo(bar): # Some awesome temporary comment. # But there is actually nothing in the function! # D'Oh!
It yelled:
File "foobar.py", line 69 ^ IndentationError: expected an indented block
(note that the line the ^ mark points to is empty)
--
Multiple solutions:
1: Just comment out the function
2: Add function comment
def foo(bar): '' Some awesome comment. This comment could be just one space.''
3: Add a line that does not do anything
def foo(bar): 0
In any case, make sure to make it obvious why it is an empty function - for yourself, or for your peers that will use your code.
View > Indentation > Intent Using Spaces