def _obj_to_dict(obj):
 return {key: getattr(obj, key) for key in dir(obj) if ((key[0] != '_') and (not hasattr(getattr(obj, key), '__call__')))}

def _obj_to_dict ( obj ) : return { key : getattr ( obj , key ) for key in dir ( obj ) if ( ( key [ 0 ] != '_' ) and ( not hasattr ( getattr ( obj , key ) , '__call__' ) ) ) }
convert an object into a hash for debug .