MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / rewind

Method rewind

pymysql/protocol.py:94–98  ·  view source on GitHub ↗

Set the position of the data buffer cursor to 'position'.

(self, position=0)

Source from the content-addressed store, hash-verified

92 self._position = new_position
93
94 def rewind(self, position=0):
95 """Set the position of the data buffer cursor to 'position'."""
96 if position < 0 or position > len(self._data):
97 raise Exception("Invalid position to rewind cursor to: %s." % position)
98 self._position = position
99
100 def get_bytes(self, position, length=1):
101 """Get 'length' bytes starting at 'position'.

Callers 1

raise_for_errorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected