I already read many articles that explain how to implement singleton in python,like Creating a singleton in Python
I was wondering, isn't a class with class methods and attributes is a singleton class.
e.g.
class my_singleton_class(object):
_logger = Logger ()
_printer = Printer ()
@classmethod
def logger(cls):
return cls._logger
@classmethod
def printer(cls):
return cls._printer
Is it not pythonic ? What is wrong with this singleton implementation ?