%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/more_itertools/__pycache__/ |
| Current File : //lib/python3/dist-packages/more_itertools/__pycache__/recipes.cpython-312.pyc |
�
�ݷe�k � �� � d Z ddlZddlZddlmZ ddlmZ ddlmZm Z ddl
mZmZm
Z
mZmZmZmZmZmZmZmZmZ ddlmZmZmZ ddlmZ g d �Z e� Z e d
�� ee d
�� Z! e#edd
� � Z$d� Z%dFd�Z&d� Z'dGd�Z(dGd�Z)d� Z*e+fd�Z,d� Z-e-Z.d� Z/d� Z0d� Z1dGd�Z2d� Z3 ddl
m4Z5 d� Z4e3j e4_ G d� de7� Z8d� Z9d � Z:dHd!�Z;d"� Z<d#� Z=d$� Z>dGd%�Z?dGd&�Z@dGd'�ZAdId(�ZBd)d*�d+�ZCdGd,�ZDd-� ZEd.� ZFd/� ZGd0� ZHd1� ZId2� ZJd3� ZKd4� ZLd5� ZMd6� ZNdJd7�ZOd8� ZPd9d�d:�ZQed;k\ r
dd<l
mRZS d9d�d=�ZRneQZReQj eR_ d>� ZTd?� ZUd@� ZVdA� ZWdB� ZXdC� ZYdD� ZZdE� Z[y# e"$ r e Z!Y ��w xY w# e6$ r e3Z4Y ��w xY w)Ka Imported from the recipes section of the itertools documentation.
All functions taken from the recipes section of the itertools library docs
[1]_.
Some backward-compatible usability improvements have been made.
.. [1] http://docs.python.org/library/itertools.html#recipes
� N)�deque)�Sized)�partial�reduce)�chain�combinations�compress�count�cycle�groupby�islice�product�repeat�starmap�tee�zip_longest)� randrange�sample�choice)�
hexversion)-� all_equal�batched�before_and_after�consume�convolve�
dotproduct�
first_true�factor�flatten�grouper�iter_except�
iter_index�matmul�ncycles�nth�nth_combination�padnone�pad_none�pairwise� partition�polynomial_eval�polynomial_from_roots�polynomial_derivative�powerset�prepend�quantify�reshape�#random_combination_with_replacement�random_combination�random_permutation�random_product�
repeatfunc�
roundrobin�sieve�sliding_window� subslices�sum_of_squares�tabulate�tail�take�totient� transpose�
triplewise�unique_everseen�unique_justseenT��strict�sumprodc � � t | |� S �N)r )�x�ys �8/usr/lib/python3/dist-packages/more_itertools/recipes.py�<lambda>rL ] s
� ��A�q�1A� � c �, � t t || � � S )z�Return first *n* items of the iterable as a list.
>>> take(3, range(10))
[0, 1, 2]
If there are fewer than *n* items in the iterable, all of them are
returned.
>>> take(10, range(3))
[0, 1, 2]
)�listr
��n�iterables rK r>