관리-도구
편집 파일: ordered_dict.pyo
� ��Rac @ s� y d d l m Z Wn! e k r7 d d l m Z n Xy d d l m Z m Z m Z Wn e k rk n Xd e f d � � YZ d S( i����( t get_ident( t KeysViewt ValuesViewt ItemsViewt OrderedDictc B s e Z d Z d � Z e j d � Z e j d � Z d � Z d � Z d � Z e d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z e Z e � Z e d � Z d d � Z i d � Z d � Z d � Z e d d � � Z d � Z d � Z d � Z d � Z d � Z! RS( s) Dictionary that remembers insertion orderc O s� t | � d k r+ t d t | � � � n y | j Wn7 t k ro g | _ } | | d g | (i | _ n X| j | | � d S( s� Initialize an ordered dictionary. Signature is the same as for regular dictionaries, but keyword arguments are not recommended because their insertion order is arbitrary. i s$ expected at most 1 arguments, got %dN( t lent TypeErrort _OrderedDict__roott AttributeErrort Nonet _OrderedDict__mapt _OrderedDict__update( t selft argst kwdst root( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt __init__7 s c C s\ | | k rH | j } | d } | | | g | d <| d <| j | <n | | | | � d S( s! od.__setitem__(i, y) <==> od[i]=yi i N( R R ( R t keyt valuet dict_setitemR t last( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt __setitem__G s )c C s@ | | | � | j j | � \ } } } | | d <| | d <d S( s od.__delitem__(y) <==> del od[y]i i N( R t pop( R R t dict_delitemt link_prevt link_next( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt __delitem__Q s c c s= | j } | d } x# | | k r8 | d V| d } q Wd S( s od.__iter__() <==> iter(od)i i N( R ( R R t curr( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt __iter__Z s c c s= | j } | d } x# | | k r8 | d V| d } q Wd S( s# od.__reversed__() <==> reversed(od)i i N( R ( R R R ( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt __reversed__b s c C sm yH x | j j � D] } | 2q W| j } | | d g | (| j j � Wn t k r[ n Xt j | � d S( s. od.clear() -> None. Remove all items from od.N( R t itervaluesR R t clearR t dict( R t nodeR ( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyR j s c C s� | s t d � � n | j } | rO | d } | d } | | d <| | d <n( | d } | d } | | d <| | d <| d } | j | =t j | | � } | | f S( s� od.popitem() -> (k, v), return and remove a (key, value) pair. Pairs are returned in LIFO order if last is true or FIFO order if false. s dictionary is emptyi i i ( t KeyErrorR R R R ( R R R t linkR R R R ( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt popitemv s c C s t | � S( s od.keys() -> list of keys in od( t list( R ( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt keys� s c C s g | D] } | | ^ q S( s# od.values() -> list of values in od( ( R R ( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt values� s c C s! g | D] } | | | f ^ q S( s. od.items() -> list of (key, value) pairs in od( ( R R ( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt items� s c C s t | � S( s0 od.iterkeys() -> an iterator over the keys in od( t iter( R ( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyt iterkeys� s c c s x | D] } | | Vq Wd S( s2 od.itervalues -> an iterator over the values in odN( ( R t k( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyR � s c c s$ x | D] } | | | f Vq Wd S( s9 od.items -> an iterator over the (key, value) items in odN( ( R R+ ( ( sn /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/ordered_dict.pyR( � s c O s& t | � d k r. t d t | � f � � n | sC t d � � n | d } d } t | � d k rr | d } n t | t � r� xw | D] } | | | | <q� WnX t | d � r� xF | j � D] } | | | | <q� Wn! x | D] \ } } | | | <q� Wx$ | j � D] \ } } | | | <qWd S( s� od.update(E, **F) -> None. Update od from dict/iterable E and F. If E is a dict instance, does: for k in E: od[k] = E[k] If E has a .keys() method, does: for k in E.keys(): od[k] = E[k] Or if E is an iterable of items, does: for k, v in E: od[k] = v In either case, this is followed by: for k, v in F.items(): od[k] = v i s8 update() takes at most 2 positional arguments (%d given)s, update() takes at least 1 argument (0 given)i i R&