New submission from Ryan Leslie <ryle...@gmail.com>:

py> StringIO.StringIO("foo").read(long(1))
'f'

py> io.BytesIO("foo").read(long(1))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: integer argument expected, got 'long'

This is known to cause problems when reading zip data from a BytesIO
object with zipfile. See this recent thread on comp.lang.python:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/337c1b8a48e8acae/

----------
components: Library (Lib)
messages: 94818
nosy: ryles
severity: normal
status: open
title: Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6
type: behavior
versions: Python 2.6

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

Reply via email to