Today I am facing a strange bug about the built in function min().
I noticed that was being rewritten during the execution of my program, so I started to look for in every function of the stack when min() gets overwritten (print(min.__module__)), and I got
UnboundLocalError: local variable 'min' referenced before assignment
I am still debugging and going back and forth between commits to check what is causing the problem. The program depends on different modules, but the modules are the same as the last time that the program was successful.
I wonder, how is it possible to delete the builtin "min"? I am sure I have not declared any variable with that name, and even if I had, the error would be different.
del min should restore the builtin (but in my case I get the error above)
builtins['min'] works (in 2 of the 3 systems where I tried)
Any idea of how this is possible?