관리-도구
편집 파일: more.cpython-311.pyc
� ,�Re�� � �� � d dl Z d dlmZmZmZmZ d dlmZ d dlm Z m Z mZ d dlm Z mZmZmZ d dlmZmZmZmZmZmZmZmZmZmZmZmZ d dlmZm Z m!Z!m"Z" d dl#m$Z$m%Z% d d l&m&Z&m'Z'm(Z( d d l)m*Z*m+Z+m,Z,m-Z-m.Z. d dl/m0Z0m1Z1 d dl2m3Z3 d dl4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z: g d�Z; e<� � Z=dzd�Z>e=fd�Z?e=fd�Z@e=fd�ZA G d� d� � ZBd� ZCd� ZDd� ZEd� ZFd� ZGd{d�ZHd|d�ZId}d�ZJd� ZKd~d �ZLd!� ZMdzd"�ZN G d#� d$� � ZOd}d%�ZPd&� ZQd'� ZRd{d(�ZSdd)�ZTdzd*�ZUd�d,�ZVd�d-�ZWd�d.�ZXd�d/�ZYd0� ZZd�d1�Z[d|d2�Z\d3� Z]d�d5�Z^ G d6� d7e_� � Z`d8� Zad9� Zbddd:�d;�Zcd�d=�Zdd>� Zed?� Zfegehffd@�Zid}dA�ZjddB�Zk G dC� dDej ejl � � Zmd|dE�ZndF� ZoepdfdG�ZqdH� ZrdI� ZsdJ� Zt G dK� dL� � ZudM� ZvdN� ZwdO� fdP�Zxe,fddQ�dR�Zy G dS� dTe� � Zz G dU� dV� � Z{ G dW� dX� � Z|epfdY�Z}dZ� Z~d<d[�Zd{d\�Z�epdfd]�Z�d~d^�Z�d_� Z�d|d`�Z� G da� db� � Z�d{dc�Z�dd� Z�de� Z�df� Z�dg� Z�dh� Z�di� Z�d|dj�Z�d�dk�Z� G dl� dme�� � Z� G dn� do� � Z�dp� Z�d|dq�Z�dr� Z�ds� Z�dt� Z�du� Z�dv� Z�dw� Z� G dx� dy� � Z�dS )�� N)�Counter�defaultdict�deque�abc)�Sequence)�partial�reduce�wraps)�merge�heapify�heapreplace�heappop)�chain�compress�count�cycle� dropwhile�groupby�islice�repeat�starmap� takewhile�tee�zip_longest)�exp� factorial�floor�log)�Empty�Queue)�random� randrange�uniform)� itemgetter�mul�sub�gt�lt)� hexversion�maxsize)� monotonic� )�consume�flatten�pairwise�powerset�take�unique_everseen)S�AbortThread�adjacent�always_iterable�always_reversible�bucket� callback_iter�chunked�circular_shifts�collapse�collate�consecutive_groups�consumer� countable�count_cycle� mark_ends� difference�distinct_combinations�distinct_permutations� distribute�divide� exactly_n� filter_except�first�groupby_transform�ilen�interleave_longest� interleave�intersperse�islice_extended�iterate�ichunked� is_sorted�last�locate�lstrip�make_decorator� map_except� map_reduce�nth_or_last�nth_permutation�nth_product� numeric_range�one�only�padded� partitions�set_partitions�peekable�repeat_last�replace�rlocate�rstrip� run_length�sample�seekable�SequenceView�side_effect�sliced� sort_together�split_at�split_after�split_before� split_when� split_into�spy�stagger�strip� substrings�substrings_indexes�time_limited�unique_to_each�unzip�windowed� with_iter�UnequalIterablesError� zip_equal� zip_offset�windowed_complete� all_unique�value_chain� product_index�combination_index�permutation_indexFc � ��� t t t �t | � � � � g � � �|r��fd�}t |� � � � S �S )aJ Break *iterable* into lists of length *n*: >>> list(chunked([1, 2, 3, 4, 5, 6], 3)) [[1, 2, 3], [4, 5, 6]] By the default, the last yielded list will have fewer than *n* elements if the length of *iterable* is not divisible by *n*: >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3)) [[1, 2, 3], [4, 5, 6], [7, 8]] To use a fill-in value instead, see the :func:`grouper` recipe. If the length of *iterable* is not divisible by *n* and *strict* is ``True``, then ``ValueError`` will be raised before the last list is yielded. c 3 �b �K � �D ](} t | � � �k rt d� � �| V � �)d S )Nziterable is not divisible by n.��len� ValueError)�chunk�iterator�ns ����/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/_vendor/more_itertools/more.py�retzchunked.<locals>.ret� sI �� � � �!� � ���u�:�:��?�?�$�%F�G�G�G������ � � )�iterr r1 )�iterabler� �strictr� r� s ` @r� r9 r9 ~ sf ��� �&