σ šΔοYc@@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((s/build/bdist.linux-armv7l/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((s/build/bdist.linux-armv7l/egg/mxnet/attribute.pytget+s  cC@sDtj|_tjjjƒ}|j|jƒ||_|t_|S(N(RtcurrentRRR R(R R((s/build/bdist.linux-armv7l/egg/mxnet/attribute.pyt __enter__As    cC@s|jst‚|jt_dS(N(RtAssertionErrorRR(R tptypeR ttrace((s/build/bdist.linux-armv7l/egg/mxnet/attribute.pyt__exit__JsN( t__name__t __module__t__doc__RRR RRR(((s/build/bdist.linux-armv7l/egg/mxnet/attribute.pyRs     N(Rt __future__RtbaseRtobjectRR(((s/build/bdist.linux-armv7l/egg/mxnet/attribute.pyts6