Skip to content

Commit 63cc047

Browse files
committed
fix doctest example
1 parent 48461c5 commit 63cc047

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deepdiff/diff.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,11 +1839,11 @@ def _get_key_for_group_by(row, group_by, item_name):
18391839
18401840
Example
18411841
>>> row = {'first': 'John', 'middle': 'Joe', 'last': 'Smith'}
1842-
>>> group_by_key = DeepDiff._get_key_for_group_by(row, 'first', 't1')
1842+
>>> DeepDiff._get_key_for_group_by(row, 'first', 't1')
18431843
'John'
18441844
>>> nested_row = {'id': 123, 'demographics': {'names': {'first': 'John', 'middle': 'Joe', 'last': 'Smith'}}}
1845-
>>> group_by_key = DeepDiff._get_key_for_group_by(nested_row,
1846-
lambda x: x['demographics']['names']['first'], 't1')
1845+
>>> group_by = lambda x: x['demographics']['names']['first']
1846+
>>> DeepDiff._get_key_for_group_by(nested_row, group_by, 't1')
18471847
'John'
18481848
18491849
Args:

0 commit comments

Comments
 (0)