Skip to content

Commit 90b12de

Browse files
committed
Fix minor spelling, grammar, and consistency errors in the Mutable and immutable types.
1 parent a27f9d2 commit 90b12de

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/writing/structure.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,12 +356,12 @@ Python has two kinds of built-in or user-defined types.
356356

357357
Mutable types are those that allow in-place modification
358358
of the content. Typical mutables are lists and dictionaries:
359-
All lists have muting methods, like append() or pop(), and
360-
can be modified in place. Same for dictionaries.
359+
All lists have mutating methods, like append() or pop(), and
360+
can be modified in place. The same goes for dictionaries.
361361

362362
Immutable types provide no method for changing their content.
363363
For instance, the variable x set to the integer 6 has no "increment" method. If you
364-
want to computed x + 1, you have to create another integer and give it
364+
want to compute x + 1, you have to create another integer and give it
365365
a name.
366366

367367
.. code-block:: python
@@ -385,8 +385,8 @@ For example, the immutable equivalent of a list is the tuple, created
385385
with ``(1, 2)``. This tuple is a pair that cannot be changed in-place,
386386
and can be used as a key for a dictionary.
387387

388-
One particularity of Python that can surprise in the beginning is that
389-
string are immutable. This means that when constructing a string from
388+
One peculiarity of Python that can surprise beginners is that
389+
strings are immutable. This means that when constructing a string from
390390
its parts, it is much more efficient to accumulate the parts in a list,
391391
which is mutable, and then glue ('join') the parts together when the
392392
full string is needed.

0 commit comments

Comments
 (0)