Skip to content

Commit 2befbad

Browse files
authored
Fix grammar in Doc/tutorial/classes.rst (#163197)
1 parent 4261ce2 commit 2befbad

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎Doc/tutorial/classes.rst‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Classes
77
Classes provide a means of bundling data and functionality together. Creating
88
a new class creates a new *type* of object, allowing new *instances* of that
99
type to be made. Each class instance can have attributes attached to it for
10-
maintaining its state. Class instances can also have methods (defined by its
10+
maintaining its state. Class instances can also have methods (defined by their
1111
class) for modifying its state.
1212

1313
Compared with other programming languages, Python's class mechanism adds classes
@@ -73,7 +73,7 @@ implemented as Python dictionaries, but that's normally not noticeable in any
7373
way (except for performance), and it may change in the future. Examples of
7474
namespaces are: the set of built-in names (containing functions such as :func:`abs`, and
7575
built-in exception names); the global names in a module; and the local names in
76-
a function invocation. In a sense the set of attributes of an object also form
76+
a function invocation. In a sense the set of attributes of an object also forms
7777
a namespace. The important thing to know about namespaces is that there is
7878
absolutely no relation between names in different namespaces; for instance, two
7979
different modules may both define a function ``maximize`` without confusion ---
@@ -229,7 +229,7 @@ The simplest form of class definition looks like this::
229229
.
230230
<statement-N>
231231

232-
Class definitions, like function definitions (:keyword:`def` statements) must be
232+
Class definitions, like function definitions (:keyword:`def` statements), must be
233233
executed before they have any effect. (You could conceivably place a class
234234
definition in a branch of an :keyword:`if` statement, or inside a function.)
235235

@@ -642,7 +642,7 @@ attributes inherited from a parent class as depth-first, left-to-right, not
642642
searching twice in the same class where there is an overlap in the hierarchy.
643643
Thus, if an attribute is not found in :class:`!DerivedClassName`, it is searched
644644
for in :class:`!Base1`, then (recursively) in the base classes of :class:`!Base1`,
645-
and if it was not found there, it was searched for in :class:`!Base2`, and so on.
645+
and if it is not found there, it is searched for in :class:`!Base2`, and so on.
646646

647647
In fact, it is slightly more complex than that; the method resolution order
648648
changes dynamically to support cooperative calls to :func:`super`. This
@@ -889,8 +889,8 @@ compact is that the :meth:`~iterator.__iter__` and :meth:`~generator.__next__` m
889889
are created automatically.
890890

891891
Another key feature is that the local variables and execution state are
892-
automatically saved between calls. This made the function easier to write and
893-
much more clear than an approach using instance variables like ``self.index``
892+
automatically saved between calls. This makes the function easier to write and
893+
much clearer than an approach using instance variables like ``self.index``
894894
and ``self.data``.
895895

896896
In addition to automatic method creation and saving program state, when

0 commit comments

Comments
 (0)