관리-도구
편집 파일: more.cpython-311.pyc
� �܋f�. � � � d dl Z d dlmZmZmZmZ d dlmZ d dlm Z m Z mZmZ d dl mZmZmZ d dlmZmZmZmZmZmZmZmZmZmZmZmZmZ d dlm Z m!Z!m"Z"m#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/m0Z0m1Z1m2Z2m3Z3 d dl4m5Z5m6Z6 d dl7m8Z8 d dl9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZD g d�ZEd�d�ZFe:fd�ZGe:fd�ZHe:fd�ZI G d� d� � ZJd� ZKd� ZLd� ZMd� ZNd�d�ZOd� ZPd�d�ZQd�d�ZRd�d�ZSd � ZTd�d!�ZUd"� ZVd�d#�ZW G d$� d%� � ZXd�d&�ZYd'� ZZd(� Z[d�d)�Z\d�d*�Z]d�d+�Z^d�d,�Z_d�d.�Z`d�d/�Zad�d0�Zbd�d1�Zcd2� Zdd�d3�Zed�d5�Zfd�d6�Zgd7� Zhd�d9�Zid:� Zjddd;�d<�Zkd�d>�Zld?� Zmd@� ZneoepffdA�Zqd�dB�Zrd�dC�Zs G dD� dEej ejt � � Zud�dF�ZvdG� ZwexdfdH�ZydI� ZzdJ� Z{dK� Z|dL� Z} G dM� dN� � Z~dO� ZdP� Z�dQ� fdR�Z�e/fddS�dT�Z� G dU� dVe� � Z� G dW� dX� � Z� G dY� dZ� � Z�exfd[�Z�d\� Z�d=d]�Z�d�d^�Z�exdfd_�Z�d�d`�Z�da� Z�d�db�Z� G dc� dd� � Z�d�de�Z� G df� dg� � Z�dh� Z�di� Z�dj� Z�dk� Z�dl� Z�dm� fdn�Z�do� Z�dp� Z�d�dq�Z�d�dr�Z� G ds� dte�� � Z� G du� dv� � Z�dw� Z�d�dx�Z�dy� Z�dz� Z�d{� Z�d|� Z�d}� Z�d~� Z�d� Z�d�� Z� G d�� d�� � Z�d�� Z�d�� Z�d�� Z�eoepfdd��d��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�de:d��d��Z�de�d�fd��Z�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z�dS )�� N)�Counter�defaultdict�deque�abc)�Sequence)�cached_property�partial�reduce�wraps)�heapify�heapreplace�heappop) �chain�compress�count�cycle� dropwhile�groupby�islice�repeat�starmap� takewhile�tee�zip_longest�product)�exp� factorial�floor�log�perm�comb)�Empty�Queue)�random� randrange�uniform)� itemgetter�mul�sub�gt�lt�ge�le)� hexversion�maxsize)� monotonic� )�_marker� _zip_equal�UnequalIterablesError�consume�flatten�pairwise�powerset�take�unique_everseen� all_equal�batched)i�AbortThread�SequenceViewr4 �adjacent� all_unique�always_iterable�always_reversible�bucket� callback_iter�chunked�chunked_even�circular_shifts�collapse�combination_index�"combination_with_replacement_index�consecutive_groups�constrained_batches�consumer�count_cycle� countable� difference�distinct_combinations�distinct_permutations� distribute�divide�duplicates_everseen�duplicates_justseen�classify_unique� exactly_n� filter_except� filter_map�first�gray_product�groupby_transform�ichunked�iequals�ilen� interleave�interleave_evenly�interleave_longest�intersperse� is_sorted�islice_extended�iterate� iter_suppress�last�locate�longest_common_prefix�lstrip�make_decorator� map_except�map_if� map_reduce� mark_ends�minmax�nth_or_last�nth_permutation�nth_product� nth_combination_with_replacement� numeric_range�one�only� outer_product�padded�partial_product� 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�takewhile_inclusive�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 ���`/opt/cloudlinux/venv/lib64/python3.11/site-packages/pkg_resources/_vendor/more_itertools/more.py�retzchunked.<locals>.ret� sI �� � � �!� � ���u�:�:��?�?�$�%F�G�G�G������ � � )�iterr r9 r� )�iterabler� �strictr� r� s ` @r� rE rE � sz ��� �&