#NEWLINE# def next( self ) : #NEWLINE# #INDENT# 'A file object is its own iterator, for example iter(f) returns f\n        (unless f is closed). When a file is used as an iterator, typically\n        in a for loop (for example, for line in f: print line), the next()\n        method is called repeatedly. This method returns the next input line,\n        or raises StopIteration when EOF is hit.\n        ' #NEWLINE# _complain_ifclosed ( self . closed ) #NEWLINE# r = self . readline ( ) #NEWLINE# if ( not r ) : #NEWLINE# #INDENT# raise StopIteration #NEWLINE# #UNINDENT# return r