[Python-checkins] r75393 - in python/branches/py3k/Doc/faq: library.rst programming.rst

georg.brandl python-checkins at python.org
Tue Oct 13 18:55:12 CEST 2009


Author: georg.brandl
Date: Tue Oct 13 18:55:12 2009
New Revision: 75393

Log:
Update module names in references in the FAQ.

Modified:
   python/branches/py3k/Doc/faq/library.rst
   python/branches/py3k/Doc/faq/programming.rst

Modified: python/branches/py3k/Doc/faq/library.rst
==============================================================================
--- python/branches/py3k/Doc/faq/library.rst	(original)
+++ python/branches/py3k/Doc/faq/library.rst	Tue Oct 13 18:55:12 2009
@@ -232,11 +232,9 @@
 How do I program using threads?
 -------------------------------
 
-.. XXX it's _thread in py3k
-
-Be sure to use the :mod:`threading` module and not the :mod:`thread` module.
+Be sure to use the :mod:`threading` module and not the :mod:`_thread` module.
 The :mod:`threading` module builds convenient abstractions on top of the
-low-level primitives provided by the :mod:`thread` module.
+low-level primitives provided by the :mod:`_thread` module.
 
 Aahz has a set of slides from his threading tutorial that are helpful; see
 http://starship.python.net/crew/aahz/OSCON2001/.
@@ -280,7 +278,7 @@
 
 Instead of trying to guess how long a :func:`time.sleep` delay will be enough,
 it's better to use some kind of semaphore mechanism.  One idea is to use the
-:mod:`Queue` module to create a queue object, let each thread append a token to
+:mod:`queue` module to create a queue object, let each thread append a token to
 the queue when it finishes, and let the main thread read as many tokens from the
 queue as there are threads.
 
@@ -288,8 +286,8 @@
 How do I parcel out work among a bunch of worker threads?
 ---------------------------------------------------------
 
-Use the :mod:`Queue` module to create a queue containing a list of jobs.  The
-:class:`~Queue.Queue` class maintains a list of objects with ``.put(obj)`` to
+Use the :mod:`queue` module to create a queue containing a list of jobs.  The
+:class:`~queue.Queue` class maintains a list of objects with ``.put(obj)`` to
 add an item to the queue and ``.get()`` to return an item.  The class will take
 care of the locking necessary to ensure that each job is handed out exactly
 once.
@@ -777,11 +775,10 @@
 
 Yes.
 
-.. XXX remove bsddb in py3k, fix other module names
-
-Python 2.3 includes the :mod:`bsddb` package which provides an interface to the
-BerkeleyDB library.  Interfaces to disk-based hashes such as :mod:`DBM <dbm>`
-and :mod:`GDBM <gdbm>` are also included with standard Python.
+Interfaces to disk-based hashes such as :mod:`DBM <dbm.ndbm>` and :mod:`GDBM
+<dbm.gnu>` are also included with standard Python.  There is also the
+:mod:`sqlite3` module, which provides a lightweight disk-based relational
+database.
 
 Support for most relational databases is available.  See the
 `DatabaseProgramming wiki page
@@ -794,8 +791,7 @@
 The :mod:`pickle` library module solves this in a very general way (though you
 still can't store things like open files, sockets or windows), and the
 :mod:`shelve` library module uses pickle and (g)dbm to create persistent
-mappings containing arbitrary Python objects.  For better performance, you can
-use the :mod:`cPickle` module.
+mappings containing arbitrary Python objects.
 
 A more awkward way of doing things is to use pickle's little sister, marshal.
 The :mod:`marshal` module provides very fast ways to store noncircular basic

Modified: python/branches/py3k/Doc/faq/programming.rst
==============================================================================
--- python/branches/py3k/Doc/faq/programming.rst	(original)
+++ python/branches/py3k/Doc/faq/programming.rst	Tue Oct 13 18:55:12 2009
@@ -364,7 +364,7 @@
 In general, don't use ``from modulename import *``.  Doing so clutters the
 importer's namespace.  Some people avoid this idiom even with the few modules
 that were designed to be imported in this manner.  Modules designed in this
-manner include :mod:`Tkinter`, and :mod:`threading`.
+manner include :mod:`tkinter`, and :mod:`threading`.
 
 Import modules at the top of a file.  Doing so makes it clear what other modules
 your code requires and avoids questions of whether the module name is in scope.


More information about the Python-checkins mailing list