Skip to content

Hrabal/Differ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Differ

Yet another object comparison tool.

This module provides a way to find differences between simple and complex (nested) objects.

This module do what others do (think of difflib / DeepDiff / ObjDiff), but the way I like, and with some magic.

Usage:

from differ import Differ
differ = Differ()
diff = differ.compare(object1, object2)
# diff is a Difference instance that can be traversed:

You can also play with inheritance from the Diffing class, that will override the bitwise xor operator ('^') so it will produces differencies:

from differ import Diffing
class MyClass(Diffing):
    pass

a = MyClass()
b = MyClass()
diff = a ^ b  # diff is a Difference instance

About

Differ for complex objects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages