'put path, value into a dict'

def put(self, path, value):

    try:
        entry = Yedit.get_entry(self.yaml_dict, path, self.separator)
    except KeyError:
        entry = None
    if (entry == value):
        return (False, self.yaml_dict)
    try:
        tmp_copy = yaml.load(yaml.round_trip_dump(self.yaml_dict, default_flow_style=False), yaml.RoundTripLoader)
    except AttributeError:
        tmp_copy = copy.deepcopy(self.yaml_dict)
    try:
        tmp_copy.fa.set_block_style()
    except AttributeError:
        pass
    result = Yedit.add_entry(tmp_copy, path, value, self.separator)
    if (result is None):
        return (False, self.yaml_dict)
    if (path == ''):
        if (isinstance(result, list) or isinstance(result, dict)):
            self.yaml_dict = result
            return (True, self.yaml_dict)
        return (False, self.yaml_dict)
    self.yaml_dict = tmp_copy
    return (True, self.yaml_dict)
