Function peek_token

Synopsis

def peek_token(self)

Description

No description yet.

Mentioned in

Source

Lines 125-134 in lib3/yaml/scanner.py.

def peek_token(self):
    # Return the next token, but do not delete if from the queue.
    # Return None if no more tokens.
    while self.need_more_tokens():
        self.fetch_more_tokens()
    if self.tokens:
        return self.tokens[0]
    else:
        return None





Add Discussion as Guest

Log in