[Python-checkins] cpython: Replace overly-aggressive comparison for type equality with an isinstance check.
jason.coombs
python-checkins at python.org
Sat May 10 19:25:52 CEST 2014
http://hg.python.org/cpython/rev/05e364315de2
changeset: 90615:05e364315de2
user: Jason R. Coombs <jaraco at jaraco.com>
date: Sat May 10 13:24:18 2014 -0400
summary:
Replace overly-aggressive comparison for type equality with an isinstance check.
files:
Lib/distutils/command/upload.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -146,7 +146,7 @@
for key, value in data.items():
title = '\nContent-Disposition: form-data; name="%s"' % key
# handle multiple entries for the same name
- if type(value) != type([]):
+ if not isinstance(value, list):
value = [value]
for value in value:
if type(value) is tuple:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list