summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/classes.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tutorial/classes.rst')
-rw-r--r--Doc/tutorial/classes.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index f91c3f0..d5bde44 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -711,12 +711,12 @@ returns an object with a :meth:`next` method. If the class defines
Generators
==========
-Generators are a simple and powerful tool for creating iterators. They are
-written like regular functions but use the :keyword:`yield` statement whenever
-they want to return data. Each time :meth:`next` is called, the generator
-resumes where it left-off (it remembers all the data values and which statement
-was last executed). An example shows that generators can be trivially easy to
-create::
+:term:`Generator`\s are a simple and powerful tool for creating iterators. They
+are written like regular functions but use the :keyword:`yield` statement
+whenever they want to return data. Each time :meth:`next` is called, the
+generator resumes where it left-off (it remembers all the data values and which
+statement was last executed). An example shows that generators can be trivially
+easy to create::
def reverse(data):
for index in range(len(data)-1, -1, -1):