Function scan

Synopsis

def scan(stream, Loader=Loader)

Description

Scan a YAML stream and produce scanning tokens.

Mentioned in

Source

Lines 58-68 in lib3/yaml/__init__.py.

def scan(stream, Loader=Loader):
    """
    Scan a YAML stream and produce scanning tokens.
    """
    loader = Loader(stream)
    try:
        while loader.check_token():
            yield loader.get_token()
    finally:
        loader.dispose()






Add Discussion as Guest

Log in