Minor grammatical improvements and typo fixes to the docs

Signed-off-by: Steven Erenst <stevenerenst@gmail.com>
This commit is contained in:
Steven Erenst
2016-03-03 22:28:50 -08:00
parent a236bd20b7
commit 2cd5f1d9ae
3 changed files with 7 additions and 7 deletions

View File

@@ -11,7 +11,7 @@
finally:
timeout.cancel()
When *exception* is omitted or ``None``, the :class:`Timeout` instance
When *exception* is omitted or is ``None``, the :class:`Timeout` instance
itself is raised:
>>> Timeout(0.1)
@@ -48,8 +48,8 @@
* If the code block catches and doesn't re-raise :class:`BaseException` (for example, with ``except:``), then it will catch the Timeout exception, and might not abort as intended.
When catching timeouts, keep in mind that the one you catch may not be the
one you have set; if you going to silence a timeout, always check that it's
the same instance that you set::
one you set; if you plan on silencing a timeout, always check that it's the
same instance that you set::
timeout = Timeout(1)
try:

View File

@@ -3,7 +3,7 @@ Using SSL With Eventlet
Eventlet makes it easy to use non-blocking SSL sockets. If you're using Python 2.6 or later, you're all set, eventlet wraps the built-in ssl module. If on Python 2.5 or 2.4, you have to install pyOpenSSL_ to use eventlet.
In either case, the the ``green`` modules handle SSL sockets transparently, just like their standard counterparts. As an example, :mod:`eventlet.green.urllib2` can be used to fetch https urls in as non-blocking a fashion as you please::
In either case, the ``green`` modules handle SSL sockets transparently, just like their standard counterparts. As an example, :mod:`eventlet.green.urllib2` can be used to fetch https urls in as non-blocking a fashion as you please::
from eventlet.green import urllib2
from eventlet import spawn

View File

@@ -37,7 +37,7 @@ Currently there are 16 doctests.
Standard Library Tests
----------------------
Eventlet provides for the ability to test itself with the standard Python networking tests. This verifies that the libraries it wraps work at least as well as the standard ones do. The directory tests/stdlib contains a bunch of stubs that import the standard lib tests from your system and run them. If you do not have any tests in your python distribution, they'll simply fail to import.
Eventlet provides the ability to test itself with the standard Python networking tests. This verifies that the libraries it wraps work at least as well as the standard ones do. The directory tests/stdlib contains a bunch of stubs that import the standard lib tests from your system and run them. If you do not have any tests in your python distribution, they'll simply fail to import.
There's a convenience module called all.py designed to handle the impedance mismatch between Nose and the standard tests:
@@ -85,10 +85,10 @@ Coverage.py is an awesome tool for evaluating how much code was exercised by uni
After running the tests to completion, this will emit a huge wodge of module names and line numbers. For some reason, the ``--cover-inclusive`` option breaks everything rather than serving its purpose of limiting the coverage to the local files, so don't use that.
The html option is quite useful because it generates nicely-formatted HTML that are much easier to read than line-number soup. Here's a command that generates the annotation, dumping the html files into a directory called "cover":
The html option is quite useful because it generates nicely-formatted HTML files that are much easier to read than line-number soup. Here's a command that generates the annotation, dumping the html files into a directory called "cover":
.. code-block:: sh
coverage html -d cover --omit='tempmod,<console>,tests'
(``tempmod`` and ``console`` are omitted because they gets thrown away at the completion of their unit tests and coverage.py isn't smart enough to detect this.)
(``tempmod`` and ``console`` are omitted because they get thrown away at the completion of their unit tests and coverage.py isn't smart enough to detect this.)