Skip to content

Commit ef3cc7e

Browse files
author
Adam Nelson
committed
Merge remote-tracking branch 'upstream/master'
2 parents 9223381 + 50909db commit ef3cc7e

File tree

5 files changed

+12
-19
lines changed

5 files changed

+12
-19
lines changed

docs/scenarios/ci.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,6 @@ Buildbot
3131
automate the compile/test cycle to validate code changes.
3232

3333

34-
Mule
35-
-----
36-
37-
`Mule <http://www.mulesoft.org/documentation/display/current/Mule+Fundamentals>`_
38-
is a lightweight integration platform that enables you to connect anything,
39-
anywhere. You can use Mule to intelligently manage message routing, data
40-
mapping, orchestration, reliability, security and scalability between nodes.
41-
Plug other systems and applications into Mule and let it handle all the
42-
communication between systems, enabling you to track and monitor everything
43-
that happens.
44-
4534

4635
Tox
4736
---

docs/scenarios/web.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ I do not recommend using Tornado unless you think you need it.
102102
Pyramid
103103
--------
104104

105-
`Pyramid <http://www.pylonsproject.org/>`_ is a lot like Django, except
106-
with a heavier focus on modularity. It comes with a smaller number of
107-
libraries ("batteries") built-in, and encourages users to extend its
105+
`Pyramid <http://www.pylonsproject.org/>`_ is a very flexible
106+
framework with a heavy focus on modularity. It comes with a small number
107+
of libraries ("batteries") built-in, and encourages users to extend its
108108
base functionality.
109109

110110
Pyramid does not have a large user base, unlike Django and Flask. It's a

docs/starting/install/osx.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ your favorite OSX terminal emulator and run
4848

4949
.. code-block:: console
5050
51-
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
51+
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
5252
5353
The script will explain what changes it will make and prompt you before the
5454
installation begins.

docs/writing/structure.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,16 +658,20 @@ And now the generator approach using Python's own
658658
@contextmanager
659659
def custom_open(filename):
660660
f = open(filename)
661-
yield f
662-
f.close()
661+
try:
662+
yield f
663+
finally:
664+
f.close()
663665
664666
with custom_open('file') as f:
665667
contents = f.read()
666668
667669
This works in exactly the same way as the class example above, albeit it's
668670
more terse. The ``custom_open`` function executes until it reaches the ``yield``
669671
statement. It then gives control back to the ``with`` statement, which assigns
670-
whatever was ``yield``'ed to `f` in the ``as f`` portion.
672+
whatever was ``yield``'ed to `f` in the ``as f`` portion. The ``finally`` clause
673+
ensures that ``close()`` is called whether or not there was an exception inside
674+
the ``with``.
671675

672676
Since the two approaches appear the same, we should follow the Zen of Python
673677
to decide when to use which. The class approach might be better if there's

docs/writing/tests.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ A simple doctest in a function:
116116
.. code-block:: python
117117
118118
def square(x):
119-
"""Squares x.
119+
"""Return the square of x.
120120
121121
>>> square(2)
122122
4

0 commit comments

Comments
 (0)