@@ -66,31 +66,20 @@ def __init__(self, python_version=PYTHON_VERSION):
6666 from xpython .byteop .byteop26 import ByteOp26
6767 self .byteop = ByteOp26 (self )
6868 pass
69- elif int_vers == 25 :
70- from xpython .byteop .byteop25 import ByteOp25
71- self .byteop = ByteOp25 (self )
72- pass
7369 pass
7470 else :
7571 # 3.0 or greater
76- if int_vers < 34 :
77- if int_vers == 32 :
78- from xpython .byteop . byteop32 import ByteOp32
79- self . byteop = ByteOp32 ( self )
80- elif int_vers == 33 :
81- from xpython .byteop . byteop33 import ByteOp33
82- self . byteop = ByteOp33 ( self )
83- else :
84- self .byteop = None
72+ if int_vers == 33 :
73+ from xpython . byteop . byteop33 import ByteOp33
74+ self .byteop = ByteOp33 ( self )
75+ elif int_vers == 34 :
76+ from xpython . byteop . byteop34 import ByteOp34
77+ self .byteop = ByteOp34 ( self )
78+ elif int_vers == 35 :
79+ from xpython . byteop . byteop35 import ByteOp35
80+ self .byteop = ByteOp35 ( self )
8581 else :
86- if int_vers == 34 :
87- from xpython .byteop .byteop34 import ByteOp34
88- self .byteop = ByteOp34 (self )
89- elif int_vers == 35 :
90- from xpython .byteop .byteop35 import ByteOp35
91- self .byteop = ByteOp35 (self )
92- else :
93- self .byteop = None
82+ self .byteop = None
9483
9584 def top (self ):
9685 """Return the value at the top of the stack, with no changes."""
@@ -735,7 +724,7 @@ def byte_SETUP_WITH(self, dest):
735724 ## Functions
736725
737726 def byte_MAKE_CLOSURE (self , argc ):
738- if PYTHON_VERSION >= 3.3 :
727+ if PYTHON3 :
739728 # TODO: the py3 docs don't mention this change.
740729 name = self .pop ()
741730 else :
@@ -774,7 +763,7 @@ def call_function(self, arg, args, kwargs):
774763 func = self .pop ()
775764 if hasattr (func , "im_func" ):
776765 # Methods get self as an implicit first parameter.
777- if func .im_self :
766+ if func .im_self is not None :
778767 posargs .insert (0 , func .im_self )
779768 # The first parameter must be the correct type.
780769 if not isinstance (posargs [0 ], func .im_class ):
0 commit comments