__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
�
*�_i� � � � SS jr g )Nc � � [ U 5 n[ X15 n [ U5 nSR XE5 nU=( d [ U5 e! [ 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 �5/usr/lib/python3.13/importlib/resources/_itertools.py�onlyr sf � �,
�h��B��r�#�K� *��B�x��
� &��{� A� � �)�*�S�/�)�� �
�� ��
�s �A �
A�A)NN)r � � r �<module>r s
��$r | Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __init__.cpython-313.pyc | File | 816 B | 0644 |
|
| _adapters.cpython-313.pyc | File | 9.5 KB | 0644 |
|
| _common.cpython-313.pyc | File | 8.5 KB | 0644 |
|
| _functional.cpython-313.pyc | File | 3.36 KB | 0644 |
|
| _itertools.cpython-313.pyc | File | 1.43 KB | 0644 |
|
| abc.cpython-313.pyc | File | 8.57 KB | 0644 |
|
| readers.cpython-313.pyc | File | 11.9 KB | 0644 |
|
| simple.cpython-313.pyc | File | 5.39 KB | 0644 |
|