Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4722da6

Browse files
committed
fix typo in keyword argument 'allow_frament' should be 'allow_fragment'
1 parent afd3dae commit 4722da6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/urlparse.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def clear_cache():
4343
# Return a 6-tuple: (scheme, netloc, path, params, query, fragment).
4444
# Note that we don't break the components up in smaller bits
4545
# (e.g. netloc is a single string) and we don't expand % escapes.
46-
def urlparse(url, scheme = '', allow_framents = 1):
47-
key = url, scheme, allow_framents
46+
def urlparse(url, scheme = '', allow_fragments = 1):
47+
key = url, scheme, allow_fragments
4848
try:
4949
return _parse_cache[key]
5050
except KeyError:
@@ -65,7 +65,7 @@ def urlparse(url, scheme = '', allow_framents = 1):
6565
if i < 0:
6666
i = len(url)
6767
netloc, url = url[2:i], url[i:]
68-
if allow_framents and scheme in uses_fragment:
68+
if allow_fragments and scheme in uses_fragment:
6969
i = string.rfind(url, '#')
7070
if i >= 0:
7171
url, fragment = url[:i], url[i+1:]
@@ -101,13 +101,13 @@ def urlunparse((scheme, netloc, url, params, query, fragment)):
101101

102102
# Join a base URL and a possibly relative URL to form an absolute
103103
# interpretation of the latter.
104-
def urljoin(base, url, allow_framents = 1):
104+
def urljoin(base, url, allow_fragments = 1):
105105
if not base:
106106
return url
107107
bscheme, bnetloc, bpath, bparams, bquery, bfragment = \
108-
urlparse(base, '', allow_framents)
108+
urlparse(base, '', allow_fragments)
109109
scheme, netloc, path, params, query, fragment = \
110-
urlparse(url, bscheme, allow_framents)
110+
urlparse(url, bscheme, allow_fragments)
111111
# XXX Unofficial hack: default netloc to bnetloc even if
112112
# schemes differ
113113
if scheme != bscheme and not netloc and \

0 commit comments

Comments
 (0)