@@ -316,7 +316,7 @@ However, if you really do need to use some shared data then
316
316
proxies.
317
317
318
318
A manager returned by :func: `Manager ` will support types
319
- :class: `list `, :class: `dict `, :class: `Namespace `, :class: `Lock `,
319
+ :class: `list `, :class: `dict `, :class: `~managers. Namespace `, :class: `Lock `,
320
320
:class: `RLock `, :class: `Semaphore `, :class: `BoundedSemaphore `,
321
321
:class: `Condition `, :class: `Event `, :class: `Barrier `,
322
322
:class: `Queue `, :class: `Value ` and :class: `Array `. For example, ::
@@ -1747,24 +1747,26 @@ their parent process exits. The manager classes are defined in the
1747
1747
lproxy[0] = d
1748
1748
1749
1749
1750
- Namespace objects
1751
- >>>>>>>>>>>>>>>>>
1750
+ .. class :: Namespace
1752
1751
1753
- A namespace object has no public methods, but does have writable attributes.
1754
- Its representation shows the values of its attributes.
1752
+ A type that can register with :class: `SyncManager `.
1755
1753
1756
- However, when using a proxy for a namespace object, an attribute beginning with
1757
- `` '_' `` will be an attribute of the proxy and not an attribute of the referent:
1754
+ A namespace object has no public methods, but does have writable attributes.
1755
+ Its representation shows the values of its attributes.
1758
1756
1759
- .. doctest ::
1757
+ However, when using a proxy for a namespace object, an attribute beginning
1758
+ with ``'_' `` will be an attribute of the proxy and not an attribute of the
1759
+ referent:
1760
+
1761
+ .. doctest ::
1760
1762
1761
- >>> manager = multiprocessing.Manager()
1762
- >>> Global = manager.Namespace()
1763
- >>> Global.x = 10
1764
- >>> Global.y = ' hello'
1765
- >>> Global._z = 12.3 # this is an attribute of the proxy
1766
- >>> print (Global)
1767
- Namespace(x=10, y='hello')
1763
+ >>> manager = multiprocessing.Manager()
1764
+ >>> Global = manager.Namespace()
1765
+ >>> Global.x = 10
1766
+ >>> Global.y = ' hello'
1767
+ >>> Global._z = 12.3 # this is an attribute of the proxy
1768
+ >>> print (Global)
1769
+ Namespace(x=10, y='hello')
1768
1770
1769
1771
1770
1772
Customized managers
0 commit comments