isinstance takes tuple not list
This commit is contained in:
parent
9893e5865d
commit
546f518448
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue