There was an error while loading. Please reload this page.
2 parents 8bb19f5 + 6aaea96 commit 89e65c5Copy full SHA for 89e65c5
1 file changed
structural/flyweight.py
@@ -37,7 +37,7 @@ def __call__(cls, *args, **kwargs):
37
pool = getattr(cls, 'pool', {})
38
39
instance = pool.get(key)
40
- if not instance:
+ if instance is None:
41
instance = super(FlyweightMeta, cls).__call__(*args, **kwargs)
42
pool[key] = instance
43
return instance
0 commit comments