Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c182f888
Commit
c182f888
authored
Oct 31, 2014
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor grammar fixes (from docs@python.org)
parent
e969b1b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Doc/tutorial/classes.rst
Doc/tutorial/classes.rst
+2
-2
No files found.
Doc/tutorial/classes.rst
View file @
c182f888
...
...
@@ -826,7 +826,7 @@ Generators
: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 :func:`next` is called on it, the
generator resumes where it left
-
off (it remembers all the data values and which
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::
...
...
@@ -844,7 +844,7 @@ easy to create::
o
g
Anything that can be done with generators can also be done with class
based
Anything that can be done with generators can also be done with class
-
based
iterators as described in the previous section. What makes generators so
compact is that the :meth:`__iter__` and :meth:`~generator.next` methods
are created automatically.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment