No need to assign the results of expressions used only for side effects.
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 0951237..d4740e9 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -234,7 +234,7 @@
hdrs = fp.info()
fp.close()
return url2pathname(splithost(url1)[1]), hdrs
- except IOError, msg:
+ except IOError:
pass
fp = self.open(url, data)
try:
@@ -1277,7 +1277,7 @@
else:
try:
# is this a sufficient test for sequence-ness?
- x = len(v)
+ len(v)
except TypeError:
# not a sequence
v = quote_plus(str(v))