Adding the ability to deal with strings containing yaml seems to repel
to much. So we stay with create_from_yaml with a bad name.
This removes the need fro StringIO to wrap strings.
Also note:
```
with open('foo.txt') as f:
y = yaml.safe_load_all(f)
for i in y:
print(i)
\# raises ValueError: I/O operation on closed file.
```
Hence, we indent the whole method body into the open block.
with open('foo.txt') as f:
y = yaml.safe_load_all(f)
for i in y:
print(i)
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| create_from_yaml.py | ||