diff --git a/README.md b/README.md index 18e8a38..dc6216b 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,9 @@ from itertools import count, repeat, cycle, chain, islice Generator --------- -**Convenient way to implement the iterator protocol.** +* **Convenient way to implement the iterator protocol.** +* **Any function that contains a yield statement returns a generator object.** +* **Generators and iterators are interchangeable.** ```python def count(start, step): diff --git a/index.html b/index.html index 0fc2f79..c1aa7ca 100644 --- a/index.html +++ b/index.html @@ -346,7 +346,11 @@ to_exclusive = <range>.stop <iter> = islice(<collection>, from_inclusive, to_exclusive, +step_size)

#Generator

-

Convenient way to implement the iterator protocol.

+
def count(start, step):
     while True:
         yield start