4 ms·
Although it can be hacky to implement in Python, a singleton object can enforce locking and privilege-based access control. It can also group globals into sub-o
by TheOtherHobbes 5y ago
Although it can be hacky to implement in Python, a singleton object can enforce locking and privilege-based access control. It can also group globals into sub-objects, which can make some naming systems easier to enforce/remember.
Open globals are unstructured, and more likely to turn into a messy free for all.