def f1(x, y): def g1(): if y: pass return (x, y) return g1 def f2(x, y): def g2(): return (x, y) return g2 g1 = f1(40, 2) g1.__code__ = f2('?', '?').__code__ print(g1())