New submission from Antoine Pitrou <pit...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue5016>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to