(cls, name)
| 5 | class Spam: |
| 6 | _spam_cache = weakref.WeakValueDictionary() |
| 7 | def __new__(cls, name): |
| 8 | if name in cls._spam_cache: |
| 9 | return cls._spam_cache[name] |
| 10 | else: |
| 11 | self = super().__new__(cls) |
| 12 | cls._spam_cache[name] = self |
| 13 | return self |
| 14 | |
| 15 | def __init__(self, name): |
| 16 | print('Initializing Spam') |
no outgoing calls
no test coverage detected