[ python-Bugs-1676321 ] scheduler.empty() in module sched appears broken

SourceForge.net noreply at sourceforge.net
Thu Mar 8 09:50:01 CET 2007


Bugs item #1676321, was opened at 2007-03-08 00:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1676321&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mark (theshtat)
Assigned to: Nobody/Anonymous (nobody)
Summary: scheduler.empty() in module sched appears broken

Initial Comment:
In:
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) 
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin

The sched.scheduler.empty() method appears to be broken.  Its implementation is:
  return not not self.queue
Which returns true when the event queue is *not* empty.
http://www.google.com/codesearch?hl=en&q=+file:sched.py+%22not+not%22+show:_EUH1sHctjI:SV8rbKB68UQ:wZlnTyplW4c&sa=N&cd=1&ct=rc&cs_p=http://svn.python.org/snapshots/python25.tar.bz2&cs_f=python/Lib/sched.py#a0

Other Python builds seem to have a correct implementation:
http://www.google.com/codesearch?hl=en&q=+file:sched.py+%22len(self.queue)%22+show:tKxWDv9S6Xg:d-f-3CzYpHc:iU9xQ6L5s1s&sa=N&cd=1&ct=rc&cs_p=http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tar.bz2&cs_f=Python-2.4.3/Lib/sched.py#a0

Thanks,
Mark
mayzenshtat at) gmail (dot com

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1676321&group_id=5470


More information about the Python-bugs-list mailing list