3 ms·
I once tried to modify a bigger program in Python. Made by some tight-ass academic who adhered to the discipline. Global variables were bound to the object tree
by timonoko 6y ago
I once tried to modify a bigger program in Python. Made by some tight-ass academic who adhered to the discipline. Global variables were bound to the object tree in most bizarre way. Finally I just gave up, made a class "global_data" with only variables and no instances. All single-shot functions I moved out of object tree and finally realized there was no classes needed at all, because it was only one process commmunicating with single user.