From de774b2f67112f52222903053e95ded11522ec71 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 11 Sep 2011 22:02:06 -0400 Subject: update docstring --- pyramid/encode.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pyramid/encode.py b/pyramid/encode.py index 9c3a8f7c7..826e6a662 100644 --- a/pyramid/encode.py +++ b/pyramid/encode.py @@ -13,19 +13,20 @@ def url_quote(s, safe=''): different set of reserved characters that must be quoted. RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax lists - the following reserved characters. + the following reserved characters:: - reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | - "$" | "," + reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | + "$" | "," Each of these characters is reserved in some component of a URL, but not necessarily in all of them. - Unlike the default version of this function in the Python stdlib, - by default, the url_quote function is intended for quoting individual - path segments instead of an already composed path that might have - '/' characters in it. Thus, it *will* encode any '/' character it - finds in a string. It is also slightly faster than the stdlib version. + Unlike the default version of this function in the Python stdlib, by + default, the url_quote function is intended for quoting individual path + segments instead of an already composed path that might have ``/`` + characters in it. Thus, it *will* encode any ``/`` character it finds in a + string unless ``/`` is marked as 'safe'. It is also slightly faster than + the stdlib version. """ cachekey = (safe, always_safe) try: -- cgit v1.2.3