¡@

Home 

python Programming Glossary: yaml.dump

How is it that json serialization is so much faster than yaml serialization in python?

http://stackoverflow.com/questions/2451732/how-is-it-that-json-serialization-is-so-much-faster-than-yaml-serialization-in-p

is nearly identical. import yaml cjson d 'foo' 'bar' 1 yaml.dump d Dumper yaml.SafeDumper 'foo bar 1 n' cjson.encode d ' foo.. 1 n' cjson.encode d ' foo bar 1 ' import yaml cjson timeit yaml.dump d Dumper yaml.SafeDumper setup import yaml d 'foo' 'bar' 1 number.. d 'foo' 'bar' 1 number 10000 44.506911039352417 timeit yaml.dump d Dumper yaml.CSafeDumper setup import yaml d 'foo' 'bar' 1..

Any yaml libraries in Python that support dumping of long strings as block literals or folded blocks?

http://stackoverflow.com/questions/6432605/any-yaml-libraries-in-python-that-support-dumping-of-long-strings-as-block-liter

' 'Heavy or permanent curses are unaffected. n' print yaml.dump data The result folded It removes all ordinary curses from all..

YAML parsing and Python?

http://stackoverflow.com/questions/6866600/yaml-parsing-and-python

Saving data is just as easy f open 'newtree.yaml' w yaml.dump dataMap f f.close You have a dictionary and now you have to..

How can I control what scalar form PyYaml uses for my data?

http://stackoverflow.com/questions/8640959/how-can-i-control-what-scalar-form-pyyaml-uses-for-my-data

Line2 Line3 How can I instruct PyYaml to do this If I call yaml.dump my_obj it produces a dict like output long 'line1 line2 line3.. quoted Hello long literal Line1 nLine2 nLine3 n print yaml.dump d Output short Hello long Line1 Line2 Line3 share improve..