Commit b7bd1612 authored by Arnaud Fontaine's avatar Arnaud Fontaine

py3: Add helper to convert python3 dict_{keys,values,items} to list() if they need to be modified.

parent 3d76c463
......@@ -566,6 +566,12 @@ else:
def unicode2str(s):
return s
if six.PY3:
def ensure_list(o):
return list(o)
else:
ensure_list = lambda x: x
#####################################################
# Globals initialization
#####################################################
......
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