Commit 052a783f authored by Samuel GAIST's avatar Samuel GAIST
Browse files

Merge branch 'fix_stringify' into '1.4.x'

Fix striginfy method

See merge request !37
parents 301173b4 74d4e661
Pipeline #20818 passed with stages
in 34 minutes and 6 seconds
......@@ -1539,6 +1539,10 @@ def dot_diagram(prefix, type, names, path, formats):
def stringify(value):
'''Creates a string representation of a baseformat represented as a dict
To avoid overloading the terminal that will print the result of this
function, only the first ten elements of lists are processed with visual cues
that will show that there's more to it.
The input variable ``value`` is modified in-place.
Parameters:
......@@ -1569,7 +1573,7 @@ def stringify(value):
return reduced
elif (len(value) > 0) and \
(isinstance(value[0], list) or isinstance(value[0], dict)):
return map(stringify, value)
return list(map(stringify, value))
elif isinstance(value, dict):
for name, value2 in value.items():
......
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