summaryrefslogtreecommitdiff
path: root/Lib/sched.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-08-17 22:04:45 -0700
committerRaymond Hettinger <python@rcn.com>2015-08-17 22:04:45 -0700
commit987091c333ad1a6be824a843b87816faca8937c4 (patch)
tree747c8b9351866e46c5e8764770d315fe8d2cef38 /Lib/sched.py
parent94906103fc231864fdc8b103febcc10bba8ad086 (diff)
downloadcpython-987091c333ad1a6be824a843b87816faca8937c4.tar.gz
Issue #24878: Add docstrings to selected namedtuples
Diffstat (limited to 'Lib/sched.py')
-rw-r--r--Lib/sched.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/sched.py b/Lib/sched.py
index b47648d973..bd7c0f1b6f 100644
--- a/Lib/sched.py
+++ b/Lib/sched.py
@@ -46,6 +46,17 @@ class Event(namedtuple('Event', 'time, priority, action, argument, kwargs')):
def __gt__(s, o): return (s.time, s.priority) > (o.time, o.priority)
def __ge__(s, o): return (s.time, s.priority) >= (o.time, o.priority)
+Event.time.__doc__ = ('''Numeric type compatible with the return value of the
+timefunc function passed to the constructor.''')
+Event.priority.__doc__ = ('''Events scheduled for the same time will be executed
+in the order of their priority.''')
+Event.action.__doc__ = ('''Executing the event means executing
+action(*argument, **kwargs)''')
+Event.argument.__doc__ = ('''argument is a sequence holding the positional
+arguments for the action.''')
+Event.kwargs.__doc__ = ('''kwargs is a dictionary holding the keyword
+arguments for the action.''')
+
_sentinel = object()
class scheduler: