On 4/10/23 5:25 pm, dn wrote:
The first question when dealing with the Singleton Pattern is what to do when more than one instantiation is attempted
My preferred way of handling singletons is not to expose the class itself, but a function that creates an instance the first time it's called, and returns that instance subsequently. The problem then doesn't arise. -- Greg -- https://mail.python.org/mailman/listinfo/python-list