3 ms·
It's quite common in python to manage/encapsulate a global by wrapping it in a module, so arguably a singleton is the same thing, just encapsulating in a class/
by Chris2048 5y ago
It's quite common in python to manage/encapsulate a global by wrapping it in a module, so arguably a singleton is the same thing, just encapsulating in a class/class-instance instead?
but even if the prog-lang had specific support for safe(r) globals, it would still just be a global at the lower (higher?) level.