From 9ecc161f4908b59031fa9ce097d11384f78311ff Mon Sep 17 00:00:00 2001 From: Vipul Kumar Date: Mon, 6 Sep 2021 09:28:14 +0530 Subject: [PATCH 1/3] [igd] Emphasis words, instead of quoting in asterisks Having a backward slash (\) before asterisk (*), let Sphinx even parse these asterisks in which word is quoted. It would be better to highlight these words with double asterisks to make it bold, instead of quoting in asterisks. --- docs/igd.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/igd.rst b/docs/igd.rst index 9092573..e5d252a 100644 --- a/docs/igd.rst +++ b/docs/igd.rst @@ -133,8 +133,8 @@ and the generator state is suspended. During the second *next* call the generato it freeze-ed before and then the value of *low* is increased by one. It continues with the while loop and comes to the *yield* statement again. -When you call an generator function it returns a \*generator* object. If you call \*dir* -on this object you will find that it contains *__iter__* and \*__next__* methods among the +When you call an generator function it returns a **generator** object. If you call **dir** +on this object you will find that it contains **__iter__** and **__next__** methods among the other methods. :: @@ -245,7 +245,7 @@ The syntax of generator expression says that always needs to be directly inside at 0x7fc559516b90> We can have chaining of generators or generator expressions. In the following -example we will read the file \*/var/log/cron* and will find if any particular +example we will read the file **/var/log/cron** and will find if any particular job (in the example we are searching for anacron) is running successfully or not. We can do the same using a shell command *tail -f /var/log/cron |grep anacron* From ae70c77aa623bb27e364c23c7fb2ff15c18e72ec Mon Sep 17 00:00:00 2001 From: Vipul Kumar Date: Mon, 6 Sep 2021 09:38:59 +0530 Subject: [PATCH 2/3] [igd] Fix indentation issue in "Generators" section Because of improper indentation, code block in "Generators" section isn't get properly formatted. --- docs/igd.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/igd.rst b/docs/igd.rst index e5d252a..f1b7093 100644 --- a/docs/igd.rst +++ b/docs/igd.rst @@ -142,10 +142,10 @@ other methods. >>> c = counter_generator(5,10) >>> dir(c) ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', - '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__iter__', - '__le__', '__lt__', '__name__', '__ne__', '__new__', '__next__', '__reduce__', - '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', - 'close', 'gi_code', 'gi_frame', 'gi_running', 'send', 'throw'] + '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__iter__', + '__le__', '__lt__', '__name__', '__ne__', '__new__', '__next__', '__reduce__', + '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', + 'close', 'gi_code', 'gi_frame', 'gi_running', 'send', 'throw'] We mostly use generators for laze evaluations. This way generators become a good approach to work with lots of data. If you don't want to load all the data in the memory, you can use From e844eab388e78f9e1e069d56688e599a46a6f6a3 Mon Sep 17 00:00:00 2001 From: Vipul Kumar Date: Mon, 6 Sep 2021 09:42:00 +0530 Subject: [PATCH 3/3] [igd] Fix a typo Replace "freeze-ed" word with "suspended", freeze-ed is not a word. --- docs/igd.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/igd.rst b/docs/igd.rst index f1b7093..f4e3c1d 100644 --- a/docs/igd.rst +++ b/docs/igd.rst @@ -130,7 +130,7 @@ in a for loop. Inside the while loop when it reaches to the *yield* statement, the value of low is returned and the generator state is suspended. During the second *next* call the generator resumed where -it freeze-ed before and then the value of *low* is increased by one. It continues with the +it suspended before and then the value of *low* is increased by one. It continues with the while loop and comes to the *yield* statement again. When you call an generator function it returns a **generator** object. If you call **dir**