Skip to content

Instantly share code, notes, and snippets.

@tom-henderson
Created October 5, 2017 21:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tom-henderson/8231cc26feb5b9e5a082e642a30bca5f to your computer and use it in GitHub Desktop.
Save tom-henderson/8231cc26feb5b9e5a082e642a30bca5f to your computer and use it in GitHub Desktop.
class Delta:
def __init__(self,old,new):
newset = set(new.rules)
oldset = set(old.rules)
self.deleted = list(oldset - newset)
self.added = list(newset - oldset)
self.retained = list(oldset & newset)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment