{
  "id": "functools",
  "name": "functools",
  "description": "",
  "version": "0.1.0",
  "author": "",
  "license": "MIT",
  "tags": [
    "python-stdlib"
  ],
  "status": "HUMAN_REVIEWED",
  "official": true,
  "source": "https://github.com/micropython/micropython-lib/tree/master/python-stdlib/functools",
  "updatedAt": "2026-10-12T03:55:17.774Z",
  "page": "https://checkmim.com/packages/functools",
  "createdAt": "2025-05-27T04:19:19.510Z",
  "install": {
    "mpremote": "mpremote mip install functools",
    "mip": "import mip; mip.install(\"functools\")"
  },
  "readme": "# functools\n\nIn CPython, `@functools.lru_cache` would also record the *order* of the keyword\narguments as they are passed to the function to cache the output for.  So, a\nfunction called with `(a=1, b=2)` and called with `(b=2, a=1)` will take up two\nentries in the LRU cache even though they are virtually the same function\ninvocation.\n\nMicroPython, however, seems to pre-sort keyword arguments.  This means the\nkeyword arguments order is lost, and therefore the behaviour of\n`@functools.lru_cache` differs slightly between the two implementations.\n"
}