Message60709
$ 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. |
|
Date |
User |
Action |
Args |
2008-01-20 09:57:43 | admin | link | issue1174606 messages |
2008-01-20 09:57:43 | admin | create | |
|