>>> from msgpack import *
>>> u = Unpacker(); u.feed('x'); u.read_bytes(1)
'x'
>>> u.next()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "msgpack/_unpacker.pyx", line 562, in msgpack._cmsgpack.Unpacker.__next__
File "msgpack/_unpacker.pyx", line 489, in msgpack._cmsgpack.Unpacker._unpack
StopIteration: No more data to unpack.
>>> u.feed('\1'); u.next()
1
So far so good. Now with fallback implémentation:
>>> from msgpack.fallback import *
>>> u = Unpacker(); u.feed('x'); u.read_bytes(1)
bytearray(b'x')
>>> u.next()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/msgpack/fallback.py", line 690, in __next__
raise StopIteration
StopIteration
>>> u.feed('\1'); u.next()
120
Something seems to be wrongly reset on StopIteration.
So far so good. Now with fallback implémentation:
Something seems to be wrongly reset on StopIteration.