[Python-checkins] cpython (3.6): Issue #5830: Remove old comment. Add empty slots.

raymond.hettinger python-checkins at python.org
Mon Oct 24 10:32:32 EDT 2016


https://hg.python.org/cpython/rev/ee476248a74a
changeset: 104677:ee476248a74a
branch: 3.6
parent: 104674:081329cca21f
user: Raymond Hettinger <python at rcn.com>
date: Mon Oct 24 07:31:55 2016 -0700
summary:
 Issue #5830: Remove old comment. Add empty slots.
files:
 Lib/sched.py | 6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/Lib/sched.py b/Lib/sched.py
--- a/Lib/sched.py
+++ b/Lib/sched.py
@@ -23,11 +23,6 @@
 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 @@
 __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)
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /