Created
August 17, 2022 00:05
-
-
Save epicfaace/56452ffa0522317092d33a58398f0d40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def peek(self, size: int): | |
b = bytearray() | |
for i in range(0, min(size, len(self.__buf))): | |
b.extend(self.__buf[i]) | |
return bytes(b)[:size] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment