#NEWLINE# def _as_list( self , factory , attrs ) : #NEWLINE# #INDENT# if ( attrs . pop ( 'hide_empty' , False ) and ( not self ) ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# _add_class ( attrs , 'multiple-items' ) #NEWLINE# html = self . _field . form . html_builder #NEWLINE# items = [ ] #NEWLINE# empty_streak = 0 #NEWLINE# for index in xrange ( len ( self ) ) : #NEWLINE# #INDENT# subwidget = self [ index ] #NEWLINE# empty_streak = ( ( empty_streak + 1 ) if subwidget . empty_as_item else 0 ) #NEWLINE# items . append ( html . li ( subwidget ( ) ) ) #NEWLINE# #UNINDENT# for offset in xrange ( ( attrs . pop ( 'extra_rows' , 1 ) - subwidget ) ) : #NEWLINE# #INDENT# items . append ( html . li ( self [ ( len ( items ) + offset ) ] ( ) ) ) #NEWLINE# #UNINDENT# return factory ( * items , ** attrs )