Skip to content

Commit

Permalink
minor: small doc improvement (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
icy authored Jan 18, 2024
1 parent 98ec8c1 commit d1c417e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ through common data structures and joining results. Although
it's recommended to choose your own strategies, deepmerge does
provided some preconfigured mergers for a common situations:

* deepmerge.always_merger: always try to merge. in the case of mismatches, the value from the second object overrides the first o ne.
* deepmerge.always_merger: always try to merge. in the case of mismatches, the value from the second object overrides the first one.
* deepmerge.merge_or_raise: try to merge, raise an exception if an unmergable situation is encountered.
* deepmerge.conservative_merger: similar to always_merger, but in the case of a conflict, use the existing value.

Expand Down Expand Up @@ -43,6 +43,8 @@ This is intentional, as an implicit copy would result in a significant performan
result = deepcopy(base)
always_merger.merge(result, next)
assert id(result) != id(base)
Authoring your own Mergers
==========================

Expand Down
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Example
assert expected_result == result
# The merge action will change the first dict (base).
assert id(base) == id(result)
**Custom Strategy**

Expand Down

0 comments on commit d1c417e

Please sign in to comment.