Function load_all
Synopsis
def load_all(stream, Loader=None)
Description
Parse all YAML documents in a stream and produce corresponding Python objects.
Mentioned in
- Documentation / Loading YAML
- Documentation / The yaml package
Source
Lines 118-133 in lib3/yaml/__init__.py.
def load_all(stream, Loader=None):
"""
Parse all YAML documents in a stream
and produce corresponding Python objects.
"""
if Loader is None:
load_warning('load_all')
Loader = FullLoader
loader = Loader(stream)
try:
while loader.check_data():
yield loader.get_data()
finally:
loader.dispose()