summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2018-11-18 23:43:18 -0600
committerMichael Merickel <michael@merickel.org>2018-11-18 23:43:18 -0600
commite0fcb74e9d0c347a2c1627d07007f1d566dc7e17 (patch)
treeb9ff335258d906a9e71afbfd3875727aad86cec2 /src
parent8f2fbe31c6c1aaa1b7792249ebeb984946e7a5e1 (diff)
downloadpyramid-e0fcb74e9d0c347a2c1627d07007f1d566dc7e17.tar.gz
pyramid-e0fcb74e9d0c347a2c1627d07007f1d566dc7e17.tar.bz2
pyramid-e0fcb74e9d0c347a2c1627d07007f1d566dc7e17.zip
fix up some more docstrings
Diffstat (limited to 'src')
-rw-r--r--src/pyramid/i18n.py2
-rw-r--r--src/pyramid/traversal.py12
2 files changed, 8 insertions, 6 deletions
diff --git a/src/pyramid/i18n.py b/src/pyramid/i18n.py
index 112044e47..a20503be2 100644
--- a/src/pyramid/i18n.py
+++ b/src/pyramid/i18n.py
@@ -45,7 +45,7 @@ class Localizer(object):
``translate`` method accepts three arguments: ``tstring``
(required), ``domain`` (optional) and ``mapping`` (optional).
When called, it will translate the ``tstring`` translation
- string the current locale. If the current locale could not be
+ string using the current locale. If the current locale could not be
determined, the result of interpolation of the default value is
returned. The optional ``domain`` argument can be used to specify
or override the domain of the ``tstring`` (useful when ``tstring``
diff --git a/src/pyramid/traversal.py b/src/pyramid/traversal.py
index 72176fc4b..92436e403 100644
--- a/src/pyramid/traversal.py
+++ b/src/pyramid/traversal.py
@@ -62,7 +62,7 @@ def find_resource(resource, path):
(absolute) or ``to%20the/La%20Pe%C3%B1a`` (relative). The
:func:`pyramid.traversal.resource_path` function generates strings
which follow these rules (albeit only absolute ones). The text may not
- have any nonascii characters in it.
+ have any non-ASCII characters in it.
Rules for passing a *tuple* as the ``path`` argument: if the first
element in the path tuple is the empty string (for example ``('',
@@ -190,8 +190,10 @@ def traverse(resource, path):
example: if the path passed is ``/foo/bar``, and a resource
object is found at ``/foo`` (but not at ``/foo/bar``), the 'view
name' will be ``'bar'``. If the ``resource`` was found via
- urldispatch, the view_name will be the name the route found was
- registered with.
+ url dispatch, the ``view_name`` will be the empty string unless
+ the ``traverse`` predicate was specified or the ``*traverse`` route
+ pattern was used, at which point normal traversal rules dictate the
+ result.
- ``subpath``: For a ``resource`` found via :term:`traversal`, this
is a sequence of path segments found in the ``path`` that follow
@@ -421,9 +423,9 @@ def traversal_path(path):
""" Variant of :func:`pyramid.traversal.traversal_path_info` suitable for
decoding paths that are URL-encoded.
- If this function is passed a string, it *must* directly encodeable to
+ If this function is passed a string, it *must* be directly encodeable to
ASCII. For example, '/foo' will work but '/<unprintable unicode>' (a
- string object with characters that cannot be encoded to ascii) will
+ string object with characters that cannot be encoded to ASCII) will
not. A :exc:`UnicodeEncodeError` will be raised if the string cannot be
encoded directly to ASCII.
"""