GeezerVison is showing github.com — updating docs · FOSSAware/deepdiff@45fe9cb
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: README.md +20-1Lines changed: 20 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -58,8 +58,27 @@ DeepDiff 5-6-0 allows you to pass custom operators. | 58 | 58 |
| 59 | 59 | ``` | 60 | 60 |
| | 61 | +**New in 5-6-0: Dynamic ignore order function** | | 62 | + | | 63 | +Ignoring order when certain word in the path | | 64 | + | | 65 | +```python | | 66 | +>>> from deepdiff import DeepDiff | | 67 | +>>> t1 = {'a': [1, 2], 'b': [3, 4]} | | 68 | +>>> t2 = {'a': [2, 1], 'b': [4, 3]} | | 69 | +>>> DeepDiff(t1, t2, ignore_order=True) | | 70 | +{} | | 71 | +>>> def ignore_order_func(level): | | 72 | +... return 'a' in level.path() | | 73 | +... | | 74 | +>>> DeepDiff(t1, t2, ignore_order=True, ignore_order_func=ignore_order_func) | | 75 | +{'values_changed': {"root['b'][0]": {'new_value': 4, 'old_value': 3}, "root['b'][1]": {'new_value': 3, 'old_value': 4}}} | | 76 | + | | 77 | +``` | | 78 | + | | 79 | + | | 80 | +**New in 5-5-0: Regular expressions in the DeepSearch and grep modules:** | 61 | 81 |
| 62 | | -Deepdiff 5-5-0 comes with regular expressions in the DeepSearch and grep modules: | 63 | 82 |
| 64 | 83 | ```python | 65 | 84 | >>> from deepdiff import grep | |
Collapse file Copy file name to clipboardExpand all lines: docs/index.rst +18-1Lines changed: 18 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -44,7 +44,7 @@ What is New | 44 | 44 | New In DeepDiff 5-6-0 | 45 | 45 | --------------------- | 46 | 46 |
| 47 | | -Create custom operators! | | 47 | +**Create custom operators!** | 48 | 48 |
| 49 | 49 | >>> from deepdiff import DeepDiff | 50 | 50 | >>> from deepdiff.operator import BaseOperator | @@ -78,6 +78,23 @@ Create custom operators! | 78 | 78 | >>> | 79 | 79 |
| 80 | 80 |
| | 81 | +**New in 5-6-0: Dynamic ignore order function** | | 82 | + | | 83 | +Ignoring order when certain word in the path | | 84 | + | | 85 | + >>> from deepdiff import DeepDiff | | 86 | + >>> t1 = {'a': [1, 2], 'b': [3, 4]} | | 87 | + >>> t2 = {'a': [2, 1], 'b': [4, 3]} | | 88 | + >>> DeepDiff(t1, t2, ignore_order=True) | | 89 | + {} | | 90 | + >>> def ignore_order_func(level): | | 91 | + ... return 'a' in level.path() | | 92 | + ... | | 93 | + >>> DeepDiff(t1, t2, ignore_order=True, ignore_order_func=ignore_order_func) | | 94 | + {'values_changed': {"root['b'][0]": {'new_value': 4, 'old_value': 3}, "root['b'][1]": {'new_value': 3, 'old_value': 4}}} | | 95 | + | | 96 | + | | 97 | + | 81 | 98 | New In DeepDiff 5-5-0 | 82 | 99 | --------------------- | 83 | 100 |
| |
|