mk-fg / pretty-yaml

PyYAML-based module to produce a bit more pretty and readable YAML-serialized data
Do What The F*ck You Want To Public License
135 stars 29 forks source link

Fix bug where arrays with dict displayed wrong #1

Closed skawouter closed 11 years ago

skawouter commented 11 years ago

When executing the following code:

import pyaml
import collections
m = {'items': [{"template": "test", "otherval": "test2"}, {"group": "group1", "test2": "test"}]}
v = {"t": [1 , 3, 4 ], "xxx" : m, 'zzz': {"testing": "testing", "bal": "test"}}
k = collections.OrderedDict(v)
print pyaml.dump(k)

This outputs an invalid yaml that should be valid. The pull request fixes this.

mk-fg commented 11 years ago

Thanks!