def valid_window_lengths(underlying_buffer_length):
 return iter(range(1, (underlying_buffer_length + 1)))

def valid_window_lengths ( underlying_buffer_length ) : return iter ( range ( 1 , ( underlying_buffer_length + 1 ) ) )
an iterator of all legal window lengths on a buffer of a given length .