{
    "content": [
        {
            "type": "text",
            "text": "# _functools (pydoc)\n\n## NAME\n\nfunctools - Tools that operate on functions.\n\n## Sections\n\n- **NAME**\n- **FUNCTIONS** (2 subsections)\n- **FILE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "_functools",
        "section": "",
        "mode": "pydoc",
        "summary": "functools - Tools that operate on functions.",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "cmp_to_key",
                        "lines": 2
                    },
                    {
                        "name": "reduce",
                        "lines": 9
                    }
                ]
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "functools - Tools that operate on functions.\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "cmp_to_key",
                        "content": "Convert a cmp= function into a key= function.\n"
                    },
                    {
                        "name": "reduce",
                        "content": "reduce(function, iterable[, initial]) -> value\n\nApply a function of two arguments cumulatively to the items of a sequence\nor iterable, from left to right, so as to reduce the iterable to a single\nvalue.  For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates\n((((1+2)+3)+4)+5).  If initial is present, it is placed before the items\nof the iterable in the calculation, and serves as a default when the\niterable is empty.\n"
                    }
                ]
            },
            "FILE": {
                "content": "(built-in)\n\n",
                "subsections": []
            }
        }
    }
}