Submit
Path:
~
/
/
opt
/
alt
/
python312
/
lib64
/
python3.12
/
importlib
/
resources
/
__pycache__
/
File Content:
_itertools.cpython-312.opt-1.pyc
� ��_i� � � � dd�Z y )Nc � � t | � }t ||� } t |� }dj ||� }|xs t |� �# t $ r Y |S w xY w)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/python312/lib64/python3.12/importlib/resources/_itertools.py�onlyr sj � �, �h��B��r�7�#�K� *��B�x�� � &��{�L� A� � �)�*�S�/�)�� � �� �� �s �A � A�A)NN)r � � r �<module>r s ��$r
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
__init__.cpython-312.opt-1.pyc
653 bytes
0644
__init__.cpython-312.opt-2.pyc
598 bytes
0644
__init__.cpython-312.pyc
653 bytes
0644
_adapters.cpython-312.opt-1.pyc
9627 bytes
0644
_adapters.cpython-312.opt-2.pyc
8838 bytes
0644
_adapters.cpython-312.pyc
9627 bytes
0644
_common.cpython-312.opt-1.pyc
8688 bytes
0644
_common.cpython-312.opt-2.pyc
7616 bytes
0644
_common.cpython-312.pyc
8747 bytes
0644
_itertools.cpython-312.opt-1.pyc
1555 bytes
0644
_itertools.cpython-312.opt-2.pyc
750 bytes
0644
_itertools.cpython-312.pyc
1555 bytes
0644
_legacy.cpython-312.opt-1.pyc
4859 bytes
0644
_legacy.cpython-312.opt-2.pyc
3765 bytes
0644
_legacy.cpython-312.pyc
4859 bytes
0644
abc.cpython-312.opt-1.pyc
8919 bytes
0644
abc.cpython-312.opt-2.pyc
7108 bytes
0644
abc.cpython-312.pyc
8919 bytes
0644
readers.cpython-312.opt-1.pyc
9014 bytes
0644
readers.cpython-312.opt-2.pyc
8358 bytes
0644
readers.cpython-312.pyc
9014 bytes
0644
simple.cpython-312.opt-1.pyc
5483 bytes
0644
simple.cpython-312.opt-2.pyc
4678 bytes
0644
simple.cpython-312.pyc
5483 bytes
0644
N4ST4R_ID | Naxtarrr