[issue38565] Expose the value passed of typed passed to functools.lru_cache
Manjusaka
report at bugs.python.org
Thu Oct 24 04:06:28 EDT 2019
Manjusaka <lizheao940510 at gmail.com> added the comment:
I have already make a new function like this
static PyObject *
lru_cache_cache_parameters(lru_cache_object *self)
{
PyObject *cache_parameters = PyDict_New();
PyDict_SetItemString(cache_parameters, "maxsize", PyLong_FromSsize_t(self->maxsize));
PyDict_SetItemString(cache_parameters, "typed", self->typed == 0 ? Py_False : Py_True);
return cache_parameters;
}
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38565>
_______________________________________
More information about the Python-bugs-list
mailing list