summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-04-07 03:53:12 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-04-07 03:53:12 (GMT)
commit56b0a3d89a3909e7a5dcf3f13f49ff362f7ec2b7 (patch)
treeddb8c1132640bad1c9cca79d98776e28643c8ebb /Lib/urllib
parent1a2ea9c592feae00452f16e9507be37c8bcb8cea (diff)
downloadcpython-56b0a3d89a3909e7a5dcf3f13f49ff362f7ec2b7.zip
cpython-56b0a3d89a3909e7a5dcf3f13f49ff362f7ec2b7.tar.gz
cpython-56b0a3d89a3909e7a5dcf3f13f49ff362f7ec2b7.tar.bz2
Remove redundant imports
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/parse.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index abe5d0d..b49b7a1 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -846,7 +846,6 @@ def splittype(url):
"""splittype('type:opaquestring') --> 'type', 'opaquestring'."""
global _typeprog
if _typeprog is None:
- import re
_typeprog = re.compile('^([^/:]+):')
match = _typeprog.match(url)
@@ -860,7 +859,6 @@ def splithost(url):
"""splithost('//host[:port]/path') --> 'host[:port]', '/path'."""
global _hostprog
if _hostprog is None:
- import re
_hostprog = re.compile('^//([^/?]*)(.*)$')
match = _hostprog.match(url)
@@ -877,7 +875,6 @@ def splituser(host):
"""splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'."""
global _userprog
if _userprog is None:
- import re
_userprog = re.compile('^(.*)@(.*)$')
match = _userprog.match(host)
@@ -889,7 +886,6 @@ def splitpasswd(user):
"""splitpasswd('user:passwd') -> 'user', 'passwd'."""
global _passwdprog
if _passwdprog is None:
- import re
_passwdprog = re.compile('^([^:]*):(.*)$',re.S)
match = _passwdprog.match(user)
@@ -902,7 +898,6 @@ def splitport(host):
"""splitport('host:port') --> 'host', 'port'."""
global _portprog
if _portprog is None:
- import re
_portprog = re.compile('^(.*):([0-9]+)$')
match = _portprog.match(host)
@@ -917,7 +912,6 @@ def splitnport(host, defport=-1):
Return None if ':' but not a valid number."""
global _nportprog
if _nportprog is None:
- import re
_nportprog = re.compile('^(.*):(.*)$')
match = _nportprog.match(host)
@@ -936,7 +930,6 @@ def splitquery(url):
"""splitquery('/path?query') --> '/path', 'query'."""
global _queryprog
if _queryprog is None:
- import re
_queryprog = re.compile('^(.*)\?([^?]*)$')
match = _queryprog.match(url)
@@ -948,7 +941,6 @@ def splittag(url):
"""splittag('/path#tag') --> '/path', 'tag'."""
global _tagprog
if _tagprog is None:
- import re
_tagprog = re.compile('^(.*)#([^#]*)$')
match = _tagprog.match(url)
@@ -966,7 +958,6 @@ def splitvalue(attr):
"""splitvalue('attr=value') --> 'attr', 'value'."""
global _valueprog
if _valueprog is None:
- import re
_valueprog = re.compile('^([^=]*)=(.*)$')
match = _valueprog.match(attr)