Merged revisions 72932 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72932 | georg.brandl | 2009-05-26 09:50:23 +0200 (Di, 26 Mai 2009) | 1 line

  #6112: list.remove raises ValueError, not RuntimeError.
........
This commit is contained in:
Georg Brandl 2009-05-26 07:50:52 +00:00
parent e9a6514767
commit bbc5cc1e1d
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ Scheduler Objects
.. method:: scheduler.cancel(event) .. method:: scheduler.cancel(event)
Remove the event from the queue. If *event* is not an event currently in the Remove the event from the queue. If *event* is not an event currently in the
queue, this method will raise a :exc:`RuntimeError`. queue, this method will raise a :exc:`ValueError`.
.. method:: scheduler.empty() .. method:: scheduler.empty()

View File

@ -67,7 +67,7 @@ class scheduler:
"""Remove an event from the queue. """Remove an event from the queue.
This must be presented the ID as returned by enter(). This must be presented the ID as returned by enter().
If the event is not in the queue, this raises RuntimeError. If the event is not in the queue, this raises ValueError.
""" """
self._queue.remove(event) self._queue.remove(event)