[Python-checkins] cpython (merge 3.5 -> default): merge from 3.5
senthil.kumaran
python-checkins at python.org
Wed Jan 20 06:12:07 EST 2016
https://hg.python.org/cpython/rev/f97da0952a2e
changeset: 100002:f97da0952a2e
parent: 100000:d4f13c9a2b07
parent: 100001:32ee5d197500
user: Senthil Kumaran <senthil at uthcode.com>
date: Wed Jan 20 03:11:52 2016 -0800
summary:
merge from 3.5
issue25982 - Add a class definition for managers.Namespace in the multiprocessing docs.
files:
Doc/library/multiprocessing.rst | 40 +++++++++++---------
1 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -316,7 +316,7 @@
proxies.
A manager returned by :func:`Manager` will support types
- :class:`list`, :class:`dict`, :class:`Namespace`, :class:`Lock`,
+ :class:`list`, :class:`dict`, :class:`~managers.Namespace`, :class:`Lock`,
:class:`RLock`, :class:`Semaphore`, :class:`BoundedSemaphore`,
:class:`Condition`, :class:`Event`, :class:`Barrier`,
:class:`Queue`, :class:`Value` and :class:`Array`. For example, ::
@@ -1752,24 +1752,26 @@
lproxy[0] = d
-Namespace objects
->>>>>>>>>>>>>>>>>
-
-A namespace object has no public methods, but does have writable attributes.
-Its representation shows the values of its attributes.
-
-However, when using a proxy for a namespace object, an attribute beginning with
-``'_'`` will be an attribute of the proxy and not an attribute of the referent:
-
-.. doctest::
-
- >>> manager = multiprocessing.Manager()
- >>> Global = manager.Namespace()
- >>> Global.x = 10
- >>> Global.y = 'hello'
- >>> Global._z = 12.3 # this is an attribute of the proxy
- >>> print(Global)
- Namespace(x=10, y='hello')
+.. class:: Namespace
+
+ A type that can register with :class:`SyncManager`.
+
+ A namespace object has no public methods, but does have writable attributes.
+ Its representation shows the values of its attributes.
+
+ However, when using a proxy for a namespace object, an attribute beginning
+ with ``'_'`` will be an attribute of the proxy and not an attribute of the
+ referent:
+
+ .. doctest::
+
+ >>> manager = multiprocessing.Manager()
+ >>> Global = manager.Namespace()
+ >>> Global.x = 10
+ >>> Global.y = 'hello'
+ >>> Global._z = 12.3 # this is an attribute of the proxy
+ >>> print(Global)
+ Namespace(x=10, y='hello')
Customized managers
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list