#NEWLINE# @ register . filter #NEWLINE# def slice( items , group_size = 1 ) : #NEWLINE# #INDENT# args = ( [ iter ( group_size ) ] * group_size ) #NEWLINE# return ( filter ( None , group ) for group in zip_longest ( * args , fillvalue = None ) )