Skip to content

Commit

Permalink
Rename ordered_dict_union -> compat_dict_union
Browse files Browse the repository at this point in the history
Do not use OrderedDicts any more, so name did not make sense.
  • Loading branch information
johnomotani committed Mar 23, 2020
1 parent 23df58e commit 854e922
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xarray/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ def ordered_dict_intersection(
Binary operator to determine if two values are compatible. By default,
checks for equivalence.
# TODO: Rename to compat_dict_intersection, as we do not use OrderedDicts
# any more.
Returns
-------
intersection : dict
Expand All @@ -371,15 +374,15 @@ def ordered_dict_intersection(
return new_dict


def ordered_dict_union(
def compat_dict_union(
first_dict: Mapping[K, V],
second_dict: Mapping[K, V],
compat: Callable[[V, V], bool] = equivalent,
) -> MutableMapping[K, V]:
"""Return the union of two dictionaries as a new dictionary.
An exception is raised if any keys are found in both dictionaries and the values are
not compatible.
An exception is raised if any keys are found in both dictionaries and the
values are not compatible.
Parameters
----------
Expand Down

0 comments on commit 854e922

Please sign in to comment.