def _RecurseOverObject(obj, factory, parent=None):
 if _IsSudsIterable(obj):
  copy_of_obj = tuple(obj)
  for item in copy_of_obj:
   if _IsSudsIterable(item):
    if ('xsi_type' in item):
     if isinstance(obj, tuple):
      parent[obj[0]] = _PackForSuds(obj[1], factory)
     else:
      obj.remove(item)
      obj.append(_PackForSuds(item, factory))
    _RecurseOverObject(item, factory, obj)

def _RecurseOverObject ( obj , factory , parent = None ) : if _IsSudsIterable ( obj ) : copy_of_obj = tuple ( obj ) for item in copy_of_obj : if _IsSudsIterable ( item ) : if ( 'xsi_type' in item ) : if isinstance ( obj , tuple ) : parent [ obj [ 0 ] ] = _PackForSuds ( obj [ 1 ] , factory ) else : obj . remove ( item ) obj . append ( _PackForSuds ( item , factory ) ) _RecurseOverObject ( item , factory , obj )
recurses over a nested structure to look for changes in suds objects .