HEX
Server: LiteSpeed
System: Linux cluster02.load-balancer.x2.network 4.18.0-553.51.1.lve.1.el8.x86_64 #1 SMP Wed May 14 14:34:57 UTC 2025 x86_64
User: kbdhpghp (1098)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python313/lib64/python3.13/importlib/resources/__pycache__/_itertools.cpython-313.pyc
�

sdYh����SSjrg)Nc��[U5n[X15n[U5nSRXE5nU=(d [U5e![a U$f=f)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�format�
ValueError�
StopIteration)�iterable�default�too_long�it�first_value�second_value�msgs       �E/opt/alt/python313/lib64/python3.13/importlib/resources/_itertools.py�onlyrsf��,
�h��B��r�#�K�	*��B�x��

 � &��{� A�	��)�*�S�/�)���
����
�s�A�
A�A)NN)r��r�<module>rs
��$r