#NEWLINE# def obj_eq( a , b ) : #NEWLINE# #INDENT# if ( id ( a ) == id ( b ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( isinstance ( a , Iterable ) and isinstance ( b , Iterable ) ) : #NEWLINE# #INDENT# if ( ( '@id' in a ) and ( '@id' in b ) ) : #NEWLINE# #INDENT# return ( a [ '@id' ] == b [ '@id' ] ) #NEWLINE# #UNINDENT# if isinstance ( a , dshared . list ) : #NEWLINE# #INDENT# a = list ( a ) #NEWLINE# #UNINDENT# if isinstance ( b , dshared . list ) : #NEWLINE# #INDENT# b = list ( b ) #NEWLINE# #UNINDENT# #UNINDENT# return ( a == b )