]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
added quote and unquote
authorGuido van Rossum <guido@python.org>
Mon, 27 Feb 1995 17:51:51 +0000 (17:51 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 27 Feb 1995 17:51:51 +0000 (17:51 +0000)
Doc/lib/liburllib.tex
Doc/liburllib.tex

index 49bc416ff16504c6a11b45d8be0e693df7c37d27..689a5c9e0435a8711ba651fd1256dfa9853985fa 100644 (file)
@@ -2,7 +2,7 @@
 \stmodindex{urllib}
 \index{WWW}
 \indexii{World-Wide}{Web}
-\index{URLs}
+\index{URL}
 
 This module provides a high-level interface for fetching data across
 the World-Wide Web.  In particular, the \code{urlopen} function is
@@ -49,6 +49,21 @@ Clear the cache that may have been built up by previous calls to
 \code{urlretrieve()}.
 \end{funcdesc}
 
+\begin{funcdesc}{quote}{string\optional{\, addsafe}}
+Replace special characters in \var{string} using the \code{\%xx} escape.
+Letters, digits, and the characters ``\code{_,.-}'' are never quoted.
+The optional \var{addsafe} parameter specifies additional characters
+that should not be quoted --- its default value is \code{'/'}.
+
+Example: \code{quote('/~conolly/')} yields \code{'/\%7econnolly/'}.
+\end{funcdesc}
+
+\begin{funcdesc}{unquote}{string}
+Remove \code{\%xx} escapes by their single-character equivalent.
+
+Example: \code{unquote('/\%7Econnolly/')} yields \code{'/~connolly/'}.
+\end{funcdesc}
+
 Restrictions:
 
 \begin{itemize}
index 49bc416ff16504c6a11b45d8be0e693df7c37d27..689a5c9e0435a8711ba651fd1256dfa9853985fa 100644 (file)
@@ -2,7 +2,7 @@
 \stmodindex{urllib}
 \index{WWW}
 \indexii{World-Wide}{Web}
-\index{URLs}
+\index{URL}
 
 This module provides a high-level interface for fetching data across
 the World-Wide Web.  In particular, the \code{urlopen} function is
@@ -49,6 +49,21 @@ Clear the cache that may have been built up by previous calls to
 \code{urlretrieve()}.
 \end{funcdesc}
 
+\begin{funcdesc}{quote}{string\optional{\, addsafe}}
+Replace special characters in \var{string} using the \code{\%xx} escape.
+Letters, digits, and the characters ``\code{_,.-}'' are never quoted.
+The optional \var{addsafe} parameter specifies additional characters
+that should not be quoted --- its default value is \code{'/'}.
+
+Example: \code{quote('/~conolly/')} yields \code{'/\%7econnolly/'}.
+\end{funcdesc}
+
+\begin{funcdesc}{unquote}{string}
+Remove \code{\%xx} escapes by their single-character equivalent.
+
+Example: \code{unquote('/\%7Econnolly/')} yields \code{'/~connolly/'}.
+\end{funcdesc}
+
 Restrictions:
 
 \begin{itemize}