def objectSaveHook(pythonObject):
 for (predicate, uuid, saver, loader) in classInfo:
  if predicate(pythonObject):
   result = saver(pythonObject)
   result['__class_uuid__'] = str(uuid)
   return result
 return {'unpersistable': True}

def objectSaveHook ( pythonObject ) : for ( predicate , uuid , saver , loader ) in classInfo : if predicate ( pythonObject ) : result = saver ( pythonObject ) result [ '__class_uuid__' ] = str ( uuid ) return result return { 'unpersistable' : True }
object-to-serializable hook for certain value types used within the logging system .