'Places bytes back onto the front of the lazy stream.
Future calls to read() will return those bytes first. The
stream position and thus tell() will be rewound.'

def unget(self, bytes):

    if (not bytes):
        return
    self._update_unget_history(len(bytes))
    self.position -= len(bytes)
    self._leftover = ''.join([bytes, self._leftover])
