Skip to content

Commit 32437cc

Browse files
authored
Merge pull request realpython#952 from apjanke/typos
Typo and grammar fixes
2 parents 90ab6b3 + eb6ec70 commit 32437cc

14 files changed

+100
-106
lines changed

docs/contents.rst.inc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ New to Python? Let's properly setup up your Python environment:
3333
Python Development Environments
3434
-------------------------------
3535
36-
This part of the guide focus on the Python development environment,
36+
This part of the guide focuses on the Python development environment,
3737
and the best-practice tools that are available for writing Python code.
3838
3939
.. toctree::
@@ -110,7 +110,7 @@ Additional Notes
110110
----------------
111111
112112
This part of the guide, which is mostly prose, begins with some
113-
background information about Python, then focuses on next steps.
113+
background information about Python, and then focuses on next steps.
114114
115115
.. toctree::
116116
:maxdepth: 2
@@ -137,8 +137,3 @@ Contribution notes and legal information (for those interested).
137137
notes/contribute
138138
notes/license
139139
notes/styleguide
140-
141-
142-
143-
144-

docs/dev/env.rst

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Your Development Environment
77
Text Editors
88
::::::::::::
99

10-
Just about anything that can edit plain text will work for writing Python code,
10+
Just about anything that can edit plain text will work for writing Python code;
1111
however, using a more powerful editor may make your life a bit easier.
1212

1313

@@ -97,7 +97,7 @@ using ``<Tab>`` key or any other customized keys.
9797
Emacs
9898
-----
9999

100-
Emacs is another powerful text editor. It is fully programmable (lisp), but
100+
Emacs is another powerful text editor. It is fully programmable (Lisp), but
101101
it can be some work to wire up correctly. A good start if you're already an
102102
Emacs user is `Python Programming in Emacs`_ at EmacsWiki.
103103

@@ -117,8 +117,8 @@ Sublime Text
117117
------------
118118

119119
`Sublime Text <http://www.sublimetext.com/>`_ is a sophisticated text
120-
editor for code, markup and prose. You'll love the slick user interface,
121-
extraordinary features and amazing performance.
120+
editor for code, markup, and prose. You'll love the slick user interface,
121+
extraordinary features, and amazing performance.
122122

123123
Sublime Text has excellent support for editing Python code and uses Python for
124124
its plugin API. It also has a diverse variety of plugins,
@@ -133,7 +133,7 @@ Atom
133133
editors.
134134

135135
Atom is web native (HTML, CSS, JS), focusing on modular design and easy plugin
136-
development. It comes with native package control and plethora of packages.
136+
development. It comes with native package control and a plethora of packages.
137137
Recommended for Python development is
138138
`Linter <https://github.com/AtomLinter/Linter>`_ combined with
139139
`linter-flake8 <https://github.com/AtomLinter/linter-flake8>`_.
@@ -156,7 +156,7 @@ Python (on Visual Studio Code)
156156
------------------------------
157157

158158
`Python for Visual Studio <https://marketplace.visualstudio.com/items?itemName=ms-python.python>`_ is an extension for the `Visual Studio Code IDE <https://code.visualstudio.com>`_.
159-
This is a free, light weight, open source IDE, with support for Mac, Windows, and Linux.
159+
This is a free, lightweight, open source IDE, with support for Mac, Windows, and Linux.
160160
Built using open source technologies such as Node.js and Python, with compelling features such as Intellisense (autocompletion), local and remote debugging, linting, and the like.
161161

162162
MIT licensed.
@@ -192,15 +192,15 @@ toward working with scientific Python libraries (namely
192192
`pylint <http://www.logilab.org/857>`_ and
193193
`rope <https://github.com/python-rope/rope>`_.
194194

195-
Spyder is open-source (free), offers code completion, syntax highlighting,
195+
Spyder is open source (free), offers code completion, syntax highlighting,
196196
a class and function browser, and object inspection.
197197

198198

199199
WingIDE
200200
-------
201201

202202
`WingIDE <http://wingware.com/>`_ is a Python specific IDE. It runs on Linux,
203-
Windows and Mac (as an X11 application, which frustrates some Mac users).
203+
Windows, and Mac (as an X11 application, which frustrates some Mac users).
204204

205205
WingIDE offers code completion, syntax highlighting, source browser, graphical
206206
debugger and support for version control systems.
@@ -211,11 +211,11 @@ NINJA-IDE
211211

212212
`NINJA-IDE <http://www.ninja-ide.org/>`_ (from the recursive acronym: "Ninja-IDE
213213
Is Not Just Another IDE") is a cross-platform IDE, specially designed to build
214-
Python applications, and runs on Linux/X11, Mac OS X and Windows desktop
214+
Python applications, and runs on Linux/X11, Mac OS X, and Windows desktop
215215
operating systems. Installers for these platforms can be downloaded from the
216216
website.
217217

218-
NINJA-IDE is open-source software (GPLv3 licence) and is developed
218+
NINJA-IDE is open source software (GPLv3 licence) and is developed
219219
in Python and Qt. The source files can be downloaded from
220220
`GitHub <https://github.com/ninja-ide>`_.
221221

@@ -224,11 +224,11 @@ Eric (The Eric Python IDE)
224224
--------------------------
225225

226226
`Eric <http://eric-ide.python-projects.org/>`_ is a full featured Python IDE
227-
offering sourcecode autocompletion, syntax highlighting, support for version
228-
control systems, python 3 support, integrated web browser, python shell,
229-
integrated debugger and a flexible plug-in system. Written in python, it is
230-
based on the Qt gui toolkit, integrating the Scintilla editor control. Eric
231-
is an open-source software project (GPLv3 licence) with more than ten years of
227+
offering source code autocompletion, syntax highlighting, support for version
228+
control systems, Python 3 support, integrated web browser, python shell,
229+
integrated debugger, and a flexible plug-in system. Written in Python, it is
230+
based on the Qt GUI toolkit, integrating the Scintilla editor control. Eric
231+
is an open source software project (GPLv3 licence) with more than ten years of
232232
active development.
233233

234234

@@ -253,8 +253,8 @@ of the Python interpreter to be installed at the same time. This solves the
253253
problem of having different projects requiring different versions of Python.
254254
For example, it becomes very easy to install Python 2.7 for compatibility in
255255
one project, whilst still using Python 3.4 as the default interpreter.
256-
pyenv isn't just limited to the CPython versions - it will also install PyPy,
257-
anaconda, miniconda, stackless, jython, and ironpython interpreters.
256+
pyenv isn't just limited to the CPython versions it will also install PyPy,
257+
Anaconda, miniconda, stackless, Jython, and IronPython interpreters.
258258

259259
pyenv works by filling a ``shims`` directory with fake versions of the Python
260260
interpreter (plus other tools like ``pip`` and ``2to3``). When the system
@@ -276,7 +276,7 @@ IDLE
276276
----
277277

278278
:ref:`IDLE <python:idle>` is an integrated development environment that is
279-
part of Python standard library. It is completely written in Python and uses
279+
part of the Python standard distribution. It is completely written in Python and uses
280280
the Tkinter GUI toolkit. Though IDLE is not suited for full-blown development
281281
using Python, it is quite helpful to try out small Python snippets and
282282
experiment with different features in Python.
@@ -294,18 +294,18 @@ IPython
294294
`IPython <http://ipython.org/>`_ provides a rich toolkit to help you make the
295295
most out of using Python interactively. Its main components are:
296296

297-
* Powerful Python shells (terminal- and Qt-based).
297+
* Powerful Python shells (terminal- and Qt-based)
298298
* A web-based notebook with the same core features but support for rich media,
299-
text, code, mathematical expressions and inline plots.
300-
* Support for interactive data visualization and use of GUI toolkits.
301-
* Flexible, embeddable interpreters to load into your own projects.
302-
* Tools for high level and interactive parallel computing.
299+
text, code, mathematical expressions and inline plots
300+
* Support for interactive data visualization and use of GUI toolkits
301+
* Flexible, embeddable interpreters to load into your own projects
302+
* Tools for high level and interactive parallel computing
303303

304304
.. code-block:: console
305305
306306
$ pip install ipython
307307
308-
To download and install IPython with all it's optional dependencies for the notebook, qtconsole, tests, and other functionalities
308+
To download and install IPython with all its optional dependencies for the notebook, qtconsole, tests, and other functionalities:
309309

310310
.. code-block:: console
311311
@@ -318,14 +318,14 @@ BPython
318318
Python interpreter for Unix-like operating systems. It has the following
319319
features:
320320

321-
* In-line syntax highlighting.
322-
* Readline-like autocomplete with suggestions displayed as you type.
323-
* Expected parameter list for any Python function.
324-
* "Rewind" function to pop the last line of code from memory and re-evaluate.
325-
* Send entered code off to a pastebin.
326-
* Save entered code to a file.
327-
* Auto-indentation.
328-
* Python 3 support.
321+
* In-line syntax highlighting
322+
* Readline-like autocomplete with suggestions displayed as you type
323+
* Expected parameter list for any Python function
324+
* "Rewind" function to pop the last line of code from memory and re-evaluate
325+
* Send entered code off to a pastebin
326+
* Save entered code to a file
327+
* Auto-indentation
328+
* Python 3 support
329329

330330
.. code-block:: console
331331
@@ -341,12 +341,12 @@ library. It is considered to be an alternative to BPython_. Features include:
341341
* Syntax highlighting
342342
* Autocompletion
343343
* Multiline editing
344-
* Emacs and VIM Mode
344+
* Emacs and Vim Modes
345345
* Embedding REPL inside of your code
346-
* Syntax Validation
346+
* Syntax validation
347347
* Tab pages
348348
* Support for integrating with IPython_'s shell, by installing IPython
349-
``pip install ipython`` and running ``ptipython``.
349+
(``pip install ipython``) and running ``ptipython``.
350350

351351
.. code-block:: console
352352

docs/dev/pip-virtualenv.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _pip-virtualenv:
22

3-
Further Configuration of Pip and Virtualenv
3+
Further Configuration of pip and Virtualenv
44
===========================================
55

66
.. image:: /_static/photos/34018732105_f0e6758859_k_d.jpg

docs/dev/virtualenvs.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Install virtualenv via pip:
212212
213213
$ pip install virtualenv
214214
215-
Test your installation
215+
Test your installation:
216216

217217
.. code-block:: console
218218
@@ -281,7 +281,7 @@ To delete a virtual environment, just delete its folder. (In this case,
281281
it would be ``rm -rf my_project``.)
282282

283283
After a while, though, you might end up with a lot of virtual environments
284-
littered across your system, and its possible you'll forget their names or
284+
littered across your system, and it's possible you'll forget their names or
285285
where they were placed.
286286

287287
Other Notes
@@ -293,7 +293,7 @@ for keeping the package list clean in case it needs to be accessed later.
293293
[This is the default behavior for ``virtualenv`` 1.7 and later.]
294294

295295
In order to keep your environment consistent, it's a good idea to "freeze"
296-
the current state of the environment packages. To do this, run
296+
the current state of the environment packages. To do this, run:
297297

298298
.. code-block:: console
299299
@@ -302,7 +302,7 @@ the current state of the environment packages. To do this, run
302302
This will create a :file:`requirements.txt` file, which contains a simple
303303
list of all the packages in the current environment, and their respective
304304
versions. You can see the list of installed packages without the requirements
305-
format using "pip list". Later it will be easier for a different developer
305+
format using ``pip list``. Later it will be easier for a different developer
306306
(or you, if you need to re-create the environment) to install the same packages
307307
using the same versions:
308308

@@ -343,7 +343,7 @@ To install (make sure **virtualenv** is already installed):
343343
344344
$ pip install virtualenvwrapper-win
345345
346-
In Windows, the default path for WORKON_HOME is %USERPROFILE%\Envs
346+
In Windows, the default path for WORKON_HOME is %USERPROFILE%\\Envs
347347

348348
Basic Usage
349349
~~~~~~~~~~~
@@ -363,7 +363,7 @@ This creates the :file:`my_project` folder inside :file:`~/Envs`.
363363
$ workon my_project
364364
365365
Alternatively, you can make a project, which creates the virtual environment,
366-
and also a project directory inside ``$WORKON_HOME``, which is ``cd`` -ed into
366+
and also a project directory inside ``$WORKON_HOME``, which is ``cd``-ed into
367367
when you ``workon myproject``.
368368

369369
.. code-block:: console

docs/scenarios/ml.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For installing the full stack, or individual packages, you can refer to the inst
4141
scikit-learn
4242
************
4343

44-
Scikit is a free and open-source machine learning library for Python. It offers off-the-shelf functions to implement many algorithms like linear regression, classifiers, SVMs, k-means, Neural Networks etc. It also has a few sample datasets which can be directly used for training and testing.
44+
Scikit is a free and open source machine learning library for Python. It offers off-the-shelf functions to implement many algorithms like linear regression, classifiers, SVMs, k-means, Neural Networks etc. It also has a few sample datasets which can be directly used for training and testing.
4545

4646
Because of its speed, robustness and easiness to use, it's one of the most widely-used libraries for many Machine Learning applications.
4747

docs/starting/which-python.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ written in C. It compiles Python code to intermediate bytecode which is then
8888
interpreted by a virtual machine. CPython provides the highest
8989
level of compatibility with Python packages and C extension modules.
9090

91-
If you are writing open-source Python code and want to reach the widest possible
91+
If you are writing open source Python code and want to reach the widest possible
9292
audience, targeting CPython is best. To use packages which rely on C extensions
9393
to function, CPython is your only implementation option.
9494

docs/writing/documentation.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ information. This file is the main entry point for readers of the code.
2525

2626
An :file:`INSTALL` file is less necessary with Python. The installation
2727
instructions are often reduced to one command, such as ``pip install
28-
module`` or ``python setup.py install`` and added to the :file:`README`
28+
module`` or ``python setup.py install``, and added to the :file:`README`
2929
file.
3030

3131
A :file:`LICENSE` file should *always* be present and specify the license
@@ -75,7 +75,7 @@ your source repository so that rebuilding your documentation will
7575
happen automatically.
7676

7777
When run, Sphinx_ will import your code and using Python's introspection
78-
features it will extract all function, method and class signatures. It will
78+
features it will extract all function, method, and class signatures. It will
7979
also extract the accompanying docstrings, and compile it all into well
8080
structured and easily readable documentation for your project.
8181

@@ -215,7 +215,7 @@ more information about a function, what it does, any exceptions it may raise,
215215
what it returns, or relevant details about the parameters.
216216

217217
For more detailed documentation of code a popular style is the one used for the
218-
Numpy project, often called `Numpy style`_ docstrings. While it can take up more
218+
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. ::
221221

@@ -245,8 +245,8 @@ docstrings, making it easy to incorporate NumPy style docstrings into your
245245
project.
246246

247247
At the end of the day, it doesn't really matter what style is used for writing
248-
docstrings, their purpose is to serve as documentation for anyone who may need
249-
to read or make changes to your code. As long as it is correct, understandable
248+
docstrings; their purpose is to serve as documentation for anyone who may need
249+
to read or make changes to your code. As long as it is correct, understandable,
250250
and gets the relevant points across then it has done the job it was designed to
251251
do.
252252

docs/writing/gotchas.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ will automatically write a bytecode version of that file to disk, e.g.
205205

206206
These ``.pyc`` files should not be checked into your source code repositories.
207207

208-
Theoretically, this behavior is on by default, for performance reasons.
208+
Theoretically, this behavior is on by default for performance reasons.
209209
Without these bytecode files present, Python would re-generate the bytecode
210210
every time the file is loaded.
211211

docs/writing/license.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ In general, these licenses tend to fall into one of two categories:
1919

2020
1. licenses that focus more on the user's freedom to do with the
2121
software as they please (these are the more permissive open
22-
source licenses such as the MIT, BSD, & Apache).
22+
source licenses such as the MIT, BSD, and Apache)
2323

2424
2. licenses that focus more on making sure that the code itself —
2525
including any changes made to it and distributed along with it —
2626
always remains free (these are the less permissive free software
27-
licenses such as the GPL and LGPL).
27+
licenses such as the GPL and LGPL)
2828

2929
The latter are less permissive in the sense that they don't permit
3030
someone to add code to the software and distribute it without also
3131
including the source code for their changes.
3232

33-
To help you choose one for your project, there's a `license chooser <http://choosealicense.com/>`_,
33+
To help you choose one for your project, there's a `license chooser <http://choosealicense.com/>`_;
3434
**use it**.
3535

3636
**More Permissive**

docs/writing/logging.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ hierarchy of loggers using dot notation, so using ``__name__`` ensures
5858
no name collisions.
5959

6060
Here is an example of best practice from the `requests source`_ -- place
61-
this in your ``__init__.py``
61+
this in your ``__init__.py``:
6262

6363
.. code-block:: python
6464
@@ -83,7 +83,7 @@ There are at least three ways to configure a logger:
8383
- Using an INI-formatted file:
8484
- **Pro**: possible to update configuration while running using the
8585
function :func:`logging.config.listen` to listen on a socket.
86-
- **Con**: less control (*e.g.* custom subclassed filters or loggers)
86+
- **Con**: less control (e.g. custom subclassed filters or loggers)
8787
than possible when configuring a logger in code.
8888
- Using a dictionary or a JSON-formatted file:
8989
- **Pro**: in addition to updating while running, it is possible to load

docs/writing/reading.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ reading. Each one of these projects is a paragon of Python coding.
2525
best intentions in mind.
2626

2727
- `Diamond <https://github.com/python-diamond/Diamond>`_
28-
Diamond is a python daemon that collects metrics
28+
Diamond is a Python daemon that collects metrics
2929
and publishes them to Graphite or other backends.
3030
It is capable of collecting CPU, memory, network, I/O, load, and disk metrics.
3131
Additionally, it features an API for implementing custom collectors
@@ -36,7 +36,7 @@ reading. Each one of these projects is a paragon of Python coding.
3636
applications and has become one of the most advanced WSGI utility modules.
3737
It includes a powerful debugger, full-featured request and response objects,
3838
HTTP utilities to handle entity tags, cache control headers, HTTP dates,
39-
cookie handling, file uploads, a powerful URL routing system and a bunch
39+
cookie handling, file uploads, a powerful URL routing system, and a bunch
4040
of community-contributed addon modules.
4141

4242
- `Requests <https://github.com/kennethreitz/requests>`_
@@ -49,4 +49,4 @@ reading. Each one of these projects is a paragon of Python coding.
4949

5050
.. todo:: Include code examples of exemplary code from each of the projects listed. Explain why it is excellent code. Use complex examples.
5151

52-
.. todo:: Explain techniques to rapidly identify data structures, algorithms and determine what the code is doing.
52+
.. todo:: Explain techniques to rapidly identify data structures and algorithms and determine what the code is doing.

0 commit comments

Comments
 (0)