diff options
| author | Steve Piercy <web@stevepiercy.com> | 2018-11-20 00:55:17 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2018-11-20 00:55:17 -0800 |
| commit | 1007fa3773a311a72dd7b2e5e8c52584c5d6e416 (patch) | |
| tree | fdc078284ae310ce6ba7d673a9744319062170f2 /docs | |
| parent | a08763a9b5213ed352a26c603a6d3722aebe9dd0 (diff) | |
| download | pyramid-1007fa3773a311a72dd7b2e5e8c52584c5d6e416.tar.gz pyramid-1007fa3773a311a72dd7b2e5e8c52584c5d6e416.tar.bz2 pyramid-1007fa3773a311a72dd7b2e5e8c52584c5d6e416.zip | |
proper spacing of interpreter output between a dict's colon and value
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/urldispatch.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index b9b42a9bd..129dce8f3 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -165,8 +165,8 @@ The above pattern will match these URLs, generating the following matchdicts: .. code-block:: text - foo/1/2 -> {'baz':'1', 'bar':'2'} - foo/abc/def -> {'baz':'abc', 'bar':'def'} + foo/1/2 -> {'baz': '1', 'bar': '2'} + foo/abc/def -> {'baz': 'abc', 'bar': 'def'} It will not match the following patterns however: @@ -303,10 +303,10 @@ The above pattern will match these URLs, generating the following matchdicts: .. code-block:: text foo/1/2/ -> - {'baz':'1', 'bar':'2', 'fizzle':()} + {'baz': '1', 'bar': '2', 'fizzle': ()} foo/abc/def/a/b/c -> - {'baz':'abc', 'bar':'def', 'fizzle':('a', 'b', 'c')} + {'baz': 'abc', 'bar': 'def', 'fizzle': ('a', 'b', 'c')} Note that when a ``*stararg`` remainder match is matched, the value put into the matchdict is turned into a tuple of path segments representing the @@ -327,7 +327,7 @@ Will generate the following matchdict: .. code-block:: text - {'fizzle':('La Pe\xf1a', 'a', 'b', 'c')} + {'fizzle': ('La Pe\xf1a', 'a', 'b', 'c')} By default, the ``*stararg`` will parse the remainder sections into a tuple split by segment. Changing the regular expression used to match a marker can @@ -341,8 +341,8 @@ The above pattern will match these URLs, generating the following matchdicts: .. code-block:: text - foo/1/2/ -> {'baz':'1', 'bar':'2', 'fizzle':''} - foo/abc/def/a/b/c -> {'baz':'abc', 'bar':'def', 'fizzle': 'a/b/c'} + foo/1/2/ -> {'baz': '1', 'bar': '2', 'fizzle': ''} + foo/abc/def/a/b/c -> {'baz': 'abc', 'bar': 'def', 'fizzle': 'a/b/c'} This occurs because the default regular expression for a marker is ``[^/]+`` which will match everything up to the first ``/``, while ``{fizzle:.*}`` will |
