mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
added quote and unquote
This commit is contained in:
parent
d6304d09cc
commit
61d34f47c3
2 changed files with 32 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
\stmodindex{urllib}
|
\stmodindex{urllib}
|
||||||
\index{WWW}
|
\index{WWW}
|
||||||
\indexii{World-Wide}{Web}
|
\indexii{World-Wide}{Web}
|
||||||
\index{URLs}
|
\index{URL}
|
||||||
|
|
||||||
This module provides a high-level interface for fetching data across
|
This module provides a high-level interface for fetching data across
|
||||||
the World-Wide Web. In particular, the \code{urlopen} function is
|
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()}.
|
\code{urlretrieve()}.
|
||||||
\end{funcdesc}
|
\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:
|
Restrictions:
|
||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
\stmodindex{urllib}
|
\stmodindex{urllib}
|
||||||
\index{WWW}
|
\index{WWW}
|
||||||
\indexii{World-Wide}{Web}
|
\indexii{World-Wide}{Web}
|
||||||
\index{URLs}
|
\index{URL}
|
||||||
|
|
||||||
This module provides a high-level interface for fetching data across
|
This module provides a high-level interface for fetching data across
|
||||||
the World-Wide Web. In particular, the \code{urlopen} function is
|
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()}.
|
\code{urlretrieve()}.
|
||||||
\end{funcdesc}
|
\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:
|
Restrictions:
|
||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue