(stream, Loader=None, version=None, preserve_quotes=None)
Parse the first YAML document in a stream
    and produce the corresponding Python object.
Parse the first YAML document in a stream
    and produce the corresponding Python object.
Parse the first YAML document in a stream and produce the corresponding Python object .
def load(stream, Loader=None, version=None, preserve_quotes=None):
    # type: (StreamTextType, Any, Optional[VersionType], Any) -> Any
    """
    Parse the first YAML document in a stream
    and produce the corresponding Python object.
    """
    if Loader is None:
        warnings.warn(UnsafeLoaderWarning.text, UnsafeLoaderWarning, stacklevel=2)
        Loader = UnsafeLoader
    loader = Loader(stream, version, preserve_quotes=preserve_quotes)
    try:
        return loader._constructor.get_single_data()
    finally:
        loader._parser.dispose()
        try:
            loader._reader.reset_reader()
        except AttributeError:
            pass
        try:
            loader._scanner.reset_scanner()
        except AttributeError:
            pass
def load ( stream , Loader = None , version = None , preserve_quotes = None ) : # type: (StreamTextType, Any, Optional[VersionType], Any) -> Any if Loader is None : warnings . warn ( UnsafeLoaderWarning . text , UnsafeLoaderWarning , stacklevel = 2 ) Loader = UnsafeLoader loader = Loader ( stream , version , preserve_quotes = preserve_quotes ) try : return loader . _constructor . get_single_data ( ) finally : loader . _parser . dispose ( ) try : loader . _reader . reset_reader ( ) except AttributeError : pass try : loader . _scanner . reset_scanner ( ) except AttributeError : pass