MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / Singleton

Class Singleton

KVCOMM/utils/globals.py:1–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Singleton:
2 _instance = None
3
4 @classmethod
5 def instance(cls):
6 if cls._instance is None:
7 cls._instance = cls()
8 return cls._instance
9
10 def reset(self):
11 self.value = 0.0
12
13class Cost(Singleton):
14 def __init__(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected