fix for slot descriptor
authorStefan Behnel <scoder@users.berlios.de>
Thu, 15 May 2008 15:45:10 +0000 (17:45 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 15 May 2008 15:45:10 +0000 (17:45 +0200)
Cython/Compiler/TypeSlots.py

index 9f06a445532e9f1a3536716cf9d97b13f6141055..c697a1260d57e98ca09a8de7f93b57266f061ae2 100644 (file)
@@ -213,8 +213,8 @@ class InternalMethodSlot(SlotDescriptor):
     #
     #  slot_name    string           Member name of the slot in the type object
 
-    def __init__(self, slot_name, py3k = True):
-        SlotDescriptor.__init__(self, slot_name, py3k = py3k)
+    def __init__(self, slot_name):
+        SlotDescriptor.__init__(self, slot_name)
 
     def slot_code(self, scope):
         return scope.mangle_internal(self.slot_name)
@@ -272,8 +272,8 @@ class SyntheticSlot(InternalMethodSlot):
     #  alternative default value will be placed in the type
     #  slot.
     
-    def __init__(self, slot_name, user_methods, default_value, py3k = True):
-        InternalMethodSlot.__init__(self, slot_name, py3k = py3k)
+    def __init__(self, slot_name, user_methods, default_value):
+        InternalMethodSlot.__init__(self, slot_name)
         self.user_methods = user_methods
         self.default_value = default_value
     
@@ -579,7 +579,7 @@ PySequenceMethods = (
     SyntheticSlot("sq_item", ["__getitem__"], "0"),    #EmptySlot("sq_item"),   # mp_subscript used instead
     MethodSlot(ssizessizeargfunc, "sq_slice", "__getslice__"),
     EmptySlot("sq_ass_item"), # mp_ass_subscript used instead
-    SyntheticSlot("sq_ass_slice", ["__setslice__", "__delslice__"], "0", py3k = False),
+    SyntheticSlot("sq_ass_slice", ["__setslice__", "__delslice__"], "0"),
     MethodSlot(cmpfunc, "sq_contains", "__contains__"),
     EmptySlot("sq_inplace_concat"), # nb_inplace_add used instead
     EmptySlot("sq_inplace_repeat"), # nb_inplace_multiply used instead