Can someone explain why /prog/ thinks this is a bad thing? Who the fuck *doesn't* indent their code? And why do we need brackets if the code blocks are already defined by indentation? Makes perfect sense to me.
Name:
Anonymous2007-06-26 12:49 ID:8XMUKpjf
>>25
You can return more than one item in Python. For example:
def f(x):
return x, x + 1
def g(x, y):
print "I've got %d and %d" % (x, y)
#Call function saving its values
x, y = f(3)
#Call function capturing its values in a single tuple
x = f(3)
#Call function passing its two results to another function
g(*f(3))