Hacker News new | ask | show | jobs
by klibertp 5040 days ago
I have nothing against singletons! (I'm referring to your somewhat defensive "I think it was an appropriate solution, especially since this singleton class is used internally,...")

I was just curious about what 'singleton method' meant, as opposed to 'singleton object'. Sadly, it seems that it would be very hard to implement something similar in Python (my main language at the moment) without creating a metaclass. But I certainly saw this pattern in Smalltalk before, just didn't know how it's called.