io.BytesIO returns wrong getvalue() after seeking
LatinSuD opened this issue · comments
LatinSuD commented
getvalue() and getbuffer() return wrong results after having used seek.
This code:
import io
bio = io.BytesIO(bytes('1234', encoding='ascii'))
bio.seek(0)
bio.write(b"HI")
print(bio.getvalue())
In Python returns:
b'HI34'
While in Brython it returns:
b'1234HI'
Pierre Quentel commented
Thanks for the report @LatinSuD !