MCPcopy
hub / github.com/PyMySQL/PyMySQL / rewind

Method rewind

pymysql/protocol.py:95–99  ·  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

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

Callers 1

raise_for_errorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected