File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,10 +73,11 @@ simple example of a ``generator`` function:
7373 It is not really useful in this case. Generators are best for
7474calculating large sets of results (particularly calculations involving
7575loops themselves) where you don't want to allocate the memory for all
76- results at the same time. Python modified a lot of Python 2 functions
77- which returned ``lists `` to return ``generators `` in Python 3. It is
78- because ``generators `` are not resource intensive. Here is an example
79- which calculates fibonacci numbers:
76+ results at the same time. Many Standard Library functions that return
77+ ``lists `` in Python 2 have been modified to return ``generators `` in
78+ Python 3 because ``generators `` require fewer resources.
79+
80+ Here is an example ``generator `` which calculates fibonacci numbers:
8081
8182.. code :: python
8283
You can’t perform that action at this time.
0 commit comments