U  üevã@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 úF/opt/hc_python/lib/python3.8/site-packages/importlib_metadata/_text.pyÚ__lt__CszFoldedCase.__lt__cCs| ¡| ¡kSrrrr r r Ú__gt__FszFoldedCase.__gt__cCs| ¡| ¡kSrrrr r r Ú__eq__IszFoldedCase.__eq__cCs| ¡| ¡kSrrrr r r Ú__ne__LszFoldedCase.__ne__cCs t| ¡ƒSr)Úhashr©r r r r Ú__hash__OszFoldedCase.__hash__cstƒ ¡ | ¡¡Sr)ÚsuperrÚ __contains__r©Ú __class__r r rRszFoldedCase.__contains__cCs |t|ƒkS)zDoes self appear in other?)rrr r r Úin_UszFoldedCase.in_cs tƒ ¡Sr)rrrrr r rZszFoldedCase.lowercCs| ¡ | ¡¡Sr)rÚindex)r Úsubr r r r^szFoldedCase.indexú rcCs t t |¡tj¡}| ||¡Sr)ÚreÚcompileÚescapeÚIÚsplit)r ZsplitterÚmaxsplitÚpatternr r r r aszFoldedCase.split)rr)Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrrrrrrrrr Ú __classcell__r r rr rs; r)rÚ _functoolsrÚstrrr r r r Ús