Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (67 - 69 of 121)

Ticket Resolution Summary Owner Reporter
#18 worksforme [bug] nested dictionnary load works dump doesn't xi eugene@…

Reported by eugene@…, 7 years ago.

Description
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

#51 fixed Won't emit a document until the next document is available xi edward@…

Reported by edward@…, 6 years ago.

Description

parse_document_end won't emit an event until it has seen the next token after the document end. This makes it difficult to use PyYAML to parse live streams of documents in a timely way, because the next document may not actually be available for some undetermined amount of time.

Using PyYAML-3.04.

#9 fixed Forcing block style xi edemaine@…

Reported by edemaine@…, 7 years ago.

Description

Is there an easy way to force the emitter to use block style instead of flow style? I have one particular case in mind where it would be particularly desirable: ordered dictionaries. For example:

>>> yaml.load('[hello: world, goodbye: world]')
[{'hello': 'world'}, {'goodbye': 'world'}]
>>> print yaml.dump(_)
- {hello: world}
- {goodbye: world}

In my opinion, the output would look much nicer as

- hello: world
- goodbye: world

Even if you don't agree with this opinion, there should be a way to force block style in all output. I did not see an easy way to do this, even with subclassing. Suggestions?

Note: See TracQuery for help on using queries.