A RetroSearch Logo

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

Search Query:

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

[Python-Dev] Iterating a closed StringIO

[Python-Dev] Iterating a closed StringIO [Python-Dev] Iterating a closed StringIOWalter Dörwald walter at livinglogic.de
Thu Nov 17 21:21:48 CET 2005
Currently StringIO.StringIO and cStringIO.StringIO behave differently 
when iterating a closed stream:

s = StringIO.StringIO("foo")
s.close()
s.next()

gives StopIteration, but

s = cStringIO.StringIO("foo")
s.close()
s.next()

gives "ValueError: I/O operation on closed file".

Should they raise the same exception? Should this be fixed for 2.5?

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