diff options
author | Raymond Hettinger <python@rcn.com> | 2016-10-24 14:31:55 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-10-24 14:31:55 (GMT) |
commit | 712d593e494e2ccaeff08f3b137e7fd2a2a79645 (patch) | |
tree | 07a95df0f4c96e1aa4c9b0e8d028a09dca1e23d3 /Lib/sched.py | |
parent | e89639124b0fb5fa1a6caceb9541a91529182980 (diff) | |
download | cpython-712d593e494e2ccaeff08f3b137e7fd2a2a79645.zip cpython-712d593e494e2ccaeff08f3b137e7fd2a2a79645.tar.gz cpython-712d593e494e2ccaeff08f3b137e7fd2a2a79645.tar.bz2 |
Issue #5830: Remove old comment. Add empty slots.
Diffstat (limited to 'Lib/sched.py')
-rw-r--r-- | Lib/sched.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/sched.py b/Lib/sched.py index bd7c0f1..3d8c011 100644 --- a/Lib/sched.py +++ b/Lib/sched.py @@ -23,11 +23,6 @@ The action function may be an instance method so it has another way to reference private data (besides global variables). """ -# XXX The timefunc and delayfunc should have been defined as methods -# XXX so you can define new kinds of schedulers using subclassing -# XXX instead of having to define a module or class just to hold -# XXX the global state of your particular time and delay functions. - import time import heapq from collections import namedtuple @@ -40,6 +35,7 @@ from time import monotonic as _time __all__ = ["scheduler"] class Event(namedtuple('Event', 'time, priority, action, argument, kwargs')): + __slots__ = [] def __eq__(s, o): return (s.time, s.priority) == (o.time, o.priority) def __lt__(s, o): return (s.time, s.priority) < (o.time, o.priority) def __le__(s, o): return (s.time, s.priority) <= (o.time, o.priority) |