diff options
author | Raymond Hettinger <python@rcn.com> | 2015-08-18 05:04:45 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-08-18 05:04:45 (GMT) |
commit | 5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3 (patch) | |
tree | 4bb326ec6a4e0bdac1585d09db97611f905ee29a /Lib/sched.py | |
parent | 02aa3426d393642999bb4f0e1a3125b9391ca399 (diff) | |
download | cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.zip cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.tar.gz cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.tar.bz2 |
Issue #24878: Add docstrings to selected namedtuples
Diffstat (limited to 'Lib/sched.py')
-rw-r--r-- | Lib/sched.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/sched.py b/Lib/sched.py index b47648d..bd7c0f1 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: |