[New-bugs-announce] [issue5016] FileIO.seekable() can return False
Antoine Pitrou
report at bugs.python.org
Wed Jan 21 00:38:38 CET 2009
New submission from Antoine Pitrou <pitrou at free.fr>:
FileIO.seekable() can return False if we first seek to a position such
that, when truncated to a signed int, it becomes negative:
>>> f = open('largefile', 'wb', buffering=0)
>>> f.seek(2**31, 0)
2147483648
>>> f.write(b'x')
1
>>> f.close()
>>> f = open('largefile', 'rb', buffering=0)
>>> f.seek(0, 2)
2147483649
>>> f.seekable()
False
----------
components: Extension Modules
messages: 80295
nosy: pitrou
severity: normal
status: open
title: FileIO.seekable() can return False
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5016>
_______________________________________
More information about the New-bugs-announce
mailing list