PK95mzEGG-INFO/PKG-INFOMetadata-Version: 1.0 Name: RuleDispatch Version: 0.5a0.dev-r2115 Summary: Rule-based Dispatching and Generic Functions Home-page: UNKNOWN Author: Phillip J. Eby Author-email: peak@eby-sarna.com License: PSF or ZPL Description: UNKNOWN Platform: UNKNOWN PK95un`$$EGG-INFO/SOURCES.txt.cvsignore TODO.txt setup.cfg setup.py ez_setup/README.txt ez_setup/__init__.py src/RuleDispatch.egg-info/PKG-INFO src/RuleDispatch.egg-info/SOURCES.txt src/RuleDispatch.egg-info/dependency_links.txt src/RuleDispatch.egg-info/native_libs.txt src/RuleDispatch.egg-info/requires.txt src/RuleDispatch.egg-info/top_level.txt src/RuleDispatch.egg-info/zip-safe src/dispatch/__init__.py src/dispatch/_speedups.c src/dispatch/_speedups.pyx src/dispatch/assembler.py src/dispatch/assembler.txt src/dispatch/ast_builder.py src/dispatch/combiners.py src/dispatch/combiners.txt src/dispatch/functions.py src/dispatch/interfaces.py src/dispatch/predicates.py src/dispatch/strategy.py src/dispatch/tests/__init__.py src/dispatch/tests/doctest.py src/dispatch/tests/test_dispatch.py src/dispatch/tests/test_parsing.py PK952EGG-INFO/dependency_links.txt PK95ޓkEGG-INFO/native_libs.txtdispatch/_speedups.so PK958EGG-INFO/requires.txtPyProtocols>=1.0a0devPK95 EGG-INFO/top_level.txtdispatch PK&52EGG-INFO/zip-safe PK&5숲[dispatch/__init__.py"""Multiple/Predicate Dispatch Framework This framework refines the algorithms of Chambers and Chen in their 1999 paper, "Efficient Multiple and Predicate Dispatching", to make them suitable for Python, while adding a few other enhancements like incremental index building and lazy expansion of the dispatch DAG. Also, their algorithm was designed only for class selection and true/false tests, while this framework can be used with any kind of test, such as numeric ranges, or custom tests such as categorization/hierarchy membership. NOTE: this package is not yet ready for prime-time. APIs are subject to change randomly without notice. You have been warned! TODO * Support DAG-walking for visualization, debugging, and ambiguity detection """ from dispatch.interfaces import * from types import ClassType as _ClassType _cls = _ClassType,type def generic(combiner=None): """Use the following function as the skeleton for a generic function Decorate a Python function so that it wraps an instance of 'dispatch.functions.GenericFunction' that has been configured with the decorated function's name, docstring, argument signature, and default arguments. The decorated function will have additional attributes besides those of a normal function. (See 'dispatch.IGenericFunction' for more information on these special attributes/methods.) Most commonly, you will use the 'when()' method of the decorated function to define "rules" or "methods" of the generic function. For example:: import dispatch @dispatch.generic() def someFunction(*args): '''This is a generic function''' @someFunction.when("len(args)>0") def argsPassed(*args): print "Arguments were passed!" @someFunction.when("len(args)==0") def noArgsPassed(*args): print "No arguments were passed!" someFunction() # prints "No args passed" someFunction(1) # prints "args passed" Note that when using older Python versions, you must use '[dispatch.generic()]' instead of '@dispatch.generic()'. """ from dispatch.functions import GenericFunction, AbstractGeneric from protocols.advice import add_assignment_advisor if combiner is None: def callback(frm,name,value,old_locals): return GenericFunction(value).delegate elif isinstance(combiner,_cls) and issubclass(combiner,AbstractGeneric): def callback(frm,name,value,old_locals): return combiner(value).delegate else: def callback(frm,name,value,old_locals): gf = GenericFunction(value) gf.combine = combiner return gf.delegate return add_assignment_advisor(callback) def as(*decorators): """Use Python 2.4 decorators w/Python 2.2+ Example: import dispatch class Foo(object): [dispatch.as(classmethod)] def something(cls,etc): \"""This is a classmethod\""" """ if len(decorators)>1: decorators = list(decorators) decorators.reverse() def callback(frame,k,v,old_locals): for d in decorators: v = d(v) return v from protocols.advice import add_assignment_advisor return add_assignment_advisor(callback) def on(argument_name): """Decorate the following function as a single-dispatch generic function Single-dispatch generic functions may have a slight speed advantage over predicate-dispatch generic functions when you only need to dispatch based on a single argument's type or protocol, and do not need arbitrary predicates. Also, single-dispatch functions do not require you to adapt the dispatch argument when dispatching based on protocol or interface, and if the dispatch argument has a '__conform__' method, it will attempt to use it, rather than simply dispatching based on class information the way predicate dispatch functions do. The created generic function will use the documentation from the supplied function as its docstring. And, it will dispatch methods based on the argument named by 'argument_name', and otherwise keeping the same argument signature, defaults, etc. For example:: @dispatch.on('y') def doSomething(x,y,z): '''Doc for 'doSomething()' generic function goes here''' @doSomething.when([SomeClass,OtherClass]) def doSomething(x,y,z): # do something when 'isinstance(y,(SomeClass,OtherClass))' @doSomething.when(IFoo) def doSomething(x,y,z): # do something to a 'y' that has been adapted to 'IFoo' """ def callback(frm,name,value,old_locals): return _mkGeneric(value,argument_name) from dispatch.functions import _mkGeneric from protocols.advice import add_assignment_advisor return add_assignment_advisor(callback) PK95`dispatch/__init__.pyc; ZDc@sHdZdkTdklZeefZedZdZ dZ dS(sMultiple/Predicate Dispatch Framework This framework refines the algorithms of Chambers and Chen in their 1999 paper, "Efficient Multiple and Predicate Dispatching", to make them suitable for Python, while adding a few other enhancements like incremental index building and lazy expansion of the dispatch DAG. Also, their algorithm was designed only for class selection and true/false tests, while this framework can be used with any kind of test, such as numeric ranges, or custom tests such as categorization/hierarchy membership. NOTE: this package is not yet ready for prime-time. APIs are subject to change randomly without notice. You have been warned! TODO * Support DAG-walking for visualization, debugging, and ambiguity detection (s*(s ClassTypecsdkll}dkl}tjod}n@tt o t |od}nd}||SdS(sUse the following function as the skeleton for a generic function Decorate a Python function so that it wraps an instance of 'dispatch.functions.GenericFunction' that has been configured with the decorated function's name, docstring, argument signature, and default arguments. The decorated function will have additional attributes besides those of a normal function. (See 'dispatch.IGenericFunction' for more information on these special attributes/methods.) Most commonly, you will use the 'when()' method of the decorated function to define "rules" or "methods" of the generic function. For example:: import dispatch @dispatch.generic() def someFunction(*args): '''This is a generic function''' @someFunction.when("len(args)>0") def argsPassed(*args): print "Arguments were passed!" @someFunction.when("len(args)==0") def noArgsPassed(*args): print "No arguments were passed!" someFunction() # prints "No args passed" someFunction(1) # prints "args passed" Note that when using older Python versions, you must use '[dispatch.generic()]' instead of '@dispatch.generic()'. (sGenericFunctionsAbstractGeneric(sadd_assignment_advisorcs|iSdS(N(sGenericFunctionsvaluesdelegate(sfrmsnamesvalues old_locals(sGenericFunction(s6build/bdist.darwin-8.7.1-i386/egg/dispatch/__init__.pyscallbackTscs|iSdS(N(scombinersvaluesdelegate(sfrmsnamesvalues old_locals(scombiner(s6build/bdist.darwin-8.7.1-i386/egg/dispatch/__init__.pyscallbackWscs |}|_|iSdS(N(sGenericFunctionsvaluesgfscombinerscombinesdelegate(sfrmsnamesvalues old_localssgf(scombinersGenericFunction(s6build/bdist.darwin-8.7.1-i386/egg/dispatch/__init__.pyscallbackZs  N( sdispatch.functionssGenericFunctionsAbstractGenericsprotocols.advicesadd_assignment_advisorscombinersNonescallbacks isinstances_clss issubclass(scombinersadd_assignment_advisorsGenericFunctionscallbacksAbstractGeneric((scombinersGenericFunctions6build/bdist.darwin-8.7.1-i386/egg/dispatch/__init__.pysgeneric*s!   csTtdjotind}dkl}||SdS(sUse Python 2.4 decorators w/Python 2.2+ Example: import dispatch class Foo(object): [dispatch.as(classmethod)] def something(cls,etc): """This is a classmethod""" ics%xD]}||}qW|SdS(N(s decoratorssdsv(sframesksvs old_localssd(s decorators(s6build/bdist.darwin-8.7.1-i386/egg/dispatch/__init__.pyscallbackss(sadd_assignment_advisorN(slens decoratorsslistsreversescallbacksprotocols.advicesadd_assignment_advisor(s decoratorssadd_assignment_advisorscallback((s decoratorss6build/bdist.darwin-8.7.1-i386/egg/dispatch/__init__.pysasbs    cs7d}dkldkl}||SdS(sADecorate the following function as a single-dispatch generic function Single-dispatch generic functions may have a slight speed advantage over predicate-dispatch generic functions when you only need to dispatch based on a single argument's type or protocol, and do not need arbitrary predicates. Also, single-dispatch functions do not require you to adapt the dispatch argument when dispatching based on protocol or interface, and if the dispatch argument has a '__conform__' method, it will attempt to use it, rather than simply dispatching based on class information the way predicate dispatch functions do. The created generic function will use the documentation from the supplied function as its docstring. And, it will dispatch methods based on the argument named by 'argument_name', and otherwise keeping the same argument signature, defaults, etc. For example:: @dispatch.on('y') def doSomething(x,y,z): '''Doc for 'doSomething()' generic function goes here''' @doSomething.when([SomeClass,OtherClass]) def doSomething(x,y,z): # do something when 'isinstance(y,(SomeClass,OtherClass))' @doSomething.when(IFoo) def doSomething(x,y,z): # do something to a 'y' that has been adapted to 'IFoo' cs|SdS(N(s _mkGenericsvalues argument_name(sfrmsnamesvalues old_locals(s _mkGenerics argument_name(s6build/bdist.darwin-8.7.1-i386/egg/dispatch/__init__.pyscallbacks(s _mkGeneric(sadd_assignment_advisorN(scallbacksdispatch.functionss _mkGenericsprotocols.advicesadd_assignment_advisor(s argument_names _mkGenericscallbacksadd_assignment_advisor((s argument_names _mkGenerics6build/bdist.darwin-8.7.1-i386/egg/dispatch/__init__.pyson|s   N( s__doc__sdispatch.interfacesstypess ClassTypes _ClassTypestypes_clssNonesgenericsasson(sonsgenerics _ClassTypesass_cls((s6build/bdist.darwin-8.7.1-i386/egg/dispatch/__init__.pys?s    8 PK95"dispatch/_speedups.pydef __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__,'_speedups.so') del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__() PK95::dispatch/_speedups.pyc; 8Ec@sdatdS(cCsGdk}dk}dk}|itdabb|ittdS(Ns _speedups.so( ssyss pkg_resourcessimpsresource_filenames__name__s__file__s __bootstrap__s __loader__s load_dynamic(s pkg_resourcesssyssimp((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/_speedups.pys __bootstrap__s N(s __bootstrap__(((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/_speedups.pys?s PK95) .XUXUdispatch/_speedups.soH__TEXTpp__text__TEXT _ __picsymbol_stub__TEXTOkOk__cstring__TEXTPkPk__textcoal_nt__TEXToo __DATApp__data__DATAptp__dyld__DATAtutu__bss__DATAuT__IMPORT__jump_table__IMPORT__pointers__IMPORTD/8__LINKEDITX 4 C/usr/lib/libgcc_s.1.dylib 4DX/usr/lib/libSystem.B.dylib? Q P@@wX;diXiUSdED$$uP []UVuV t tFu^]F P$RFu^]UE@ tUT$$U t1UVSfcuV t tutF 1[^]ËF P$RutF 1[^]UScED$$tPP P[]UVuVt tdV t tDVt tFu^]FP$RFu^]F P$R뮋FP$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D< DA DC DO D[ D` &&$ W&`&&@&$NNb .b Db Dh Dr D D D &$b ' ' +'5'@>'I'\'w''@'b ' '$'N . D D D D D D D '$ ''@'$XN . D D D D D D '$ '( ((@"((@( ( ($>N . D! D#) D$; D%M D&_ D'k D&p D%r D&~ D' D& D$ D# ($! (!(@!)$N . D) D, D- D/ D0 D2 D3 D6 D3D6)$) 1)):)) E))O)@*X)@)a)@)k) l) m)$]N . D8 D:D;-D<9D=KD>QD?cDAiD>sD?DAD<D:n)$8 )8)@8)$N.DBDDDEDFDHDFDHDDDH )$B)B)B )@C)@D)@B*@B * **$_N.DDD&D'*$=*F* O*X*@a*$N).)D)D/D8D9b*$)**@*$N;.;D;D>*$;** **$NB.BDBDE*$B*+3+$NI.IDIDTDeDwDDDDD4+$Ic+l+ u+@~+@+@+@+I++$_N+.DD+ Df De D3 DN DT j,$- ~,@- ,- ,- ,$/N,.Dv Dw Dy 3Dz ;D{ WD| jD uD D D D D D D D~ D D D D 8D >D DD JD MD TD [D bD nD D D D ,$v ,w ,w ,w ,@x ,y --=-P/c/v/////K2\2R3e3v333334645666$N 6.D D 6DxD D D D D D D 'D /D @D H-6@xD D D D D D D D D D -D BD WD uD }D D D D D ;6$ V6@ f6 w6@ 6 6@ 6 6 6 66777$ N.D_DcDdDeDf2Dg:D ^D nD {D D D DhD D D D Dj7HxDk87LxDl`7PxDm7TxDn7XxDoDp DqDr=DsCDtODu_DvDwDxDyD|D}D~DD(D1D<DEDQDiDxDDDDDDDDDD,DDDVDrDDDDDDDDD DDDD.D6D9D?DHDQDZDtD}DDDDDDDDD&D<DSDYDbDnDDDDDiDDDDq D#D)D0Du5DxOD|iDD~D}DDDD D.D9DVDdDDDDDDD D&DCD`DxDDDDD D D- 7$_7@`7a7@b77@h8^88@i888@i8 8!8J "858H8n8888$z NJ 8%Dn%D%D%D/%D0%D1&D2 &D3&DYK&DZ]&D[{&D\&D]&D&D=&D>&D?'D@'DA'DKN'DL`'DM~'DN'DO'D'D'D$ (D(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,PmAA@AA@A@AA@A,PA@AFPAbPA@AQAQAORA$#NORATu.ORDxORDy]RDdRDRDRDRDRDRDRDRD SDSD-SDLSDcSDzSDSDSDSDSDSD SD SDSDTD4TDATD ITDdTD sTDTD$ TD) TDTDTDTDTDUDUDUD!UD)UD_UDUDUDUDUDUDUD VDVD.VD9VDGVDeVDoVDVDVDVDVDVDVDVDVDWDWD!WDTWDbWDpWD~WDWDWDWDWDXD+XD9XDGXDeXDvXDXDXDXDXDXDXDXDXDXDYDYD$YD*YDD PDbDvDDDD@DDD D D  E@ E (E&\u@E^E@pE@E ]E@CEy`E`E@CEbEcEWcE$KNWcEhu.WcDWcDecDlcDscDcDcDcDcDcDcDdD dDdD.dD0dD ?dDGdDJdD RdD$pdD:vdD>ydDN~dDQdDRdDSdDdD:dD>dDAdDBdDCdDDdDEdDFeDGeD/eD1eDc;eD{MeD[eD^eDpeDeDeDeDeDeDeDeDeDeD fD&fD6fD L\iu 5FXp!4FXes -  0 1 /  4 ' ! $  . ; 2 (  5 &  ,  # 7  %  8  = )     : *   +   "  <   3 > 6      9 __dyld_func_lookupdyld_stub_binding_helper__mh_bundle_header___i686.get_pc_thunk.bx_init_speedups_PyArg_ParseTupleAndKeywords_PyBaseObject_Type_PyClass_Type_PyCode_New_PyDict_GetItem_PyDict_New_PyDict_Type_PyErr_Clear_PyErr_ExceptionMatches_PyErr_Fetch_PyErr_Format_PyErr_NormalizeException_PyErr_Occurred_PyErr_Restore_PyErr_SetNone_PyErr_SetObject_PyErr_SetString_PyExc_AssertionError_PyExc_AttributeError_PyExc_IndexError_PyExc_NameError_PyExc_SystemError_PyExc_TypeError_PyExc_ValueError_PyFrame_New_PyImport_AddModule_PyInstance_Type_PyInt_AsLong_PyInt_FromLong_PyIter_Next_PyList_New_PyModule_GetDict_PyObject_CallFunction_PyObject_CallObject_PyObject_Cmp_PyObject_GC_Del_PyObject_GetAttr_PyObject_GetAttrString_PyObject_GetItem_PyObject_GetIter_PyObject_IsInstance_PyObject_IsTrue_PyObject_SetAttr_PyObject_SetAttrString_PyObject_SetItem_PyObject_Size_PyObject_Type_PySequence_GetItem_PySequence_Tuple_PyString_FromString_PyString_FromStringAndSize_PyString_InternFromString_PyString_Type_PyThreadState_Get_PyTraceBack_Here_PyTraceBack_Type_PyTuple_New_PyTuple_Size_PyTuple_Type_PyType_IsSubtype_PyType_Ready_PyType_Type_Py_InitModule4__Py_NoneStruct{standard input}int:t1=r1;-2147483648;2147483647;char:t2=r2;0;127;void:t3=3/SourceCache/Csu/Csu-58/bundle1.s/SourceCache/Csu/Csu-58///SourceCache/Csu/Csu-58/bundle1.s/SourceCache/Csu/Csu-58/bundle1.sdyld_stub_binding_helper:F3dyld__mh_bundle_headerdyld_lazy_symbol_binding_entry_point__dyld_func_lookup:F3dyld_func_lookup_pointer/Users/alberto/src/RuleDispatch/src/dispatch/_speedups.cgcc2_compiled.___pyx_ptype_9_speedups_BaseDispatcher___pyx_type_9_speedups_BaseDispatcher___pyx_tp_dealloc_9_speedups_BaseDispatcher___pyx_tp_as_number_BaseDispatcher___pyx_tp_as_sequence_BaseDispatcher___pyx_tp_as_mapping_BaseDispatcher___pyx_tp_as_buffer_BaseDispatcher___pyx_tp_traverse_9_speedups_BaseDispatcher___pyx_tp_clear_9_speedups_BaseDispatcher___pyx_methods_9_speedups_BaseDispatcher___pyx_tp_new_9_speedups_BaseDispatcher___pyx_f_9_speedups_14BaseDispatcher___getitem_____pyx_sq_item_9_speedups_BaseDispatcher___pyx_ptype_9_speedups_ExprCache___pyx_type_9_speedups_ExprCache___pyx_tp_dealloc_9_speedups_ExprCache___pyx_tp_as_number_ExprCache___pyx_tp_as_sequence_ExprCache___pyx_tp_as_mapping_ExprCache___pyx_tp_as_buffer_ExprCache___pyx_tp_traverse_9_speedups_ExprCache___pyx_tp_clear_9_speedups_ExprCache___pyx_methods_9_speedups_ExprCache___pyx_f_9_speedups_9ExprCache___init_____pyx_tp_new_9_speedups_ExprCache___pyx_f_9_speedups_9ExprCache___getitem_____pyx_sq_item_9_speedups_ExprCache___pyx_ptype_9_speedups__ExtremeType___pyx_type_9_speedups__ExtremeType___pyx_tp_dealloc_9_speedups__ExtremeType___pyx_f_9_speedups_12_ExtremeType___cmp_____pyx_f_9_speedups_12_ExtremeType___repr_____pyx_tp_as_number__ExtremeType___pyx_tp_as_sequence__ExtremeType___pyx_tp_as_mapping__ExtremeType___pyx_f_9_speedups_12_ExtremeType___hash_____pyx_tp_as_buffer__ExtremeType___pyx_tp_traverse_9_speedups__ExtremeType___pyx_tp_clear_9_speedups__ExtremeType___pyx_f_9_speedups_12_ExtremeType___richcmp_____pyx_methods_9_speedups__ExtremeType___pyx_f_9_speedups_12_ExtremeType___init_____pyx_tp_new_9_speedups__ExtremeType___pyx_string_tab___pyx_k1p___pyx_k1___pyx_k9p___pyx_k9___pyx_k10p___pyx_k10___pyx_intern_tab___pyx_n_DispatchError___pyx_n_IndexError___pyx_n_InstanceType___pyx_n_KeyError___pyx_n_Max___pyx_n_Min___pyx_n_NoApplicableMethods___pyx_n_TypeError___pyx_n___all_____pyx_n___class_____pyx_n___getitem_____pyx_n___hash_____pyx_n__acquire___pyx_n__dispatcher___pyx_n__release___pyx_n__startNode___pyx_n_append___pyx_n_concatenate_ranges___pyx_n_dispatch_by_inequalities___pyx_n_dispatch_by_mro___pyx_n_expr_defs___pyx_n_keys___pyx_n_map___pyx_n_object___pyx_n_reseed___pyx_n_sort___pyx_n_types___pyx_f___pyx_filenames___pyx_mdoc___pyx_methods___pyx_f_9_speedups_concatenate_ranges___pyx_f_9_speedups_dispatch_by_inequalities___pyx_f_9_speedups_dispatch_by_mro___pyx_doc_9_speedups_dispatch_by_mro__pyx_tp_new_9_speedups__ExtremeType:f(0,1)t:p(0,2)a:p(0,1)k:p(0,1)o:r(0,1)t:r(0,2):t(0,1)=*(0,3):t(0,2)=*(0,4)PyObject:t(0,3)=(0,5)PyTypeObject:t(0,4)=(0,6)_object:T(0,5)=s8ob_refcnt:(0,7),0,32;ob_type:(0,8),32,32;;_typeobject:T(0,6)=s192ob_refcnt:(0,7),0,32;ob_type:(0,8),32,32;ob_size:(0,7),64,32;tp_name:(0,9),96,32;tp_basicsize:(0,7),128,32;tp_itemsize:(0,7),160,32;tp_dealloc:(0,10),192,32;tp_print:(0,12),224,32;tp_getattr:(0,14),256,32;tp_setattr:(0,16),288,32;tp_compare:(0,18),320,32;tp_repr:(0,20),352,32;tp_as_number:(0,22),384,32;tp_as_sequence:(0,23),416,32;tp_as_mapping:(0,24),448,32;tp_hash:(0,25),480,32;tp_call:(0,27),512,32;tp_str:(0,20),544,32;tp_getattro:(0,29),576,32;tp_setattro:(0,31),608,32;tp_as_buffer:(0,33),640,32;tp_flags:(0,34),672,32;tp_doc:(0,9),704,32;tp_traverse:(0,35),736,32;tp_clear:(0,37),768,32;tp_richcompare:(0,39),800,32;tp_weaklistoffset:(0,34),832,32;tp_iter:(0,41),864,32;tp_iternext:(0,42),896,32;tp_methods:(0,43),928,32;tp_members:(0,44),960,32;tp_getset:(0,45),992,32;tp_base:(0,8),1024,32;tp_dict:(0,1),1056,32;tp_descr_get:(0,46),1088,32;tp_descr_set:(0,47),1120,32;tp_dictoffset:(0,34),1152,32;tp_init:(0,48),1184,32;tp_alloc:(0,49),1216,32;tp_new:(0,51),1248,32;tp_free:(0,53),1280,32;tp_is_gc:(0,37),1312,32;tp_bases:(0,1),1344,32;tp_mro:(0,1),1376,32;tp_cache:(0,1),1408,32;tp_subclasses:(0,1),1440,32;tp_weaklist:(0,1),1472,32;tp_del:(0,10),1504,32;;int:t(0,7)=r(0,7);-2147483648;2147483647;:t(0,8)=*(0,6):t(0,9)=*(0,55):t(0,11)=*(0,56)destructor:t(0,10)=(0,11):t(0,13)=*(0,57)printfunc:t(0,12)=(0,13):t(0,15)=*(0,58)getattrfunc:t(0,14)=(0,15):t(0,17)=*(0,59)setattrfunc:t(0,16)=(0,17):t(0,19)=*(0,60)cmpfunc:t(0,18)=(0,19):t(0,21)=*(0,61)reprfunc:t(0,20)=(0,21):t(0,22)=*(0,62):t(0,23)=*(0,63):t(0,24)=*(0,64):t(0,26)=*(0,65)hashfunc:t(0,25)=(0,26):t(0,28)=*(0,66)ternaryfunc:t(0,27)=(0,28):t(0,30)=*(0,67)getattrofunc:t(0,29)=(0,30):t(0,32)=*(0,68)setattrofunc:t(0,31)=(0,32):t(0,33)=*(0,69)long int:t(0,34)=r(0,34);-2147483648;2147483647;:t(0,36)=*(0,70)traverseproc:t(0,35)=(0,36):t(0,38)=*(0,71)inquiry:t(0,37)=(0,38):t(0,40)=*(0,72)richcmpfunc:t(0,39)=(0,40)getiterfunc:t(0,41)=(0,21)iternextfunc:t(0,42)=(0,21):t(0,43)=*(0,73):t(0,44)=*(0,74):t(0,45)=*(0,75)descrgetfunc:t(0,46)=(0,28)descrsetfunc:t(0,47)=(0,32)initproc:t(0,48)=(0,32):t(0,50)=*(0,76)allocfunc:t(0,49)=(0,50):t(0,52)=*(0,77)newfunc:t(0,51)=(0,52):t(0,54)=*(0,78)freefunc:t(0,53)=(0,54)char:t(0,55)=r(0,55);0;127;:t(0,56)=f(0,79):t(0,57)=f(0,7):t(0,58)=f(0,1):t(0,59)=f(0,7):t(0,60)=f(0,7):t(0,61)=f(0,1)PyNumberMethods:t(0,62)=(0,80)PySequenceMethods:t(0,63)=(0,81)PyMappingMethods:t(0,64)=(0,82):t(0,65)=f(0,34):t(0,66)=f(0,1):t(0,67)=f(0,1):t(0,68)=f(0,7)PyBufferProcs:t(0,69)=(0,83):t(0,70)=f(0,7):t(0,71)=f(0,7):t(0,72)=f(0,1)PyMethodDef:T(0,73)=s16ml_name:(0,9),0,32;ml_meth:(0,84),32,32;ml_flags:(0,7),64,32;ml_doc:(0,9),96,32;;PyMemberDef:T(0,74)=s20name:(0,9),0,32;type:(0,7),32,32;offset:(0,7),64,32;flags:(0,7),96,32;doc:(0,9),128,32;;PyGetSetDef:T(0,75)=s20name:(0,9),0,32;get:(0,85),32,32;set:(0,87),64,32;doc:(0,9),96,32;closure:(0,89),128,32;;:t(0,76)=f(0,1):t(0,77)=f(0,1):t(0,78)=f(0,79):t(0,79)=(0,79):T(0,80)=s152nb_add:(0,90),0,32;nb_subtract:(0,90),32,32;nb_multiply:(0,90),64,32;nb_divide:(0,90),96,32;nb_remainder:(0,90),128,32;nb_divmod:(0,90),160,32;nb_power:(0,27),192,32;nb_negative:(0,91),224,32;nb_positive:(0,91),256,32;nb_absolute:(0,91),288,32;nb_nonzero:(0,37),320,32;nb_invert:(0,91),352,32;nb_lshift:(0,90),384,32;nb_rshift:(0,90),416,32;nb_and:(0,90),448,32;nb_xor:(0,90),480,32;nb_or:(0,90),512,32;nb_coerce:(0,92),544,32;nb_int:(0,91),576,32;nb_long:(0,91),608,32;nb_float:(0,91),640,32;nb_oct:(0,91),672,32;nb_hex:(0,91),704,32;nb_inplace_add:(0,90),736,32;nb_inplace_subtract:(0,90),768,32;nb_inplace_multiply:(0,90),800,32;nb_inplace_divide:(0,90),832,32;nb_inplace_remainder:(0,90),864,32;nb_inplace_power:(0,27),896,32;nb_inplace_lshift:(0,90),928,32;nb_inplace_rshift:(0,90),960,32;nb_inplace_and:(0,90),992,32;nb_inplace_xor:(0,90),1024,32;nb_inplace_or:(0,90),1056,32;nb_floor_divide:(0,90),1088,32;nb_true_divide:(0,90),1120,32;nb_inplace_floor_divide:(0,90),1152,32;nb_inplace_true_divide:(0,90),1184,32;;:T(0,81)=s40sq_length:(0,37),0,32;sq_concat:(0,90),32,32;sq_repeat:(0,94),64,32;sq_item:(0,94),96,32;sq_slice:(0,96),128,32;sq_ass_item:(0,98),160,32;sq_ass_slice:(0,100),192,32;sq_contains:(0,102),224,32;sq_inplace_concat:(0,90),256,32;sq_inplace_repeat:(0,94),288,32;;:T(0,82)=s12mp_length:(0,37),0,32;mp_subscript:(0,90),32,32;mp_ass_subscript:(0,103),64,32;;:T(0,83)=s16bf_getreadbuffer:(0,104),0,32;bf_getwritebuffer:(0,106),32,32;bf_getsegcount:(0,107),64,32;bf_getcharbuffer:(0,109),96,32;;PyCFunction:t(0,84)=(0,30):t(0,86)=*(0,111)getter:t(0,85)=(0,86):t(0,88)=*(0,112)setter:t(0,87)=(0,88):t(0,89)=*(0,79)binaryfunc:t(0,90)=(0,30)unaryfunc:t(0,91)=(0,21):t(0,93)=*(0,113)coercion:t(0,92)=(0,93):t(0,95)=*(0,114)intargfunc:t(0,94)=(0,95):t(0,97)=*(0,115)intintargfunc:t(0,96)=(0,97):t(0,99)=*(0,116)intobjargproc:t(0,98)=(0,99):t(0,101)=*(0,117)intintobjargproc:t(0,100)=(0,101)objobjproc:t(0,102)=(0,19)objobjargproc:t(0,103)=(0,32):t(0,105)=*(0,118)getreadbufferproc:t(0,104)=(0,105)getwritebufferproc:t(0,106)=(0,105):t(0,108)=*(0,119)getsegcountproc:t(0,107)=(0,108):t(0,110)=*(0,120)getcharbufferproc:t(0,109)=(0,110):t(0,111)=f(0,1):t(0,112)=f(0,7):t(0,113)=f(0,7):t(0,114)=f(0,1):t(0,115)=f(0,1):t(0,116)=f(0,7):t(0,117)=f(0,7):t(0,118)=f(0,7):t(0,119)=f(0,7):t(0,120)=f(0,7)__pyx_tp_dealloc_9_speedups__ExtremeType:f(0,79)o:p(0,1)__pyx_obj_9_speedups__ExtremeType:T(0,121)=s16ob_refcnt:(0,7),0,32;ob_type:(0,8),32,32;_cmpr:(0,7),64,32;_rep:(0,1),96,32;;o:r(0,1)__pyx_tp_traverse_9_speedups__ExtremeType:f(0,7)o:p(0,1)v:p(0,122)a:p(0,89)e:r(0,7)int:t(0,7):t(0,123)=*(0,124)visitproc:t(0,122)=(0,123):t(0,124)=f(0,7)o:r(0,1)__pyx_tp_clear_9_speedups__ExtremeType:f(0,7)o:p(0,1)o:r(0,1)__pyx_tp_new_9_speedups_ExprCache:f(0,1)t:p(0,2)a:p(0,1)k:p(0,1)o:r(0,1)__pyx_obj_9_speedups_ExprCache:T(0,125)=s20ob_refcnt:(0,7),0,32;ob_type:(0,8),32,32;cache:(0,1),64,32;argtuple:(0,1),96,32;expr_defs:(0,1),128,32;;t:r(0,2)__pyx_tp_dealloc_9_speedups_ExprCache:f(0,79)o:p(0,1)o:r(0,1)__pyx_tp_traverse_9_speedups_ExprCache:f(0,7)o:p(0,1)v:p(0,122)a:p(0,89)e:r(0,7)o:r(0,1)a:r(0,89)__pyx_tp_clear_9_speedups_ExprCache:f(0,7)o:p(0,1)o:r(0,1)__pyx_sq_item_9_speedups_ExprCache:f(0,1)o:p(0,1)i:p(0,7)r:r(0,1)x:r(0,1)o:r(0,1)i:r(0,7)__pyx_tp_new_9_speedups_BaseDispatcher:f(0,1)t:p(0,2)a:p(0,1)k:p(0,1)t:r(0,2)__pyx_tp_dealloc_9_speedups_BaseDispatcher:f(0,79)o:p(0,1)o:r(0,1)__pyx_tp_traverse_9_speedups_BaseDispatcher:f(0,7)o:p(0,1)v:p(0,122)a:p(0,89)__pyx_tp_clear_9_speedups_BaseDispatcher:f(0,7)o:p(0,1)__pyx_sq_item_9_speedups_BaseDispatcher:f(0,1)o:p(0,1)i:p(0,7)r:r(0,1)x:r(0,1)o:r(0,1)i:r(0,7)___Pyx_Import___pyx_b___pyx_m__Pyx_Import:f(0,1)name:p(0,1)from_list:P(0,1)__import__:r(0,1)empty_list:(0,1)module:r(0,1)global_dict:r(0,1)empty_dict:(0,1)list:(0,1)void:t(0,79)___Pyx_Raise__Pyx_Raise:f(0,79)type:P(0,1)value:p(0,1)tb:p(0,1)___Pyx_GetExcValue__Pyx_GetExcValue:f(0,1)type:(0,1)value:(0,1)tb:(0,1)result:r(0,1)tstate:(0,126):t(0,126)=*(0,127)PyThreadState:t(0,127)=(0,128)_ts:T(0,128)=s84next:(0,129),0,32;interp:(0,130),32,32;frame:(0,131),64,32;recursion_depth:(0,7),96,32;tracing:(0,7),128,32;use_tracing:(0,7),160,32;c_profilefunc:(0,132),192,32;c_tracefunc:(0,132),224,32;c_profileobj:(0,1),256,32;c_traceobj:(0,1),288,32;curexc_type:(0,1),320,32;curexc_value:(0,1),352,32;curexc_traceback:(0,1),384,32;exc_type:(0,1),416,32;exc_value:(0,1),448,32;exc_traceback:(0,1),480,32;dict:(0,1),512,32;tick_counter:(0,7),544,32;gilstate_counter:(0,7),576,32;async_exc:(0,1),608,32;thread_id:(0,34),640,32;;:t(0,129)=*(0,128):t(0,130)=*(0,134):t(0,131)=*(0,135):t(0,133)=*(0,136)Py_tracefunc:t(0,132)=(0,133)PyInterpreterState:t(0,134)=(0,137)_frame:T(0,135)=s336ob_refcnt:(0,7),0,32;ob_type:(0,8),32,32;ob_size:(0,7),64,32;f_back:(0,131),96,32;f_code:(0,138),128,32;f_builtins:(0,1),160,32;f_globals:(0,1),192,32;f_locals:(0,1),224,32;f_valuestack:(0,139),256,32;f_stacktop:(0,139),288,32;f_trace:(0,1),320,32;f_exc_type:(0,1),352,32;f_exc_value:(0,1),384,32;f_exc_traceback:(0,1),416,32;f_tstate:(0,126),448,32;f_lasti:(0,7),480,32;f_lineno:(0,7),512,32;f_restricted:(0,7),544,32;f_iblock:(0,7),576,32;f_blockstack:(0,140),608,1920;f_nlocals:(0,7),2528,32;f_ncells:(0,7),2560,32;f_nfreevars:(0,7),2592,32;f_stacksize:(0,7),2624,32;f_localsplus:(0,141),2656,32;;:t(0,136)=f(0,7)_is:T(0,137)=s36next:(0,142),0,32;tstate_head:(0,129),32,32;modules:(0,1),64,32;sysdict:(0,1),96,32;builtins:(0,1),128,32;codec_search_path:(0,1),160,32;codec_search_cache:(0,1),192,32;codec_error_registry:(0,1),224,32;dlopenflags:(0,7),256,32;;:t(0,138)=*(0,143):t(0,139)=*(0,1):t(0,140)=ar(0,144);0;19;(0,145):t(0,141)=ar(0,144);0;0;(0,1):t(0,142)=*(0,137)PyCodeObject:t(0,143)=(0,146)long unsigned int:t(0,144)=r(0,144);0;037777777777;PyTryBlock:t(0,145)=(0,147):T(0,146)=s64ob_refcnt:(0,7),0,32;ob_type:(0,8),32,32;co_argcount:(0,7),64,32;co_nlocals:(0,7),96,32;co_stacksize:(0,7),128,32;co_flags:(0,7),160,32;co_code:(0,1),192,32;co_consts:(0,1),224,32;co_names:(0,1),256,32;co_varnames:(0,1),288,32;co_freevars:(0,1),320,32;co_cellvars:(0,1),352,32;co_filename:(0,1),384,32;co_name:(0,1),416,32;co_firstlineno:(0,7),448,32;co_lnotab:(0,1),480,32;;:T(0,147)=s12b_type:(0,7),0,32;b_handler:(0,7),32,32;b_level:(0,7),64,32;;___Pyx_AddTraceback___pyx_filename___pyx_lineno__Pyx_AddTraceback:f(0,79)funcname:P(0,9)py_srcfile:(0,1)py_funcname:r(0,1)py_globals:(0,1)empty_tuple:r(0,1)empty_string:(0,1)py_code:(0,138)py_frame:(0,148):t(0,148)=*(0,149)PyFrameObject:t(0,149)=(0,135)___pyx_v_9_speedups_InstanceType___pyx_v_9_speedups_NoApplicableMethods___pyx_v_9_speedups_DispatchError___pyx_v_9_speedups__NF___pyx_v_9_speedups___nclassinit_speedups:F(0,79)__pyx_1:r(0,1)__pyx_2:(0,1)__pyx_3:r(0,1)t:r(0,150)t:r(0,151)t:r(0,151):t(0,150)=*(0,152):t(0,151)=*(0,153)__Pyx_InternTabEntry:t(0,152)=(0,154)__Pyx_StringTabEntry:t(0,153)=(0,155):T(0,154)=s8p:(0,139),0,32;s:(0,9),32,32;;:T(0,155)=s12p:(0,139),0,32;s:(0,9),32,32;n:(0,34),64,32;;___pyx_argnames.7067__pyx_f_9_speedups_12_ExtremeType___init__:f(0,7)__pyx_v_self:p(0,1)__pyx_args:p(0,1)__pyx_kwds:p(0,1)__pyx_v_cmpr:(0,1)__pyx_v_rep:(0,1)__pyx_r:r(0,7)__pyx_argnames:V(0,156):t(0,156)=ar(0,144);0;2;(0,9)__pyx_v_self:r(0,1)__pyx_args:r(0,1)__pyx_kwds:r(0,1)__pyx_f_9_speedups_12_ExtremeType___richcmp__:f(0,1)__pyx_v_self:p(0,1)__pyx_v_other:p(0,1)__pyx_v_op:p(0,7)__pyx_v_cmp:(0,1)__pyx_r:r(0,1)__pyx_1:(0,7)__pyx_2:r(0,1)__pyx_3:r(0,1)type:r(0,2)type:r(0,2)type:r(0,2)__pyx_f_9_speedups_12_ExtremeType___repr__:f(0,1)__pyx_v_self:p(0,1)__pyx_r:r(0,1)__pyx_v_self:r(0,1)__pyx_f_9_speedups_12_ExtremeType___cmp__:f(0,7)__pyx_v_self:p(0,1)__pyx_v_other:p(0,1)__pyx_r:r(0,7)__pyx_2:r(0,1)__pyx_3:r(0,1)___pyx_argnames.7666__pyx_f_9_speedups_9ExprCache___init__:f(0,7)__pyx_v_self:p(0,1)__pyx_args:p(0,1)__pyx_kwds:p(0,1)__pyx_v_argtuple:(0,1)__pyx_v_expr_defs:(0,1)__pyx_r:r(0,7)__pyx_1:r(0,1)__pyx_argnames:V(0,157):t(0,157)=ar(0,144);0;2;(0,9)__pyx_v_self:r(0,1)__pyx_args:r(0,1)__pyx_kwds:r(0,1)__pyx_f_9_speedups_14BaseDispatcher___getitem__:f(0,1)__pyx_v_self:p(0,1)__pyx_v_argtuple:p(0,1)__pyx_v_node:(0,1)__pyx_v_factory:(0,1)__pyx_v_func:(0,1)__pyx_v_cache:(0,1)__pyx_r:r(0,1)__pyx_1:(0,7)__pyx_2:(0,1)__pyx_3:(0,1)__pyx_4:(0,1)__pyx_5:r(0,1)__pyx_6:(0,1)__pyx_7:(0,1)__pyx_8:r(0,7)__pyx_9:(0,7)__pyx_10:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_why:r(0,7)__pyx_f_9_speedups_9ExprCache___getitem__:f(0,1)__pyx_v_self:p(0,1)__pyx_v_item:p(0,1)__pyx_v_f:(0,1)__pyx_v_args:(0,1)__pyx_r:r(0,1)__pyx_1:r(0,1)__pyx_2:(0,7)__pyx_3:(0,1)__pyx_4:r(0,1)name:(0,1)name:(0,1)name:r(0,1)item:r(0,1)name:r(0,1)item:r(0,1)item:r(0,1)name:r(0,1)name:r(0,1)__pyx_f_9_speedups_12_ExtremeType___hash__:f(0,34)__pyx_v_self:p(0,1)__pyx_r:r(0,34)long int:t(0,34)__pyx_1:r(0,1)__pyx_2:r(0,1)__pyx_3:(0,1)__pyx_4:r(0,34)name:r(0,1)name:r(0,1)___pyx_argnames.7317__pyx_f_9_speedups_concatenate_ranges:f(0,1)__pyx_self:p(0,1)__pyx_args:p(0,1)__pyx_kwds:p(0,1)__pyx_v_range_map:(0,1)__pyx_v_ranges:(0,1)__pyx_v_output:(0,1)__pyx_v_last:(0,1)__pyx_v_l:r(0,1)__pyx_v_h:(0,1)__pyx_r:r(0,1)__pyx_1:(0,1)__pyx_2:r(0,1)__pyx_3:(0,1)__pyx_4:(0,1)__pyx_5:(0,7)__pyx_argnames:V(0,158):t(0,158)=ar(0,144);0;1;(0,9)__pyx_args:r(0,1)__pyx_kwds:r(0,1)name:r(0,1)item:r(0,1)name:r(0,1)item:r(0,1)item:r(0,1)___pyx_argnames.7431__pyx_f_9_speedups_dispatch_by_inequalities:f(0,1)__pyx_self:p(0,1)__pyx_args:p(0,1)__pyx_kwds:p(0,1)__pyx_v_table:(0,1)__pyx_v_ob:(0,1)__pyx_v_lo:(0,7)__pyx_v_hi:(0,7)__pyx_v_key:r(0,1)__pyx_v_ranges:(0,1)__pyx_v_t:(0,1)__pyx_r:(0,1)__pyx_1:(0,1)__pyx_2:(0,7)__pyx_3:r(0,1)__pyx_4:(0,1)__pyx_argnames:V(0,159):t(0,159)=ar(0,144);0;2;(0,9)__pyx_args:r(0,1)__pyx_kwds:r(0,1)name:r(0,1)name:r(0,1)___pyx_argnames.7546__pyx_f_9_speedups_dispatch_by_mro:f(0,1)__pyx_self:p(0,1)__pyx_args:p(0,1)__pyx_kwds:p(0,1)__pyx_v_table:(0,1)__pyx_v_ob:(0,1)__pyx_v_bc:r(0,7)__pyx_v_bases:r(0,160)__pyx_v_klass:r(0,1)__pyx_v_err:(0,1)__pyx_r:r(0,1)__pyx_1:r(0,7):t(0,160)=*(0,161)PyTupleObject:t(0,161)=(0,162):T(0,162)=s16ob_refcnt:(0,7),0,32;ob_type:(0,8),32,32;ob_size:(0,7),64,32;ob_item:(0,141),96,32;;__pyx_argnames:V(0,163):t(0,163)=ar(0,144);0;2;(0,9)__pyx_args:r(0,1)__pyx_kwds:r(0,1)name:r(0,1)name:(0,1)name:r(0,1)name:(0,1)__pyx_m:S(0,1)__pyx_b:S(0,1)__pyx_lineno:S(0,7)__pyx_filename:S(0,9)char:t(0,55)__pyx_f:S(0,164):t(0,164)=*(0,9)__pyx_mdoc:S(0,165)__pyx_type_9_speedups__ExtremeType:S(0,4)__pyx_type_9_speedups_ExprCache:S(0,4)__pyx_type_9_speedups_BaseDispatcher:S(0,4)__pyx_ptype_9_speedups__ExtremeType:S(0,2)__pyx_ptype_9_speedups_ExprCache:S(0,2)__pyx_ptype_9_speedups_BaseDispatcher:S(0,2)__pyx_v_9_speedups_InstanceType:S(0,1)__pyx_v_9_speedups_NoApplicableMethods:S(0,1)__pyx_v_9_speedups_DispatchError:S(0,1)__pyx_v_9_speedups__NF:S(0,1)__pyx_v_9_speedups___nclass:S(0,1)__pyx_k1:S(0,166)__pyx_n___all__:S(0,1)__pyx_n_Max:S(0,1)__pyx_n_Min:S(0,1)__pyx_n_concatenate_ranges:S(0,1)__pyx_n_dispatch_by_inequalities:S(0,1)__pyx_n_dispatch_by_mro:S(0,1)__pyx_n_NoApplicableMethods:S(0,1)__pyx_n_DispatchError:S(0,1)__pyx_n_types:S(0,1)__pyx_n_InstanceType:S(0,1)__pyx_n___class__:S(0,1)__pyx_k1p:S(0,1)__pyx_n_object:S(0,1)__pyx_n___hash__:S(0,1)__pyx_n_keys:S(0,1)__pyx_n_sort:S(0,1)__pyx_n_append:S(0,1)__pyx_n_TypeError:S(0,1)__pyx_n_reseed:S(0,1)__pyx_k9p:S(0,1)__pyx_k10p:S(0,1)__pyx_k9:S(0,167)__pyx_k10:S(0,168)__pyx_doc_9_speedups_dispatch_by_mro:S(0,169)__pyx_n___getitem__:S(0,1)__pyx_n_IndexError:S(0,1)__pyx_n_KeyError:S(0,1)__pyx_n_map:S(0,1)__pyx_n__dispatcher:S(0,1)__pyx_n__startNode:S(0,1)__pyx_n__acquire:S(0,1)__pyx_n__release:S(0,1)__pyx_n_expr_defs:S(0,1)__pyx_intern_tab:S(0,170)__pyx_string_tab:S(0,171)__pyx_methods_9_speedups__ExtremeType:S(0,172)__pyx_tp_as_number__ExtremeType:S(0,62)__pyx_tp_as_sequence__ExtremeType:S(0,63)__pyx_tp_as_mapping__ExtremeType:S(0,64)__pyx_tp_as_buffer__ExtremeType:S(0,69)__pyx_methods_9_speedups_ExprCache:S(0,173)__pyx_tp_as_number_ExprCache:S(0,62)__pyx_tp_as_sequence_ExprCache:S(0,63)__pyx_tp_as_mapping_ExprCache:S(0,64)__pyx_tp_as_buffer_ExprCache:S(0,69)__pyx_methods_9_speedups_BaseDispatcher:S(0,174)__pyx_tp_as_number_BaseDispatcher:S(0,62)__pyx_tp_as_sequence_BaseDispatcher:S(0,63)__pyx_tp_as_mapping_BaseDispatcher:S(0,64)__pyx_tp_as_buffer_BaseDispatcher:S(0,69)__pyx_methods:S(0,175)__pyx_filenames:S(0,176):t(0,165)=ar(0,144);0;39;(0,55):t(0,166)=ar(0,144);0;19;(0,55):t(0,167)=ar(0,144);0;19;(0,55):t(0,168)=ar(0,144);0;20;(0,55):t(0,169)=ar(0,144);0;57;(0,55):t(0,170)=ar(0,144);0;27;(0,152):t(0,171)=ar(0,144);0;3;(0,153):t(0,172)=ar(0,144);0;0;(0,73):t(0,173)=ar(0,144);0;0;(0,73):t(0,174)=ar(0,144);0;0;(0,73):t(0,175)=ar(0,144);0;3;(0,73):t(0,176)=ar(0,144);0;0;(0,9)PK95@a!a!dispatch/assembler.pyfrom array import array from dis import * from new import code __all__ = ['Code'] opcode = {} for op in range(256): name=opname[op] if name.startswith('<'): continue if name.endswith('+0'): opcode[name[:-2]]=op opcode[name]=op globals().update(opcode) # opcodes are now importable at will __all__.extend(opcode.keys()) class Code: co_argcount = 0 co_stacksize = 0 co_flags = 0 co_filename = '' co_name = '' co_firstlineno = 0 co_freevars = () co_cellvars = () _last_lineofs = 0 stack_size = 0 def __init__(self): self.co_code = array('B') self.co_consts = [] self.co_names = [] self.co_varnames = [] self.co_lnotab = array('B') self.emit = self.co_code.append def code(self): return code( self.co_argcount, len(self.co_varnames), self.co_stacksize, self.co_flags, self.co_code.tostring(), tuple(self.co_consts), tuple(self.co_names), tuple(self.co_varnames), self.co_filename, self.co_name, self.co_firstlineno, self.co_lnotab.tostring(), self.co_freevars, self.co_cellvars ) def emit_arg(self, op, arg): emit = self.emit if arg>0xFFFF: emit(EXTENDED_ARG) emit((arg>>16)&255) emit((arg>>24)&255) emit(op) emit(arg&255) emit((arg>>8)&255) def set_lineno(self, lno): if not self.co_firstlineno: self.co_firstlineno = self._last_line = lno return append = self.co_lnotab.append incr_line = lno - self._last_line incr_addr = len(self.co_code) - self._last_lineofs if not incr_line: return assert incr_addr>=0 and incr_line>=0 while incr_addr>255: append(255) append(0) incr_addr -= 255 while incr_line>255: append(incr_addr) append(255) incr_line -= 255 incr_addr = 0 if incr_addr or incr_line: append(incr_addr) append(incr_line) self._last_line = lno self._last_lineofs = len(self.co_code) def stackchange(self, (inputs,outputs)): assert inputs<=self.stack_size, "Stack underflow" if inputs or outputs: ss = self.stack_size = self.stack_size + outputs - inputs if outputs>inputs and ss>self.co_stacksize: self.co_stacksize = ss def LOAD_CONST(self, const): self.stackchange((0,1)) try: arg = self.co_consts.index(const) except ValueError: arg = len(self.co_consts) self.co_consts.append(const) self.emit_arg(LOAD_CONST, arg) def CALL_FUNCTION(self, argc=0, kwargc=0, op=CALL_FUNCTION): self.stackchange((1+argc+2*kwargc,1)) emit = self.emit emit(op); emit(argc); emit(kwargc) def CALL_FUNCTION_VAR(self, argc=0, kwargc=0): self.stackchange((1,0)) # extra for *args self.CALL_FUNCTION(argc,kwargc,CALL_FUNCTION_VAR) def CALL_FUNCTION_KW(self, argc=0, kwargc=0): self.stackchange((1,0)) # extra for **kw self.CALL_FUNCTION(argc,kwargc,CALL_FUNCTION_KW) def CALL_FUNCTION_VAR_KW(self, argc=0, kwargc=0): self.stackchange((2,0)) # extra for *args, **kw self.CALL_FUNCTION(argc,kwargc,CALL_FUNCTION_VAR_KW) def BUILD_TUPLE(self, count): self.stackchange((count,1)) self.emit_arg(BUILD_TUPLE,count) def BUILD_LIST(self, count): self.stackchange((count,1)) self.emit_arg(BUILD_LIST,count) def UNPACK_SEQUENCE(self, count): self.stackchange((1,count)) self.emit_arg(UNPACK_SEQUENCE,count) def BUILD_SLICE(self, count): assert count in (2,3), "Invalid number of arguments for BUILD_SLICE" self.stackchange((count,1)) self.emit_arg(BUILD_SLICE,count) def DUP_TOPX(self,count): self.stackchange((count,count*2)) self.emit_arg(DUP_TOPX,count) def RAISE_VARARGS(self, argc): assert 0<=argc<=3, "Invalid number of arguments for RAISE_VARARGS" self.stackchange((argc,0)) self.emit_arg(RAISE_VARARGS,argc) def MAKE_FUNCTION(self, ndefaults): self.stackchange((1+ndefaults,1)) self.emit_arg(MAKE_FUNCTION, ndefaults) def MAKE_CLOSURE(self, ndefaults, freevars): self.stackchange((1+freevars+ndefaults,1)) self.emit_arg(MAKE_CLOSURE, ndefaults) def label(self): return len(self.co_code) def jump(self, op, arg=None): def backpatch(target): if op not in hasjabs: target = target - posn assert target>=0, "Relative jumps can't go backwards" self.co_code[posn-2] = target & 255 self.co_code[posn-1] = (target>>8) & 255 def lbl(): backpatch(self.label()) self.emit_arg(op,0) posn = self.label() if arg is not None: backpatch(arg) return lbl for op in hasname: if not hasattr(Code, opname[op]): def do_name(self, name, op=op): self.stackchange(stack_effects[op]) try: arg = self.co_names.index(name) except ValueError: arg = len(self.co_names) self.co_names.append(name) self.emit_arg(op, arg) setattr(Code, opname[op], do_name) for op in haslocal: if not hasattr(Code, opname[op]): def do_local(self, varname, op=op): self.stackchange(stack_effects[op]) try: arg = self.co_varnames.index(varname) except ValueError: arg = len(self.co_varnames) self.co_varnames.append(varname) self.emit_arg(op, arg) setattr(Code, opname[op], do_local) for op in hasjrel+hasjabs: if not hasattr(Code, opname[op]): def do_jump(self, address=None, op=op): self.stackchange(stack_effects[op]) return self.jump(op, address) setattr(Code, opname[op], do_jump) class _se: """Quick way of defining static stack effects of opcodes""" POP_TOP = 1,0 ROT_TWO = 2,2 ROT_THREE = 3,3 ROT_FOUR = 4,4 DUP_TOP = 1,2 UNARY_POSITIVE = UNARY_NEGATIVE = UNARY_NOT = UNARY_CONVERT = \ UNARY_INVERT = GET_ITER = LOAD_ATTR = IMPORT_FROM = 1,1 BINARY_POWER = BINARY_MULTIPLY = BINARY_DIVIDE = BINARY_FLOOR_DIVIDE = \ BINARY_TRUE_DIVIDE = BINARY_MODULO = BINARY_ADD = BINARY_SUBTRACT = \ BINARY_SUBSCR = BINARY_LSHIFT = BINARY_RSHIFT = BINARY_AND = \ BINARY_XOR = BINARY_OR = COMPARE_OP = 2,1 INPLACE_POWER = INPLACE_MULTIPLY = INPLACE_DIVIDE = \ INPLACE_FLOOR_DIVIDE = INPLACE_TRUE_DIVIDE = INPLACE_MODULO = \ INPLACE_ADD = INPLACE_SUBTRACT = INPLACE_LSHIFT = INPLACE_RSHIFT = \ INPLACE_AND = INPLACE_XOR = INPLACE_OR = 2,1 SLICE_0, SLICE_1, SLICE_2, SLICE_3 = \ (1,1),(2,1),(2,1),(3,1) STORE_SLICE_0, STORE_SLICE_1, STORE_SLICE_2, STORE_SLICE_3 = \ (2,0),(3,0),(3,0),(4,0) DELETE_SLICE_0, DELETE_SLICE_1, DELETE_SLICE_2, DELETE_SLICE_3 = \ (1,0),(2,0),(2,0),(3,0) STORE_SUBSCR = 3,0 DELETE_SUBSCR = STORE_ATTR = 2,0 DELETE_ATTR = STORE_DEREF = 1,0 PRINT_EXPR = PRINT_ITEM = PRINT_NEWLINE_TO = IMPORT_STAR = 1,0 RETURN_VALUE = YIELD_VALUE = STORE_NAME = STORE_GLOBAL = STORE_FAST = 1,0 PRINT_ITEM_TO = LIST_APPEND = 2,0 LOAD_LOCALS = LOAD_CONST = LOAD_NAME = LOAD_GLOBAL = LOAD_FAST = \ LOAD_CLOSURE = LOAD_DEREF = IMPORT_NAME = BUILD_MAP = 0,1 EXEC_STMT = BUILD_CLASS = 3,0 stack_effects = [(0,0)]*256 for name in opcode: op = opcode[name] name = name.replace('+','_') if hasattr(_se,name): # update stack effects table from the _se class stack_effects[op] = getattr(_se,name) if not hasattr(Code,name): # Create default method for Code class if op>=HAVE_ARGUMENT: def do_op(self,arg,op=op,se=stack_effects[op]): self.stackchange(se); self.emit_arg(op,arg) else: def do_op(self,op=op,se=stack_effects[op]): self.stackchange(se); self.emit(op) setattr(Code, name, do_op) PK9566dispatch/assembler.pyc; ]Ec@sdklZdkTdklZdgZhZxaedD]SZeeZ e i doq=ne i doeee d scCsLtd|_g|_g|_g|_td|_|ii|_dS(NsB( sarraysselfsco_codes co_constssco_namess co_varnamess co_lnotabsappendsemit(sself((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys__init__6s    cCst|it|i|i|i|iit |i t |i t |i|i |i |i|ii|i|iSdS(N(scodesselfs co_argcountslens co_varnamess co_stacksizesco_flagssco_codestostringstuples co_constssco_namess co_filenamesco_namesco_firstlinenos co_lnotabs co_freevarss co_cellvars(sself((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pyscode>s  cCsv|i}|djo2|t||d?d@||d?d@n||||d@||d?d@dS(Niiiii(sselfsemitsargs EXTENDED_ARGsop(sselfsopsargsemit((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pysemit_argIs    cCs4|i o||_|_dSn|ii}||i}t|i|i }| odSn|djo |djpt x0|djo"|d|d|d8}qWx6|djo(|||d|d8}d}qW|p|o||||n||_t|i|_ dS(Nii( sselfsco_firstlinenoslnos _last_lines co_lnotabsappends incr_lineslensco_codes _last_lineofss incr_addrsAssertionError(sselfslnos incr_addrs incr_linesappend((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys set_linenoSs2   !          cCs~|\}}||ijp td|p|oF|i||}|_||jo ||ijo ||_qzndS(NsStack underflow(sinputssoutputssselfs stack_sizesAssertionErrorssss co_stacksize(sselfs.2sinputssoutputssss((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys stackchangers cCsr|iddfy|ii|}Wn2tj o&t|i}|ii|nX|i t |dS(Nii( sselfs stackchanges co_constssindexsconstsargs ValueErrorslensappendsemit_args LOAD_CONST(sselfsconstsarg((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys LOAD_CONST|scCsJ|id|d|df|i}||||||dS(Nii(sselfs stackchangesargcskwargcsemitsop(sselfsargcskwargcsopsemit((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys CALL_FUNCTIONs cCs*|iddf|i||tdS(Nii(sselfs stackchanges CALL_FUNCTIONsargcskwargcsCALL_FUNCTION_VAR(sselfsargcskwargc((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pysCALL_FUNCTION_VARscCs*|iddf|i||tdS(Nii(sselfs stackchanges CALL_FUNCTIONsargcskwargcsCALL_FUNCTION_KW(sselfsargcskwargc((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pysCALL_FUNCTION_KWscCs*|iddf|i||tdS(Nii(sselfs stackchanges CALL_FUNCTIONsargcskwargcsCALL_FUNCTION_VAR_KW(sselfsargcskwargc((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pysCALL_FUNCTION_VAR_KWscCs'|i|df|it|dS(Ni(sselfs stackchangescountsemit_args BUILD_TUPLE(sselfscount((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys BUILD_TUPLEscCs'|i|df|it|dS(Ni(sselfs stackchangescountsemit_args BUILD_LIST(sselfscount((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys BUILD_LISTscCs'|id|f|it|dS(Ni(sselfs stackchangescountsemit_argsUNPACK_SEQUENCE(sselfscount((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pysUNPACK_SEQUENCEscCsD|ddfjp td|i|df|it|dS(Niis+Invalid number of arguments for BUILD_SLICEi(scountsAssertionErrorsselfs stackchangesemit_args BUILD_SLICE(sselfscount((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys BUILD_SLICEscCs+|i||df|it|dS(Ni(sselfs stackchangescountsemit_argsDUP_TOPX(sselfscount((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pysDUP_TOPXscCsOd|jo djnp td|i|df|it|dS(Niis-Invalid number of arguments for RAISE_VARARGS(sargcsAssertionErrorsselfs stackchangesemit_args RAISE_VARARGS(sselfsargc((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys RAISE_VARARGSs(cCs+|id|df|it|dS(Ni(sselfs stackchanges ndefaultssemit_args MAKE_FUNCTION(sselfs ndefaults((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys MAKE_FUNCTIONscCs/|id||df|it|dS(Ni(sselfs stackchangesfreevarss ndefaultssemit_args MAKE_CLOSURE(sselfs ndefaultssfreevars((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys MAKE_CLOSUREscCst|iSdS(N(slensselfsco_code(sself((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pyslabelscs`dd}idi|tj o|n|SdS(Ncsdtjo%|}|djp tdn|d@id<|d?d@idZ?Z@ddfZAZBZCZDZEddfZFZGddfZHZIZJZKZLZMZNZOZPddfZQZRRS(s5Quick way of defining static stack effects of opcodesiiiii(Ss__name__s __module__s__doc__sPOP_TOPsROT_TWOs ROT_THREEsROT_FOURsDUP_TOPsUNARY_POSITIVEsUNARY_NEGATIVEs UNARY_NOTs UNARY_CONVERTs UNARY_INVERTsGET_ITERs LOAD_ATTRs IMPORT_FROMs BINARY_POWERsBINARY_MULTIPLYs BINARY_DIVIDEsBINARY_FLOOR_DIVIDEsBINARY_TRUE_DIVIDEs BINARY_MODULOs BINARY_ADDsBINARY_SUBTRACTs BINARY_SUBSCRs BINARY_LSHIFTs BINARY_RSHIFTs BINARY_ANDs BINARY_XORs BINARY_ORs COMPARE_OPs INPLACE_POWERsINPLACE_MULTIPLYsINPLACE_DIVIDEsINPLACE_FLOOR_DIVIDEsINPLACE_TRUE_DIVIDEsINPLACE_MODULOs INPLACE_ADDsINPLACE_SUBTRACTsINPLACE_LSHIFTsINPLACE_RSHIFTs INPLACE_ANDs INPLACE_XORs INPLACE_ORsSLICE_0sSLICE_1sSLICE_2sSLICE_3s STORE_SLICE_0s STORE_SLICE_1s STORE_SLICE_2s STORE_SLICE_3sDELETE_SLICE_0sDELETE_SLICE_1sDELETE_SLICE_2sDELETE_SLICE_3s STORE_SUBSCRs DELETE_SUBSCRs STORE_ATTRs DELETE_ATTRs STORE_DEREFs PRINT_EXPRs PRINT_ITEMsPRINT_NEWLINE_TOs IMPORT_STARs RETURN_VALUEs YIELD_VALUEs STORE_NAMEs STORE_GLOBALs STORE_FASTs PRINT_ITEM_TOs LIST_APPENDs LOAD_LOCALSs LOAD_CONSTs LOAD_NAMEs LOAD_GLOBALs LOAD_FASTs LOAD_CLOSUREs LOAD_DEREFs IMPORT_NAMEs BUILD_MAPs EXEC_STMTs BUILD_CLASS(((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys_ses(      (D<666 ,is+s_cCs!|i||i||dS(N(sselfs stackchangessesemit_argsopsarg(sselfsargsopsse((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pysdo_op-scCs|i||i|dS(N(sselfs stackchangessesemitsop(sselfsopsse((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pysdo_op0sN(!sarraysdissnewscodes__all__sopcodesrangesopsopnamesnames startswithsendswithsglobalssupdatesextendskeyssCodeshasnameshasattrsdo_namessetattrshaslocalsdo_localshasjrelshasjabssNonesdo_jumps_ses stack_effectssreplacesgetattrs HAVE_ARGUMENTsdo_op( scodesarraysdo_names__all__sdo_jumpsdo_localsdo_ops stack_effectssCodesnames_sesopcodesop((s7build/bdist.darwin-8.7.1-i386/egg/dispatch/assembler.pys?sV         )  PK95b)dispatch/assembler.txt====================================================== Generating Python Bytecode with ``dispatch.assembler`` ====================================================== >>> from dispatch.assembler import * >>> from dis import dis Line number tracking: >>> def simple_code(flno, slno, consts=1, ): ... c = Code() ... c.set_lineno(flno) ... for i in range(consts): c.LOAD_CONST(None) ... c.set_lineno(slno) ... c.RETURN_VALUE() ... return c.code() >>> dis(simple_code(1,1)) 1 0 LOAD_CONST 0 (None) 3 RETURN_VALUE >>> simple_code(1,1).co_stacksize 1 >>> dis(simple_code(13,414)) 13 0 LOAD_CONST 0 (None) 414 3 RETURN_VALUE >>> dis(simple_code(13,14,100)) 13 0 LOAD_CONST 0 (None) 3 LOAD_CONST 0 (None) ... 14 300 RETURN_VALUE >>> simple_code(13,14,100).co_stacksize 100 >>> dis(simple_code(13,572,120)) 13 0 LOAD_CONST 0 (None) 3 LOAD_CONST 0 (None) ... 572 360 RETURN_VALUE Stack size tracking: >>> c = Code() >>> c.LOAD_CONST(1) >>> c.POP_TOP() >>> c.LOAD_CONST(2) >>> c.LOAD_CONST(3) >>> c.co_stacksize 2 >>> c.BINARY_ADD() >>> c.LOAD_CONST(4) >>> c.co_stacksize 2 >>> c.LOAD_CONST(5) >>> c.LOAD_CONST(6) >>> c.co_stacksize 4 >>> c.POP_TOP() >>> c.stack_size 3 Stack underflow detection/recovery, and global/local variable names: >>> c = Code() >>> c.LOAD_GLOBAL('foo') >>> c.stack_size 1 >>> c.STORE_ATTR('bar') # drops stack by 2 Traceback (most recent call last): ... AssertionError: Stack underflow >>> c.co_names # 'bar' isn't added unless success ['foo'] >>> c.LOAD_ATTR('bar') >>> c.co_names ['foo', 'bar'] >>> c.DELETE_FAST('baz') >>> c.co_varnames ['baz'] >>> dis(c.code()) 0 0 LOAD_GLOBAL 0 (foo) 3 LOAD_ATTR 1 (bar) 6 DELETE_FAST 0 (baz) Sequence operators and stack tracking: Function calls and raise: >>> c = Code() >>> c.LOAD_GLOBAL('locals') >>> c.CALL_FUNCTION() # argc/kwargc default to 0 >>> c.POP_TOP() >>> c.LOAD_GLOBAL('foo') >>> c.LOAD_CONST(1) >>> c.LOAD_CONST('x') >>> c.LOAD_CONST(2) >>> c.CALL_FUNCTION(1,1) # argc, kwargc >>> c.POP_TOP() >>> dis(c.code()) 0 0 LOAD_GLOBAL 0 (locals) 3 CALL_FUNCTION 0 6 POP_TOP 7 LOAD_GLOBAL 1 (foo) 10 LOAD_CONST 0 (1) 13 LOAD_CONST 1 ('x') 16 LOAD_CONST 2 (2) 19 CALL_FUNCTION 257 22 POP_TOP >>> c = Code() >>> c.LOAD_GLOBAL('foo') >>> c.LOAD_CONST(1) >>> c.LOAD_CONST('x') >>> c.LOAD_CONST(2) >>> c.BUILD_MAP(0) >>> c.stack_size 5 >>> c.CALL_FUNCTION_KW(1,1) >>> c.POP_TOP() >>> c.stack_size 0 >>> c = Code() >>> c.LOAD_GLOBAL('foo') >>> c.LOAD_CONST(1) >>> c.LOAD_CONST('x') >>> c.LOAD_CONST(1) >>> c.BUILD_TUPLE(1) >>> c.CALL_FUNCTION_VAR(0,1) >>> c.POP_TOP() >>> c.stack_size 0 >>> c = Code() >>> c.LOAD_GLOBAL('foo') >>> c.LOAD_CONST(1) >>> c.LOAD_CONST('x') >>> c.LOAD_CONST(1) >>> c.BUILD_TUPLE(1) >>> c.BUILD_MAP(0) >>> c.CALL_FUNCTION_VAR_KW(0,1) >>> c.POP_TOP() >>> c.stack_size 0 >>> c = Code() >>> c.RAISE_VARARGS(0) >>> c.RAISE_VARARGS(1) Traceback (most recent call last): ... AssertionError: Stack underflow >>> c.LOAD_CONST(1) >>> c.RAISE_VARARGS(1) >>> dis(c.code()) 0 0 RAISE_VARARGS 0 3 LOAD_CONST 0 (1) 6 RAISE_VARARGS 1 Sequence building, unpacking, dup'ing: >>> c = Code() >>> c.LOAD_CONST(1) >>> c.LOAD_CONST(2) >>> c.BUILD_TUPLE(3) Traceback (most recent call last): ... AssertionError: Stack underflow >>> c.BUILD_LIST(3) Traceback (most recent call last): ... AssertionError: Stack underflow >>> c.BUILD_TUPLE(2) >>> c.stack_size 1 >>> c.UNPACK_SEQUENCE(2) >>> c.stack_size 2 >>> c.DUP_TOPX(3) Traceback (most recent call last): ... AssertionError: Stack underflow >>> c.DUP_TOPX(2) >>> c.stack_size 4 >>> c.LOAD_CONST(3) >>> c.BUILD_LIST(5) >>> c.stack_size 1 >>> c.UNPACK_SEQUENCE(5) >>> c.BUILD_SLICE(3) >>> c.stack_size 3 >>> c.BUILD_SLICE(3) >>> c.stack_size 1 >>> c.BUILD_SLICE(2) Traceback (most recent call last): ... AssertionError: Stack underflow >>> dis(c.code()) 0 0 LOAD_CONST 0 (1) 3 LOAD_CONST 1 (2) 6 BUILD_TUPLE 2 9 UNPACK_SEQUENCE 2 12 DUP_TOPX 2 15 LOAD_CONST 2 (3) 18 BUILD_LIST 5 21 UNPACK_SEQUENCE 5 24 BUILD_SLICE 3 27 BUILD_SLICE 3 XXX Need tests for MAKE_CLOSURE/MAKE_FUNCTION Labels and backpatching forward references: >>> c = Code() >>> ref = c.JUMP_ABSOLUTE() >>> c.LOAD_CONST(1) >>> ref() >>> c.RETURN_VALUE() >>> dis(c.code()) 0 0 JUMP_ABSOLUTE 6 3 LOAD_CONST 0 (1) >> 6 RETURN_VALUE >>> c = Code() >>> ref = c.JUMP_FORWARD() >>> c.LOAD_CONST(1) >>> ref() >>> c.RETURN_VALUE() >>> dis(c.code()) 0 0 JUMP_FORWARD 3 (to 6) 3 LOAD_CONST 0 (1) >> 6 RETURN_VALUE >>> c = Code() >>> lbl = c.label() >>> c.LOAD_CONST(1) >>> c.JUMP_IF_TRUE(lbl) Traceback (most recent call last): ... AssertionError: Relative jumps can't go backwards >>> c = Code() >>> lbl = c.label() >>> c.LOAD_CONST(1) >>> ref = c.JUMP_