From 97216133fc17b5e24c6518b855867ebd7561cc6d Mon Sep 17 00:00:00 2001 From: Andrey Golovizin Date: Tue, 2 Sep 2014 00:23:24 +0200 Subject: [PATCH] Rename GlyphDB.update() to GlyphDB.add(). --- pixelocr/glyphdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pixelocr/glyphdb.py b/pixelocr/glyphdb.py index e5be0c0..1dd5776 100644 --- a/pixelocr/glyphdb.py +++ b/pixelocr/glyphdb.py @@ -78,7 +78,7 @@ class GlyphDB(object): key = self._key_from_glyph(glyph) self._dict[key] = data - def update(self, data): + def add(self, data): key = self._key_from_data(data) self._dict[key] = data @@ -99,7 +99,7 @@ class GlyphDB(object): with open(self.filename, 'rb') as fileobj: data = pickle.load(fileobj) for item in data: - self.update(GlyphData.deserialize(item)) + self.add(GlyphData.deserialize(item)) def save(self): data = [data.serialize() for data in self.values()]