#NEWLINE# def clear( self ) : #NEWLINE# #INDENT# 'Resets the grid.' #NEWLINE# node_factory = self . node_factory #NEWLINE# self . nodes [ : ] = [ [ node_factory ( x , y ) for x in range ( width ) ] for y in range ( height ) ]