aboutsummaryrefslogtreecommitdiff
path: root/immutables
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-11-20 13:41:40 -0500
committerYury Selivanov <yury@magic.io>2018-11-20 14:25:07 -0500
commite1de4d45d365f64950eef7587eb688d1a3caff0f (patch)
tree8aeb3022fed87c524c3c61f05970dadf2e83e871 /immutables
parentd14e5e91fbd88bae54c69b759ee8d76e6569f2c3 (diff)
downloadimmutables-e1de4d45d365f64950eef7587eb688d1a3caff0f.tar.gz
immutables-e1de4d45d365f64950eef7587eb688d1a3caff0f.zip
Rename .finalize() to .finish()
Diffstat (limited to 'immutables')
-rw-r--r--immutables/_map.c2
-rw-r--r--immutables/map.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/immutables/_map.c b/immutables/_map.c
index 652e171..d5d7f97 100644
--- a/immutables/_map.c
+++ b/immutables/_map.c
@@ -3969,7 +3969,7 @@ static PyMethodDef MapMutation_methods[] = {
{"set", (PyCFunction)mapmut_py_set, METH_VARARGS, NULL},
{"get", (PyCFunction)map_py_get, METH_VARARGS, NULL},
{"pop", (PyCFunction)mapmut_py_pop, METH_VARARGS, NULL},
- {"finalize", (PyCFunction)mapmut_py_finalize, METH_NOARGS, NULL},
+ {"finish", (PyCFunction)mapmut_py_finalize, METH_NOARGS, NULL},
{"__enter__", (PyCFunction)mapmut_py_enter, METH_NOARGS, NULL},
{"__exit__", (PyCFunction)mapmut_py_exit, METH_VARARGS, NULL},
{NULL, NULL}
diff --git a/immutables/map.py b/immutables/map.py
index fbe6562..a393b72 100644
--- a/immutables/map.py
+++ b/immutables/map.py
@@ -637,7 +637,7 @@ class MapMutation:
return self
def __exit__(self, *exc):
- self.finalize()
+ self.finish()
return False
def __delitem__(self, key):
@@ -707,7 +707,7 @@ class MapMutation:
else:
return True
- def finalize(self):
+ def finish(self):
self.__mutid = 0
return Map._new(self.__count, self.__root)