diff options
| author | Walter Dörwald <walter@livinglogic.de> | 2006-03-15 08:23:53 (GMT) | 
|---|---|---|
| committer | Walter Dörwald <walter@livinglogic.de> | 2006-03-15 08:23:53 (GMT) | 
| commit | 0af5d93d8a9ce44343630c24140977fa841dfe04 (patch) | |
| tree | d85ea652f568c9b31ae51554fdd223114ae1c1a3 /Lib/StringIO.py | |
| parent | 4a53dadc3edf80785b8c99a780727dea005ee1e3 (diff) | |
| download | cpython-0af5d93d8a9ce44343630c24140977fa841dfe04.zip cpython-0af5d93d8a9ce44343630c24140977fa841dfe04.tar.gz cpython-0af5d93d8a9ce44343630c24140977fa841dfe04.tar.bz2  | |
SF patch #1359365: file and cStringIO raise a ValueError when next() is called
after calling close(). Change StringIO, so that it behaves the same way.
Diffstat (limited to 'Lib/StringIO.py')
| -rw-r--r-- | Lib/StringIO.py | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/StringIO.py b/Lib/StringIO.py index 5c463fb..1e5f254 100644 --- a/Lib/StringIO.py +++ b/Lib/StringIO.py @@ -72,8 +72,7 @@ class StringIO:          method is called repeatedly. This method returns the next input line,          or raises StopIteration when EOF is hit.          """ -        if self.closed: -            raise StopIteration +        _complain_ifclosed(self.closed)          r = self.readline()          if not r:              raise StopIteration  | 
