@@ -686,10 +686,13 @@ static PyObject *CacheMap_clear(CtsCacheMap *self) {
686686/* tp_methods */
687687static PyMethodDef CacheMap_methods [] = {
688688 {"evict" , (PyCFunction )CacheMap_evict , METH_NOARGS ,
689- "evict()\n--\n\nEvict a item. raise error if no item in cache."
690- "no item in cache." },
691- {"set_capacity" , (PyCFunction )CacheMap_set_capacity , METH_O ,
692- "set_capacity(capacity, /)\n--\n\n Reset capacity of cache." },
689+ "evict()\n--\n\nEvict a item. raise error if no item in cache." },
690+ {
691+ "set_capacity" ,
692+ (PyCFunction )CacheMap_set_capacity ,
693+ METH_O ,
694+ "set_capacity(capacity, /)\n--\n\n Reset capacity of cache." ,
695+ },
693696 {"hit_info" , (PyCFunction )CacheMap_hit_info , METH_NOARGS ,
694697 "hit_info()\n--\n\nReturn capacity, hits, and misses count." },
695698 {"next_evict_key" , (PyCFunction )CacheMap_NextEvictKey , METH_NOARGS ,
@@ -703,9 +706,13 @@ static PyMethodDef CacheMap_methods[] = {
703706 {"pop" , (PyCFunction )CacheMap_pop , METH_VARARGS | METH_KEYWORDS ,
704707 "pop(key, default=None, /)\n--\n\nPop an item from cache, if key not "
705708 "exists return default." },
706- {"popitem" , (PyCFunction )CacheMap_popitem , METH_NOARGS ,
707- "popitem()\n--\n\nRemove and return some (key, value) pair"
708- "as a 2-tuple; but raise KeyError if mapping is empty." },
709+ {
710+ "popitem" ,
711+ (PyCFunction )CacheMap_popitem ,
712+ METH_NOARGS ,
713+ "popitem()\n--\n\nRemove and return some (key, value) pair"
714+ "as a 2-tuple; but raise KeyError if mapping is empty." ,
715+ },
709716 {"keys" , (PyCFunction )CacheMap_keys , METH_NOARGS ,
710717 "keys()\n--\n\nIter keys." },
711718 {"values" , (PyCFunction )CacheMap_values , METH_NOARGS ,
@@ -755,12 +762,12 @@ static PyObject *CacheMap_tp_richcompare(PyObject *self, PyObject *other,
755762}
756763
757764PyDoc_STRVAR (CacheMap__doc__ ,
758- "CacheMap(maxsize =None, )\n--\n\n"
765+ "CacheMap(capacity =None, )\n--\n\n"
759766 "A fast LFU (least frequently used) mapping.\n"
760767 "\n"
761768 "Parameters\n"
762769 "----------\n"
763- "maxsize : int\n"
770+ "capacity : int, optional \n"
764771 " Max size of cache, default is C ``INT32_MAX``.\n"
765772 "\n"
766773 "Examples\n"
0 commit comments