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
86f7109d
Commit
86f7109d
authored
Jan 14, 2016
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #25822: Add docstrings to the fields of urllib.parse results.
Patch contributed by Swati Jaiswal.
parent
4e280a6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
2 deletions
+68
-2
Lib/urllib/parse.py
Lib/urllib/parse.py
+65
-2
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/urllib/parse.py
View file @
86f7109d
...
@@ -224,8 +224,71 @@ class _NetlocResultMixinBytes(_NetlocResultMixinBase, _ResultMixinBytes):
...
@@ -224,8 +224,71 @@ class _NetlocResultMixinBytes(_NetlocResultMixinBase, _ResultMixinBytes):
from
collections
import
namedtuple
from
collections
import
namedtuple
_DefragResultBase
=
namedtuple
(
'DefragResult'
,
'url fragment'
)
_DefragResultBase
=
namedtuple
(
'DefragResult'
,
'url fragment'
)
_SplitResultBase
=
namedtuple
(
'SplitResult'
,
'scheme netloc path query fragment'
)
_SplitResultBase
=
namedtuple
(
_ParseResultBase
=
namedtuple
(
'ParseResult'
,
'scheme netloc path params query fragment'
)
'SplitResult'
,
'scheme netloc path query fragment'
)
_ParseResultBase
=
namedtuple
(
'ParseResult'
,
'scheme netloc path params query fragment'
)
_DefragResultBase
.
__doc__
=
"""
DefragResult(url, fragment)
A 2-tuple that contains the url without fragment identifier and the fragment
identifier as a separate argument.
"""
_DefragResultBase
.
url
.
__doc__
=
"""The URL with no fragment identifier."""
_DefragResultBase
.
fragment
.
__doc__
=
"""
Fragment identifier separated from URL, that allows indirect identification of a
secondary resource by reference to a primary resource and additional identifying
information.
"""
_SplitResultBase
.
__doc__
=
"""
SplitResult(scheme, netloc, path, query, fragment)
A 5-tuple that contains the different components of a URL. Similar to
ParseResult, but does not split params.
"""
_SplitResultBase
.
scheme
.
__doc__
=
"""Specifies URL scheme for the request."""
_SplitResultBase
.
netloc
.
__doc__
=
"""
Network location where the request is made to.
"""
_SplitResultBase
.
path
.
__doc__
=
"""
The hierarchical path, such as the path to a file to download.
"""
_SplitResultBase
.
query
.
__doc__
=
"""
The query component, that contains non-hierarchical data, that along with data
in path component, identifies a resource in the scope of URI's scheme and
network location.
"""
_SplitResultBase
.
fragment
.
__doc__
=
"""
Fragment identifier, that allows indirect identification of a secondary resource
by reference to a primary resource and additional identifying information.
"""
_ParseResultBase
.
__doc__
=
"""
ParseResult(scheme, netloc, path, params, query, fragment)
A 6-tuple that contains components of a parsed URL.
"""
_ParseResultBase
.
scheme
.
__doc__
=
_SplitResultBase
.
scheme
.
__doc__
_ParseResultBase
.
netloc
.
__doc__
=
_SplitResultBase
.
netloc
.
__doc__
_ParseResultBase
.
path
.
__doc__
=
_SplitResultBase
.
path
.
__doc__
_ParseResultBase
.
params
.
__doc__
=
"""
Parameters for last path element used to dereference the URI in order to provide
access to perform some operation on the resource.
"""
_ParseResultBase
.
query
.
__doc__
=
_SplitResultBase
.
query
.
__doc__
_ParseResultBase
.
fragment
.
__doc__
=
_SplitResultBase
.
fragment
.
__doc__
# For backwards compatibility, alias _NetlocResultMixinStr
# For backwards compatibility, alias _NetlocResultMixinStr
# ResultBase is no longer part of the documented API, but it is
# ResultBase is no longer part of the documented API, but it is
...
...
Misc/NEWS
View file @
86f7109d
...
@@ -128,6 +128,9 @@ Core and Builtins
...
@@ -128,6 +128,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #25822: Add docstrings to the fields of urllib.parse results.
Patch contributed by Swati Jaiswal.
- Issue #22642: Convert trace module option parsing mechanism to argparse.
- Issue #22642: Convert trace module option parsing mechanism to argparse.
Patch contributed by SilentGhost.
Patch contributed by SilentGhost.
...
...
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