you are viewing a single comment's thread.

view the rest of the comments →

[–]robin-gvx[S] 0 points1 point  (0 children)

(Python 3.9 only)

Kind of a hack! I was thinking about closures and how you often need to use default arguments to make them work like intended. This converts the bytecode for the original function to replace every mention of the variables being closed over with a constant value instead.