3 \" @sdZddlZddZeeZeddZeejZeejZ eej Z ddZ ee Z d d ZeZeeZejd d ZeZeeZGd ddZeejZeeZegjZeeZyeWn:ek rejdZeeZeejZ dZ[YnXeejZ!eej"Z#[[[ [[fddfddZ$fdfddZ%ddZ&GdddZ'ddl(Z)ddl*j+Z,GdddZ-ddZ.dde/DZ0dS)zO Define names for built-in types that aren't directly accessible as a builtin. NcCsdS)Nrrr/usr/lib64/python3.6/types.py_f srcCsdS)Nrrrrr srccs dVdS)Nrrrrr_gsrcsdS)Nrrrrr_csrcCs dVdS)Nrrrrr_agsr c@seZdZddZdS)_CcCsdS)Nr)selfrrr_m!sz_C._mN)__name__ __module__ __qualname__r rrrrr sr cCs2t|||\}}}|dk r"||||||f|S)zBCreate a class object dynamically using the appropriate metaclass.N) prepare_class)namebaseskwds exec_bodymetansrrr new_class9srcCs~|dkri}nt|}d|kr*|jd}n|r||_||_||_|p|j|_|dk|_tt|dd|_dS)N__isabstractmethod__F)fgetfsetfdel__doc__ overwrite_docboolgetattrr')r r(r)r*docrrr__init__}s   zDynamicClassAttribute.__init__cCs6|dkr|jr|Stn|jdkr,td|j|S)Nzunreadable attribute)r'AttributeErrorr()r instance ownerclassrrr__get__s zDynamicClassAttribute.__get__cCs"|jdkrtd|j||dS)Nzcan't set attribute)r)r1)r r2valuerrr__set__s zDynamicClassAttribute.__set__cCs |jdkrtd|j|dS)Nzcan't delete attribute)r*r1)r r2rrr __delete__s z DynamicClassAttribute.__delete__cCs8|jr |jnd}t|||j|j|p(|j}|j|_|S)N)r,r+rr)r*)r r(fdocresultrrrgetterszDynamicClassAttribute.gettercCs$t||j||j|j}|j|_|S)N)rr(r*r+r,)r r)r9rrrsetterszDynamicClassAttribute.settercCs$t||j|j||j}|j|_|S)N)rr(r)r+r,)r r*r9rrrdeleterszDynamicClassAttribute.deleter)NNNN)N) r rrr+r0r4r6r7r:r;r<rrrrr&qs  r&c@seZdZddZddZddZddZed d Zed d Z ed dZ eddZ eZ e Z e Ze ZddZddZeZdS)_GeneratorWrappercCs2||_|jtk|_t|dd|_t|dd|_dS)Nr r)_GeneratorWrapper__wrapped __class__ GeneratorType_GeneratorWrapper__isgenr.r r)r genrrrr0s z_GeneratorWrapper.__init__cCs |jj|S)N)r>send)r valrrrrCsz_GeneratorWrapper.sendcGs|jj|f|S)N)r>throw)r tprestrrrrEsz_GeneratorWrapper.throwcCs |jjS)N)r>close)r rrrrHsz_GeneratorWrapper.closecCs|jjS)N)r>gi_code)r rrrrIsz_GeneratorWrapper.gi_codecCs|jjS)N)r>gi_frame)r rrrrJsz_GeneratorWrapper.gi_framecCs|jjS)N)r> gi_running)r rrrrKsz_GeneratorWrapper.gi_runningcCs|jjS)N)r> gi_yieldfrom)r rrrrLsz_GeneratorWrapper.gi_yieldfromcCs t|jS)N)nextr>)r rrr__next__sz_GeneratorWrapper.__next__cCs|jr |jS|S)N)rAr>)r rrr__iter__sz_GeneratorWrapper.__iter__N)r rrr0rCrErHpropertyrIrJrKrLcr_codecr_frame cr_runningcr_awaitrNrO __await__rrrrr=s    r=cststdjtkrtddjtkrjj}|d@r@S|d@rj}t|j|j |j |j |jdB|j |j |j|j|j|j|j|j|j|j_Stjfdd}|S) z2Convert regular generator function to a coroutine.z$types.coroutine() expects a callable__code__Ni csT||}|jtks*|jtkr.|jjd@r.|St|tjrPt|tj rPt |S|S)NrX) r? CoroutineTyper@rIco_flagsr_collections_abc Generator Coroutiner=)argskwargscoro)funcrrwrappeds   zcoroutine..wrapped)callabler"r? FunctionTyper.CodeTyperVrZ co_argcountco_kwonlyargcount co_nlocals co_stacksizeco_code co_constsco_names co_varnames co_filenameco_nameco_firstlineno co_lnotab co_freevars co_cellvars _functoolswraps)rarZcorbr)rar coroutines(   rwcCs g|]}|dddkr|qS)Nr_r).0nrrr sr{)1r+sysrrrd LambdaTyperVre__dict__MappingProxyTypeimplementationSimpleNamespacerr@rrYrHr AsyncGeneratorTyper r MethodTypelenBuiltinFunctionTypeappendBuiltinMethodType ModuleTyper"exc_infotb TracebackTypetb_frame FrameTypeGetSetDescriptorType __globals__MemberDescriptorTyperrrr& functoolsrtcollections.abcabcr[r=rwglobals__all__rrrrsR             : %7