I have this Python 3 pseudo code:
def f1():
a, b, c, d, e, f = some_other_fn()
if (condition):
f2(a, b, c, d, e, f)
def f2(a, b, c, d, e, f):
complex_set_of_operations_with(a, b, c, d, e, f)
for i in range(1000):
f(1)
Now I am a little annoyed by the long signature and repetition in f2()and would like to include this in f1():
def f1():
def f2():
complex_set_of_operations_with(a, b, c, d, e, f)
a, b, c, d, e, f = some_other_fn()
if (condition):
f2()
for i in range(1000):
f(1)
Now my question is: if I run a f1()thousand times, should the interpreter parse a f2()thousand times, or is it smart enough to create a link for reuse?