summaryrefslogtreecommitdiff
path: root/docs/designdefense.rst
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2016-01-17 22:30:42 -0800
committerSteve Piercy <web@stevepiercy.com>2016-01-17 22:30:42 -0800
commit404e5fc40b3073ab289a1154ec3a7abe1b1be9fb (patch)
tree23b7f3a0914472f1eb1590a1e48ae121e1c12812 /docs/designdefense.rst
parent0f451b89f7981234614c8437d002bee48d788a51 (diff)
parent51573a705f7798403f7bce5ef1bc5f614d2690f5 (diff)
downloadpyramid-404e5fc40b3073ab289a1154ec3a7abe1b1be9fb.tar.gz
pyramid-404e5fc40b3073ab289a1154ec3a7abe1b1be9fb.tar.bz2
pyramid-404e5fc40b3073ab289a1154ec3a7abe1b1be9fb.zip
Merge pull request #2240 from stevepiercy/master
minor grammar, rewrap 79 columns, up through arbitrary keywords in views
Diffstat (limited to 'docs/designdefense.rst')
-rw-r--r--docs/designdefense.rst27
1 files changed, 13 insertions, 14 deletions
diff --git a/docs/designdefense.rst b/docs/designdefense.rst
index 35de8cb03..566f10015 100644
--- a/docs/designdefense.rst
+++ b/docs/designdefense.rst
@@ -477,11 +477,10 @@ Pyramid Views Do Not Accept Arbitrary Keyword Arguments
Many web frameworks (Zope, TurboGears, Pylons 1.X, Django) allow for their
variant of a :term:`view callable` to accept arbitrary keyword or positional
-arguments, which are filled in using values present in the ``request.POST``
-or ``request.GET`` dictionaries or by values present in the route match
-dictionary. For example, a Django view will accept positional arguments
-which match information in an associated "urlconf" such as
-``r'^polls/(?P<poll_id>\d+)/$``:
+arguments, which are filled in using values present in the ``request.POST``,
+``request.GET``, or route match dictionaries. For example, a Django view will
+accept positional arguments which match information in an associated "urlconf"
+such as ``r'^polls/(?P<poll_id>\d+)/$``:
.. code-block:: python
:linenos:
@@ -489,8 +488,8 @@ which match information in an associated "urlconf" such as
def aview(request, poll_id):
return HttpResponse(poll_id)
-Zope, likewise allows you to add arbitrary keyword and positional
-arguments to any method of a resource object found via traversal:
+Zope likewise allows you to add arbitrary keyword and positional arguments to
+any method of a resource object found via traversal:
.. code-block:: python
:linenos:
@@ -507,13 +506,13 @@ match the names of the positional and keyword arguments in the request, and
the method is called (if possible) with its argument list filled with values
mentioned therein. TurboGears and Pylons 1.X operate similarly.
-Out of the box, :app:`Pyramid` is configured to have none of these features.
-By default, :app:`Pyramid` view callables always accept only ``request`` and
-no other arguments. The rationale: this argument specification matching done
-aggressively can be costly, and :app:`Pyramid` has performance as one of its
-main goals, so we've decided to make people, by default, obtain information
-by interrogating the request object within the view callable body instead of
-providing magic to do unpacking into the view argument list.
+Out of the box, :app:`Pyramid` is configured to have none of these features. By
+default :app:`Pyramid` view callables always accept only ``request`` and no
+other arguments. The rationale is, this argument specification matching when
+done aggressively can be costly, and :app:`Pyramid` has performance as one of
+its main goals. Therefore we've decided to make people, by default, obtain
+information by interrogating the request object within the view callable body
+instead of providing magic to do unpacking into the view argument list.
However, as of :app:`Pyramid` 1.0a9, user code can influence the way view
callables are expected to be called, making it possible to compose a system