]> granicus.if.org Git - python/commitdiff
Added cross-references plus a note about dict & list shallow copying.
authorMark Summerfield <list@qtrac.plus.com>
Tue, 4 Sep 2007 08:16:15 +0000 (08:16 +0000)
committerMark Summerfield <list@qtrac.plus.com>
Tue, 4 Sep 2007 08:16:15 +0000 (08:16 +0000)
Doc/library/copy.rst
Doc/library/mutex.rst
Doc/library/queue.rst
Doc/library/thread.rst
Doc/library/threading.rst

index 6fb3100679ae6b6c73b597ed1f3f84c0d17854a3..50baabfffb827aab597a722138531d1d70c376f0 100644 (file)
@@ -54,6 +54,10 @@ file, socket, window, array, or any similar types.  It does "copy" functions and
 classes (shallow and deeply), by returning the original object unchanged; this
 is compatible with the way these are treated by the :mod:`pickle` module.
 
+Shallow copies of dictionaries can be made using :meth:`dict.copy`, and
+of lists by assigning a slice of the entire list, for example,
+``copied_list = original_list[:]``.
+
 .. versionchanged:: 2.5
    Added copying functions.
 
index 523692f0667c2b6dc705339406aa68eec2cd5387..151f0c1261795f24d8c88037bed480f7a0bccb50 100644 (file)
@@ -8,8 +8,9 @@
 
 
 The :mod:`mutex` module defines a class that allows mutual-exclusion via
-acquiring and releasing locks. It does not require (or imply) threading or
-multi-tasking, though it could be useful for those purposes.
+acquiring and releasing locks. It does not require (or imply)
+:mod:`threading` or multi-tasking, though it could be useful for those
+purposes.
 
 The :mod:`mutex` module defines the following class:
 
index c7b65fdd568a56966d4ebea6caab46575fac67cb..0812b78a8b1980b17571b7eba62f69acbed8776e 100644 (file)
@@ -7,10 +7,11 @@
 
 
 The :mod:`Queue` module implements a multi-producer, multi-consumer FIFO queue.
-It is especially useful in threads programming when information must be
+It is especially useful in threaded programming when information must be
 exchanged safely between multiple threads.  The :class:`Queue` class in this
 module implements all the required locking semantics.  It depends on the
-availability of thread support in Python.
+availability of thread support in Python; see the :mod:`threading`
+module.
 
 The :mod:`Queue` module defines the following class and exception:
 
index c9be598c8ede8479222c386f4632de0ddfb5cca2..ca70403c9b8e829f9e51e2c052ed943279078440 100644 (file)
    single: semaphores, binary
 
 This module provides low-level primitives for working with multiple threads
-(a.k.a. :dfn:`light-weight processes` or :dfn:`tasks`) --- multiple threads of
+(also called :dfn:`light-weight processes` or :dfn:`tasks`) --- multiple threads of
 control sharing their global data space.  For synchronization, simple locks
-(a.k.a. :dfn:`mutexes` or :dfn:`binary semaphores`) are provided.
+(also called :dfn:`mutexes` or :dfn:`binary semaphores`) are provided.
+The :mod:`threading` module provides an easier to use and higher-level
+threading API built on top of this module.
 
 .. index::
    single: pthreads
index 92ce02a39ccd1e2fd188f5b014536da1b7a0bdac..650a11361dd6cf68e6dbcac690d7def1b8e0b05c 100644 (file)
@@ -8,6 +8,7 @@
 
 This module constructs higher-level threading interfaces on top of the  lower
 level :mod:`thread` module.
+See also the :mod:`mutex` and :mod:`Queue` modules.
 
 The :mod:`dummy_threading` module is provided for situations where
 :mod:`threading` cannot be used because :mod:`thread` is missing.