gv.ddlZddlmZGddeZy)N) method_cachecheZdZdZdZdZdZdZdZfdZ dZ e fd Z d Z d d ZxZS) 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 cD|j|jkSNlowerselfothers ?/opt/alt/python312/lib64/python3.12/importlib/metadata/_text.py__lt__zFoldedCase.__lt__Czz|ekkm++cD|j|jkDSrr r s r__gt__zFoldedCase.__gt__FrrcD|j|jk(Srr r s r__eq__zFoldedCase.__eq__Izz|u{{},,rcD|j|jk7Srr r s r__ne__zFoldedCase.__ne__Lrrc4t|jSr)hashr )r s r__hash__zFoldedCase.__hash__OsDJJL!!rcZt|j|jSr)superr __contains__)r r __class__s rrzFoldedCase.__contains__Rs w}++EKKM::rc|t|vS)zDoes self appear in other?)rr s rin_zFoldedCase.in_Usz%(((rc t|Sr)rr )r rs rr zFoldedCase.lowerZsw}rc\|jj|jSr)r index)r subs rr$zFoldedCase.index^szz|!!#))+..rctjtj|tj}|j ||Sr)recompileescapeIsplit)r splittermaxsplitpatterns rr+zFoldedCase.splitas0**RYYx0"$$7}}T8,,r) r)__name__ __module__ __qualname____doc__rrrrrrr!rr r$r+ __classcell__)rs@rrrsJ9v,,--";) /-rr)r' _functoolsrstrrrrr8s $\-\-r