Function load

Synopsis

def load(stream, Loader=None)

Description

Parse the first YAML document in a stream and produce the corresponding Python object.

Mentioned in

Source

Lines 103-117 in lib3/yaml/__init__.py.

def load(stream, Loader=None):
    """
    Parse the first YAML document in a stream
    and produce the corresponding Python object.
    """
    if Loader is None:
        load_warning('load')
        Loader = FullLoader

    loader = Loader(stream)
    try:
        return loader.get_single_data()
    finally:
        loader.dispose()






Add Discussion as Guest

Log in