diff options
author | Ruamel/Anthon van der Neut <bitbucket@ruamel.eu> | 2017-07-01 19:54:45 +0000 |
---|---|---|
committer | Ruamel/Anthon van der Neut <bitbucket@ruamel.eu> | 2017-07-01 19:54:45 +0000 |
commit | cb19d3f0f1e95243accc079d5fe4885ef518b03a (patch) | |
tree | 7661c6f1bd4ccc26879f464727be702e4ae9216a | |
parent | 0c24d2ff9084642bb8e3b25b3a52e617d8b9f435 (diff) | |
parent | 9731f14c2818bbea527b6cdd8d0c72a753769164 (diff) | |
download | ruamel.yaml-cb19d3f0f1e95243accc079d5fe4885ef518b03a.tar.gz |
Merged in mmorearty/yaml/mmorearty/fix-small-typo-and-formatting-1498938255255 (pull request #22)
fix small typo and formatting
-rw-r--r-- | _doc/basicuse.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/_doc/basicuse.rst b/_doc/basicuse.rst index 05b59fc..56a28d6 100644 --- a/_doc/basicuse.rst +++ b/_doc/basicuse.rst @@ -28,14 +28,14 @@ Dumping works in the same way:: yaml=YAML() yaml.default_flow_style = False - yaml.dump({a: [1, 2], s) + yaml.dump({a: [1, 2]}, s) in this ``s`` can be a file pointer (i.e. an object that has the `.write()` method, or a ``pathlib.Path()``. If you want to display your output, just stream to `sys.stdout`. If you need to transform a string representation of the output provide -a function that takes a string as input and returns one: +a function that takes a string as input and returns one:: def tr(s): return s.replace('\n', '<\n') # such output is not valid YAML! |