From: Georg Brandl Date: Tue, 26 May 2009 07:50:23 +0000 (+0000) Subject: #6112: list.remove raises ValueError, not RuntimeError. X-Git-Tag: v2.7a1~1096 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ee8282229ec9b91f95f4c1f449bae85ee6941fe;p=python #6112: list.remove raises ValueError, not RuntimeError. --- diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst index 2283077bd0..51b9d3fb66 100644 --- a/Doc/library/sched.rst +++ b/Doc/library/sched.rst @@ -100,7 +100,7 @@ Scheduler Objects .. method:: scheduler.cancel(event) 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() diff --git a/Lib/sched.py b/Lib/sched.py index aecdb2a475..f0da8291fe 100644 --- a/Lib/sched.py +++ b/Lib/sched.py @@ -67,7 +67,7 @@ class scheduler: """Remove an event from the queue. 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)