HEX
Server: Apache
System: Linux 26.184.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64
User: hyderabadrubberp (1048)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //var/opt/nydus/ops/importlib_resources/__pycache__/_itertools.cpython-39.pyc
a

d�pi��@sddd�ZdS)NcCsNt|�}t||�}zt|�}Wnty0Yn0d�||�}|pHt|��|S)a(If *iterable* has only one item, return it.
    If it has zero items, return *default*.
    If it has more than one item, raise the exception given by *too_long*,
    which is ``ValueError`` by default.
    >>> only([], default='missing')
    'missing'
    >>> only([1])
    1
    >>> only([1, 2])  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    ValueError: Expected exactly one item in iterable, but got 1, 2,
     and perhaps more.'
    >>> only([1, 2], too_long=TypeError)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    TypeError
    Note that :func:`only` attempts to advance *iterable* twice to ensure there
    is only one item.  See :func:`spy` or :func:`peekable` to check
    iterable contents less destructively.
    zLExpected exactly one item in iterable, but got {!r}, {!r}, and perhaps more.)�iter�next�
StopIteration�format�
ValueError)�iterable�default�too_long�it�first_value�second_value�msg�r
�O/opt/nydus/tmp/pip-target-fvo0evhh/lib/python/importlib_resources/_itertools.py�onlys
��r)NN)rr
r
r
r�<module>�