#NEWLINE# def iter_all_collisions( self ) : #NEWLINE# #INDENT# known_collisions = set ( ) #NEWLINE# for bucket in self . buckets : #NEWLINE# #INDENT# for ( i , obj ) in enumerate ( bucket ) : #NEWLINE# #INDENT# f_overlaps = obj . cshape . overlaps #NEWLINE# for ( j , other ) in enumerate ( bucket ) : #NEWLINE# #INDENT# if ( j >= i ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# if f_overlaps ( other . cshape ) : #NEWLINE# #INDENT# if ( id ( obj ) < id ( other ) ) : #NEWLINE# #INDENT# coll_id = ( id ( obj ) , id ( other ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# coll_id = ( id ( other ) , id ( obj ) ) #NEWLINE# #UNINDENT# if ( coll_id not in known_collisions ) : #NEWLINE# #INDENT# known_collisions . add ( coll_id ) #NEWLINE# ( yield ( obj , other ) )