{"body":"def update_dict(obj, dict, attributes):\n    \"\"\"Update dict with fields from obj.attributes\n\n    :param obj: the object updated into dict\n    :param dict: the result dictionary\n    :param attributes: a list of attributes belonging to obj\n    \"\"\"\n    for attribute in attributes:\n        if hasattr(obj, attribute) and getattr(obj, attribute) is not None:\n            dict[attribute] = getattr(obj, attribute)","name":"","extension":"","url":"https://www.irccloud.com/pastebin/4UlRogiU","modified":1406606322,"id":"4UlRogiU","size":407,"lines":10,"own_paste":false,"theme":"","date":1406606322}