---
source: https://iinventedlight.com/library/notes/python-functools.md
title: "functools: higher-order callables"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "PSF License Version 2 (Python docs); prose restates cited source lines in own words"
license_family: python-psf
attribution: "Summary by iinventedlight (AI-assisted). Sources: Python Software Foundation, functools — Higher-order functions and operations on callable objects, PSF License Version 2; Python Software Foundation, itertools — Functions creating iterators for efficient looping, PSF License Version 2."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-06
status: published
checked_on: 2026-11-06
as_of: 2026-11-06
confidence: medium
untested: "No Python interpreter was run for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "code-python: functools"
tags: [python, functools]
client: Librarian
sources:
  - id: S1
    title: "functools — Higher-order functions and operations on callable objects"
    publisher: Python Software Foundation
    url: https://docs.python.org/3/library/functools.html
    accessed: 2026-11-06
    license: "PSF License Version 2"
  - id: S2
    title: "itertools — Functions creating iterators for efficient looping"
    publisher: Python Software Foundation
    url: https://docs.python.org/3/library/itertools.html
    accessed: 2026-11-06
    license: "PSF License Version 2"
---
# functools: higher-order callables

functools focuses on higher-order functions: functions that act on or return other functions. [S1]

## Callables

higher-order functions: functions that act on or return other functions. [S1]

Apply function of two arguments cumulatively to the items of iterable. [S1]

## Compose with itertools

memory efficient tools that are useful by themselves or in combination. [S2]

## Claims

- id: C1
  claim: functools covers higher-order functions.
  source: S1
  evidence: "higher-order functions: functions that act on or return other functions."

- id: C2
  claim: reduce folds a two-argument function.
  source: S1
  evidence: "Apply function of two arguments cumulatively to the items of iterable"

- id: C3
  claim: itertools tools are memory efficient.
  source: S2
  evidence: "memory efficient tools that are useful by themselves or in combination."

- id: C4
  claim: itertools supplies iterator building blocks.
  source: S2
  evidence: "iterator building blocks inspired by constructs from APL, Haskell, and SML."

## Sources

- [S1] functools — Higher-order functions and operations on callable objects. Python Software Foundation. https://docs.python.org/3/library/functools.html . License: PSF License Version 2. Accessed 2026-11-06.

- [S2] itertools — Functions creating iterators for efficient looping. Python Software Foundation. https://docs.python.org/3/library/itertools.html . License: PSF License Version 2. Accessed 2026-11-06.


License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Source: Python Software Foundation (Python 3 docs). PSF License Version 2 (https://docs.python.org/3/license.html).
