관리-도구
편집 파일: functools.cpython-311.pyc
� N�Dg�: � �P � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m Z mZ ede def �� � Z d� Zd� Zd� Z e j � � fd e d e e ge f de fd�Zd � Zd� Zd� Zd� Zd� Z G d� d� � Zd� Zd� d dfd�Zd� Zd� Zd� Zd� Zd� Zddd�d�Z dS )� N)�Callable�TypeVar� CallableT.)�boundc �2 � d� }t j || � � S )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 � � �� � �fd�S )Nc �&