관리-도구
편집 파일: more.cpython-311.pyc
� ,�Re� � �V � 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.m/Z/m0Z0 d dl1m2Z2m3Z3 d dl4m5Z5 d dl6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z< g d�Z= e>� � Z?d�d�Z@e?fd�ZAe?fd�ZBe?fd�ZC G d� d� � ZDd� ZEd� ZFd� ZGd� ZHd� ZId�d�ZJd� ZKd�d�ZLd�d�ZMd�d �ZNd!� ZOd�d"�ZPd#� ZQd�d$�ZR G d%� d&� � ZSd�d'�ZTd(� ZUd)� ZVd�d*�ZWd�d+�ZXd�d,�ZYd�d-�ZZd�d/�Z[d�d0�Z\d�d1�Z]d�d2�Z^d3� Z_d�d4�Z`d�d6�Zad�d7�Zbd8� Zcd�d:�Zd G d;� d<ee� � Zfd=� Zgd>� Zhd?� Ziddd@�dA�Zjd�dC�ZkdD� ZldE� ZmeneoffdF�Zpd�dG�Zqd�dH�Zr G dI� dJej ejs � � Ztd�dK�ZudL� ZvewdfdM�ZxdN� ZydO� ZzdP� Z{ G dQ� dR� � Z|dS� Z}dT� Z~dU� fdV�Ze,fddW�dX�Z� G dY� dZe� � Z� G d[� d\� � Z� G d]� d^� � Z�ewfd_�Z�d`� Z�dBda�Z�d�db�Z�ewdfdc�Z�d�dd�Z�de� Z�d�df�Z� G dg� dh� � Z�d�di�Z�dj� Z�dk� Z�dl� Z�dm� Z�dn� fdo�Z�dp� Z�dq� Z�d�dr�Z�d�ds�Z� G dt� due�� � Z� G dv� dw� � Z�dx� Z�d�dy�Z�dz� Z�d{� Z�d|� Z�d}� Z�d~� Z�d� Z� G d�� d�� � Z�d�� Z�d�� Z�d�� Z�eneofdd��d��Z�d�d��Z�d�d��Z�d�d��Z�de?d��d��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�ge�le)� hexversion�maxsize)� monotonic� )�consume�flatten�pairwise�powerset�take�unique_everseen)^�AbortThread�SequenceView�UnequalIterablesError�adjacent� all_unique�always_iterable�always_reversible�bucket� callback_iter�chunked�chunked_even�circular_shifts�collapse�collate�combination_index�consecutive_groups�consumer�count_cycle� countable� difference�distinct_combinations�distinct_permutations� distribute�divide�duplicates_everseen�duplicates_justseen� exactly_n� filter_except�first�groupby_transform�ichunked�ilen� interleave�interleave_evenly�interleave_longest�intersperse� is_sorted�islice_extended�iterate�last�locate�lstrip�make_decorator� map_except�map_if� map_reduce� mark_ends�minmax�nth_or_last�nth_permutation�nth_product� numeric_range�one�only�padded� partitions�peekable�permutation_index� product_index�raise_�repeat_each�repeat_last�replace�rlocate�rstrip� run_length�sample�seekable�set_partitions�side_effect�sliced� sort_together�split_after�split_at�split_before� split_into� split_when�spy�stagger�strip� strictly_n� substrings�substrings_indexes�time_limited�unique_in_window�unique_to_each�unzip�value_chain�windowed�windowed_complete� with_iter� zip_broadcast� zip_equal� zip_offsetFc �� ��� t t t �t | � � � � g � � �|r.��t d� � ���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. Nz*n must not be None when using strict mode.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/pkg_resources/_vendor/more_itertools/more.py�retzchunked.<locals>.ret� sI �� � � �!� � ���u�:�:��?�?�$�%F�G�G�G������ � � )�iterr r3 r� )�iterabler� �strictr� r� s ` @r� r>