8000 Minor Polishes · realpython/python-guide@46ff6a6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 46ff6a6

Browse files
Minor Polishes
1 parent 148e650 commit 46ff6a6

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

docs/scenarios/admin.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Ansible
199199
*******
200200

201201
`Ansible <http://ansible.com/>`_ is an open source system automation tool.
202-
The biggest advantage over Puppet or Chef is it does not require an agent on
202+
Its biggest advantage over Puppet or Chef is that it does not require an agent on
203203
the client machine. Playbooks are Ansible’s configuration, deployment, and
204204
orchestration language and are written in YAML with Jinja2 for templating.
205205

docs/scenarios/ci.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Travis-CI
6565
tests for open source projects for free. It provides multiple workers to run
6666
Python tests on and seamlessly integrates with GitHub. You can even have it
6767
comment on your Pull Requests whether this particular changeset breaks the
68-
build or not. So if you are hosting your code on GitHub, Travis-CI is a great
68+
build or not. So, if you are hosting your code on GitHub, Travis-CI is a great
6969
and easy way to get started with Continuous Integration.
7070

7171
In order to get started, add a :file:`.travis.yml` file to your repository with

docs/starting/which-python.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Recommendations
3131
***************
3232

3333

34-
.. note:: The use of **Python 3** is *highly* preferred over Python 2. Consider upgrading your applications and infrastructure if you find yourself *still* using Python 2 in production today. If you are using Python 3, congratulations — you are indeed a person of excellent taste.
34+
.. note:: The use of **Python 3** is *highly* recommended over Python 2. Consider upgrading your applications and infrastructure if you find yourself *still* using Python 2 in production today. If you are using Python 3, congratulations — you are indeed a person of excellent taste.
3535
—*Kenneth Reitz*
3636

3737
I'll be blunt:

docs/writing/style.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ but making a public property private might be a much harder operation.
226226
Returning values
227227
~~~~~~~~~~~~~~~~
228228

229-
When a function grows in complexity it is not uncommon to use multiple return
229+
When a function grows in complexity, it is not uncommon to use multiple return
230230
statements inside the function's body. However, in order to keep a clear intent
231231
and a sustainable readability level, it is preferable to avoid returning
232232
meaningful values from many output points in the body.
@@ -639,11 +639,11 @@ Short Ways to Manipulate Lists
639639

640640
`List comprehensions
641641
<http://docs.python.org/tutorial/datastructures.html#list-comprehensions>`_
642-
provide a powerful, concise way to work with lists.
642+
provides a powerful, concise way to work with lists.
643643

644644
`Generator expressions
645645
<http://docs.python.org/tutorial/classes.html#generator-expressions>`_
646-
follow almost the same syntax as list comprehensions but return a generator
646+
follows almost the same syntax as list comprehensions but return a generator
647647
instead of a list.
648648

649649
Creating a new list requires more work and uses more memory. If you are just going
@@ -829,7 +829,7 @@ a white space added to the end of the line, after the backslash, will break the
829829
code and may have unexpected results.
830830

831831
A better solution is to use parentheses around your elements. Left with an
832-
unclosed parenthesis on an end-of-line the Python interpreter will join the
832+
unclosed parenthesis on an end-of-line, the Python interpreter will join the
833833
next line until the parentheses are closed. The same behavior holds for curly
834834
and square braces.
835835

docs/writing/tests.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Testing Your Code
99
Testing your code is very important.
1010

1111
Getting used to writing testing code and running this code in parallel is now
12-
considered a good habit. Used wisely, this method helps you define more
13-
precisely your code's intent and have a more decoupled architecture.
12+
considered a good habit. Used wisely, this method helps to define your
13+
code's intent more precisely and have a more decoupled architecture.
1414

1515
Some general rules of testing:
1616

@@ -294,6 +294,6 @@ always returns the same result (but only for the duration of the test).
294294
# get_search_results runs a search and iterates over the result
295295
self.assertEqual(len(myapp.get_search_results(q="fish")), 3)
296296
297-
Mock has many other ways you can configure it and control its behavior.
297+
Mock has many other ways with which you can configure and control its behaviour.
298298

299299
`mock <http://www.voidspace.org.uk/python/mock/>`_

0 commit comments

Comments
 (0)
0