a0bi: < S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SK J
r
Jr \" S\
S\4 S9r
S rS rS r\ R" " 5 4S \
S
\
\
/\
4 S\
4S jjrS
rS rS rS rS r " S S5 rS rS S S4S jrS rS rS rS rS rSSS.S jr g) N)CallableTypeVar CallableT.)boundc 4 S n[ R " X5 $ )a
Compose any number of unary functions into a single unary function.
>>> import textwrap
>>> expected = str.strip(textwrap.dedent(compose.__doc__))
>>> strip_and_dedent = compose(str.strip, textwrap.dedent)
>>> strip_and_dedent(compose.__doc__) == expected
True
Compose also allows the innermost function to take arbitrary arguments.
>>> round_three = lambda x: round(x, ndigits=3)
>>> f = compose(round_three, int.__truediv__)
>>> [f(3*x, x+1) for x in range(1,10)]
[1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7]
c ^ ^ U U4S j$ )Nc > T" T" U 0 UD65 $ N )argskwargsf1f2s ڟ/builddir/build/BUILDROOT/alt-python313-setuptools-69.0.2-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pkg_resources/_vendor/jaraco/functools.py