#NEWLINE# def type_change( old , new ) : #NEWLINE# #INDENT# ' Was there a significant type change between old and new data?\n\n    >>> type_change([1, 2], [3, 4])\n    False\n    >>> type_change([1, 2], [3, [1,2,3]])\n    True\n\n    Some special cases exist, like no type change from list to Iterator\n\n    >>> type_change([[1, 2]], [iter([1, 2])])\n    False\n    ' #NEWLINE# if all ( ( isinstance ( x , base ) for x in ( old + new ) ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( len ( old ) != len ( new ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# new_types = list ( map ( type , new ) ) #NEWLINE# old_types = list ( map ( type , old ) ) #NEWLINE# return ( not all ( map ( issubtype , new_types , old_types ) ) )