I\'m just learning python and confused when a \"def\" of a function ends?
I see code samples like:
def myfunc(a=4,b=6):
sum = a + b
return su
Interestingly, if you're just typing at the python interactive interpreter, you have to follow a function with a blank line. This does not work:
def foo(x):
return x+1
print "last"
although it is perfectly legal python syntax in a file. There are other syntactic differences when typing to the interpreter too, so beware.