8000 Minor Changes · realpython/python-guide@558e60c · GitHub
[go: up one dir, main page]

Skip to content

Commit 558e60c

Browse files
Minor Changes
1 parent 843348e commit 558e60c

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
contain the root `toctree` directive.
55
66
.. meta::
7-
:description: An opinionated guide to the Python programming language and a best practice handbook to the installation, configuration, and usage of Python on a daily basis.
7+
:description: An opinionated guide to the Python programming language and a best practice handbook for the installation, configuration, and usage of Python on a daily basis.
88

99

1010
#################################
@@ -17,15 +17,15 @@ Greetings, Earthling! Welcome to The Hitchhiker's Guide to Python.
1717
`fork us on GitHub <https://github.com/realpython/python-guide>`_!
1818

1919
This handcrafted guide exists to provide both novice and expert Python
20-
developers a best practice handbook to the installation, configuration, and
20+
developers a best practice handbook for the installation, configuration, and
2121
usage of Python on a daily basis.
2222

2323
This guide is **opinionated** in a way that is almost, but not quite, entirely
2424
*unlike* Python's official documentation. You won't find a list of every Python web framework
2525
available here. Rather, you'll find a nice concise list of highly recommended
2626
options.
2727

28-
.. 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.
28+
.. note:: The use of **Python 3** is *highly* recommended over Python 2. Consider upgrading your applications and infrastructures 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.
2929
—*Kenneth Reitz*
3030

3131
Let's get started! But first, let's make sure you know where your towel is.

docs/writing/documentation.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Project Publication
4545
Depending on the project, your documentation might include some or all
4646
of the following components:
4747

48-
- An *introduction* should show a very short overview of what can be
48+
- An *introduction* should give a very short overview of what can be
4949
done with the product, using one or two extremely simplified use
5050
cases. This is the thirty-second pitch for your project.
5151

@@ -94,7 +94,7 @@ reStructuredText
9494
~~~~~~~~~~~~~~~~
9595

9696
Most Python documentation is written with reStructuredText_. It&# 10000 39;s like
97-
Markdown with all the optional extensions built in.
97+
Markdown, but with all the optional extensions built in.
9898

9999
The `reStructuredText Primer`_ and the `reStructuredText Quick
100100
Reference`_ should help you familiarize yourself with its syntax.
@@ -149,8 +149,8 @@ a project's documentation.
149149
Additionally, Doctest_ will read all embedded docstrings that look like input
150150
from the Python commandline (prefixed with ">>>") and run them, checking to see
151151
if the output of the command matches the text on the following line. This
152-
allows developers to embed real examples and usage of functions alongside
153-
their source code, and as a side effect, it also ensures that their code is
152+
allows developers to embed real examples and usage of functions alongside
153+
their source code. As a side effect, it also ensures that their code is
154154
tested and works.
155155

156156
::
@@ -187,8 +187,8 @@ Docstrings are accessible from both the `__doc__` dunder attribute for almost
187187
every Python object, as well as with the built in `help()` function.
188188

189189
While block comments are usually used to explain *what* a section of code is
190-
doing, or the specifics of an algorithm, docstrings are more intended for
191-
explaining to other users of your code (or you in 6 months time) *how* a
190+
doing, or the specifics of an algorithm, docstrings are more intended towards
191+
explaining other users of your code (or you in 6 months time) *how* a
192192
particular function can be used and the general purpose of a function, class,
193193
or module.
194194

@@ -214,7 +214,7 @@ In larger or more complex projects however, it is often a good idea to give
214214
more information about a function, what it does, any exceptions it may raise,
215215
what it returns, or relevant details about the parameters.
216216

217-
For more detailed documentation of code a popular style is the one used for the
217+
For more detailed documentation of code a popular style used, is the one used by the
218218
NumPy project, often called `NumPy style`_ docstrings. While it can take up more
219219
lines than the previous example, it allows the developer to include a lot
220220
more information about a method, function, or class. ::

docs/writing/gotchas.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Common Gotchas
77
.. image:: /_static/photos/34435688380_b5a740762b_k_d.jpg
88

99
For the most part, Python aims to be a clean and consistent language that
10-
avoids surprises. However, there are a few cases that can be confusing to
10+
avoids surprises. However, there are a few cases that can be confusing for
1111
newcomers.
1212

1313
Some of these cases are intentional but can be potentially surprising. Some
1414
could arguably be considered language warts. In general, what follows
1515
is a collection of potentially tricky behavior that might seem strange at first
16-
glance, but is generally sensible once you're aware of the underlying cause for
16+
glance, but are generally sensible, once you're aware of the underlying cause for
1717
the surprise.
1818

1919

@@ -53,8 +53,8 @@ isn't provided, so that the output is::
5353
[12]
5454
[42]
5555

56-
What Does Happen
57-
~~~~~~~~~~~~~~~~
56+
What Actually Happens
57+
~~~~~~~~~~~~~~~~~~~~~
5858

5959
.. testoutput::
6060

@@ -100,6 +100,7 @@ Late Binding Closures
100100
Another common source of confusion is the way Python binds its variables in
101101
closures (or in the surrounding global scope).
102102

103+
103104
What You Wrote
104105
~~~~~~~~~~~~~~
105106

@@ -125,8 +126,8 @@ variable that multiplies their argument, producing::
125126
6
126127
8
127128

128-
What Does Happen
129-
~~~~~~~~~~~~~~~~
129+
What Actually Happens
130+
~~~~~~~~~~~~~~~~~~~~~
130131

131132
.. testoutput::
132133

@@ -206,7 +207,7 @@ will automatically write a bytecode version of that file to disk, e.g.
206207
These ``.pyc`` files should not be checked into your source code repositories.
207208

208209
Theoretically, this behavior is on by default for performance reasons.
209-
Without these bytecode files present, Python would re-generate the bytecode
210+
Without these bytecode files, Python would re-generate the bytecode
210211
every time the file is loaded.
211212

212213

0 commit comments

Comments
 (0)
0