Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d78b1a3

Browse filesBrowse files
author
Kenneth Reitz
committed
Merge pull request realpython#179 from campbellr/master
Fix several spelling mistakes
2 parents 6a45957 + 1d63c91 commit d78b1a3
Copy full SHA for d78b1a3

File tree

8 files changed

+36
-36
lines changed
Filter options

8 files changed

+36
-36
lines changed

‎docs/dev/env.rst

Copy file name to clipboardExpand all lines: docs/dev/env.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ VIM
1515
Vim is a text editor which uses keyboard shortcuts for editing instead of menus
1616
or icons. There exist a couple of plugins and settings for the VIM editor to
1717
aid python development. If you only develop in Python, a good start is to set
18-
the default settings for indentation and linewrapping to values compliant with
18+
the default settings for indentation and line-wrapping to values compliant with
1919
`PEP 8 <http://www.python.org/dev/peps/pep-0008/>`_. In your home directory,
2020
open a file called `.vimrc` and add the following lines: ::
2121

@@ -162,7 +162,7 @@ Create a virtual environment for a project::
162162
$ cd my_project
163163
$ virtualenv venv
164164

165-
``virtualenv venv`` will create a folder in the currect directory
165+
``virtualenv venv`` will create a folder in the current directory
166166
which will contain the Python executable files, and a copy of the ``pip``
167167
library which you can use to install other packages. The name of the
168168
virtual environment (in this case, it was ``venv``) can be anything;

‎docs/intro/learning.rst

Copy file name to clipboardExpand all lines: docs/intro/learning.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ as writing C extensions.
136136
The Python Language Reference
137137
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138138

139-
This is Python's reference manual, it covers the syntax and the core symantics of the
139+
This is Python's reference manual, it covers the syntax and the core semantics of the
140140
language.
141141

142-
`The Python Language Reference <http://docs.python.org/reference/index.html>`_
142+
`The Python Language Reference <http://docs.python.org/reference/index.html>`_

‎docs/notes/styleguide.rst

Copy file name to clipboardExpand all lines: docs/notes/styleguide.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The Guide Style Guide
77
As with all documentation, having a consistent formating helps make the
88
document more understandable. In order to make The Guide easier to digest,
99
all contributions should fit within the rules of this style guide where
10-
approriate.
10+
appropriate.
1111

1212
The Guide is written as :ref:`restructuredtext-ref`.
1313

@@ -29,9 +29,9 @@ Strive to keep any contributions relevant to the :ref:`purpose of The Guide
2929
Be sure to describe what and why you are linking.
3030
* `Cite <http://sphinx.pocoo.org/rest.html?highlight=citations#citations>`_
3131
references where needed.
32-
* If a subject isn't directly relevant to Python, but useful in conjuction
32+
* If a subject isn't directly relevant to Python, but useful in conjunction
3333
with Python (ex: Git, Github, Databases), reference by linking to useful
34-
resouces and describe why it's useful to Python.
34+
resources and describe why it's useful to Python.
3535
* When in doubt, ask.
3636

3737
Headings
@@ -115,7 +115,7 @@ Externally Linking
115115
Read the `Sphinx Tutorial <http://sphinx.pocoo.org/tutorial.html>`_
116116

117117
* Avoid using labels such as "click here", "this", etc. preferring
118-
decriptive labels (SEO worthy) instead.
118+
descriptive labels (SEO worthy) instead.
119119

120120
Linking to Sections in The Guide
121121
--------------------------------

‎docs/starting/install/osx.rst

Copy file name to clipboardExpand all lines: docs/starting/install/osx.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ simply run
3535
3636
$ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
3737
38-
Then, insert the Homebrew directory at the top of your ``PATH`` enviornment
38+
Then, insert the Homebrew directory at the top of your ``PATH`` environment
3939
variable. You can do this by adding the following line at the bottom of your
4040
``~/.bashrc`` file
4141

‎docs/writing/documentation.rst

Copy file name to clipboardExpand all lines: docs/writing/documentation.rst
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ misleading for the maintainers, slow down considerably bug hunting or
7070
refactoring, and then, when discovered wrong, they will throw suspicion on all
7171
other comments in the code, regardless of their individual correctness.
7272

73-
**No need comments for perfect code...** An hypothetical perfectly readable
73+
**There's no need to comment perfect code...** An hypothetical perfectly readable
7474
code, with a crystal clear logic stream, expressive variable and function
7575
names, orthogonal segmentation passing exactly between the flesh and the bones,
7676
and no implicit assumptions of any kind, would not require any comment at all.
7777
When striving for coding excellence, it is useful to see any existing comment,
7878
or any feeling of a need for a comment, as the sign that the code do not
7979
express clearly enough its intent and can be improved.
8080

81-
**.. but no code is perfect.** Perfect code is a chimere, it exists only in
81+
**.. but no code is perfect.** Perfect code is a chimera, it exists only in
8282
our dreams. In real life, a code base is full of trade offs, and comments are
8383
often needed in the most difficult parts. Moreover, any special case, any
8484
obscure hack, any monkey patch and any ugly workaround MUST be signaled and
@@ -87,15 +87,15 @@ explained by a proper comment. This should be enforced by the law!
8787
**TODOs** are special comments that a developer write as a reminder for later
8888
use. It is said that its original intent was that someone might, one day,
8989
search for the string "TODO" in the code base and actually roll their sleeves
90-
and start *to do the TODOs*. There is no avalaible record that it ever
90+
and start *to do the TODOs*. There is no available record that it ever
9191
happened. However, TODOs comment are still very useful, because they mark the
9292
current limits of the code, and it is not unlikely that, when required to add a
9393
new behavior to the actual code, looking at the TODOs will show where to start.
9494

9595
**Do not use triple-quote strings to comment code.** A common operation when
96-
modifiying code is to comment out some lines or even a full function or class
96+
modifying code is to comment out some lines or even a full function or class
9797
definition. This can be done by adding triple-quotes around the code block to
98-
be skipped, but this is not a good pratice, because line-oriented command-line
98+
be skipped, but this is not a good practice, because line-oriented command-line
9999
tools such as ``grep`` will not be aware that the commented code is inactive.
100100
It is better to add hashes at the proper indentation level for every commented
101101
line. Good editors allow to do this with few keystrokes (ctrl-v on Vim).
@@ -156,7 +156,7 @@ Block comment styling should be used when commenting out multiple lines of code.
156156
Paragraphs inside a block comment are separated by a line containing a
157157
single #.
158158

159-
Inline comments are used for individual lines and should be used sparingly.: ::
159+
In-line comments are used for individual lines and should be used sparingly.: ::
160160

161161
An inline comment is a comment on the same line as a statement. Inline
162162
comments should be separated by at least two spaces from the statement.

‎docs/writing/structure.rst

Copy file name to clipboardExpand all lines: docs/writing/structure.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ clearer and thus preferred.
279279
Using this mechanism is useful for separating concerns and avoiding
280280
external un-related logic 'polluting' the core logic of the function
281281
or method. A good example of a piece of functionality that is better handled
282-
with decoration is memoization or caching: you want to store the results of an
282+
with decoration is memorization or caching: you want to store the results of an
283283
expensive function in a table and use them directly instead of recomputing
284284
them when they have already been computed. This is clearly not part
285285
of the function logic.

‎docs/writing/style.rst

Copy file name to clipboardExpand all lines: docs/writing/style.rst
+14-14Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ most explicit and straightforward manner is preferred.
4141
def make_complex(x, y):
4242
return {'x': x, 'y': y}
4343
44-
In the good code above, x and y are explicitely received from
44+
In the good code above, x and y are explicitly received from
4545
the caller, and an explicit dictionary is returned. The developer
4646
using this function knows exactly what to do by reading the
4747
first and last lines, which is not the case with the bad example.
@@ -50,7 +50,7 @@ One statement per line
5050
~~~~~~~~~~~~~~~~~~~~~~
5151
5252
While some compound statements such as list comprehensions are
53-
allowed and appreciated for their brevity and their expressivity,
53+
allowed and appreciated for their brevity and their expressiveness,
5454
it is bad practice to have two disjoint statements on the same line.
5555
5656
**Bad**
@@ -107,10 +107,10 @@ passed another value.
107107
108108
Calling a function with keyword arguments can be done in multiple ways in Python,
109109
for example it is possible to follow the order of arguments in the definition without
110-
explicitely naming the arguments, like in ``send('Hello', 'World', 'Cthulhu`, 'God')``,
110+
explicitly naming the arguments, like in ``send('Hello', 'World', 'Cthulhu`, 'God')``,
111111
sending a blank carbon copy to God. It would also be possible to name arguments in
112112
another order, like in ``send('Hello again', 'World', bcc='God', cc='Cthulhu')``.
113-
Those two possibilities are better avoided whitout any strong reason to not
113+
Those two possibilities are better avoided without any strong reason to not
114114
follow the syntax that is the closest to the function definition: ``send('Hello',
115115
'World', cc='Cthulhu', bcc='God')``.
116116
@@ -132,13 +132,13 @@ However, this construct has some drawback and should be used with caution. If a
132132
function receives a list of arguments of the same nature, it is often more
133133
clear to define it as a function of one argument, that argument being a list or
134134
any sequence. Here, if ``send`` has multiple recipients, it is better to define
135-
it explicitely: ``send(message, recipients)`` and call it with ``send('Hello',
135+
it explicitly: ``send(message, recipients)`` and call it with ``send('Hello',
136136
['God', 'Mom', 'Cthulhu'])``. This way, the user of the function can manipulate
137-
the recipient list as a list beforhand, and it opens the possibility to pass
138-
any sequence, inculding iterators, that cannot be unpacked as other sequences.
137+
the recipient list as a list beforehand, and it opens the possibility to pass
138+
any sequence, including iterators, that cannot be unpacked as other sequences.
139139
140140
The **arbitrary keyword argument dictionary** is the last way to pass arguments
141-
to functions. If the function requires an undetermined serie of named
141+
to functions. If the function requires an undetermined series of named
142142
arguments, it is possible to used the ``**kwargs`` construct. In the function
143143
body, ``kwargs`` will be a dictionary of all the passed named arguments that
144144
have not been caught be other keyword argument in the function signature.
@@ -149,8 +149,8 @@ proven necessity to use them, and they should not be used if the simpler and
149149
clearer construct is sufficient to express the function's intention.
150150
151151
It is up to the programmer writing the function to determine which arguments
152-
are positional argmuents and which are optional keyword arguments, and to
153-
decide wheter to use the advanced techniques of arbitrary argument passing. If
152+
are positional arguments and which are optional keyword arguments, and to
153+
decide whether to use the advanced techniques of arbitrary argument passing. If
154154
the advices above are followed wisely, it is possible and enjoyable to write
155155
Python functions that are:
156156
@@ -164,7 +164,7 @@ Avoid the magical wand
164164
165165
A powerful tool for hackers, Python comes with a very rich set of hooks and
166166
tools allowing to do almost any kind of tricky tricks. For instance, it is
167-
possible to change how objects are created and instanciated, it is possible to
167+
possible to change how objects are created and instantiated, it is possible to
168168
change how the Python interpreter imports modules, it is even possible (and
169169
recommended if needed) to embed C routines in Python.
170170
@@ -222,7 +222,7 @@ output point in the body.
222222
223223
There are two main cases for returning values in a function: The result of the function
224224
return when it has been processed normally, and the error cases that indicate a wrong
225-
input paramter or any other reason for the function to not be able to complete its
225+
input parameter or any other reason for the function to not be able to complete its
226226
computation or task.
227227
228228
If you do not wish to raise exceptions for the second case, then returning a value, such
@@ -610,7 +610,7 @@ sometime but is preferably avoided, because of its fragility: a white space
610610
added to the end of the line, after the backslash, will break the code and may
611611
have unexpected results.
612612
613-
A prefered solution is to use parenthesis around your elements. Left with an
613+
A preferred solution is to use parenthesis around your elements. Left with an
614614
unclosed parenthesis on an end-of-line the Python interpreter will join the
615615
next line until the parenthesis is closed. The same behavior holds for curly
616616
and square braces.
@@ -624,7 +624,7 @@ and square braces.
624624
time to say “I’m going to sleep.”"""
625625
626626
from some.deep.module.inside.a.module import a_nice_function, another_nice_function, \
627-
yet_another_nice_functio
627+
yet_another_nice_function
628628
629629
**Good**:
630630

‎docs/writing/tests.rst

Copy file name to clipboardExpand all lines: docs/writing/tests.rst
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Testing Your Code
33

44
Testing your code is very important.
55

6-
Getting used to writting the testing code and the running code in parallel is
6+
Getting used to writing the testing code and the running code in parallel is
77
now considered a good habit. Used wisely, this method helps you define more
88
precisely your code's intent and have a more decoupled architecture.
99

@@ -39,7 +39,7 @@ Some general rules of testing:
3939

4040
- If you are in the middle of a development and have to interrupt your work, it
4141
is a good idea to write a broken unit test about what you want to develop next.
42-
When comming back to work, you will have a pointer to where you were and get
42+
When coming back to work, you will have a pointer to where you were and get
4343
faster on tracks.
4444

4545
- The first step when you are debugging your code is to write a new test
@@ -48,7 +48,7 @@ Some general rules of testing:
4848

4949
- Use long and descriptive names for testing functions. The style guide here is
5050
slightly different than that of running code, where short names are often
51-
preferred. The reason is testing functions are never called explicitely.
51+
preferred. The reason is testing functions are never called explicitly.
5252
``square()`` or even ``sqr()`` is ok in running code, but in testing code you
5353
would has names such as ``test_square_of_number_2()``,
5454
``test_square_negative_number()``. These function names are displayed when a
@@ -61,7 +61,7 @@ Some general rules of testing:
6161
purpose is unclear is not very helpful is this case.
6262

6363
- Another use of the testing code is as an introduction to new developers. When
64-
someone will have to work on the code base, runnning and reading the related
64+
someone will have to work on the code base, running and reading the related
6565
testing code is often the best they can do. They will or should discover the
6666
hot spots, where most difficulties arise, and the corner cases. If they have
6767
to add some functionality, the first step should be to add a test and, by this
@@ -214,15 +214,15 @@ multiple interpreter configurations
214214

215215
$ pip install tox
216216

217-
tox allows you to configure complicatated multi-parameter test matrices via a
217+
tox allows you to configure complicated multi-parameter test matrices via a
218218
simple ini-style configuration file.
219219

220220
`tox <http://tox.testrun.org/latest/>`_
221221

222222
Unittest2
223223
---------
224224

225-
unittest2 is a a backport of Python 2.7's unittest module which has an improved
225+
unittest2 is a backport of Python 2.7's unittest module which has an improved
226226
API and better assertions over the one available in previous versions of Python.
227227

228228
If you're using Python 2.6 or below, you can install it with pip

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.