Feb-11-2020, 06:41 PM
(This post was last modified: Feb-11-2020, 06:43 PM by Gribouillis.)
psolar Wrote:This works, but is this pythonic if I instantiate MyBord class in different classes?Honestly, I must confess that I never use borgs. I use singletons but usually I don't declare them as such. I simply define a class and create a single instance. There was a time where singletons and borgs were trendy but it is not very useful to declare them as such. The pythonic philosophy is not to enforce gentlemen's agreements. For example you may define a python function which first argument must be a list (otherwise the function won't work), but you often don't enforce this requirement by checking the argument's type.