#NEWLINE# def product_upper_triangle( values , include_diagonal = False ) : #NEWLINE# #INDENT# '\n    Return an iterator over pairs, (v0, v1), drawn from values.\n\n    If `include_diagonal` is True, returns all pairs such that v0 <= v1.\n    If `include_diagonal` is False, returns all pairs such that v0 < v1.\n    ' #NEWLINE# return all_pairs_matching_predicate ( include_diagonal , ( operator . le if include_diagonal else operator . lt ) )