Rename GlyphDB.update() to GlyphDB.add().
This commit is contained in:
parent
90b9a5a978
commit
97216133fc
1 changed files with 2 additions and 2 deletions
|
|
@ -78,7 +78,7 @@ class GlyphDB(object):
|
||||||
key = self._key_from_glyph(glyph)
|
key = self._key_from_glyph(glyph)
|
||||||
self._dict[key] = data
|
self._dict[key] = data
|
||||||
|
|
||||||
def update(self, data):
|
def add(self, data):
|
||||||
key = self._key_from_data(data)
|
key = self._key_from_data(data)
|
||||||
self._dict[key] = data
|
self._dict[key] = data
|
||||||
|
|
||||||
|
|
@ -99,7 +99,7 @@ class GlyphDB(object):
|
||||||
with open(self.filename, 'rb') as fileobj:
|
with open(self.filename, 'rb') as fileobj:
|
||||||
data = pickle.load(fileobj)
|
data = pickle.load(fileobj)
|
||||||
for item in data:
|
for item in data:
|
||||||
self.update(GlyphData.deserialize(item))
|
self.add(GlyphData.deserialize(item))
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
data = [data.serialize() for data in self.values()]
|
data = [data.serialize() for data in self.values()]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue