]> granicus.if.org Git - python/commitdiff
Issue #16642: Document kwargs field in sched.Event named tuple.
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 29 Dec 2012 18:57:52 +0000 (20:57 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 29 Dec 2012 18:57:52 +0000 (20:57 +0200)
Doc/library/sched.rst
Lib/sched.py

index d6c86c79e7a277f6c3bcce449706a649368be31a..f6bd43f6349acd8de931ad6b1c613667a2b47662 100644 (file)
@@ -27,6 +27,7 @@ scheduler:
 
    .. versionchanged:: 3.3
       *timefunc* and *delayfunc* parameters are optional.
+
    .. versionchanged:: 3.3
       :class:`scheduler` class can be safely used in multi-threaded
       environments.
@@ -129,4 +130,4 @@ Scheduler Objects
 
    Read-only attribute returning a list of upcoming events in the order they
    will be run.  Each event is shown as a :term:`named tuple` with the
-   following fields:  time, priority, action, argument.
+   following fields:  time, priority, action, argument, kwargs.
index 5551f71df6c0241cb8c5e5754136ce8c0b1c749c..e523bc1c0d4c6894cda3353bffcbbcad81c6753a 100644 (file)
@@ -13,12 +13,12 @@ also be used to integrate scheduling with STDWIN events; the delay
 function is allowed to modify the queue.  Time can be expressed as
 integers or floating point numbers, as long as it is consistent.
 
-Events are specified by tuples (time, priority, action, argument).
+Events are specified by tuples (time, priority, action, argument, kwargs).
 As in UNIX, lower priority numbers mean higher priority; in this
 way the queue can be maintained as a priority queue.  Execution of the
 event means calling the action function, passing it the argument
 sequence in "argument" (remember that in Python, multiple function
-arguments are be packed in a sequence).
+arguments are be packed in a sequence) and keyword parameters in "kwargs".
 The action function may be an instance method so it
 has another way to reference private data (besides global variables).
 """
@@ -151,7 +151,7 @@ class scheduler:
         """An ordered list of upcoming events.
 
         Events are named tuples with fields for:
-            time, priority, action, arguments
+            time, priority, action, arguments, kwargs
 
         """
         # Use heapq to sort the queue rather than using 'sorted(self._queue)'.