File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ \section{Built-in module \sectcode{urllib}}
22\stmodindex {urllib}
33\index {WWW}
44\indexii {World-Wide}{Web}
5- \index {URLs }
5+ \index {URL }
66
77This module provides a high-level interface for fetching data across
88the World-Wide Web. In particular, the \code {urlopen} function is
@@ -49,6 +49,21 @@ \section{Built-in module \sectcode{urllib}}
4949\code {urlretrieve()}.
5050\end {funcdesc }
5151
52+ \begin {funcdesc }{quote}{string\optional {\, addsafe}}
53+ Replace special characters in \var {string} using the \code {\% xx} escape.
54+ Letters, digits, and the characters `` \code {_,.-}'' are never quoted.
55+ The optional \var {addsafe} parameter specifies additional characters
56+ that should not be quoted --- its default value is \code {'/'}.
57+
58+ Example: \code {quote('/~conolly/')} yields \code {'/\% 7econnolly/'}.
59+ \end {funcdesc }
60+
61+ \begin {funcdesc }{unquote}{string}
62+ Remove \code {\% xx} escapes by their single-character equivalent.
63+
64+ Example: \code {unquote('/\% 7Econnolly/')} yields \code {'/~connolly/'}.
65+ \end {funcdesc }
66+
5267Restrictions:
5368
5469\begin {itemize }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ \section{Built-in module \sectcode{urllib}}
22\stmodindex {urllib}
33\index {WWW}
44\indexii {World-Wide}{Web}
5- \index {URLs }
5+ \index {URL }
66
77This module provides a high-level interface for fetching data across
88the World-Wide Web. In particular, the \code {urlopen} function is
@@ -49,6 +49,21 @@ \section{Built-in module \sectcode{urllib}}
4949\code {urlretrieve()}.
5050\end {funcdesc }
5151
52+ \begin {funcdesc }{quote}{string\optional {\, addsafe}}
53+ Replace special characters in \var {string} using the \code {\% xx} escape.
54+ Letters, digits, and the characters `` \code {_,.-}'' are never quoted.
55+ The optional \var {addsafe} parameter specifies additional characters
56+ that should not be quoted --- its default value is \code {'/'}.
57+
58+ Example: \code {quote('/~conolly/')} yields \code {'/\% 7econnolly/'}.
59+ \end {funcdesc }
60+
61+ \begin {funcdesc }{unquote}{string}
62+ Remove \code {\% xx} escapes by their single-character equivalent.
63+
64+ Example: \code {unquote('/\% 7Econnolly/')} yields \code {'/~connolly/'}.
65+ \end {funcdesc }
66+
5267Restrictions:
5368
5469\begin {itemize }
You can’t perform that action at this time.
0 commit comments