A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-November/058206.html below:

[Python-Dev] Another StringIO/cStringIO discrepancy

[Python-Dev] Another StringIO/cStringIO discrepancy [Python-Dev] Another StringIO/cStringIO discrepancyWalter Dörwald walter at livinglogic.de
Fri Nov 18 17:30:33 CET 2005
Guido van Rossum wrote:

> On 11/18/05, Walter Dörwald <walter at livinglogic.de> wrote:
> 
>> >>> import StringIO, cStringIO
>> >>> s = StringIO.StringIO()
>> >>> s.truncate(-42)
>>Traceback (most recent call last):
>>   File "<stdin>", line 1, in ?
>>   File "/usr/local/lib/python2.4/StringIO.py", line 203, in truncate
>>     raise IOError(EINVAL, "Negative size not allowed")
>>IOError: [Errno 22] Negative size not allowed
>> >>> s = cStringIO.StringIO()
>> >>> s.truncate(-42)
>> >>>
> 
> 
> Well, what does a regular file say in this case?

IOError: [Errno 22] Invalid argument

Bye,
    Walter Dörwald
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4