(self, loader=None)
Initialize the scanner.
Initialize the scanner.
Initialize the scanner .
def __init__(self, loader=None):
        # type: (Any) -> None
        """Initialize the scanner."""
        # It is assumed that Scanner and Reader will have a common descendant.
        # Reader do the dirty work of checking for BOM and converting the
        # input data to Unicode. It also adds NUL to the end.
        #
        # Reader supports the following methods
        #   self.peek(i=0)    # peek the next i-th character
        #   self.prefix(l=1)  # peek the next l characters
        #   self.forward(l=1) # read the next l characters and move the pointer

        self.loader = loader
        if self.loader is not None and getattr(self.loader, "_scanner", None) is None:
            self.loader._scanner = self
        self.reset_scanner()
        self.first_time = False
        self.yaml_version = None
def __init__ ( self , loader = None ) : # type: (Any) -> None # It is assumed that Scanner and Reader will have a common descendant. # Reader do the dirty work of checking for BOM and converting the # input data to Unicode. It also adds NUL to the end. # # Reader supports the following methods #   self.peek(i=0)    # peek the next i-th character #   self.prefix(l=1)  # peek the next l characters #   self.forward(l=1) # read the next l characters and move the pointer self . loader = loader if self . loader is not None and getattr ( self . loader , "_scanner" , None ) is None : self . loader . _scanner = self self . reset_scanner ( ) self . first_time = False self . yaml_version = None