Skip to content

Commit

Permalink
Merge cc3a98d into 7e62ad1
Browse files Browse the repository at this point in the history
  • Loading branch information
robinchew committed Mar 13, 2019
2 parents 7e62ad1 + cc3a98d commit b19e003
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dictdiffer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@


def diff(first, second, node=None, ignore=None, path_limit=None, expand=False,
tolerance=EPSILON):
tolerance=EPSILON, dot_notation=True):
"""Compare two dictionary/list/set objects, and returns a diff result.
Return an iterator with differences between two objects. The diff items
Expand Down Expand Up @@ -129,8 +129,9 @@ def _process_ignore_value(value):

def dotted(node, default_type=list):
"""Return dotted notation."""
if all(map(lambda x: isinstance(x, string_types) and '.' not in x,
node)):
if dot_notation and \
all(map(lambda x: isinstance(x, string_types) and '.' not in x,
node)):
return '.'.join(node)
else:
return default_type(node)
Expand Down

0 comments on commit b19e003

Please sign in to comment.