_e[c@sddlZddlmZddlmZddlmZddlmZddlmZddd d gZ de fd YZ de fd YZ d e fdYZ e Zd e fdYZd e fdYZdS(iN(terror(tcalling(t constraint(ttag(ttagmaptAsn1Itemt Asn1ItemBasetAbstractSimpleAsn1ItemtAbstractConstructedAsn1ItemcBseZeddZRS(icCs7ytj|7_Wntk r/|t_nXtjS(N(Rt _typeCountertAttributeError(tclst increment((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt getTypeIds   (t__name__t __module__t classmethodR (((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRscBseZejZejZdZ dZ dZ dZ e dZe dZe dZeedZeedZedZd d Zd Zd Zd ZdZdZRS(cKsDi|jd6|jd6}|j||jj|||_dS(NttagSett subtypeSpec(RRtupdatet__dict__t _readOnly(tselftkwargstreadOnly((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__init__(s    cCsF|ddkr5||jkr5tjd|n||j|(RBRtid(R((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyREs(s __slots__s__getattribute__s __getattr__s __setattr__s __delattr__s __class__s__init__s__del__s__new__s__repr__RFs __objclass__sim_classs __sizeof__s __reduce__s __reduce_ex__s__getnewargs__s__getinitargs__s __getstate__s __setstate__N( RRt__doc__R`R[R9RURDR@RE(((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyR=s4    cBseZeZedZdZdZdZdZdZ dZ dZ e j dd krvd Zn d Zd Zed ZedZedZdZdZddZddZRS(cKstj|||tkr(|j}nh|j|}y|j|WnEtjk rtj \}}}|d||j j fnX||_ dS(Ns%s at %s( RRR*t defaultValuetprettyInRRRtsystexc_infoRBRt_value(RRRtexTypetexValuetexTb((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRs   cCsd|jj|jrdpdt|f}x:|jjD])\}}|r>|d||f7}q>q>W|jr|j}t|dkr|d d|d}n|d |7}nd |S( Ns%s %s object at 0x%xRtschemas %s %si is...is payload [%s]s<%s>(RBRR5RfRtitemsRtlen(RtrepresentationReR((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyREs+  cCs||krtp|j|kS(N(R,Rl(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__eq__ scCs |j|kS(N(Rl(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__ne__scCs |j|kS(N(Rl(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__lt__scCs |j|kS(N(Rl(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__le__scCs |j|kS(N(Rl(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__gt__scCs |j|kS(N(Rl(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__ge__siicCs|jrtptS(N(RlR,R+(R((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt __nonzero__scCs|jrtptS(N(RlR,R+(R((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__bool__!scCs t|jS(N(thashRl(R((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__hash__$scCs |jtk S(sWIndicate that |ASN.1| object represents ASN.1 value. If *isValue* is `False` then this object represents just ASN.1 schema. If *isValue* is `True` then, in addition to its ASN.1 schema features, this object can also be used like a Python built-in object (e.g. `int`, `str`, `dict` etc.). Returns ------- : :class:`bool` :class:`False` if object represents just ASN.1 schema. :class:`True` if object represents ASN.1 schema and can be used as a normal value. Note ---- There is an important distinction between PyASN1 schema and value objects. The PyASN1 schema objects can only participate in ASN.1 schema-related operations (e.g. defining or testing the structure of the data). Most obvious uses of ASN.1 schema is to guide serialisation codecs whilst encoding/decoding serialised ASN.1 contents. The PyASN1 value objects can **additionally** participate in many operations involving regular Python objects (e.g. arithmetic, comprehension etc). (RlR*(R((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyR5'scKsN|tkr"|s|S|j}n|jj}|j||j||S(s`Create a modified version of |ASN.1| schema or value object. The `clone()` method accepts the same set arguments as |ASN.1| class takes on instantiation except that all arguments of the `clone()` method are optional. Whatever arguments are supplied, they are used to create a copy of `self` taking precedence over the ones used to instantiate `self`. Note ---- Due to the immutable nature of the |ASN.1| object, if no arguments are supplied, no new |ASN.1| object will be created and `self` will be returned instead. (R*RlRtcopyRRB(RRRt initilaizers((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pytcloneDs   cKs|tkr"|s|S|j}n|jj}|jdd}|dk rh|jj||d %s(RRBR(RR0((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pytprettyPrintTypes(RRR*RhRRERtRuRvRwRxRyRjt version_infoRzR{R}R;R5RRRiRRR(((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRs(             D   cBseZeZdZdZdZdZdZ dZ dZ dZ dZ dZejdd krd Zn d Zd Zd ZdZdZdZdZedZdZdZdZdZRS(cKsDi|jd6|jd6}|j|tj||g|_dS(Nt componentTypetsizeSpec(RRRRRt_componentValues(RRR((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRs    cCsd|jj|jrdpdt|f}x@|jjD]/\}}|tk r>|d||f7}q>q>W|jr|jr|ddjg|jD]}t |^q7}nd|S(Ns%s %s object at 0x%xRRps %s=%rs payload [%s]s, s<%s>( RBRR5RfRRqR*Rtjointrepr(RRsReRtx((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyREs+ 6cCs||krtp|j|kS(N(R,R(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRtscCs |j|kS(N(R(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRuscCs |j|kS(N(R(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRvscCs |j|kS(N(R(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRwscCs |j|kS(N(R(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRxscCs |j|kS(N(R(RR$((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRysiicCs|jrtptS(N(RR,R+(R((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRzscCs|jrtptS(N(RR,R+(R((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyR{scCs t|jS(N(RrR(R((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt__len__scCsdS(N((RtmyClonetcloneValueFlag((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyt_cloneComponentValuesscKsZ|jdt}|jj}|j||j|}|rV|j||n|S(s%Create a modified version of |ASN.1| schema object. The `clone()` method accepts the same set arguments as |ASN.1| class takes on instantiation except that all arguments of the `clone()` method are optional. Whatever arguments are supplied, they are used to create a copy of `self` taking precedence over the ones used to instantiate `self`. Possible values of `self` are never copied over thus `clone()` can only create a new schema object. Returns ------- : new instance of |ASN.1| type/value Note ---- Due to the mutable nature of the |ASN.1| object, even if no arguments are supplied, new |ASN.1| object will always be created as a shallow copy of `self`. R(RR+RR~RRBR(RRRRR((s2/tmp/pip-install-KP2Jbq/pyasn1/pyasn1/type/base.pyRs c Ks|jj}|jdt}|jdd}|dk rX|jj||ds  }J