(parent, key, value)
Set attribute 'key' on parent if value is not None
Set attribute 'key' on parent if value is not None
Set attribute key on parent if value is not None
def set_if_not_none(parent, key, value):
    """
    Set attribute 'key' on parent if value is not None
    """
    if value is not None:
        setattr(parent, key, value)
def set_if_not_none ( parent , key , value ) : if value is not None : setattr ( parent , key , value )