def seek(self, offset, whence=<NUM_LIT:0>):
self.flush()<EOL>if whence == self.SEEK_SET:<EOL><INDENT>self._realpos = self._pos = offset<EOL><DEDENT>elif whence == self.SEEK_CUR:<EOL><INDENT>self._pos += offset<EOL>self._realpos = self._pos<EOL><DEDENT>else:<EOL><INDENT>self._realpos = self._pos = self._get_size() + offset<EOL><DEDENT>self._rbuffer = bytes()<EOL>
Set the file's current position.

See `file.seek` for details.