mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Unpacker.get_buffer(): new method to access the internal buffer of data
This commit is contained in:
parent
fd8a393086
commit
75eccc5bcf
1 changed files with 3 additions and 0 deletions
|
@ -150,6 +150,9 @@ class Unpacker:
|
|||
def set_position(self, position):
|
||||
self.__pos = position
|
||||
|
||||
def get_buffer(self):
|
||||
return self.__buf
|
||||
|
||||
def done(self):
|
||||
if self.__pos < len(self.__buf):
|
||||
raise Error('unextracted data remains')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue