ó Ú_e[c@s3ddlmZdgZdefd„ƒYZdS(iÿÿÿÿ(terrort NamedValuescBsËeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(sCreate named values object. The |NamedValues| object represents a collection of string names associated with numeric IDs. These objects are used for giving names to otherwise numerical values. |NamedValues| objects are immutable and duck-type Python :class:`dict` object mapping ID to name and vice-versa. Parameters ---------- \*args: variable number of two-element :py:class:`tuple` name: :py:class:`str` Value label value: :py:class:`int` Numeric value Keyword Args ------------ name: :py:class:`str` Value label value: :py:class:`int` Numeric value Examples -------- .. code-block:: pycon >>> nv = NamedValues('a', 'b', ('c', 0), d=1) >>> nv >>> {'c': 0, 'd': 1, 'a': 2, 'b': 3} >>> nv[0] 'c' >>> nv['a'] 2 cOsi|_i|_g}xÝ|D]Õ}t|ttfƒrwy|\}}Wq‡tk rstjd|fƒ‚q‡Xn|j|ƒq||jkr¯tjd|fƒ‚n||jkrÚtjd||fƒ‚n||j|<||j|(tjoinR tlent __class__t__name__tid(R txtrepresentation((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__repr__js,cCst|ƒ|kS(N(tdict(R tother((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__eq__rscCst|ƒ|kS(N(R(R R((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__ne__uscCst|ƒ|kS(N(R(R R((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__lt__xscCst|ƒ|kS(N(R(R R((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__le__{scCst|ƒ|kS(N(R(R R((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__gt__~scCst|ƒ|kS(N(R(R R((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__ge__scCst|jƒƒS(N(thashR (R ((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__hash__„scCs/y|j|SWntk r*|j|SXdS(N(RtKeyErrorR(R tkey((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt __getitem__‰s cCs t|jƒS(N(RR(R ((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__len__scCs||jkp||jkS(N(RR(R R'((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt __contains__“scCs t|jƒS(N(titerR(R ((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__iter__–scCs t|jƒS(N(R+R(R ((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pytvalues™scCs t|jƒS(N(R+R(R ((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pytkeysœsccs*x#|jD]}||j|fVq WdS(N(R(R R((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyR ŸscCs)|jt|jƒƒt|jƒƒŒS(N(RRR (R t namedValues((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt__add__¥scOs|j||Ž}||S(N(R(R R Rtnew((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pytcloneªscCs||jkr|j|SdS(N(R(R tvalue((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pytgetName°scCs||jkr|j|SdS(N(R(R R((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pytgetValue´scGsby"g|D]}|j|^q SWn9tk r]tjdt|ƒj|jƒfƒ‚nXdS(NsUnknown bit identifier(s): %s(RR&RRtsett difference(R tnamesR((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt getValues¸s " (Rt __module__t__doc__RRRRR R!R"R#R%R(R)R*R,R-R.R R0R2R4R5R9(((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyRs,( 3                   N(tpyasn1Rt__all__tobjectR(((s6/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/namedval.pyt s