Arthur Darcet added the comment:

it's a tiny bit slow, but that works, thank you. I guess we can close this



% python -m timeit -s "import io; b = io.BytesIO(b'0' * 2 ** 30)" "p = 
b.tell(); b.seek(0, 2); b.tell(); b.seek(p)"
1000000 loops, best of 3: 0.615 usec per loop

% python -m timeit -s "import io; b = io.BytesIO(b'0' * 2 ** 30)" 
"len(b.getvalue())"
10000000 loops, best of 3: 0.174 usec per loop

----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31025>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to