ó R;]c@@sLdZddlmZddlmZdefd„ƒYZeƒe_dS(s+Attribute scoping support for symbolic API.i(tabsolute_importi(t string_typest AttrScopecB@s8eZdZdZd„Zd„Zd„Zd„ZRS(sÔAttribute manager for scoping. User can also inherit this object to change naming behavior. Parameters ---------- kwargs The attributes to set for all symbol creations in the scope. cK@sKd|_x2|jƒD]$}t|tƒstdƒ‚qqW||_dS(NsAttributes need to be string(tNonet _old_scopetvaluest isinstanceRt ValueErrort_attr(tselftkwargstvalue((sO/usr/local/lib/python2.7/site-packages/mxnet-1.2.1-py2.7.egg/mxnet/attribute.pyt__init__$s  cC@sD|jr2|jjƒ}|r.|j|ƒn|S|r<|SiSdS(sq Get the attribute dict given the attribute set by the symbol. Parameters ---------- attr : dict of string to string The attribute passed in by user during symbol creation. Returns ------- attr : dict of string to string Updated attributes to add other scope related attributes. N(Rtcopytupdate(R tattrtret((sO/usr/local/lib/python2.7/site-packages/mxnet-1.2.1-py2.7.egg/mxnet/attribute.pytget+s  cC@sDtj|_tjjjƒ}|j|jƒ||_|t_|S(N(RtcurrentRRR R(R R((sO/usr/local/lib/python2.7/site-packages/mxnet-1.2.1-py2.7.egg/mxnet/attribute.pyt __enter__As    cC@s|jst‚|jt_dS(N(RtAssertionErrorRR(R tptypeR ttrace((sO/usr/local/lib/python2.7/site-packages/mxnet-1.2.1-py2.7.egg/mxnet/attribute.pyt__exit__JsN( t__name__t __module__t__doc__RRR RRR(((sO/usr/local/lib/python2.7/site-packages/mxnet-1.2.1-py2.7.egg/mxnet/attribute.pyRs     N(Rt __future__RtbaseRtobjectRR(((sO/usr/local/lib/python2.7/site-packages/mxnet-1.2.1-py2.7.egg/mxnet/attribute.pyts6