From 9c6c6c4330fc68115be012de254161f36e3a8328 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Thu, 23 Sep 2021 09:04:37 -0700 Subject: [PATCH] add next() info --- README.md | 2 +- templates/readme_template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1040b2b2..18f200d7 100644 --- a/README.md +++ b/README.md @@ -274,7 +274,7 @@ $ ping 1.1.1.1 | jc --ping-s -u | jq Streaming parsers accept any iterable object and return a generator iterator object allowing lazy processing of the data. The input data should iterate on lines of string data. Examples of good input data are `sys.stdin` or `str.splitlines()`. -To use the generator object in your code, simply loop through it: +To use the generator object in your code, simply loop through it or use the [next()](https://docs.python.org/3/library/functions.html#next) builtin function: ```python import jc.parsers.ls_s diff --git a/templates/readme_template b/templates/readme_template index 9cf5b32e..894e439e 100644 --- a/templates/readme_template +++ b/templates/readme_template @@ -197,7 +197,7 @@ $ ping 1.1.1.1 | jc --ping-s -u | jq Streaming parsers accept any iterable object and return a generator iterator object allowing lazy processing of the data. The input data should iterate on lines of string data. Examples of good input data are `sys.stdin` or `str.splitlines()`. -To use the generator object in your code, simply loop through it: +To use the generator object in your code, simply loop through it or use the [next()](https://docs.python.org/3/library/functions.html#next) builtin function: ```python import jc.parsers.ls_s