Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Singleton(type):
- _instances = {}
- def __call__(cls, *args, **kwargs):
- //make name change here
- if cls not in cls._instances:
- cls._instances[cls] = super(
- Singleton,
- cls).__call__(
- *args,
- **kwargs)
- return cls._instances[cls]
- _STAGE = Singleton("_STAGE", (object, ), {})
- PoolManager(_STAGE):
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement