cls _logger super(loggercls__new__(cls*args**kwargsreturn cls _logger in this examplelogger is singleton when __new__ is calledit normally constructs new instance of that class when we override itwe first check if our singleton instance has been created or not if notwe create it using super call thuswhenever we call the constructor on loggerwe always get the exact same instance obj logger(obj logger(obj =obj true obj obj