We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d60ed5a commit bc4d79dCopy full SHA for bc4d79d
singletons/singleton_mp.py
@@ -18,7 +18,7 @@ def __init__(self, x=100):
18
self.x = x
19
20
def __setattr__(self, key, value):
21
- # For all lookups other than 'd'
+ # For all lookups other than '_shared'
22
# set value in the shared dictionary
23
if key == '_shared':
24
self.__dict__[key] = value
@@ -29,5 +29,7 @@ def __getattr__(self, key):
29
if key in self.__dict__:
30
return self.__dict__[key]
31
32
+
33
+ # Lookups via shared memory
34
return self._shared[key]
35
0 commit comments