gZ d dl mZmZmZ d dlmZ d dlmZ n# e$ r d dl mZ Y nw xY wd dl mZmZ er d dl mc mZ n d dlmc mZ n# e$ r d dl mc mZ Y nw xY wg dZ ed Z eee s ed Z eee sJ d Zn # e$ r d ZY nw xY w G d de Z G d de Zd Zd Zd Zd ZdS ) )absolute_importdivisionunicode_literals) ModuleType)Mapping) text_typePY3N) default_etreeMethodDispatcherisSurrogatePairsurrogatePairToCodepointmoduleFactoryFactorysupports_lone_surrogatesz"\uD800"z u"\uD800"TFc ( e Zd ZdZddZd ZddZdS ) r ap Dict with 2 special properties: On initiation, keys that are lists, sets or tuples are converted to multiple keys so accessing any one of the items in the original list-like object returns the matching value md = MethodDispatcher({("foo", "bar"):"baz"}) md["foo"] == "baz" A default value which can be set through the default attribute. c Z g }|D ]a\ }}t |t t t t f r|D ]}| ||f J| ||f bt | | t | t | k sJ d | _ d S N) isinstancelisttuple frozensetsetappenddict__init__lendefault)selfitems_dictEntriesnamevalueitems /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/html5lib/_utils.pyr zMethodDispatcher.__init__9 s 3 3KD%$ui =>> 3 7 7D ''u 66667 ##T5M2222 dL)))4yyC------ c D t | || j S r )r getr r keys r$ __getitem__zMethodDispatcher.__getitem__E s xxc4<000r% Nc " t || S r )BoundMethodDispatcher)r instanceowners r$ __get__zMethodDispatcher.__get__H s $Xt444r% )r r )__name__ __module____qualname____doc__r r* r/ r r% r$ r r , sU 1 1 15 5 5 5 5 5r% r c 6 e Zd ZdZd Zd Zd Zd Zd Zd Z dS ) r, zAWraps a MethodDispatcher, binding its return values to `instance`c " || _ || _ d S r )r- dispatcher)r r- r6 s r$ r zBoundMethodDispatcher.__init__N s $r% c L | j | | j S r )r6 r/ r- r( s r$ r* z!BoundMethodDispatcher.__getitem__R s! s#++DM:::r% c ( || j v r| | S |S r r6 )r r) r s r$ r' zBoundMethodDispatcher.getW s $/!!9Nr% c * t | j S r )iterr6 r s r$ __iter__zBoundMethodDispatcher.__iter__] s DO$$$r% c * t | j S r )r r6 r<