| Server IP : 43.141.50.122 / Your IP : 113.219.202.173 Web Server : Apache System : Linux VM-8-5-opencloudos 6.6.34-9.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 19 19:35:45 CST 2024 x86_64 User : www ( 1000) PHP Version : 8.1.27 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.11/importlib/metadata/__pycache__/ |
Upload File : |
�
��e � �( � d dl mZ dd�Zeeffd�ZdS )� )�filterfalseNc # �� K � t � � }|j }|�)t |j | � � D ]} ||� � |V � �dS | D ] } ||� � }||vr ||� � |V � �!dS )zHList unique elements, preserving order. Remember all elements ever seen.N)�set�addr �__contains__)�iterable�key�seen�seen_add�element�ks �6/usr/lib64/python3.11/importlib/metadata/_itertools.py�unique_everseenr s� � � � � �5�5�D��x�H�
�{�"�4�#4�h�?�?� � �G��H�W�����M�M�M�M� � � � � �G���G���A���}�}��������
�
�
�� � � c �� � | �t d� � S |� t | |� � rt | f� � S t | � � S # t $ r t | f� � cY S w xY w)ax If *obj* is iterable, return an iterator over its items::
>>> obj = (1, 2, 3)
>>> list(always_iterable(obj))
[1, 2, 3]
If *obj* is not iterable, return a one-item iterable containing *obj*::
>>> obj = 1
>>> list(always_iterable(obj))
[1]
If *obj* is ``None``, return an empty iterable:
>>> obj = None
>>> list(always_iterable(None))
[]
By default, binary and text strings are not considered iterable::
>>> obj = 'foo'
>>> list(always_iterable(obj))
['foo']
If *base_type* is set, objects for which ``isinstance(obj, base_type)``
returns ``True`` won't be considered iterable.
>>> obj = {'a': 1}
>>> list(always_iterable(obj)) # Iterate over the dict's keys
['a']
>>> list(always_iterable(obj, base_type=dict)) # Treat dicts as a unit
[{'a': 1}]
Set *base_type* to ``None`` to avoid any special handling and treat objects
Python considers iterable as iterable:
>>> obj = 'foo'
>>> list(always_iterable(obj, base_type=None))
['f', 'o', 'o']
N� )�iter�
isinstance� TypeError)�obj� base_types r �always_iterabler sx � �R �{��B�x�x����:�c�9�#=�#=���S�F�|�|����C�y�y���� � � ��S�F�|�|�������s �A �A!� A!)N)� itertoolsr r �str�bytesr r r r �<module>r sR �� !� !� !� !� !� !�� � � �&