From 1759e72152868ffca517555e8409d53ebac996b1 Mon Sep 17 00:00:00 2001 From: HansBug Date: Tue, 3 May 2022 13:29:59 +0800 Subject: [PATCH] doc(hansbug): add 2 lines of comments for get and pop method in TreeStorage --- treevalue/tree/common/storage.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/treevalue/tree/common/storage.pyx b/treevalue/tree/common/storage.pyx index f039712c36..576111ae1e 100644 --- a/treevalue/tree/common/storage.pyx +++ b/treevalue/tree/common/storage.pyx @@ -22,6 +22,7 @@ cdef class TreeStorage: cpdef public void set(self, str key, object value) except *: self.map[key] = value + # get and get_or_default is designed separately due to the consideration of performance cpdef public object get(self, str key): cdef object v, nv try: @@ -35,6 +36,7 @@ cdef class TreeStorage: v = self.map.get(key, default) return _c_undelay_check_data(self.map, key, v) + # pop and pop_or_default is designed separately due to the consideration of performance cpdef public object pop(self, str key): cdef object v, nv, res try: -- GitLab