summaryrefslogtreecommitdiff
path: root/Doc/library/urllib.parse.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/urllib.parse.rst')
-rw-r--r--Doc/library/urllib.parse.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
index 800f8301c6..40098d0496 100644
--- a/Doc/library/urllib.parse.rst
+++ b/Doc/library/urllib.parse.rst
@@ -76,13 +76,15 @@ or on combining URL components into a URL string.
ParseResult(scheme='', netloc='', path='help/Python.html', params='',
query='', fragment='')
- If the *scheme* argument is specified, it gives the default addressing
- scheme, to be used only if the URL does not specify one. The default value for
- this argument is the empty string.
+ The *scheme* argument gives the default addressing scheme, to be
+ used only if the URL does not specify one. It should be the same type
+ (text or bytes) as *urlstring*, except that the default value ``''`` is
+ always allowed, and is automatically converted to ``b''`` if appropriate.
If the *allow_fragments* argument is false, fragment identifiers are not
- recognized and parsed as part of the preceding component. The default value
- for this argument is :const:`True`.
+ recognized. Instead, they are parsed as part of the path, parameters
+ or query component, and :attr:`fragment` is set to the empty string in
+ the return value.
The return value is actually an instance of a subclass of :class:`tuple`. This
class has the following additional read-only convenience attributes:
@@ -90,7 +92,7 @@ or on combining URL components into a URL string.
+------------------+-------+--------------------------+----------------------+
| Attribute | Index | Value | Value if not present |
+==================+=======+==========================+======================+
- | :attr:`scheme` | 0 | URL scheme specifier | empty string |
+ | :attr:`scheme` | 0 | URL scheme specifier | *scheme* parameter |
+------------------+-------+--------------------------+----------------------+
| :attr:`netloc` | 1 | Network location part | empty string |
+------------------+-------+--------------------------+----------------------+
@@ -206,7 +208,7 @@ or on combining URL components into a URL string.
+------------------+-------+-------------------------+----------------------+
| Attribute | Index | Value | Value if not present |
+==================+=======+=========================+======================+
- | :attr:`scheme` | 0 | URL scheme specifier | empty string |
+ | :attr:`scheme` | 0 | URL scheme specifier | *scheme* parameter |
+------------------+-------+-------------------------+----------------------+
| :attr:`netloc` | 1 | Network location part | empty string |
+------------------+-------+-------------------------+----------------------+