summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-05-08 14:10:11 (GMT)
committerGitHub <noreply@github.com>2022-05-08 14:10:11 (GMT)
commit3680ebed7f3e529d01996dd0318601f9f0d02b4b (patch)
tree7889885b7ce3089f5ce5d02d88e7a55518644aae /Lib/xmlrpc
parentc826867b7c1bb69639290d8df0f850ec3f9a6c72 (diff)
downloadcpython-3680ebed7f3e529d01996dd0318601f9f0d02b4b.zip
cpython-3680ebed7f3e529d01996dd0318601f9f0d02b4b.tar.gz
cpython-3680ebed7f3e529d01996dd0318601f9f0d02b4b.tar.bz2
bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)
I suppose it is a remnants of very old code written when str, int, list, dict, etc were functions and not classes.
Diffstat (limited to 'Lib/xmlrpc')
-rw-r--r--Lib/xmlrpc/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index a614cef..bef23f4 100644
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -850,9 +850,9 @@ class MultiCallIterator:
def __getitem__(self, i):
item = self.results[i]
- if type(item) == type({}):
+ if isinstance(item, dict):
raise Fault(item['faultCode'], item['faultString'])
- elif type(item) == type([]):
+ elif isinstance(item, list):
return item[0]
else:
raise ValueError("unexpected type in multicall result")