@@ -104,30 +104,31 @@ or on combining URL components into a URL string.
104
104
The return value is a :term: `named tuple `, which means that its items can
105
105
be accessed by index or as named attributes, which are:
106
106
107
- +------------------+-------+-------------------------+------------------------+
108
- | Attribute | Index | Value | Value if not present |
109
- +==================+=======+=========================+========================+
110
- | :attr: `scheme ` | 0 | URL scheme specifier | *scheme * parameter |
111
- +------------------+-------+-------------------------+------------------------+
112
- | :attr: `netloc ` | 1 | Network location part | empty string |
113
- +------------------+-------+-------------------------+------------------------+
114
- | :attr: `path ` | 2 | Hierarchical path | empty string |
115
- +------------------+-------+-------------------------+------------------------+
116
- | :attr: `params ` | 3 | No longer used | always an empty string |
117
- +------------------+-------+-------------------------+------------------------+
118
- | :attr: `query ` | 4 | Query component | empty string |
119
- +------------------+-------+-------------------------+------------------------+
120
- | :attr: `fragment ` | 5 | Fragment identifier | empty string |
121
- +------------------+-------+-------------------------+------------------------+
122
- | :attr: `username ` | | User name | :const: `None ` |
123
- +------------------+-------+-------------------------+------------------------+
124
- | :attr: `password ` | | Password | :const: `None ` |
125
- +------------------+-------+-------------------------+------------------------+
126
- | :attr: `hostname ` | | Host name (lower case) | :const: `None ` |
127
- +------------------+-------+-------------------------+------------------------+
128
- | :attr: `port ` | | Port number as integer, | :const: `None ` |
129
- | | | if present | |
130
- +------------------+-------+-------------------------+------------------------+
107
+ +------------------+-------+--------------------------+----------------------+
108
+ | Attribute | Index | Value | Value if not present |
109
+ +==================+=======+==========================+======================+
110
+ | :attr: `scheme ` | 0 | URL scheme specifier | *scheme * parameter |
111
+ +------------------+-------+--------------------------+----------------------+
112
+ | :attr: `netloc ` | 1 | Network location part | empty string |
113
+ +------------------+-------+--------------------------+----------------------+
114
+ | :attr: `path ` | 2 | Hierarchical path | empty string |
115
+ +------------------+-------+--------------------------+----------------------+
116
+ | :attr: `params ` | 3 | Parameters for last path | empty string |
117
+ | | | element | |
118
+ +------------------+-------+--------------------------+----------------------+
119
+ | :attr: `query ` | 4 | Query component | empty string |
120
+ +------------------+-------+--------------------------+----------------------+
121
+ | :attr: `fragment ` | 5 | Fragment identifier | empty string |
122
+ +------------------+-------+--------------------------+----------------------+
123
+ | :attr: `username ` | | User name | :const: `None ` |
124
+ +------------------+-------+--------------------------+----------------------+
125
+ | :attr: `password ` | | Password | :const: `None ` |
126
+ +------------------+-------+--------------------------+----------------------+
127
+ | :attr: `hostname ` | | Host name (lower case) | :const: `None ` |
128
+ +------------------+-------+--------------------------+----------------------+
129
+ | :attr: `port ` | | Port number as integer, | :const: `None ` |
130
+ | | | if present | |
131
+ +------------------+-------+--------------------------+----------------------+
131
132
132
133
Reading the :attr: `port ` attribute will raise a :exc: `ValueError ` if
133
134
an invalid port is specified in the URL. See section
0 commit comments