3 ms·
time.time() is a specific case, but let's say I had very_expensive_function_to_call() as a default value. I would want that function to be called once at parse
by herge 13y ago
time.time() is a specific case, but let's say I had very_expensive_function_to_call() as a default value. I would want that function to be called once at parse time, and the value to be kept going forward, instead of calling the function each time.
Both ways have their advantages, python (and the python implementations) just fell one way instead of another.