Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Doc/library/functools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,12 @@ The :mod:`!functools` module defines the following functions:
types such as *str* and *int* may be cached separately even when *typed*
is false.)

Note, type specificity applies only to the function's immediate arguments
rather than their contents. The scalar arguments, ``Decimal(42)`` and
``Fraction(42)`` are treated as distinct calls with distinct results.
In contrast, the tuple arguments ``('answer', Decimal(42))`` and
``('answer', Fraction(42))`` are treated as equivalent.
If *typed* is true, type specificity applies only to the function's
immediate arguments rather than their contents. The scalar arguments,
``Decimal(42)`` and ``Fraction(42)`` are treated as distinct calls with
distinct results. In contrast, the tuple arguments
``('answer', Decimal(42))`` and ``('answer', Fraction(42))`` are treated
as equivalent.

The wrapped function is instrumented with a :func:`!cache_parameters`
function that returns a new :class:`dict` showing the values for *maxsize*
Expand Down
Loading