Merged revisions 73941-73943,74076,74094,74186,74211-74214,74247,74254,74262,74311,74334,74368 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

................
  r73941 | georg.brandl | 2009-07-11 12:39:00 +0200 (Sa, 11 Jul 2009) | 9 lines

  Merged revisions 73940 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r73940 | georg.brandl | 2009-07-11 12:37:38 +0200 (Sa, 11 Jul 2009) | 1 line

    #6430: add note about size of "u" type.
  ........
................
  r73942 | georg.brandl | 2009-07-11 12:39:23 +0200 (Sa, 11 Jul 2009) | 1 line

  #6430: remove mention of "w" array typecode.
................
  r73943 | georg.brandl | 2009-07-11 12:43:08 +0200 (Sa, 11 Jul 2009) | 1 line

  #6421: The self argument of module-level PyCFunctions is now a reference to the module object.
................
  r74076 | georg.brandl | 2009-07-18 11:07:48 +0200 (Sa, 18 Jul 2009) | 1 line

  #6502: add missing comma in docstring.
................
  r74094 | georg.brandl | 2009-07-19 09:25:56 +0200 (So, 19 Jul 2009) | 10 lines

  Recorded merge of revisions 74089 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74089 | senthil.kumaran | 2009-07-19 04:43:43 +0200 (So, 19 Jul 2009) | 3 lines

    Fix for issue5102, timeout value propages between redirects, proxy, digest and
    auth handlers. Fixed tests to reflect the same.
  ........
................
  r74186 | georg.brandl | 2009-07-23 11:19:09 +0200 (Do, 23 Jul 2009) | 9 lines

  Recorded merge of revisions 74185 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74185 | georg.brandl | 2009-07-23 11:17:09 +0200 (Do, 23 Jul 2009) | 1 line

    Fix the "pylocals" gdb command.
  ........
................
  r74211 | georg.brandl | 2009-07-26 16:48:09 +0200 (So, 26 Jul 2009) | 9 lines

  Recorded merge of revisions 74210 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74210 | georg.brandl | 2009-07-26 16:44:23 +0200 (So, 26 Jul 2009) | 1 line

    Move member descriptions inside the classes.
  ........
................
  r74212 | georg.brandl | 2009-07-26 16:54:51 +0200 (So, 26 Jul 2009) | 9 lines

  Merged revisions 74209 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74209 | georg.brandl | 2009-07-26 16:37:28 +0200 (So, 26 Jul 2009) | 1 line

    builtin -> built-in.
  ........
................
  r74213 | georg.brandl | 2009-07-26 17:02:41 +0200 (So, 26 Jul 2009) | 9 lines

  Merged revisions 74207 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74207 | georg.brandl | 2009-07-26 16:19:57 +0200 (So, 26 Jul 2009) | 1 line

    #6577: fix (hopefully) all links to builtin instead of module/class-specific objects.
  ........
................
  r74214 | georg.brandl | 2009-07-26 17:03:49 +0200 (So, 26 Jul 2009) | 9 lines

  Merged revisions 74205 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74205 | georg.brandl | 2009-07-26 15:36:39 +0200 (So, 26 Jul 2009) | 1 line

    #6576: fix cross-refs in re docs.
  ........
................
  r74247 | georg.brandl | 2009-07-29 09:27:08 +0200 (Mi, 29 Jul 2009) | 9 lines

  Merged revisions 74239 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74239 | georg.brandl | 2009-07-28 18:55:32 +0000 (Di, 28 Jul 2009) | 1 line

    Clarify quote_plus() usage.
  ........
................
  r74254 | georg.brandl | 2009-07-29 18:14:16 +0200 (Mi, 29 Jul 2009) | 1 line

  #6586: fix return/argument type doc for os.read() and os.write().
................
  r74262 | alexandre.vassalotti | 2009-07-29 21:54:39 +0200 (Mi, 29 Jul 2009) | 57 lines

  Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74074 | georg.brandl | 2009-07-18 05:03:10 -0400 (Sat, 18 Jul 2009) | 1 line

    #6513: fix example code: warning categories are classes, not instances.
  ........
    r74077 | georg.brandl | 2009-07-18 05:43:40 -0400 (Sat, 18 Jul 2009) | 1 line

    #6489: fix an ambiguity in getiterator() documentation.
  ........
    r74111 | benjamin.peterson | 2009-07-20 09:30:10 -0400 (Mon, 20 Jul 2009) | 1 line

    remove docs for deprecated -p option
  ........
    r74188 | benjamin.peterson | 2009-07-23 10:25:31 -0400 (Thu, 23 Jul 2009) | 1 line

    use bools
  ........
    r74192 | georg.brandl | 2009-07-24 12:28:38 -0400 (Fri, 24 Jul 2009) | 1 line

    Fix arg types of et#.
  ........
    r74193 | georg.brandl | 2009-07-24 12:46:38 -0400 (Fri, 24 Jul 2009) | 1 line

    Dont put "void" in signature for nullary functions.
  ........
    r74200 | georg.brandl | 2009-07-25 09:02:15 -0400 (Sat, 25 Jul 2009) | 1 line

    #6571: add index entries for more operators.
  ........
    r74252 | georg.brandl | 2009-07-29 12:06:31 -0400 (Wed, 29 Jul 2009) | 1 line

    #6593: fix link targets.
  ........
    r74253 | georg.brandl | 2009-07-29 12:09:17 -0400 (Wed, 29 Jul 2009) | 1 line

    #6591: add reference to ioctl in fcntl module for platforms other than Windows.
  ........
    r74258 | georg.brandl | 2009-07-29 12:57:05 -0400 (Wed, 29 Jul 2009) | 1 line

    Add a link to readline, and mention IPython and bpython.
  ........
    r74259 | georg.brandl | 2009-07-29 13:07:21 -0400 (Wed, 29 Jul 2009) | 1 line

    Fix some markup and small factual glitches found by M. Markert.
  ........
    r74260 | georg.brandl | 2009-07-29 13:15:20 -0400 (Wed, 29 Jul 2009) | 1 line

    Fix a few markup glitches.
  ........
    r74261 | georg.brandl | 2009-07-29 13:50:25 -0400 (Wed, 29 Jul 2009) | 1 line

    Rewrite the section about classes a bit; mostly tidbits, and a larger update to the section about "private" variables to reflect the Pythonic consensus better.
  ........
................
  r74311 | georg.brandl | 2009-08-04 22:29:27 +0200 (Di, 04 Aug 2009) | 1 line

  Slightly improve buffer-related error message.
................
  r74334 | georg.brandl | 2009-08-06 19:51:03 +0200 (Do, 06 Aug 2009) | 1 line

  #6648: mention surrogateescape handler where all standard handlers are listed.
................
  r74368 | georg.brandl | 2009-08-13 09:56:35 +0200 (Do, 13 Aug 2009) | 21 lines

  Merged revisions 74328,74332-74333,74365 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74328 | georg.brandl | 2009-08-06 17:06:25 +0200 (Do, 06 Aug 2009) | 1 line

    Fix base keyword arg name for int() and long().
  ........
    r74332 | georg.brandl | 2009-08-06 19:23:21 +0200 (Do, 06 Aug 2009) | 1 line

    Fix punctuation and one copy-paste error.
  ........
    r74333 | georg.brandl | 2009-08-06 19:43:55 +0200 (Do, 06 Aug 2009) | 1 line

    #6658: fix two typos.
  ........
    r74365 | georg.brandl | 2009-08-13 09:48:05 +0200 (Do, 13 Aug 2009) | 1 line

    #6679: Remove mention that sub supports no flags.
  ........
................
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index d880157..86a9bf8 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -1,4 +1,3 @@
-
 :mod:`threading` --- Higher-level threading interface
 =====================================================
 
@@ -55,8 +54,9 @@
    :noindex:
 
    A factory function that returns a new event object.  An event manages a flag
-   that can be set to true with the :meth:`set` method and reset to false with the
-   :meth:`clear` method.  The :meth:`wait` method blocks until the flag is true.
+   that can be set to true with the :meth:`~Event.set` method and reset to false
+   with the :meth:`clear` method.  The :meth:`wait` method blocks until the flag
+   is true.
 
 
 .. class:: local
@@ -213,7 +213,8 @@
 
 .. class:: Thread(group=None, target=None, name=None, args=(), kwargs={})
 
-   This constructor should always be called with keyword arguments.  Arguments are:
+   This constructor should always be called with keyword arguments.  Arguments
+   are:
 
    *group* should be ``None``; reserved for future extension when a
    :class:`ThreadGroup` class is implemented.
@@ -221,111 +222,103 @@
    *target* is the callable object to be invoked by the :meth:`run` method.
    Defaults to ``None``, meaning nothing is called.
 
-   *name* is the thread name.  By default, a unique name is constructed of the form
-   "Thread-*N*" where *N* is a small decimal number.
+   *name* is the thread name.  By default, a unique name is constructed of the
+   form "Thread-*N*" where *N* is a small decimal number.
 
    *args* is the argument tuple for the target invocation.  Defaults to ``()``.
 
    *kwargs* is a dictionary of keyword arguments for the target invocation.
    Defaults to ``{}``.
 
-   If the subclass overrides the constructor, it must make sure to invoke the base
-   class constructor (``Thread.__init__()``) before doing anything else to the
-   thread.
+   If the subclass overrides the constructor, it must make sure to invoke the
+   base class constructor (``Thread.__init__()``) before doing anything else to
+   the thread.
 
+   .. method:: start()
 
-.. method:: Thread.start()
+      Start the thread's activity.
 
-   Start the thread's activity.
+      It must be called at most once per thread object.  It arranges for the
+      object's :meth:`run` method to be invoked in a separate thread of control.
 
-   It must be called at most once per thread object.  It arranges for the object's
-   :meth:`run` method to be invoked in a separate thread of control.
+      This method will raise a :exc:`RuntimeException` if called more than once
+      on the same thread object.
 
-   This method will raise a :exc:`RuntimeException` if called more than once on the
-   same thread object.
+   .. method:: run()
 
+      Method representing the thread's activity.
 
-.. method:: Thread.run()
+      You may override this method in a subclass.  The standard :meth:`run`
+      method invokes the callable object passed to the object's constructor as
+      the *target* argument, if any, with sequential and keyword arguments taken
+      from the *args* and *kwargs* arguments, respectively.
 
-   Method representing the thread's activity.
+   .. method:: join([timeout])
 
-   You may override this method in a subclass.  The standard :meth:`run` method
-   invokes the callable object passed to the object's constructor as the *target*
-   argument, if any, with sequential and keyword arguments taken from the *args*
-   and *kwargs* arguments, respectively.
+      Wait until the thread terminates. This blocks the calling thread until the
+      thread whose :meth:`join` method is called terminates -- either normally
+      or through an unhandled exception -- or until the optional timeout occurs.
 
+      When the *timeout* argument is present and not ``None``, it should be a
+      floating point number specifying a timeout for the operation in seconds
+      (or fractions thereof). As :meth:`join` always returns ``None``, you must
+      call :meth:`is_alive` after :meth:`join` to decide whether a timeout
+      happened -- if the thread is still alive, the :meth:`join` call timed out.
 
-.. method:: Thread.join([timeout])
+      When the *timeout* argument is not present or ``None``, the operation will
+      block until the thread terminates.
 
-   Wait until the thread terminates. This blocks the calling thread until the
-   thread whose :meth:`join` method is called terminates -- either normally or
-   through an unhandled exception -- or until the optional timeout occurs.
+      A thread can be :meth:`join`\ ed many times.
 
-   When the *timeout* argument is present and not ``None``, it should be a floating
-   point number specifying a timeout for the operation in seconds (or fractions
-   thereof). As :meth:`join` always returns ``None``, you must call :meth:`is_alive`
-   after :meth:`join` to decide whether a timeout happened -- if the thread is
-   still alive, the :meth:`join` call timed out.
+      :meth:`join` raises a :exc:`RuntimeError` if an attempt is made to join
+      the current thread as that would cause a deadlock. It is also an error to
+      :meth:`join` a thread before it has been started and attempts to do so
+      raises the same exception.
 
-   When the *timeout* argument is not present or ``None``, the operation will block
-   until the thread terminates.
+   .. attribute:: name
 
-   A thread can be :meth:`join`\ ed many times.
+      A string used for identification purposes only. It has no semantics.
+      Multiple threads may be given the same name.  The initial name is set by
+      the constructor.
 
-   :meth:`join` raises a :exc:`RuntimeError` if an attempt is made to join
-   the current thread as that would cause a deadlock. It is also an error to
-   :meth:`join` a thread before it has been started and attempts to do so
-   raises the same exception.
+   .. method:: getName()
+               setName()
 
+      Old getter/setter API for :attr:`~Thread.name`; use it directly as a
+      property instead.
 
-.. attribute:: Thread.name
+   .. attribute:: ident
 
-   A string used for identification purposes only. It has no semantics.
-   Multiple threads may be given the same name.  The initial name is set by the
-   constructor.
+      The 'thread identifier' of this thread or ``None`` if the thread has not
+      been started.  This is a nonzero integer.  See the
+      :func:`thread.get_ident()` function.  Thread identifiers may be recycled
+      when a thread exits and another thread is created.  The identifier is
+      available even after the thread has exited.
 
+   .. method:: is_alive()
 
-.. method:: Thread.getName()
-            Thread.setName()
+      Return whether the thread is alive.
 
-   Old getter/setter API for :attr:`~Thread.name`; use it directly as a property
-   instead.
+      Roughly, a thread is alive from the moment the :meth:`start` method
+      returns until its :meth:`run` method terminates. The module function
+      :func:`enumerate` returns a list of all alive threads.
 
+   .. attribute:: daemon
 
-.. attribute:: Thread.ident
+      A boolean value indicating whether this thread is a daemon thread (True)
+      or not (False).  This must be set before :meth:`start` is called,
+      otherwise :exc:`RuntimeError` is raised.  Its initial value is inherited
+      from the creating thread; the main thread is not a daemon thread and
+      therefore all threads created in the main thread default to :attr:`daemon`
+      = ``False``.
 
-   The 'thread identifier' of this thread or ``None`` if the thread has not been
-   started.  This is a nonzero integer.  See the :func:`thread.get_ident()`
-   function.  Thread identifiers may be recycled when a thread exits and another
-   thread is created.  The identifier is available even after the thread has
-   exited.
+      The entire Python program exits when no alive non-daemon threads are left.
 
+   .. method:: isDaemon()
+               setDaemon()
 
-.. method:: Thread.is_alive()
-
-   Return whether the thread is alive.
-
-   Roughly, a thread is alive from the moment the :meth:`start` method returns
-   until its :meth:`run` method terminates. The module function :func:`enumerate`
-   returns a list of all alive threads.
-
-
-.. attribute:: Thread.daemon
-
-   A boolean value indicating whether this thread is a daemon thread (True) or
-   not (False).  This must be set before :meth:`start` is called, otherwise
-   :exc:`RuntimeError` is raised.  Its initial value is inherited from the
-   creating thread; the main thread is not a daemon thread and therefore all
-   threads created in the main thread default to :attr:`daemon` = ``False``.
-
-   The entire Python program exits when no alive non-daemon threads are left.
-
-
-.. method:: Thread.isDaemon()
-            Thread.setDaemon()
-
-   Old getter/setter API for :attr:`~Thread.daemon`; use it directly as a
-   property instead.
+      Old getter/setter API for :attr:`~Thread.daemon`; use it directly as a
+      property instead.
 
 
 .. _lock-objects:
@@ -496,69 +489,66 @@
 
 .. class:: Condition([lock])
 
-   If the *lock* argument is given and not ``None``, it must be a :class:`Lock` or
-   :class:`RLock` object, and it is used as the underlying lock.  Otherwise, a new
-   :class:`RLock` object is created and used as the underlying lock.
+   If the *lock* argument is given and not ``None``, it must be a :class:`Lock`
+   or :class:`RLock` object, and it is used as the underlying lock.  Otherwise,
+   a new :class:`RLock` object is created and used as the underlying lock.
 
+   .. method:: acquire(*args)
 
-.. method:: Condition.acquire(*args)
+      Acquire the underlying lock. This method calls the corresponding method on
+      the underlying lock; the return value is whatever that method returns.
 
-   Acquire the underlying lock. This method calls the corresponding method on the
-   underlying lock; the return value is whatever that method returns.
+   .. method:: release()
 
+      Release the underlying lock. This method calls the corresponding method on
+      the underlying lock; there is no return value.
 
-.. method:: Condition.release()
+   .. method:: wait([timeout])
 
-   Release the underlying lock. This method calls the corresponding method on the
-   underlying lock; there is no return value.
+      Wait until notified or until a timeout occurs. If the calling thread has
+      not acquired the lock when this method is called, a :exc:`RuntimeError` is
+      raised.
 
+      This method releases the underlying lock, and then blocks until it is
+      awakened by a :meth:`notify` or :meth:`notify_all` call for the same
+      condition variable in another thread, or until the optional timeout
+      occurs.  Once awakened or timed out, it re-acquires the lock and returns.
 
-.. method:: Condition.wait([timeout])
+      When the *timeout* argument is present and not ``None``, it should be a
+      floating point number specifying a timeout for the operation in seconds
+      (or fractions thereof).
 
-   Wait until notified or until a timeout occurs. If the calling thread has not
-   acquired the lock when this method is called, a :exc:`RuntimeError` is raised.
+      When the underlying lock is an :class:`RLock`, it is not released using
+      its :meth:`release` method, since this may not actually unlock the lock
+      when it was acquired multiple times recursively.  Instead, an internal
+      interface of the :class:`RLock` class is used, which really unlocks it
+      even when it has been recursively acquired several times. Another internal
+      interface is then used to restore the recursion level when the lock is
+      reacquired.
 
-   This method releases the underlying lock, and then blocks until it is awakened
-   by a :meth:`notify` or :meth:`notify_all` call for the same condition variable in
-   another thread, or until the optional timeout occurs.  Once awakened or timed
-   out, it re-acquires the lock and returns.
+   .. method:: notify()
 
-   When the *timeout* argument is present and not ``None``, it should be a floating
-   point number specifying a timeout for the operation in seconds (or fractions
-   thereof).
+      Wake up a thread waiting on this condition, if any.  If the calling thread
+      has not acquired the lock when this method is called, a
+      :exc:`RuntimeError` is raised.
 
-   When the underlying lock is an :class:`RLock`, it is not released using its
-   :meth:`release` method, since this may not actually unlock the lock when it was
-   acquired multiple times recursively.  Instead, an internal interface of the
-   :class:`RLock` class is used, which really unlocks it even when it has been
-   recursively acquired several times. Another internal interface is then used to
-   restore the recursion level when the lock is reacquired.
+      This method wakes up one of the threads waiting for the condition
+      variable, if any are waiting; it is a no-op if no threads are waiting.
 
+      The current implementation wakes up exactly one thread, if any are
+      waiting.  However, it's not safe to rely on this behavior.  A future,
+      optimized implementation may occasionally wake up more than one thread.
 
-.. method:: Condition.notify()
+      Note: the awakened thread does not actually return from its :meth:`wait`
+      call until it can reacquire the lock.  Since :meth:`notify` does not
+      release the lock, its caller should.
 
-   Wake up a thread waiting on this condition, if any.  If the calling thread
-   has not acquired the lock when this method is called, a :exc:`RuntimeError`
-   is raised.
+   .. method:: notify_all()
 
-   This method wakes up one of the threads waiting for the condition variable,
-   if any are waiting; it is a no-op if no threads are waiting.
-
-   The current implementation wakes up exactly one thread, if any are waiting.
-   However, it's not safe to rely on this behavior.  A future, optimized
-   implementation may occasionally wake up more than one thread.
-
-   Note: the awakened thread does not actually return from its :meth:`wait` call
-   until it can reacquire the lock.  Since :meth:`notify` does not release the
-   lock, its caller should.
-
-
-.. method:: Condition.notify_all()
-
-   Wake up all threads waiting on this condition.  This method acts like
-   :meth:`notify`, but wakes up all waiting threads instead of one. If the calling
-   thread has not acquired the lock when this method is called, a
-   :exc:`RuntimeError` is raised.
+      Wake up all threads waiting on this condition.  This method acts like
+      :meth:`notify`, but wakes up all waiting threads instead of one. If the
+      calling thread has not acquired the lock when this method is called, a
+      :exc:`RuntimeError` is raised.
 
 
 .. _semaphore-objects:
@@ -582,33 +572,31 @@
    defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is
    raised.
 
+   .. method:: acquire([blocking])
 
-.. method:: Semaphore.acquire([blocking])
+      Acquire a semaphore.
 
-   Acquire a semaphore.
+      When invoked without arguments: if the internal counter is larger than
+      zero on entry, decrement it by one and return immediately.  If it is zero
+      on entry, block, waiting until some other thread has called
+      :meth:`release` to make it larger than zero.  This is done with proper
+      interlocking so that if multiple :meth:`acquire` calls are blocked,
+      :meth:`release` will wake exactly one of them up.  The implementation may
+      pick one at random, so the order in which blocked threads are awakened
+      should not be relied on.  There is no return value in this case.
 
-   When invoked without arguments: if the internal counter is larger than zero on
-   entry, decrement it by one and return immediately.  If it is zero on entry,
-   block, waiting until some other thread has called :meth:`release` to make it
-   larger than zero.  This is done with proper interlocking so that if multiple
-   :meth:`acquire` calls are blocked, :meth:`release` will wake exactly one of them
-   up.  The implementation may pick one at random, so the order in which blocked
-   threads are awakened should not be relied on.  There is no return value in this
-   case.
+      When invoked with *blocking* set to true, do the same thing as when called
+      without arguments, and return true.
 
-   When invoked with *blocking* set to true, do the same thing as when called
-   without arguments, and return true.
+      When invoked with *blocking* set to false, do not block.  If a call
+      without an argument would block, return false immediately; otherwise, do
+      the same thing as when called without arguments, and return true.
 
-   When invoked with *blocking* set to false, do not block.  If a call without an
-   argument would block, return false immediately; otherwise, do the same thing as
-   when called without arguments, and return true.
+   .. method:: release()
 
-
-.. method:: Semaphore.release()
-
-   Release a semaphore, incrementing the internal counter by one.  When it was zero
-   on entry and another thread is waiting for it to become larger than zero again,
-   wake up that thread.
+      Release a semaphore, incrementing the internal counter by one.  When it
+      was zero on entry and another thread is waiting for it to become larger
+      than zero again, wake up that thread.
 
 
 .. _semaphore-examples:
@@ -647,7 +635,7 @@
 thread signals an event and other threads wait for it.
 
 An event object manages an internal flag that can be set to true with the
-:meth:`set` method and reset to false with the :meth:`clear` method.  The
+:meth:`~Event.set` method and reset to false with the :meth:`clear` method.  The
 :meth:`wait` method blocks until the flag is true.
 
 
@@ -655,40 +643,37 @@
 
    The internal flag is initially false.
 
+   .. method:: is_set()
 
-.. method:: Event.is_set()
+      Return true if and only if the internal flag is true.
 
-   Return true if and only if the internal flag is true.
+   .. method:: set()
 
+      Set the internal flag to true. All threads waiting for it to become true
+      are awakened. Threads that call :meth:`wait` once the flag is true will
+      not block at all.
 
-.. method:: Event.set()
+   .. method:: clear()
 
-   Set the internal flag to true. All threads waiting for it to become true are
-   awakened. Threads that call :meth:`wait` once the flag is true will not block at
-   all.
+      Reset the internal flag to false. Subsequently, threads calling
+      :meth:`wait` will block until :meth:`.set` is called to set the internal
+      flag to true again.
 
+   .. method:: wait([timeout])
 
-.. method:: Event.clear()
+      Block until the internal flag is true.  If the internal flag is true on
+      entry, return immediately.  Otherwise, block until another thread calls
+      :meth:`set` to set the flag to true, or until the optional timeout occurs.
 
-   Reset the internal flag to false. Subsequently, threads calling :meth:`wait`
-   will block until :meth:`set` is called to set the internal flag to true again.
+      When the timeout argument is present and not ``None``, it should be a
+      floating point number specifying a timeout for the operation in seconds
+      (or fractions thereof).
 
+      This method returns the internal flag on exit, so it will always return
+      ``True`` except if a timeout is given and the operation times out.
 
-.. method:: Event.wait([timeout])
-
-   Block until the internal flag is true.  If the internal flag is true on entry,
-   return immediately.  Otherwise, block until another thread calls :meth:`set`
-   to set the flag to true, or until the optional timeout occurs.
-
-   When the timeout argument is present and not ``None``, it should be a floating
-   point number specifying a timeout for the operation in seconds (or fractions
-   thereof).
-
-   This method returns the internal flag on exit, so it will always return
-   ``True`` except if a timeout is given and the operation times out.
-
-   .. versionchanged:: 3.1
-      Previously, the method always returned ``None``.
+      .. versionchanged:: 3.1
+         Previously, the method always returned ``None``.
 
 
 .. _timer-objects:
@@ -719,11 +704,10 @@
    Create a timer that will run *function* with arguments *args* and  keyword
    arguments *kwargs*, after *interval* seconds have passed.
 
+   .. method:: cancel()
 
-.. method:: Timer.cancel()
-
-   Stop the timer, and cancel the execution of the timer's action.  This will only
-   work if the timer is still in its waiting stage.
+      Stop the timer, and cancel the execution of the timer's action.  This will
+      only work if the timer is still in its waiting stage.
 
 
 .. _with-locks: