Similar to making all your computations in the expressions for default arguments in python (and/or C++) and leaving the function bodies empty. Fancy, but not that mindboggling. What may surprise people is how and when these expressions are evaluated since they differ between languages.
Python default arguments are evaluated only once at function definition, not every function call. It's the source of one interesting WTF for anyone who assumes otherwise:
def foo(a=[]):
a.append(1)
return a
>>> foo()
[1]
>>> foo()
[1, 1]
>>> foo()
[1, 1, 1]