Vccs(ddlmZddZeeffdZdS)i) filterfalseNc#sKt}|j}|)t|j|D]}|||VdS|D] }||}||vr|||V!dS)zHList unique elements, preserving order. Remember all elements ever seen.N)ZsetZaddrZ __contains__)ZiterableZkeyZseenZseen_addZelementZks 6/usr/lib64/python3.11/importlib/metadata/_itertools.pyunique_everseenrs 55DxH "4#4h??  G HW   MMMM     GG A}     cs|tdS| t||rt|fS t|S#t$rt|fcYSwxYw)axIf *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)ZiterZ isinstanceZ TypeError)ZobjZ base_types ralways_iterablersR Bxx:c9#=#=SF||Cyy SF||sAA! A!)N)Z itertoolsrrZstrZbytesrrrrrsR!!!!!!&%(<222222r