From c0b1ec6cc15e8cb0e6957f8d1418ee9392916f30 Mon Sep 17 00:00:00 2001 From: James Stevens Date: Sat, 10 Dec 2016 18:51:14 -0600 Subject: [PATCH] added get member function --- loopy/statistics.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/loopy/statistics.py b/loopy/statistics.py index fde8643bf..990744248 100755 --- a/loopy/statistics.py +++ b/loopy/statistics.py @@ -112,6 +112,9 @@ class ToCountMap(object): def __len__(self): return len(self.count_map) + def get(self, key, default=None): + return self.count_map.get(key, default) + def items(self): return self.count_map.items() -- GitLab