From fb2f4b6c1a78745f2bef148449cdd04874685b62 Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Wed, 25 Jan 2012 13:59:45 -0500 Subject: [PATCH] Incomplete file added to sync between computers --- courseware/progress.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 courseware/progress.py diff --git a/courseware/progress.py b/courseware/progress.py new file mode 100644 index 0000000000..6fe7cf3f2a --- /dev/null +++ b/courseware/progress.py @@ -0,0 +1,19 @@ +class completion(object): + def __init__(self, d=None): + self.dict = dict() + if d: + self.dict.update(d) + + def __getitem__(self, key): + return self.dict[key] + + def __setitem__(self, key, value): + self.dict[key] = value + + def __add__(self, other): + result = dict() + dict.update(self.dict) + dict.update(other.dict) + + def __contains__(self, key): + pass