isinstance takes tuple not list

This commit is contained in:
j 2016-09-17 17:20:17 +02:00
parent 9893e5865d
commit 546f518448

View file

@ -121,7 +121,7 @@ def _encode_dict(d, buff):
"""
buff.append(b'd')
for k in sorted(d):
if not isinstance(k, [bytes, str]):
if not isinstance(k, (bytes, str)):
k = str(k)
_encode(k, buff)
_encode(d[k], buff)