Skip to content

Commit 4e0ffec

Browse files
committed
Replaced load and dump with their safe_ equivalents
1 parent 661e4f1 commit 4e0ffec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Now let's dump and load it using `pyyaml`:
7575
```
7676

7777
```python
78-
>>> print(yaml.load("!yamlable/com.yamlable.example.Foo {a: 0, b: hey}"))
78+
>>> print(yaml.safe_load("!yamlable/com.yamlable.example.Foo {a: 0, b: hey}"))
7979

8080
Foo - {'a': 0, 'b': 'hey'}
8181
```
@@ -84,7 +84,7 @@ For more general cases where your object is embedded in a more complex structure
8484

8585
```python
8686
>>> d = {'foo': f, 'foo2': 12}
87-
>>> print(yaml.dump(d))
87+
>>> print(yaml.safe_dump(d))
8888

8989
foo: !yamlable/com.yamlable.example.Foo {a: 1, b: hello}
9090
foo2: 12

0 commit comments

Comments
 (0)