Modify ↓
Ticket #18 (closed defect: worksforme)
[bug] nested dictionnary load works dump doesn't
| Reported by: | eugene@… | Owned by: | xi |
|---|---|---|---|
| Priority: | normal | Component: | pyyaml |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by xi) (diff)
import yaml data=yaml.load(""" a: 1 b: ba: 1 bb: 2 """) yaml.dump(data)
[gives]
'a: 1\nb: {ba: 1, bb: 2}\n'
pyYaml 3.0.3 - Python 2.4.3 - Windows XP
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

It's a correct output despite the fact that the style of the nested mapping is different.
If you want collections to be always serialized in a block style, try