Utilities¶
-
class
utils.
ObjectIter
(stream: bytes, pointer=0)¶ Used to iterate over objects
-
finish_number
() → bytes¶ Move stream until a separating character is found
Returns: Resulting int
-
move_pointer
(n: int) → None¶ Moves the pointer n characters
Parameters: n – Number of characters
-
move_to
(item: bytes)¶ Moves the iterator to given item
Parameters: item – item to move to Returns: Items since the beginning of iteration till end
-
peek
(n: int = 1)¶ Returns the next n chars without incrementing the counter
Parameters: n – number of characters Returns: Returns the next n chars without incrementing the counter
-
prev
() → bytes¶ Decrements the counter
Returns: Previous element
-
reversePeek
(n: int = 1) → bytes¶ Returns the previous n chars without incrementing the counter
Parameters: n – number of characters Returns: Returns the next n chars without incrementing the counter
-
skip_space
() → None¶ Moves stream to the next non whitespace char
Parameters: stream – Any iterable object
-