From 7c3622083cce13144e667522f9130a8f011dfca5 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Wed, 29 Jun 2016 17:05:55 +0200 Subject: [PATCH] fix typo in docu and extend a little --- src/log_read.py | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/log_read.py b/src/log_read.py index 3bcb054..4e52560 100644 --- a/src/log_read.py +++ b/src/log_read.py @@ -18,7 +18,7 @@ """ Iterative reading of log files -Basic Functionality (class :py:class:`IterativeReader`:) +Basic Functionality (class :py:class:`IterativeReader`): Runs stat in a loop to find out whether file size has changed. Then reads the new data and forwards that @@ -101,7 +101,7 @@ class IterativeReader: Catches most common exceptions in iteration (not constructor) - Does not are about closing files, so does not accept file names + Does not care about closing files, so does not accept file names This is the base for class :py:class:`LineReader` that just has to implement a different :py:meth:`prepare_result` method @@ -257,6 +257,13 @@ class IterativeReader: available. It has to return some iterable whose entries are yielded from iteration over objects of this class. + It receives the following args: + - the description of the source + - the data itself + - the index of the source + The result must be an iterable of objects, which are yielded as-is, so + can have any form + This base implementation just returns its input in a list, so new data is yielded from __iter__ as-is """ -- 1.7.1