Function compose

Synopsis

def compose(stream, Loader=Loader)

Description

Parse the first YAML document in a stream and produce the corresponding representation tree.

Mentioned in

Source

Lines 80-90 in lib3/yaml/__init__.py.

def compose(stream, Loader=Loader):
    """
    Parse the first YAML document in a stream
    and produce the corresponding representation tree.
    """
    loader = Loader(stream)
    try:
        return loader.get_single_node()
    finally:
        loader.dispose()






Add Discussion as Guest

Log in