From 5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 17 Aug 2015 22:04:45 -0700 Subject: Issue #24878: Add docstrings to selected namedtuples --- Lib/sched.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Lib/sched.py') 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: -- cgit v1.2.1