You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a bug. The documentation says that .tell() returns "an opaque number" that "does not usually represent a number of bytes in the underlying binary storage".
In fact, calling .seek() with anything else than 0 or a return value of .tell() "produces undefined behaviour". I just relied on that today, without knowing it. I wrote this code:
The following prints
18446744073709551620
(as I discovered in python/cpython#93077):This is not a bug. The documentation says that
.tell()
returns "an opaque number" that "does not usually represent a number of bytes in the underlying binary storage".In fact, calling
.seek()
with anything else than0
or a return value of.tell()
"produces undefined behaviour". I just relied on that today, without knowing it. I wrote this code:This shouldn't pass the type check IMO.
The text was updated successfully, but these errors were encountered: