Your IP : 18.220.226.147


Current Path : /opt/alt/python310/lib64/python3.10/importlib/metadata/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/importlib/metadata/__pycache__/_text.cpython-310.opt-1.pyc

o

6��f��@s(ddlZddlmZGdd�de�ZdS)�N�)�method_cachecsreZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Z�fdd
�Z	dd�Z
e�fdd��Zdd�Z
ddd�Z�ZS)�
FoldedCasea{
    A case insensitive string class; behaves just like str
    except compares equal when the only variation is case.

    >>> s = FoldedCase('hello world')

    >>> s == 'Hello World'
    True

    >>> 'Hello World' == s
    True

    >>> s != 'Hello World'
    False

    >>> s.index('O')
    4

    >>> s.split('O')
    ['hell', ' w', 'rld']

    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
    ['alpha', 'Beta', 'GAMMA']

    Sequence membership is straightforward.

    >>> "Hello World" in [s]
    True
    >>> s in ["Hello World"]
    True

    You may test for set inclusion, but candidate and elements
    must both be folded.

    >>> FoldedCase("Hello World") in {s}
    True
    >>> s in {FoldedCase("Hello World")}
    True

    String inclusion works as long as the FoldedCase object
    is on the right.

    >>> "hello" in FoldedCase("Hello World")
    True

    But not if the FoldedCase object is on the left:

    >>> FoldedCase('hello') in 'Hello World'
    False

    In that case, use in_:

    >>> FoldedCase('hello').in_('Hello World')
    True

    >>> FoldedCase('hello') > FoldedCase('Hello')
    False
    cCs|��|��kS�N��lower��self�other�r�?/opt/alt/python310/lib64/python3.10/importlib/metadata/_text.py�__lt__C�zFoldedCase.__lt__cCs|��|��kSrrrrrr�__gt__FrzFoldedCase.__gt__cCs|��|��kSrrrrrr�__eq__IrzFoldedCase.__eq__cCs|��|��kSrrrrrr�__ne__LrzFoldedCase.__ne__cCst|���Sr)�hashr�r	rrr�__hash__OszFoldedCase.__hash__cstt|����|���Sr)�superrr�__contains__r��	__class__rrrRszFoldedCase.__contains__cCs|t|�vS)zDoes self appear in other?)rrrrr�in_UszFoldedCase.in_cstt|���Sr)rrrrrrrrZszFoldedCase.lowercCs|���|���Sr)r�index)r	�subrrrr^szFoldedCase.index� rcCs t�t�|�tj�}|�||�Sr)�re�compile�escape�I�split)r	Zsplitter�maxsplit�patternrrrr!aszFoldedCase.split)rr)�__name__�
__module__�__qualname__�__doc__r
rrrrrrrrrr!�
__classcell__rrrrrs;r)r�
_functoolsr�strrrrrr�<module>s

?>