diff options
Diffstat (limited to 'Lib/multiprocessing')
| -rw-r--r-- | Lib/multiprocessing/connection.py | 9 | ||||
| -rw-r--r-- | Lib/multiprocessing/dummy/__init__.py | 10 | ||||
| -rw-r--r-- | Lib/multiprocessing/dummy/connection.py | 4 | ||||
| -rw-r--r-- | Lib/multiprocessing/managers.py | 4 |
4 files changed, 20 insertions, 7 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py index d49e8f0..ba9b17c 100644 --- a/Lib/multiprocessing/connection.py +++ b/Lib/multiprocessing/connection.py @@ -465,8 +465,13 @@ class Listener(object): self._listener = None listener.close() - address = property(lambda self: self._listener._address) - last_accepted = property(lambda self: self._listener._last_accepted) + @property + def address(self): + return self._listener._address + + @property + def last_accepted(self): + return self._listener._last_accepted def __enter__(self): return self diff --git a/Lib/multiprocessing/dummy/__init__.py b/Lib/multiprocessing/dummy/__init__.py index 1abea64..cbb7f49 100644 --- a/Lib/multiprocessing/dummy/__init__.py +++ b/Lib/multiprocessing/dummy/__init__.py @@ -98,11 +98,15 @@ class Value(object): def __init__(self, typecode, value, lock=True): self._typecode = typecode self._value = value - def _get(self): + + @property + def value(self): return self._value - def _set(self, value): + + @value.setter + def value(self, value): self._value = value - value = property(_get, _set) + def __repr__(self): return '<%s(%r, %r)>'%(type(self).__name__,self._typecode,self._value) diff --git a/Lib/multiprocessing/dummy/connection.py b/Lib/multiprocessing/dummy/connection.py index 1984375..f0ce320 100644 --- a/Lib/multiprocessing/dummy/connection.py +++ b/Lib/multiprocessing/dummy/connection.py @@ -26,7 +26,9 @@ class Listener(object): def close(self): self._backlog_queue = None - address = property(lambda self: self._backlog_queue) + @property + def address(self): + return self._backlog_queue def __enter__(self): return self diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py index b9ce84b..43dd02a 100644 --- a/Lib/multiprocessing/managers.py +++ b/Lib/multiprocessing/managers.py @@ -628,7 +628,9 @@ class BaseManager(object): except KeyError: pass - address = property(lambda self: self._address) + @property + def address(self): + return self._address @classmethod def register(cls, typeid, callable=None, proxytype=None, exposed=None, |
