Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4fda21ba
Commit
4fda21ba
authored
Jan 28, 2001
by
Skip Montanaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated to document use of sequences of two-element tuples as inputs
parent
080c9974
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Doc/lib/liburllib.tex
Doc/lib/liburllib.tex
+7
-2
No files found.
Doc/lib/liburllib.tex
View file @
4fda21ba
...
...
@@ -143,8 +143,9 @@ Like \function{unquote()}, but also replaces plus signs by spaces, as
required for unquoting HTML form values.
\end{funcdesc}
\begin{funcdesc}
{
urlencode
}{
dict
\optional
{
, doseq
}}
Convert a dictionary to a ``url-encoded'' string, suitable to pass to
\begin{funcdesc}
{
urlencode
}{
query
\optional
{
, doseq
}}
Convert a mapping object or a sequence of two-element tuples to a
``url-encoded'' string, suitable to pass to
\function
{
urlopen()
}
above as the optional
\var
{
data
}
argument. This
is useful to pass a dictionary of form fields to a
\code
{
POST
}
request. The resulting string is a series of
...
...
@@ -153,6 +154,10 @@ characters, where both \var{key} and \var{value} are quoted using
\function
{
quote
_
plus()
}
above. If the optional parameter
\var
{
doseq
}
is
present and evaluates to true, individual
\code
{
\var
{
key
}
=
\var
{
value
}}
pairs
are generated for each element of the sequence.
When a sequence of two-element tuples is used as the
\var
{
query
}
argument,
the first element of each tuple is a key and the second is a value. The
order of parameters in the encoded string will match the order of parameter
tuples in the sequence.
\end{funcdesc}
The public functions
\function
{
urlopen()
}
and
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment