Am 18.11.2005 um 02:16 schrieb Guido van Rossum:
On 11/17/05, Walter Dörwald [EMAIL PROTECTED] wrote:
Am 17.11.2005 um 22:03 schrieb Guido van Rossum:
On 11/17/05, Walter Dörwald [EMAIL PROTECTED] wrote:
[...]
Should they raise the same exception? Should this be fixed for 2.5?
I think
Guido van Rossum wrote:
I hope there isn't anyone here who believes this patch would be a bad idea?
Not me, but the Iterator protocol docs may need a minor tweak. Currently they
say this:
The intention of the protocol is that once an iterator's next() method raises
StopIteration, it will
[Guido van Rossum]
I hope there isn't anyone here who believes this patch would be a
bad
idea?
[Nick Coglan]
Not me, but the Iterator protocol docs may need a minor tweak.
Currently
they
say this:
The intention of the protocol is that once an iterator's next()
method
raises
On 11/18/05, Raymond Hettinger [EMAIL PROTECTED] wrote:
For Walter's original question, my preference is to change the behavior
of regular files to raise StopIteration when next() is called on an
iterator for a closed file.
I disagree. As long as there is a possibility that you might still
On 11/17/05, Walter Dörwald [EMAIL PROTECTED] wrote:
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
Am 17.11.2005 um 22:03 schrieb Guido van Rossum:
On 11/17/05, Walter Dörwald [EMAIL PROTECTED] wrote:
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 =
On 11/17/05, Walter Dörwald [EMAIL PROTECTED] wrote:
Am 17.11.2005 um 22:03 schrieb Guido van Rossum:
On 11/17/05, Walter Dörwald [EMAIL PROTECTED] wrote:
Currently StringIO.StringIO and cStringIO.StringIO behave differently
when iterating a closed stream:
s = StringIO.StringIO(foo)