diff options
| author | Michael Merickel <michael@merickel.org> | 2018-11-18 23:47:15 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2018-11-18 23:47:15 -0600 |
| commit | 336e91d824ceb55a113b434be4957d1a5baa11a8 (patch) | |
| tree | 0588d96fb8455bb6f2fa002a511d060ac48be6cd /src | |
| parent | e0fcb74e9d0c347a2c1627d07007f1d566dc7e17 (diff) | |
| download | pyramid-336e91d824ceb55a113b434be4957d1a5baa11a8.tar.gz pyramid-336e91d824ceb55a113b434be4957d1a5baa11a8.tar.bz2 pyramid-336e91d824ceb55a113b434be4957d1a5baa11a8.zip | |
fix moar strings
Diffstat (limited to 'src')
| -rw-r--r-- | src/pyramid/traversal.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pyramid/traversal.py b/src/pyramid/traversal.py index 92436e403..3dc37613e 100644 --- a/src/pyramid/traversal.py +++ b/src/pyramid/traversal.py @@ -444,11 +444,11 @@ def traversal_path_info(path): already-URL-decoded ``str`` type as if it had come to us from an upstream WSGI server as the ``PATH_INFO`` environ variable. - The ``path`` is first decoded to from its WSGI representation to text. - Per the PEP 3333 spec, ``path`` is first encoded to bytes using the + The ``path`` is first decoded from its WSGI representation to text. + Per the :pep:`3333` spec, ``path`` is first encoded to bytes using the Latin-1 encoding; the resulting set of bytes is subsequently decoded to text using the UTF-8 encoding; a :exc:`pyramid.exc.URLDecodeError` is - raised if a the URL cannot be decoded. + raised if the URL cannot be decoded. The ``path`` is split on slashes, creating a list of segments. If a segment name is empty or if it is ``.``, it is ignored. If a segment @@ -544,7 +544,7 @@ def quote_path_segment(segment, safe=PATH_SEGMENT_SAFE): the string ``__name__`` attribute of a resource) as a string. If the ``segment`` passed in is a bytes object, it is decoded as a UTF-8 string. The result is then URL-quoted using Python's ``urllib.quote``. - If the segment passed in is not bytes or a string, an error will be + If the segment passed in is not bytes nor a string, an error will be raised. The return value of ``quote_path_segment`` is always a string. You may pass a string of characters that need not be encoded as |
