This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Rhamphoryncus
Recipients
Date 2005-04-01.04:48:46
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
$ python -c 'open("/dev/zero").read()'
Traceback (most recent call last):
  File "<string>", line 1, in ?
SystemError: ../Objects/stringobject.c:3316: bad
argument to internal function

Compare with this two variants:

$ python -c 'open("/dev/zero").read(2**31-1)'
Traceback (most recent call last):
  File "<string>", line 1, in ?
MemoryError

$ python -c 'open("/dev/zero").read(2**31)'
Traceback (most recent call last):
  File "<string>", line 1, in ?
OverflowError: long int too large to convert to int

The unsized read should produce either MemoryError or
OverflowError instead of SystemError.

Tested with Python 2.2, 2.3, and 2.4.
History
Date User Action Args
2008-01-20 09:57:43adminlinkissue1174606 messages
2008-01-20 09:57:43admincreate