mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
No need to assign the results of expressions used only for side effects.
This commit is contained in:
parent
7d4b759bd9
commit
84fedf7f06
8 changed files with 7 additions and 9 deletions
|
@ -234,7 +234,7 @@ class URLopener:
|
|||
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 @@ def urlencode(query,doseq=0):
|
|||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue