Commit 03bc9915 by Celine Mercier

Cython: utils: added handling of tuples to bytes2str_object function

parent 24b1dab5
......@@ -166,7 +166,9 @@ cdef object bytes2str_object(object value): # Only works if complex types are d
value[k] = bytes2str(v)
if type(k) == bytes:
value[bytes2str(k)] = value.pop(k)
elif isinstance(value, list):
elif isinstance(value, list) or isinstance(value, tuple):
if isinstance(value, tuple):
value = list(value)
for i in range(len(value)):
if isinstance(value[i], list) or isinstance(value[i], dict):
value[i] = bytes2str_object(value[i])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment