J
Jin Yi
so i came up with a diff method to compare 2 dicts. i found it pretty
useful so i thought i'd share it with everyone. you can see the doctest
to check out suggested uses. since we can't modify built-ins, i
demonstrated adding a diff method to OrderedDict to show how one could
add it to your own mapping objects.
the core logic is compatible with python2 and 3 (i've only tested using
2.6.5 and 3.1.2). the doctest is suited for python3 though.
the interface is pretty straightforward. it would be awesome to have
this sucker as a method on the builtin dict, but that'd take a pep, no?
useful so i thought i'd share it with everyone. you can see the doctest
to check out suggested uses. since we can't modify built-ins, i
demonstrated adding a diff method to OrderedDict to show how one could
add it to your own mapping objects.
the core logic is compatible with python2 and 3 (i've only tested using
2.6.5 and 3.1.2). the doctest is suited for python3 though.
the interface is pretty straightforward. it would be awesome to have
this sucker as a method on the builtin dict, but that'd take a pep, no?