Untabify C files. Will watch buildbots.
diff --git a/Objects/abstract.c b/Objects/abstract.c
index fddaed8..761e035 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -6,7 +6,7 @@
 #include "longintrepr.h"
 
 #define NEW_STYLE_NUMBER(o) PyType_HasFeature((o)->ob_type, \
-				Py_TPFLAGS_CHECKTYPES)
+                Py_TPFLAGS_CHECKTYPES)
 
 
 /* Shorthands to return certain errors */
@@ -14,17 +14,17 @@
 static PyObject *
 type_error(const char *msg, PyObject *obj)
 {
-	PyErr_Format(PyExc_TypeError, msg, obj->ob_type->tp_name);
-	return NULL;
+    PyErr_Format(PyExc_TypeError, msg, obj->ob_type->tp_name);
+    return NULL;
 }
 
 static PyObject *
 null_error(void)
 {
-	if (!PyErr_Occurred())
-		PyErr_SetString(PyExc_SystemError,
-				"null argument to internal routine");
-	return NULL;
+    if (!PyErr_Occurred())
+        PyErr_SetString(PyExc_SystemError,
+                        "null argument to internal routine");
+    return NULL;
 }
 
 /* Operations on any object */
@@ -32,53 +32,53 @@
 int
 PyObject_Cmp(PyObject *o1, PyObject *o2, int *result)
 {
-	int r;
+    int r;
 
-	if (o1 == NULL || o2 == NULL) {
-		null_error();
-		return -1;
-	}
-	r = PyObject_Compare(o1, o2);
-	if (PyErr_Occurred())
-		return -1;
-	*result = r;
-	return 0;
+    if (o1 == NULL || o2 == NULL) {
+        null_error();
+        return -1;
+    }
+    r = PyObject_Compare(o1, o2);
+    if (PyErr_Occurred())
+        return -1;
+    *result = r;
+    return 0;
 }
 
 PyObject *
 PyObject_Type(PyObject *o)
 {
-	PyObject *v;
+    PyObject *v;
 
-	if (o == NULL)
-		return null_error();
-	v = (PyObject *)o->ob_type;
-	Py_INCREF(v);
-	return v;
+    if (o == NULL)
+        return null_error();
+    v = (PyObject *)o->ob_type;
+    Py_INCREF(v);
+    return v;
 }
 
 Py_ssize_t
 PyObject_Size(PyObject *o)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (o == NULL) {
-		null_error();
-		return -1;
-	}
+    if (o == NULL) {
+        null_error();
+        return -1;
+    }
 
-	m = o->ob_type->tp_as_sequence;
-	if (m && m->sq_length)
-		return m->sq_length(o);
+    m = o->ob_type->tp_as_sequence;
+    if (m && m->sq_length)
+        return m->sq_length(o);
 
-	return PyMapping_Size(o);
+    return PyMapping_Size(o);
 }
 
 #undef PyObject_Length
 Py_ssize_t
 PyObject_Length(PyObject *o)
 {
-	return PyObject_Size(o);
+    return PyObject_Size(o);
 }
 #define PyObject_Length PyObject_Size
 
@@ -92,266 +92,266 @@
 Py_ssize_t
 _PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
 {
-	static PyObject *hintstrobj = NULL;
-	PyObject *ro, *hintmeth;
-	Py_ssize_t rv;
+    static PyObject *hintstrobj = NULL;
+    PyObject *ro, *hintmeth;
+    Py_ssize_t rv;
 
-	/* try o.__len__() */
-	rv = PyObject_Size(o);
-	if (rv >= 0)
-		return rv;
-	if (PyErr_Occurred()) {
-		if (!PyErr_ExceptionMatches(PyExc_TypeError) &&
-			!PyErr_ExceptionMatches(PyExc_AttributeError))
-				return -1;
-		PyErr_Clear();
-	}
+    /* try o.__len__() */
+    rv = PyObject_Size(o);
+    if (rv >= 0)
+        return rv;
+    if (PyErr_Occurred()) {
+        if (!PyErr_ExceptionMatches(PyExc_TypeError) &&
+            !PyErr_ExceptionMatches(PyExc_AttributeError))
+                return -1;
+        PyErr_Clear();
+    }
 
-	if (PyInstance_Check(o))
-		return defaultvalue;
-	/* try o.__length_hint__() */
-        hintmeth = _PyObject_LookupSpecial(o, "__length_hint__", &hintstrobj);
-	if (hintmeth == NULL) {
-		if (PyErr_Occurred())
-			return -1;
-		else
-			return defaultvalue;
-	}
-	ro = PyObject_CallFunctionObjArgs(hintmeth, NULL);
-	Py_DECREF(hintmeth);
-	if (ro == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_TypeError) &&
-		    !PyErr_ExceptionMatches(PyExc_AttributeError))
-			return -1;
-		PyErr_Clear();
-		return defaultvalue;
-	}
-	rv = PyLong_Check(ro) ? PyLong_AsSsize_t(ro) : defaultvalue;
-	Py_DECREF(ro);
-	return rv;
+    if (PyInstance_Check(o))
+        return defaultvalue;
+    /* try o.__length_hint__() */
+    hintmeth = _PyObject_LookupSpecial(o, "__length_hint__", &hintstrobj);
+    if (hintmeth == NULL) {
+        if (PyErr_Occurred())
+            return -1;
+        else
+            return defaultvalue;
+    }
+    ro = PyObject_CallFunctionObjArgs(hintmeth, NULL);
+    Py_DECREF(hintmeth);
+    if (ro == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_TypeError) &&
+            !PyErr_ExceptionMatches(PyExc_AttributeError))
+            return -1;
+        PyErr_Clear();
+        return defaultvalue;
+    }
+    rv = PyLong_Check(ro) ? PyLong_AsSsize_t(ro) : defaultvalue;
+    Py_DECREF(ro);
+    return rv;
 }
 
 PyObject *
 PyObject_GetItem(PyObject *o, PyObject *key)
 {
-	PyMappingMethods *m;
+    PyMappingMethods *m;
 
-	if (o == NULL || key == NULL)
-		return null_error();
+    if (o == NULL || key == NULL)
+        return null_error();
 
-	m = o->ob_type->tp_as_mapping;
-	if (m && m->mp_subscript)
-		return m->mp_subscript(o, key);
+    m = o->ob_type->tp_as_mapping;
+    if (m && m->mp_subscript)
+        return m->mp_subscript(o, key);
 
-	if (o->ob_type->tp_as_sequence) {
-		if (PyIndex_Check(key)) {
-			Py_ssize_t key_value;
-			key_value = PyNumber_AsSsize_t(key, PyExc_IndexError);
-			if (key_value == -1 && PyErr_Occurred())
-				return NULL;
-			return PySequence_GetItem(o, key_value);
-		}
-		else if (o->ob_type->tp_as_sequence->sq_item)
-			return type_error("sequence index must "
-					  "be integer, not '%.200s'", key);
-	}
+    if (o->ob_type->tp_as_sequence) {
+        if (PyIndex_Check(key)) {
+            Py_ssize_t key_value;
+            key_value = PyNumber_AsSsize_t(key, PyExc_IndexError);
+            if (key_value == -1 && PyErr_Occurred())
+                return NULL;
+            return PySequence_GetItem(o, key_value);
+        }
+        else if (o->ob_type->tp_as_sequence->sq_item)
+            return type_error("sequence index must "
+                              "be integer, not '%.200s'", key);
+    }
 
-	return type_error("'%.200s' object is not subscriptable", o);
+    return type_error("'%.200s' object is not subscriptable", o);
 }
 
 int
 PyObject_SetItem(PyObject *o, PyObject *key, PyObject *value)
 {
-	PyMappingMethods *m;
+    PyMappingMethods *m;
 
-	if (o == NULL || key == NULL || value == NULL) {
-		null_error();
-		return -1;
-	}
-	m = o->ob_type->tp_as_mapping;
-	if (m && m->mp_ass_subscript)
-		return m->mp_ass_subscript(o, key, value);
+    if (o == NULL || key == NULL || value == NULL) {
+        null_error();
+        return -1;
+    }
+    m = o->ob_type->tp_as_mapping;
+    if (m && m->mp_ass_subscript)
+        return m->mp_ass_subscript(o, key, value);
 
-	if (o->ob_type->tp_as_sequence) {
-		if (PyIndex_Check(key)) {
-			Py_ssize_t key_value;
-			key_value = PyNumber_AsSsize_t(key, PyExc_IndexError);
-			if (key_value == -1 && PyErr_Occurred())
-				return -1;
-			return PySequence_SetItem(o, key_value, value);
-		}
-		else if (o->ob_type->tp_as_sequence->sq_ass_item) {
-			type_error("sequence index must be "
-				   "integer, not '%.200s'", key);
-			return -1;
-		}
-	}
+    if (o->ob_type->tp_as_sequence) {
+        if (PyIndex_Check(key)) {
+            Py_ssize_t key_value;
+            key_value = PyNumber_AsSsize_t(key, PyExc_IndexError);
+            if (key_value == -1 && PyErr_Occurred())
+                return -1;
+            return PySequence_SetItem(o, key_value, value);
+        }
+        else if (o->ob_type->tp_as_sequence->sq_ass_item) {
+            type_error("sequence index must be "
+                       "integer, not '%.200s'", key);
+            return -1;
+        }
+    }
 
-	type_error("'%.200s' object does not support item assignment", o);
-	return -1;
+    type_error("'%.200s' object does not support item assignment", o);
+    return -1;
 }
 
 int
 PyObject_DelItem(PyObject *o, PyObject *key)
 {
-	PyMappingMethods *m;
+    PyMappingMethods *m;
 
-	if (o == NULL || key == NULL) {
-		null_error();
-		return -1;
-	}
-	m = o->ob_type->tp_as_mapping;
-	if (m && m->mp_ass_subscript)
-		return m->mp_ass_subscript(o, key, (PyObject*)NULL);
+    if (o == NULL || key == NULL) {
+        null_error();
+        return -1;
+    }
+    m = o->ob_type->tp_as_mapping;
+    if (m && m->mp_ass_subscript)
+        return m->mp_ass_subscript(o, key, (PyObject*)NULL);
 
-	if (o->ob_type->tp_as_sequence) {
-		if (PyIndex_Check(key)) {
-			Py_ssize_t key_value;
-			key_value = PyNumber_AsSsize_t(key, PyExc_IndexError);
-			if (key_value == -1 && PyErr_Occurred())
-				return -1;
-			return PySequence_DelItem(o, key_value);
-		}
-		else if (o->ob_type->tp_as_sequence->sq_ass_item) {
-			type_error("sequence index must be "
-				   "integer, not '%.200s'", key);
-			return -1;
-		}
-	}
+    if (o->ob_type->tp_as_sequence) {
+        if (PyIndex_Check(key)) {
+            Py_ssize_t key_value;
+            key_value = PyNumber_AsSsize_t(key, PyExc_IndexError);
+            if (key_value == -1 && PyErr_Occurred())
+                return -1;
+            return PySequence_DelItem(o, key_value);
+        }
+        else if (o->ob_type->tp_as_sequence->sq_ass_item) {
+            type_error("sequence index must be "
+                       "integer, not '%.200s'", key);
+            return -1;
+        }
+    }
 
-	type_error("'%.200s' object does not support item deletion", o);
-	return -1;
+    type_error("'%.200s' object does not support item deletion", o);
+    return -1;
 }
 
 int
 PyObject_DelItemString(PyObject *o, char *key)
 {
-	PyObject *okey;
-	int ret;
+    PyObject *okey;
+    int ret;
 
-	if (o == NULL || key == NULL) {
-		null_error();
-		return -1;
-	}
-	okey = PyString_FromString(key);
-	if (okey == NULL)
-		return -1;
-	ret = PyObject_DelItem(o, okey);
-	Py_DECREF(okey);
-	return ret;
+    if (o == NULL || key == NULL) {
+        null_error();
+        return -1;
+    }
+    okey = PyString_FromString(key);
+    if (okey == NULL)
+        return -1;
+    ret = PyObject_DelItem(o, okey);
+    Py_DECREF(okey);
+    return ret;
 }
 
 int
 PyObject_AsCharBuffer(PyObject *obj,
-			  const char **buffer,
-			  Py_ssize_t *buffer_len)
+                          const char **buffer,
+                          Py_ssize_t *buffer_len)
 {
-	PyBufferProcs *pb;
-	char *pp;
-	Py_ssize_t len;
+    PyBufferProcs *pb;
+    char *pp;
+    Py_ssize_t len;
 
-	if (obj == NULL || buffer == NULL || buffer_len == NULL) {
-		null_error();
-		return -1;
-	}
-	pb = obj->ob_type->tp_as_buffer;
-	if (pb == NULL ||
-	     pb->bf_getcharbuffer == NULL ||
-	     pb->bf_getsegcount == NULL) {
-		PyErr_SetString(PyExc_TypeError,
-				"expected a character buffer object");
-		return -1;
-	}
-	if ((*pb->bf_getsegcount)(obj,NULL) != 1) {
-		PyErr_SetString(PyExc_TypeError,
-				"expected a single-segment buffer object");
-		return -1;
-	}
-	len = (*pb->bf_getcharbuffer)(obj, 0, &pp);
-	if (len < 0)
-		return -1;
-	*buffer = pp;
-	*buffer_len = len;
-	return 0;
+    if (obj == NULL || buffer == NULL || buffer_len == NULL) {
+        null_error();
+        return -1;
+    }
+    pb = obj->ob_type->tp_as_buffer;
+    if (pb == NULL ||
+         pb->bf_getcharbuffer == NULL ||
+         pb->bf_getsegcount == NULL) {
+        PyErr_SetString(PyExc_TypeError,
+                        "expected a character buffer object");
+        return -1;
+    }
+    if ((*pb->bf_getsegcount)(obj,NULL) != 1) {
+        PyErr_SetString(PyExc_TypeError,
+                        "expected a single-segment buffer object");
+        return -1;
+    }
+    len = (*pb->bf_getcharbuffer)(obj, 0, &pp);
+    if (len < 0)
+        return -1;
+    *buffer = pp;
+    *buffer_len = len;
+    return 0;
 }
 
 int
 PyObject_CheckReadBuffer(PyObject *obj)
 {
-	PyBufferProcs *pb = obj->ob_type->tp_as_buffer;
+    PyBufferProcs *pb = obj->ob_type->tp_as_buffer;
 
-	if (pb == NULL ||
-	    pb->bf_getreadbuffer == NULL ||
-	    pb->bf_getsegcount == NULL ||
-	    (*pb->bf_getsegcount)(obj, NULL) != 1)
-		return 0;
-	return 1;
+    if (pb == NULL ||
+        pb->bf_getreadbuffer == NULL ||
+        pb->bf_getsegcount == NULL ||
+        (*pb->bf_getsegcount)(obj, NULL) != 1)
+        return 0;
+    return 1;
 }
 
 int PyObject_AsReadBuffer(PyObject *obj,
-			  const void **buffer,
-			  Py_ssize_t *buffer_len)
+                          const void **buffer,
+                          Py_ssize_t *buffer_len)
 {
-	PyBufferProcs *pb;
-	void *pp;
-	Py_ssize_t len;
+    PyBufferProcs *pb;
+    void *pp;
+    Py_ssize_t len;
 
-	if (obj == NULL || buffer == NULL || buffer_len == NULL) {
-		null_error();
-		return -1;
-	}
-	pb = obj->ob_type->tp_as_buffer;
-	if (pb == NULL ||
-	     pb->bf_getreadbuffer == NULL ||
-	     pb->bf_getsegcount == NULL) {
-		PyErr_SetString(PyExc_TypeError,
-				"expected a readable buffer object");
-		return -1;
-	}
-	if ((*pb->bf_getsegcount)(obj, NULL) != 1) {
-		PyErr_SetString(PyExc_TypeError,
-				"expected a single-segment buffer object");
-		return -1;
-	}
-	len = (*pb->bf_getreadbuffer)(obj, 0, &pp);
-	if (len < 0)
-		return -1;
-	*buffer = pp;
-	*buffer_len = len;
-	return 0;
+    if (obj == NULL || buffer == NULL || buffer_len == NULL) {
+        null_error();
+        return -1;
+    }
+    pb = obj->ob_type->tp_as_buffer;
+    if (pb == NULL ||
+         pb->bf_getreadbuffer == NULL ||
+         pb->bf_getsegcount == NULL) {
+        PyErr_SetString(PyExc_TypeError,
+                        "expected a readable buffer object");
+        return -1;
+    }
+    if ((*pb->bf_getsegcount)(obj, NULL) != 1) {
+        PyErr_SetString(PyExc_TypeError,
+                        "expected a single-segment buffer object");
+        return -1;
+    }
+    len = (*pb->bf_getreadbuffer)(obj, 0, &pp);
+    if (len < 0)
+        return -1;
+    *buffer = pp;
+    *buffer_len = len;
+    return 0;
 }
 
 int PyObject_AsWriteBuffer(PyObject *obj,
-			   void **buffer,
-			   Py_ssize_t *buffer_len)
+                           void **buffer,
+                           Py_ssize_t *buffer_len)
 {
-	PyBufferProcs *pb;
-	void*pp;
-	Py_ssize_t len;
+    PyBufferProcs *pb;
+    void*pp;
+    Py_ssize_t len;
 
-	if (obj == NULL || buffer == NULL || buffer_len == NULL) {
-		null_error();
-		return -1;
-	}
-	pb = obj->ob_type->tp_as_buffer;
-	if (pb == NULL ||
-	     pb->bf_getwritebuffer == NULL ||
-	     pb->bf_getsegcount == NULL) {
-		PyErr_SetString(PyExc_TypeError,
-				"expected a writeable buffer object");
-		return -1;
-	}
-	if ((*pb->bf_getsegcount)(obj, NULL) != 1) {
-		PyErr_SetString(PyExc_TypeError,
-				"expected a single-segment buffer object");
-		return -1;
-	}
-	len = (*pb->bf_getwritebuffer)(obj,0,&pp);
-	if (len < 0)
-		return -1;
-	*buffer = pp;
-	*buffer_len = len;
-	return 0;
+    if (obj == NULL || buffer == NULL || buffer_len == NULL) {
+        null_error();
+        return -1;
+    }
+    pb = obj->ob_type->tp_as_buffer;
+    if (pb == NULL ||
+         pb->bf_getwritebuffer == NULL ||
+         pb->bf_getsegcount == NULL) {
+        PyErr_SetString(PyExc_TypeError,
+                        "expected a writeable buffer object");
+        return -1;
+    }
+    if ((*pb->bf_getsegcount)(obj, NULL) != 1) {
+        PyErr_SetString(PyExc_TypeError,
+                        "expected a single-segment buffer object");
+        return -1;
+    }
+    len = (*pb->bf_getwritebuffer)(obj,0,&pp);
+    if (len < 0)
+        return -1;
+    *buffer = pp;
+    *buffer_len = len;
+    return 0;
 }
 
 /* Buffer C-API for Python 3.0 */
@@ -359,119 +359,119 @@
 int
 PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags)
 {
-	if (!PyObject_CheckBuffer(obj)) {
-		PyErr_Format(PyExc_TypeError,
-                             "'%100s' does not have the buffer interface",
-                             Py_TYPE(obj)->tp_name);
-		return -1;
-	}
-	return (*(obj->ob_type->tp_as_buffer->bf_getbuffer))(obj, view, flags);
+    if (!PyObject_CheckBuffer(obj)) {
+        PyErr_Format(PyExc_TypeError,
+                     "'%100s' does not have the buffer interface",
+                     Py_TYPE(obj)->tp_name);
+        return -1;
+    }
+    return (*(obj->ob_type->tp_as_buffer->bf_getbuffer))(obj, view, flags);
 }
 
 static int
 _IsFortranContiguous(Py_buffer *view)
 {
-	Py_ssize_t sd, dim;
-	int i;
+    Py_ssize_t sd, dim;
+    int i;
 
-	if (view->ndim == 0) return 1;
-	if (view->strides == NULL) return (view->ndim == 1);
+    if (view->ndim == 0) return 1;
+    if (view->strides == NULL) return (view->ndim == 1);
 
-	sd = view->itemsize;
-	if (view->ndim == 1) return (view->shape[0] == 1 ||
-				   sd == view->strides[0]);
-	for (i=0; i<view->ndim; i++) {
-		dim = view->shape[i];
-		if (dim == 0) return 1;
-		if (view->strides[i] != sd) return 0;
-		sd *= dim;
-	}
-	return 1;
+    sd = view->itemsize;
+    if (view->ndim == 1) return (view->shape[0] == 1 ||
+                               sd == view->strides[0]);
+    for (i=0; i<view->ndim; i++) {
+        dim = view->shape[i];
+        if (dim == 0) return 1;
+        if (view->strides[i] != sd) return 0;
+        sd *= dim;
+    }
+    return 1;
 }
 
 static int
 _IsCContiguous(Py_buffer *view)
 {
-	Py_ssize_t sd, dim;
-	int i;
+    Py_ssize_t sd, dim;
+    int i;
 
-	if (view->ndim == 0) return 1;
-	if (view->strides == NULL) return 1;
+    if (view->ndim == 0) return 1;
+    if (view->strides == NULL) return 1;
 
-	sd = view->itemsize;
-	if (view->ndim == 1) return (view->shape[0] == 1 ||
-				   sd == view->strides[0]);
-	for (i=view->ndim-1; i>=0; i--) {
-		dim = view->shape[i];
-		if (dim == 0) return 1;
-		if (view->strides[i] != sd) return 0;
-		sd *= dim;
-	}
-	return 1;
+    sd = view->itemsize;
+    if (view->ndim == 1) return (view->shape[0] == 1 ||
+                               sd == view->strides[0]);
+    for (i=view->ndim-1; i>=0; i--) {
+        dim = view->shape[i];
+        if (dim == 0) return 1;
+        if (view->strides[i] != sd) return 0;
+        sd *= dim;
+    }
+    return 1;
 }
 
 int
 PyBuffer_IsContiguous(Py_buffer *view, char fort)
 {
 
-	if (view->suboffsets != NULL) return 0;
+    if (view->suboffsets != NULL) return 0;
 
-	if (fort == 'C')
-		return _IsCContiguous(view);
-	else if (fort == 'F')
-		return _IsFortranContiguous(view);
-	else if (fort == 'A')
-		return (_IsCContiguous(view) || _IsFortranContiguous(view));
-	return 0;
+    if (fort == 'C')
+        return _IsCContiguous(view);
+    else if (fort == 'F')
+        return _IsFortranContiguous(view);
+    else if (fort == 'A')
+        return (_IsCContiguous(view) || _IsFortranContiguous(view));
+    return 0;
 }
 
 
 void*
 PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices)
 {
-	char* pointer;
-	int i;
-	pointer = (char *)view->buf;
-	for (i = 0; i < view->ndim; i++) {
-		pointer += view->strides[i]*indices[i];
-		if ((view->suboffsets != NULL) && (view->suboffsets[i] >= 0)) {
-			pointer = *((char**)pointer) + view->suboffsets[i];
-		}
-	}
-	return (void*)pointer;
+    char* pointer;
+    int i;
+    pointer = (char *)view->buf;
+    for (i = 0; i < view->ndim; i++) {
+        pointer += view->strides[i]*indices[i];
+        if ((view->suboffsets != NULL) && (view->suboffsets[i] >= 0)) {
+            pointer = *((char**)pointer) + view->suboffsets[i];
+        }
+    }
+    return (void*)pointer;
 }
 
 
 void
 _add_one_to_index_F(int nd, Py_ssize_t *index, Py_ssize_t *shape)
 {
-	int k;
+    int k;
 
-	for (k=0; k<nd; k++) {
-		if (index[k] < shape[k]-1) {
-			index[k]++;
-			break;
-		}
-		else {
-			index[k] = 0;
-		}
-	}
+    for (k=0; k<nd; k++) {
+        if (index[k] < shape[k]-1) {
+            index[k]++;
+            break;
+        }
+        else {
+            index[k] = 0;
+        }
+    }
 }
 
 void
 _add_one_to_index_C(int nd, Py_ssize_t *index, Py_ssize_t *shape)
 {
-	int k;
+    int k;
 
-	for (k=nd-1; k>=0; k--) {
-		if (index[k] < shape[k]-1) {
-			index[k]++;
-			break;
-		}
-		else {
-			index[k] = 0;
-		}
-	}
+    for (k=nd-1; k>=0; k--) {
+        if (index[k] < shape[k]-1) {
+            index[k]++;
+            break;
+        }
+        else {
+            index[k] = 0;
+        }
+    }
 }
 
   /* view is not checked for consistency in either of these.  It is
@@ -482,413 +482,413 @@
 int
 PyBuffer_ToContiguous(void *buf, Py_buffer *view, Py_ssize_t len, char fort)
 {
-	int k;
-	void (*addone)(int, Py_ssize_t *, Py_ssize_t *);
-	Py_ssize_t *indices, elements;
-	char *dest, *ptr;
+    int k;
+    void (*addone)(int, Py_ssize_t *, Py_ssize_t *);
+    Py_ssize_t *indices, elements;
+    char *dest, *ptr;
 
-	if (len > view->len) {
-		len = view->len;
-	}
+    if (len > view->len) {
+        len = view->len;
+    }
 
-	if (PyBuffer_IsContiguous(view, fort)) {
-		/* simplest copy is all that is needed */
-		memcpy(buf, view->buf, len);
-		return 0;
-	}
+    if (PyBuffer_IsContiguous(view, fort)) {
+        /* simplest copy is all that is needed */
+        memcpy(buf, view->buf, len);
+        return 0;
+    }
 
-	/* Otherwise a more elaborate scheme is needed */
+    /* Otherwise a more elaborate scheme is needed */
 
-	/* XXX(nnorwitz): need to check for overflow! */
-	indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*(view->ndim));
-	if (indices == NULL) {
-		PyErr_NoMemory();
-		return -1;
-	}
-	for (k=0; k<view->ndim;k++) {
-		indices[k] = 0;
-	}
+    /* XXX(nnorwitz): need to check for overflow! */
+    indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*(view->ndim));
+    if (indices == NULL) {
+        PyErr_NoMemory();
+        return -1;
+    }
+    for (k=0; k<view->ndim;k++) {
+        indices[k] = 0;
+    }
 
-	if (fort == 'F') {
-		addone = _add_one_to_index_F;
-	}
-	else {
-		addone = _add_one_to_index_C;
-	}
-	dest = buf;
-	/* XXX : This is not going to be the fastest code in the world
-		 several optimizations are possible.
-	 */
-	elements = len / view->itemsize;
-	while (elements--) {
-		addone(view->ndim, indices, view->shape);
-		ptr = PyBuffer_GetPointer(view, indices);
-		memcpy(dest, ptr, view->itemsize);
-		dest += view->itemsize;
-	}
-	PyMem_Free(indices);
-	return 0;
+    if (fort == 'F') {
+        addone = _add_one_to_index_F;
+    }
+    else {
+        addone = _add_one_to_index_C;
+    }
+    dest = buf;
+    /* XXX : This is not going to be the fastest code in the world
+             several optimizations are possible.
+     */
+    elements = len / view->itemsize;
+    while (elements--) {
+        addone(view->ndim, indices, view->shape);
+        ptr = PyBuffer_GetPointer(view, indices);
+        memcpy(dest, ptr, view->itemsize);
+        dest += view->itemsize;
+    }
+    PyMem_Free(indices);
+    return 0;
 }
 
 int
 PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_ssize_t len, char fort)
 {
-	int k;
-	void (*addone)(int, Py_ssize_t *, Py_ssize_t *);
-	Py_ssize_t *indices, elements;
-	char *src, *ptr;
+    int k;
+    void (*addone)(int, Py_ssize_t *, Py_ssize_t *);
+    Py_ssize_t *indices, elements;
+    char *src, *ptr;
 
-	if (len > view->len) {
-		len = view->len;
-	}
+    if (len > view->len) {
+        len = view->len;
+    }
 
-	if (PyBuffer_IsContiguous(view, fort)) {
-		/* simplest copy is all that is needed */
-		memcpy(view->buf, buf, len);
-		return 0;
-	}
+    if (PyBuffer_IsContiguous(view, fort)) {
+        /* simplest copy is all that is needed */
+        memcpy(view->buf, buf, len);
+        return 0;
+    }
 
-	/* Otherwise a more elaborate scheme is needed */
+    /* Otherwise a more elaborate scheme is needed */
 
-	/* XXX(nnorwitz): need to check for overflow! */
-	indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*(view->ndim));
-	if (indices == NULL) {
-		PyErr_NoMemory();
-		return -1;
-	}
-	for (k=0; k<view->ndim;k++) {
-		indices[k] = 0;
-	}
+    /* XXX(nnorwitz): need to check for overflow! */
+    indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*(view->ndim));
+    if (indices == NULL) {
+        PyErr_NoMemory();
+        return -1;
+    }
+    for (k=0; k<view->ndim;k++) {
+        indices[k] = 0;
+    }
 
-	if (fort == 'F') {
-		addone = _add_one_to_index_F;
-	}
-	else {
-		addone = _add_one_to_index_C;
-	}
-	src = buf;
-	/* XXX : This is not going to be the fastest code in the world
-		 several optimizations are possible.
-	 */
-	elements = len / view->itemsize;
-	while (elements--) {
-		addone(view->ndim, indices, view->shape);
-		ptr = PyBuffer_GetPointer(view, indices);
-		memcpy(ptr, src, view->itemsize);
-		src += view->itemsize;
-	}
+    if (fort == 'F') {
+        addone = _add_one_to_index_F;
+    }
+    else {
+        addone = _add_one_to_index_C;
+    }
+    src = buf;
+    /* XXX : This is not going to be the fastest code in the world
+             several optimizations are possible.
+     */
+    elements = len / view->itemsize;
+    while (elements--) {
+        addone(view->ndim, indices, view->shape);
+        ptr = PyBuffer_GetPointer(view, indices);
+        memcpy(ptr, src, view->itemsize);
+        src += view->itemsize;
+    }
 
-	PyMem_Free(indices);
-	return 0;
+    PyMem_Free(indices);
+    return 0;
 }
 
 int PyObject_CopyData(PyObject *dest, PyObject *src)
 {
-	Py_buffer view_dest, view_src;
-	int k;
-	Py_ssize_t *indices, elements;
-	char *dptr, *sptr;
+    Py_buffer view_dest, view_src;
+    int k;
+    Py_ssize_t *indices, elements;
+    char *dptr, *sptr;
 
-	if (!PyObject_CheckBuffer(dest) ||
-	    !PyObject_CheckBuffer(src)) {
-		PyErr_SetString(PyExc_TypeError,
-				"both destination and source must have the "\
-				"buffer interface");
-		return -1;
-	}
+    if (!PyObject_CheckBuffer(dest) ||
+        !PyObject_CheckBuffer(src)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "both destination and source must have the "\
+                        "buffer interface");
+        return -1;
+    }
 
-	if (PyObject_GetBuffer(dest, &view_dest, PyBUF_FULL) != 0) return -1;
-	if (PyObject_GetBuffer(src, &view_src, PyBUF_FULL_RO) != 0) {
-		PyBuffer_Release(&view_dest);
-		return -1;
-	}
+    if (PyObject_GetBuffer(dest, &view_dest, PyBUF_FULL) != 0) return -1;
+    if (PyObject_GetBuffer(src, &view_src, PyBUF_FULL_RO) != 0) {
+        PyBuffer_Release(&view_dest);
+        return -1;
+    }
 
-	if (view_dest.len < view_src.len) {
-		PyErr_SetString(PyExc_BufferError,
-				"destination is too small to receive data from source");
-		PyBuffer_Release(&view_dest);
-		PyBuffer_Release(&view_src);
-		return -1;
-	}
+    if (view_dest.len < view_src.len) {
+        PyErr_SetString(PyExc_BufferError,
+                        "destination is too small to receive data from source");
+        PyBuffer_Release(&view_dest);
+        PyBuffer_Release(&view_src);
+        return -1;
+    }
 
-	if ((PyBuffer_IsContiguous(&view_dest, 'C') &&
-	     PyBuffer_IsContiguous(&view_src, 'C')) ||
-	    (PyBuffer_IsContiguous(&view_dest, 'F') &&
-	     PyBuffer_IsContiguous(&view_src, 'F'))) {
-		/* simplest copy is all that is needed */
-		memcpy(view_dest.buf, view_src.buf, view_src.len);
-		PyBuffer_Release(&view_dest);
-		PyBuffer_Release(&view_src);
-		return 0;
-	}
+    if ((PyBuffer_IsContiguous(&view_dest, 'C') &&
+         PyBuffer_IsContiguous(&view_src, 'C')) ||
+        (PyBuffer_IsContiguous(&view_dest, 'F') &&
+         PyBuffer_IsContiguous(&view_src, 'F'))) {
+        /* simplest copy is all that is needed */
+        memcpy(view_dest.buf, view_src.buf, view_src.len);
+        PyBuffer_Release(&view_dest);
+        PyBuffer_Release(&view_src);
+        return 0;
+    }
 
-	/* Otherwise a more elaborate copy scheme is needed */
+    /* Otherwise a more elaborate copy scheme is needed */
 
-	/* XXX(nnorwitz): need to check for overflow! */
-	indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*view_src.ndim);
-	if (indices == NULL) {
-		PyErr_NoMemory();
-		PyBuffer_Release(&view_dest);
-		PyBuffer_Release(&view_src);
-		return -1;
-	}
-	for (k=0; k<view_src.ndim;k++) {
-		indices[k] = 0;
-	}
-	elements = 1;
-	for (k=0; k<view_src.ndim; k++) {
-		/* XXX(nnorwitz): can this overflow? */
-		elements *= view_src.shape[k];
-	}
-	while (elements--) {
-		_add_one_to_index_C(view_src.ndim, indices, view_src.shape);
-		dptr = PyBuffer_GetPointer(&view_dest, indices);
-		sptr = PyBuffer_GetPointer(&view_src, indices);
-		memcpy(dptr, sptr, view_src.itemsize);
-	}
-	PyMem_Free(indices);
-	PyBuffer_Release(&view_dest);
-	PyBuffer_Release(&view_src);
-	return 0;
+    /* XXX(nnorwitz): need to check for overflow! */
+    indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*view_src.ndim);
+    if (indices == NULL) {
+        PyErr_NoMemory();
+        PyBuffer_Release(&view_dest);
+        PyBuffer_Release(&view_src);
+        return -1;
+    }
+    for (k=0; k<view_src.ndim;k++) {
+        indices[k] = 0;
+    }
+    elements = 1;
+    for (k=0; k<view_src.ndim; k++) {
+        /* XXX(nnorwitz): can this overflow? */
+        elements *= view_src.shape[k];
+    }
+    while (elements--) {
+        _add_one_to_index_C(view_src.ndim, indices, view_src.shape);
+        dptr = PyBuffer_GetPointer(&view_dest, indices);
+        sptr = PyBuffer_GetPointer(&view_src, indices);
+        memcpy(dptr, sptr, view_src.itemsize);
+    }
+    PyMem_Free(indices);
+    PyBuffer_Release(&view_dest);
+    PyBuffer_Release(&view_src);
+    return 0;
 }
 
 void
 PyBuffer_FillContiguousStrides(int nd, Py_ssize_t *shape,
-			       Py_ssize_t *strides, int itemsize,
-			       char fort)
+                               Py_ssize_t *strides, int itemsize,
+                               char fort)
 {
-	int k;
-	Py_ssize_t sd;
+    int k;
+    Py_ssize_t sd;
 
-	sd = itemsize;
-	if (fort == 'F') {
-		for (k=0; k<nd; k++) {
-			strides[k] = sd;
-			sd *= shape[k];
-		}
-	}
-	else {
-		for (k=nd-1; k>=0; k--) {
-			strides[k] = sd;
-			sd *= shape[k];
-		}
-	}
-	return;
+    sd = itemsize;
+    if (fort == 'F') {
+        for (k=0; k<nd; k++) {
+            strides[k] = sd;
+            sd *= shape[k];
+        }
+    }
+    else {
+        for (k=nd-1; k>=0; k--) {
+            strides[k] = sd;
+            sd *= shape[k];
+        }
+    }
+    return;
 }
 
 int
 PyBuffer_FillInfo(Py_buffer *view, PyObject *obj, void *buf, Py_ssize_t len,
-	      int readonly, int flags)
+              int readonly, int flags)
 {
-	if (view == NULL) return 0;
-	if (((flags & PyBUF_WRITABLE) == PyBUF_WRITABLE) &&
-	    (readonly == 1)) {
-		PyErr_SetString(PyExc_BufferError,
-				"Object is not writable.");
-		return -1;
-	}
+    if (view == NULL) return 0;
+    if (((flags & PyBUF_WRITABLE) == PyBUF_WRITABLE) &&
+        (readonly == 1)) {
+        PyErr_SetString(PyExc_BufferError,
+                        "Object is not writable.");
+        return -1;
+    }
 
-	view->obj = obj;
-	if (obj)
-		Py_INCREF(obj);
-	view->buf = buf;
-	view->len = len;
-	view->readonly = readonly;
-	view->itemsize = 1;
-	view->format = NULL;
-	if ((flags & PyBUF_FORMAT) == PyBUF_FORMAT)
-		view->format = "B";
-	view->ndim = 1;
-	view->shape = NULL;
-	if ((flags & PyBUF_ND) == PyBUF_ND)
-		view->shape = &(view->len);
-	view->strides = NULL;
-	if ((flags & PyBUF_STRIDES) == PyBUF_STRIDES)
-		view->strides = &(view->itemsize);
-	view->suboffsets = NULL;
-	view->internal = NULL;
-	return 0;
+    view->obj = obj;
+    if (obj)
+        Py_INCREF(obj);
+    view->buf = buf;
+    view->len = len;
+    view->readonly = readonly;
+    view->itemsize = 1;
+    view->format = NULL;
+    if ((flags & PyBUF_FORMAT) == PyBUF_FORMAT)
+        view->format = "B";
+    view->ndim = 1;
+    view->shape = NULL;
+    if ((flags & PyBUF_ND) == PyBUF_ND)
+        view->shape = &(view->len);
+    view->strides = NULL;
+    if ((flags & PyBUF_STRIDES) == PyBUF_STRIDES)
+        view->strides = &(view->itemsize);
+    view->suboffsets = NULL;
+    view->internal = NULL;
+    return 0;
 }
 
 void
 PyBuffer_Release(Py_buffer *view)
 {
-	PyObject *obj = view->obj;
-	if (obj && Py_TYPE(obj)->tp_as_buffer && Py_TYPE(obj)->tp_as_buffer->bf_releasebuffer)
-		Py_TYPE(obj)->tp_as_buffer->bf_releasebuffer(obj, view);
-	Py_XDECREF(obj);
-	view->obj = NULL;
+    PyObject *obj = view->obj;
+    if (obj && Py_TYPE(obj)->tp_as_buffer && Py_TYPE(obj)->tp_as_buffer->bf_releasebuffer)
+        Py_TYPE(obj)->tp_as_buffer->bf_releasebuffer(obj, view);
+    Py_XDECREF(obj);
+    view->obj = NULL;
 }
 
 PyObject *
 PyObject_Format(PyObject* obj, PyObject *format_spec)
 {
-	static PyObject * str__format__ = NULL;
-	PyObject *empty = NULL;
-	PyObject *result = NULL;
+    static PyObject * str__format__ = NULL;
+    PyObject *empty = NULL;
+    PyObject *result = NULL;
 #ifdef Py_USING_UNICODE
-	int spec_is_unicode;
-	int result_is_unicode;
+    int spec_is_unicode;
+    int result_is_unicode;
 #endif
 
-	/* Initialize cached value */
-	if (str__format__ == NULL) {
-		/* Initialize static variable needed by _PyType_Lookup */
-		str__format__ = PyString_InternFromString("__format__");
-		if (str__format__ == NULL)
-			goto done;
-	}
+    /* Initialize cached value */
+    if (str__format__ == NULL) {
+        /* Initialize static variable needed by _PyType_Lookup */
+        str__format__ = PyString_InternFromString("__format__");
+        if (str__format__ == NULL)
+            goto done;
+    }
 
-	/* If no format_spec is provided, use an empty string */
-	if (format_spec == NULL) {
-		empty = PyString_FromStringAndSize(NULL, 0);
-		format_spec = empty;
-	}
+    /* If no format_spec is provided, use an empty string */
+    if (format_spec == NULL) {
+        empty = PyString_FromStringAndSize(NULL, 0);
+        format_spec = empty;
+    }
 
-	/* Check the format_spec type, and make sure it's str or unicode */
+    /* Check the format_spec type, and make sure it's str or unicode */
 #ifdef Py_USING_UNICODE
-	if (PyUnicode_Check(format_spec))
-		spec_is_unicode = 1;
-	else if (PyString_Check(format_spec))
-		spec_is_unicode = 0;
-	else {
+    if (PyUnicode_Check(format_spec))
+        spec_is_unicode = 1;
+    else if (PyString_Check(format_spec))
+        spec_is_unicode = 0;
+    else {
 #else
-        if (!PyString_Check(format_spec)) {
+    if (!PyString_Check(format_spec)) {
 #endif
-		PyErr_Format(PyExc_TypeError,
-			     "format expects arg 2 to be string "
-			     "or unicode, not %.100s", Py_TYPE(format_spec)->tp_name);
-		goto done;
-	}
+        PyErr_Format(PyExc_TypeError,
+                     "format expects arg 2 to be string "
+                     "or unicode, not %.100s", Py_TYPE(format_spec)->tp_name);
+        goto done;
+    }
 
-	/* Make sure the type is initialized.  float gets initialized late */
-	if (Py_TYPE(obj)->tp_dict == NULL)
-		if (PyType_Ready(Py_TYPE(obj)) < 0)
-			goto done;
+    /* Make sure the type is initialized.  float gets initialized late */
+    if (Py_TYPE(obj)->tp_dict == NULL)
+        if (PyType_Ready(Py_TYPE(obj)) < 0)
+            goto done;
 
-	/* Check for a __format__ method and call it. */
-	if (PyInstance_Check(obj)) {
-		/* We're an instance of a classic class */
-		PyObject *bound_method = PyObject_GetAttr(obj,
-							  str__format__);
-		if (bound_method != NULL) {
-			result = PyObject_CallFunctionObjArgs(bound_method,
-							      format_spec,
-							      NULL);
-			Py_DECREF(bound_method);
-		} else {
-			PyObject *self_as_str = NULL;
-			PyObject *format_method = NULL;
-			Py_ssize_t format_len;
+    /* Check for a __format__ method and call it. */
+    if (PyInstance_Check(obj)) {
+        /* We're an instance of a classic class */
+        PyObject *bound_method = PyObject_GetAttr(obj,
+                                                  str__format__);
+        if (bound_method != NULL) {
+            result = PyObject_CallFunctionObjArgs(bound_method,
+                                                  format_spec,
+                                                  NULL);
+            Py_DECREF(bound_method);
+        } else {
+            PyObject *self_as_str = NULL;
+            PyObject *format_method = NULL;
+            Py_ssize_t format_len;
 
-			PyErr_Clear();
-			/* Per the PEP, convert to str (or unicode,
-			   depending on the type of the format
-			   specifier).  For new-style classes, this
-			   logic is done by object.__format__(). */
+            PyErr_Clear();
+            /* Per the PEP, convert to str (or unicode,
+               depending on the type of the format
+               specifier).  For new-style classes, this
+               logic is done by object.__format__(). */
 #ifdef Py_USING_UNICODE
-			if (spec_is_unicode) {
-				format_len = PyUnicode_GET_SIZE(format_spec);
-				self_as_str = PyObject_Unicode(obj);
-			} else
+            if (spec_is_unicode) {
+                format_len = PyUnicode_GET_SIZE(format_spec);
+                self_as_str = PyObject_Unicode(obj);
+            } else
 #endif
-			{
-				format_len = PyString_GET_SIZE(format_spec);
-				self_as_str = PyObject_Str(obj);
-			}
-			if (self_as_str == NULL)
-				goto done1;
+            {
+                format_len = PyString_GET_SIZE(format_spec);
+                self_as_str = PyObject_Str(obj);
+            }
+            if (self_as_str == NULL)
+                goto done1;
 
-			if (format_len > 0) {
-				/* See the almost identical code in
-				   typeobject.c for new-style
-				   classes. */
-				if (PyErr_WarnEx(
-					PyExc_PendingDeprecationWarning,
-					"object.__format__ with a non-empty "
-					"format string is deprecated", 1)
-				     < 0) {
-					goto done1;
-				}
-				/* Eventually this will become an
-				   error:
-				PyErr_Format(PyExc_TypeError,
-				   "non-empty format string passed to "
-				   "object.__format__");
-				goto done1;
-				*/
-			}
+            if (format_len > 0) {
+                /* See the almost identical code in
+                   typeobject.c for new-style
+                   classes. */
+                if (PyErr_WarnEx(
+                    PyExc_PendingDeprecationWarning,
+                    "object.__format__ with a non-empty "
+                    "format string is deprecated", 1)
+                     < 0) {
+                    goto done1;
+                }
+                /* Eventually this will become an
+                   error:
+                PyErr_Format(PyExc_TypeError,
+                   "non-empty format string passed to "
+                   "object.__format__");
+                goto done1;
+                */
+            }
 
-			/* Then call str.__format__ on that result */
-			format_method = PyObject_GetAttr(self_as_str,
-							 str__format__);
-			if (format_method == NULL) {
-				goto done1;
-			}
-			result = PyObject_CallFunctionObjArgs(format_method,
-							      format_spec,
-							      NULL);
+            /* Then call str.__format__ on that result */
+            format_method = PyObject_GetAttr(self_as_str,
+                                             str__format__);
+            if (format_method == NULL) {
+                goto done1;
+            }
+            result = PyObject_CallFunctionObjArgs(format_method,
+                                                  format_spec,
+                                                  NULL);
 done1:
-			Py_XDECREF(self_as_str);
-			Py_XDECREF(format_method);
-			if (result == NULL)
-				goto done;
-		}
-	} else {
-		/* Not an instance of a classic class, use the code
-		   from py3k */
+            Py_XDECREF(self_as_str);
+            Py_XDECREF(format_method);
+            if (result == NULL)
+                goto done;
+        }
+    } else {
+        /* Not an instance of a classic class, use the code
+           from py3k */
 
-		/* Find the (unbound!) __format__ method (a borrowed
-		   reference) */
-		PyObject *method = _PyType_Lookup(Py_TYPE(obj),
-						  str__format__);
-		if (method == NULL) {
-			PyErr_Format(PyExc_TypeError,
-				     "Type %.100s doesn't define __format__",
-				     Py_TYPE(obj)->tp_name);
-			goto done;
-		}
-		/* And call it, binding it to the value */
-		result = PyObject_CallFunctionObjArgs(method, obj,
-						      format_spec, NULL);
-	}
+        /* Find the (unbound!) __format__ method (a borrowed
+           reference) */
+        PyObject *method = _PyType_Lookup(Py_TYPE(obj),
+                                          str__format__);
+        if (method == NULL) {
+            PyErr_Format(PyExc_TypeError,
+                         "Type %.100s doesn't define __format__",
+                         Py_TYPE(obj)->tp_name);
+            goto done;
+        }
+        /* And call it, binding it to the value */
+        result = PyObject_CallFunctionObjArgs(method, obj,
+                                              format_spec, NULL);
+    }
 
-	if (result == NULL)
-		goto done;
+    if (result == NULL)
+        goto done;
 
-	/* Check the result type, and make sure it's str or unicode */
+    /* Check the result type, and make sure it's str or unicode */
 #ifdef Py_USING_UNICODE
-	if (PyUnicode_Check(result))
-		result_is_unicode = 1;
-	else if (PyString_Check(result))
-		result_is_unicode = 0;
-	else {
+    if (PyUnicode_Check(result))
+        result_is_unicode = 1;
+    else if (PyString_Check(result))
+        result_is_unicode = 0;
+    else {
 #else
-	if (!PyString_Check(result)) {
+    if (!PyString_Check(result)) {
 #endif
-		PyErr_Format(PyExc_TypeError,
-			     "%.100s.__format__ must return string or "
-			     "unicode, not %.100s", Py_TYPE(obj)->tp_name,
-			     Py_TYPE(result)->tp_name);
-		Py_DECREF(result);
-		result = NULL;
-		goto done;
-	}
+        PyErr_Format(PyExc_TypeError,
+                     "%.100s.__format__ must return string or "
+                     "unicode, not %.100s", Py_TYPE(obj)->tp_name,
+                     Py_TYPE(result)->tp_name);
+        Py_DECREF(result);
+        result = NULL;
+        goto done;
+    }
 
-	/* Convert to unicode, if needed.  Required if spec is unicode
-	   and result is str */
+    /* Convert to unicode, if needed.  Required if spec is unicode
+       and result is str */
 #ifdef Py_USING_UNICODE
-	if (spec_is_unicode && !result_is_unicode) {
-		PyObject *tmp = PyObject_Unicode(result);
-		/* This logic works whether or not tmp is NULL */
-		Py_DECREF(result);
-		result = tmp;
-	}
+    if (spec_is_unicode && !result_is_unicode) {
+        PyObject *tmp = PyObject_Unicode(result);
+        /* This logic works whether or not tmp is NULL */
+        Py_DECREF(result);
+        result = tmp;
+    }
 #endif
 
 done:
-	Py_XDECREF(empty);
-	return result;
+    Py_XDECREF(empty);
+    return result;
 }
 
 /* Operations on numbers */
@@ -896,9 +896,9 @@
 int
 PyNumber_Check(PyObject *o)
 {
-	return o && o->ob_type->tp_as_number &&
-	       (o->ob_type->tp_as_number->nb_int ||
-		o->ob_type->tp_as_number->nb_float);
+    return o && o->ob_type->tp_as_number &&
+           (o->ob_type->tp_as_number->nb_int ||
+        o->ob_type->tp_as_number->nb_float);
 }
 
 /* Binary operators */
@@ -907,19 +907,19 @@
 
 #define NB_SLOT(x) offsetof(PyNumberMethods, x)
 #define NB_BINOP(nb_methods, slot) \
-		(*(binaryfunc*)(& ((char*)nb_methods)[slot]))
+        (*(binaryfunc*)(& ((char*)nb_methods)[slot]))
 #define NB_TERNOP(nb_methods, slot) \
-		(*(ternaryfunc*)(& ((char*)nb_methods)[slot]))
+        (*(ternaryfunc*)(& ((char*)nb_methods)[slot]))
 
 /*
   Calling scheme used for binary operations:
 
-  v	w	Action
+  v     w       Action
   -------------------------------------------------------------------
-  new	new	w.op(v,w)[*], v.op(v,w), w.op(v,w)
-  new	old	v.op(v,w), coerce(v,w), v.op(v,w)
-  old	new	w.op(v,w), coerce(v,w), v.op(v,w)
-  old	old	coerce(v,w), v.op(v,w)
+  new   new     w.op(v,w)[*], v.op(v,w), w.op(v,w)
+  new   old     v.op(v,w), coerce(v,w), v.op(v,w)
+  old   new     w.op(v,w), coerce(v,w), v.op(v,w)
+  old   old     coerce(v,w), v.op(v,w)
 
   [*] only when v->ob_type != w->ob_type && w->ob_type is a subclass of
       v->ob_type
@@ -936,84 +936,84 @@
 static PyObject *
 binary_op1(PyObject *v, PyObject *w, const int op_slot)
 {
-	PyObject *x;
-	binaryfunc slotv = NULL;
-	binaryfunc slotw = NULL;
+    PyObject *x;
+    binaryfunc slotv = NULL;
+    binaryfunc slotw = NULL;
 
-	if (v->ob_type->tp_as_number != NULL && NEW_STYLE_NUMBER(v))
-		slotv = NB_BINOP(v->ob_type->tp_as_number, op_slot);
-	if (w->ob_type != v->ob_type &&
-	    w->ob_type->tp_as_number != NULL && NEW_STYLE_NUMBER(w)) {
-		slotw = NB_BINOP(w->ob_type->tp_as_number, op_slot);
-		if (slotw == slotv)
-			slotw = NULL;
-	}
-	if (slotv) {
-		if (slotw && PyType_IsSubtype(w->ob_type, v->ob_type)) {
-			x = slotw(v, w);
-			if (x != Py_NotImplemented)
-				return x;
-			Py_DECREF(x); /* can't do it */
-			slotw = NULL;
-		}
-		x = slotv(v, w);
-		if (x != Py_NotImplemented)
-			return x;
-		Py_DECREF(x); /* can't do it */
-	}
-	if (slotw) {
-		x = slotw(v, w);
-		if (x != Py_NotImplemented)
-			return x;
-		Py_DECREF(x); /* can't do it */
-	}
-	if (!NEW_STYLE_NUMBER(v) || !NEW_STYLE_NUMBER(w)) {
-		int err = PyNumber_CoerceEx(&v, &w);
-		if (err < 0) {
-			return NULL;
-		}
-		if (err == 0) {
-			PyNumberMethods *mv = v->ob_type->tp_as_number;
-			if (mv) {
-				binaryfunc slot;
-				slot = NB_BINOP(mv, op_slot);
-				if (slot) {
-					x = slot(v, w);
-					Py_DECREF(v);
-					Py_DECREF(w);
-					return x;
-				}
-			}
-			/* CoerceEx incremented the reference counts */
-			Py_DECREF(v);
-			Py_DECREF(w);
-		}
-	}
-	Py_INCREF(Py_NotImplemented);
-	return Py_NotImplemented;
+    if (v->ob_type->tp_as_number != NULL && NEW_STYLE_NUMBER(v))
+        slotv = NB_BINOP(v->ob_type->tp_as_number, op_slot);
+    if (w->ob_type != v->ob_type &&
+        w->ob_type->tp_as_number != NULL && NEW_STYLE_NUMBER(w)) {
+        slotw = NB_BINOP(w->ob_type->tp_as_number, op_slot);
+        if (slotw == slotv)
+            slotw = NULL;
+    }
+    if (slotv) {
+        if (slotw && PyType_IsSubtype(w->ob_type, v->ob_type)) {
+            x = slotw(v, w);
+            if (x != Py_NotImplemented)
+                return x;
+            Py_DECREF(x); /* can't do it */
+            slotw = NULL;
+        }
+        x = slotv(v, w);
+        if (x != Py_NotImplemented)
+            return x;
+        Py_DECREF(x); /* can't do it */
+    }
+    if (slotw) {
+        x = slotw(v, w);
+        if (x != Py_NotImplemented)
+            return x;
+        Py_DECREF(x); /* can't do it */
+    }
+    if (!NEW_STYLE_NUMBER(v) || !NEW_STYLE_NUMBER(w)) {
+        int err = PyNumber_CoerceEx(&v, &w);
+        if (err < 0) {
+            return NULL;
+        }
+        if (err == 0) {
+            PyNumberMethods *mv = v->ob_type->tp_as_number;
+            if (mv) {
+                binaryfunc slot;
+                slot = NB_BINOP(mv, op_slot);
+                if (slot) {
+                    x = slot(v, w);
+                    Py_DECREF(v);
+                    Py_DECREF(w);
+                    return x;
+                }
+            }
+            /* CoerceEx incremented the reference counts */
+            Py_DECREF(v);
+            Py_DECREF(w);
+        }
+    }
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
 }
 
 static PyObject *
 binop_type_error(PyObject *v, PyObject *w, const char *op_name)
 {
-	PyErr_Format(PyExc_TypeError,
-		     "unsupported operand type(s) for %.100s: "
-		     "'%.100s' and '%.100s'",
-		     op_name,
-		     v->ob_type->tp_name,
-		     w->ob_type->tp_name);
-	return NULL;
+    PyErr_Format(PyExc_TypeError,
+                 "unsupported operand type(s) for %.100s: "
+                 "'%.100s' and '%.100s'",
+                 op_name,
+                 v->ob_type->tp_name,
+                 w->ob_type->tp_name);
+    return NULL;
 }
 
 static PyObject *
 binary_op(PyObject *v, PyObject *w, const int op_slot, const char *op_name)
 {
-	PyObject *result = binary_op1(v, w, op_slot);
-	if (result == Py_NotImplemented) {
-		Py_DECREF(result);
-		return binop_type_error(v, w, op_name);
-	}
-	return result;
+    PyObject *result = binary_op1(v, w, op_slot);
+    if (result == Py_NotImplemented) {
+        Py_DECREF(result);
+        return binop_type_error(v, w, op_name);
+    }
+    return result;
 }
 
 
@@ -1022,16 +1022,16 @@
 
   *** In some cases, w.op is called before v.op; see binary_op1. ***
 
-  v	w	z	Action
+  v     w       z       Action
   -------------------------------------------------------------------
-  new	new	new	v.op(v,w,z), w.op(v,w,z), z.op(v,w,z)
-  new	old	new	v.op(v,w,z), z.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
-  old	new	new	w.op(v,w,z), z.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
-  old	old	new	z.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
-  new	new	old	v.op(v,w,z), w.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
-  new	old	old	v.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
-  old	new	old	w.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
-  old	old	old	coerce(v,w,z), v.op(v,w,z)
+  new   new     new     v.op(v,w,z), w.op(v,w,z), z.op(v,w,z)
+  new   old     new     v.op(v,w,z), z.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
+  old   new     new     w.op(v,w,z), z.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
+  old   old     new     z.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
+  new   new     old     v.op(v,w,z), w.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
+  new   old     old     v.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
+  old   new     old     w.op(v,w,z), coerce(v,w,z), v.op(v,w,z)
+  old   old     old     coerce(v,w,z), v.op(v,w,z)
 
   Legend:
   -------
@@ -1047,141 +1047,141 @@
 
 static PyObject *
 ternary_op(PyObject *v,
-	   PyObject *w,
-	   PyObject *z,
-	   const int op_slot,
-	   const char *op_name)
+           PyObject *w,
+           PyObject *z,
+           const int op_slot,
+           const char *op_name)
 {
-	PyNumberMethods *mv, *mw, *mz;
-	PyObject *x = NULL;
-	ternaryfunc slotv = NULL;
-	ternaryfunc slotw = NULL;
-	ternaryfunc slotz = NULL;
+    PyNumberMethods *mv, *mw, *mz;
+    PyObject *x = NULL;
+    ternaryfunc slotv = NULL;
+    ternaryfunc slotw = NULL;
+    ternaryfunc slotz = NULL;
 
-	mv = v->ob_type->tp_as_number;
-	mw = w->ob_type->tp_as_number;
-	if (mv != NULL && NEW_STYLE_NUMBER(v))
-		slotv = NB_TERNOP(mv, op_slot);
-	if (w->ob_type != v->ob_type &&
-	    mw != NULL && NEW_STYLE_NUMBER(w)) {
-		slotw = NB_TERNOP(mw, op_slot);
-		if (slotw == slotv)
-			slotw = NULL;
-	}
-	if (slotv) {
-		if (slotw && PyType_IsSubtype(w->ob_type, v->ob_type)) {
-			x = slotw(v, w, z);
-			if (x != Py_NotImplemented)
-				return x;
-			Py_DECREF(x); /* can't do it */
-			slotw = NULL;
-		}
-		x = slotv(v, w, z);
-		if (x != Py_NotImplemented)
-			return x;
-		Py_DECREF(x); /* can't do it */
-	}
-	if (slotw) {
-		x = slotw(v, w, z);
-		if (x != Py_NotImplemented)
-			return x;
-		Py_DECREF(x); /* can't do it */
-	}
-	mz = z->ob_type->tp_as_number;
-	if (mz != NULL && NEW_STYLE_NUMBER(z)) {
-		slotz = NB_TERNOP(mz, op_slot);
-		if (slotz == slotv || slotz == slotw)
-			slotz = NULL;
-		if (slotz) {
-			x = slotz(v, w, z);
-			if (x != Py_NotImplemented)
-				return x;
-			Py_DECREF(x); /* can't do it */
-		}
-	}
+    mv = v->ob_type->tp_as_number;
+    mw = w->ob_type->tp_as_number;
+    if (mv != NULL && NEW_STYLE_NUMBER(v))
+        slotv = NB_TERNOP(mv, op_slot);
+    if (w->ob_type != v->ob_type &&
+        mw != NULL && NEW_STYLE_NUMBER(w)) {
+        slotw = NB_TERNOP(mw, op_slot);
+        if (slotw == slotv)
+            slotw = NULL;
+    }
+    if (slotv) {
+        if (slotw && PyType_IsSubtype(w->ob_type, v->ob_type)) {
+            x = slotw(v, w, z);
+            if (x != Py_NotImplemented)
+                return x;
+            Py_DECREF(x); /* can't do it */
+            slotw = NULL;
+        }
+        x = slotv(v, w, z);
+        if (x != Py_NotImplemented)
+            return x;
+        Py_DECREF(x); /* can't do it */
+    }
+    if (slotw) {
+        x = slotw(v, w, z);
+        if (x != Py_NotImplemented)
+            return x;
+        Py_DECREF(x); /* can't do it */
+    }
+    mz = z->ob_type->tp_as_number;
+    if (mz != NULL && NEW_STYLE_NUMBER(z)) {
+        slotz = NB_TERNOP(mz, op_slot);
+        if (slotz == slotv || slotz == slotw)
+            slotz = NULL;
+        if (slotz) {
+            x = slotz(v, w, z);
+            if (x != Py_NotImplemented)
+                return x;
+            Py_DECREF(x); /* can't do it */
+        }
+    }
 
-	if (!NEW_STYLE_NUMBER(v) || !NEW_STYLE_NUMBER(w) ||
-			(z != Py_None && !NEW_STYLE_NUMBER(z))) {
-		/* we have an old style operand, coerce */
-		PyObject *v1, *z1, *w2, *z2;
-		int c;
+    if (!NEW_STYLE_NUMBER(v) || !NEW_STYLE_NUMBER(w) ||
+                    (z != Py_None && !NEW_STYLE_NUMBER(z))) {
+        /* we have an old style operand, coerce */
+        PyObject *v1, *z1, *w2, *z2;
+        int c;
 
-		c = PyNumber_Coerce(&v, &w);
-		if (c != 0)
-			goto error3;
+        c = PyNumber_Coerce(&v, &w);
+        if (c != 0)
+            goto error3;
 
-		/* Special case: if the third argument is None, it is
-		   treated as absent argument and not coerced. */
-		if (z == Py_None) {
-			if (v->ob_type->tp_as_number) {
-				slotz = NB_TERNOP(v->ob_type->tp_as_number,
-						  op_slot);
-				if (slotz)
-					x = slotz(v, w, z);
-				else
-					c = -1;
-			}
-			else
-				c = -1;
-			goto error2;
-		}
-		v1 = v;
-		z1 = z;
-		c = PyNumber_Coerce(&v1, &z1);
-		if (c != 0)
-			goto error2;
-		w2 = w;
-		z2 = z1;
-		c = PyNumber_Coerce(&w2, &z2);
-		if (c != 0)
-			goto error1;
+        /* Special case: if the third argument is None, it is
+           treated as absent argument and not coerced. */
+        if (z == Py_None) {
+            if (v->ob_type->tp_as_number) {
+                slotz = NB_TERNOP(v->ob_type->tp_as_number,
+                                  op_slot);
+                if (slotz)
+                    x = slotz(v, w, z);
+                else
+                    c = -1;
+            }
+            else
+                c = -1;
+            goto error2;
+        }
+        v1 = v;
+        z1 = z;
+        c = PyNumber_Coerce(&v1, &z1);
+        if (c != 0)
+            goto error2;
+        w2 = w;
+        z2 = z1;
+        c = PyNumber_Coerce(&w2, &z2);
+        if (c != 0)
+            goto error1;
 
-		if (v1->ob_type->tp_as_number != NULL) {
-			slotv = NB_TERNOP(v1->ob_type->tp_as_number,
-					  op_slot);
-			if (slotv)
-				x = slotv(v1, w2, z2);
-			else
-				c = -1;
-		}
-		else
-			c = -1;
+        if (v1->ob_type->tp_as_number != NULL) {
+            slotv = NB_TERNOP(v1->ob_type->tp_as_number,
+                              op_slot);
+            if (slotv)
+                x = slotv(v1, w2, z2);
+            else
+                c = -1;
+        }
+        else
+            c = -1;
 
-		Py_DECREF(w2);
-		Py_DECREF(z2);
-	error1:
-		Py_DECREF(v1);
-		Py_DECREF(z1);
-	error2:
-		Py_DECREF(v);
-		Py_DECREF(w);
-	error3:
-		if (c >= 0)
-			return x;
-	}
+        Py_DECREF(w2);
+        Py_DECREF(z2);
+    error1:
+        Py_DECREF(v1);
+        Py_DECREF(z1);
+    error2:
+        Py_DECREF(v);
+        Py_DECREF(w);
+    error3:
+        if (c >= 0)
+            return x;
+    }
 
-	if (z == Py_None)
-		PyErr_Format(
-			PyExc_TypeError,
-			"unsupported operand type(s) for ** or pow(): "
-			"'%.100s' and '%.100s'",
-			v->ob_type->tp_name,
-			w->ob_type->tp_name);
-	else
-		PyErr_Format(
-			PyExc_TypeError,
-			"unsupported operand type(s) for pow(): "
-			"'%.100s', '%.100s', '%.100s'",
-			v->ob_type->tp_name,
-			w->ob_type->tp_name,
-			z->ob_type->tp_name);
-	return NULL;
+    if (z == Py_None)
+        PyErr_Format(
+            PyExc_TypeError,
+            "unsupported operand type(s) for ** or pow(): "
+            "'%.100s' and '%.100s'",
+            v->ob_type->tp_name,
+            w->ob_type->tp_name);
+    else
+        PyErr_Format(
+            PyExc_TypeError,
+            "unsupported operand type(s) for pow(): "
+            "'%.100s', '%.100s', '%.100s'",
+            v->ob_type->tp_name,
+            w->ob_type->tp_name,
+            z->ob_type->tp_name);
+    return NULL;
 }
 
 #define BINARY_FUNC(func, op, op_name) \
     PyObject * \
     func(PyObject *v, PyObject *w) { \
-	    return binary_op(v, w, NB_SLOT(op), op_name); \
+        return binary_op(v, w, NB_SLOT(op), op_name); \
     }
 
 BINARY_FUNC(PyNumber_Or, nb_or, "|")
@@ -1196,77 +1196,77 @@
 PyObject *
 PyNumber_Add(PyObject *v, PyObject *w)
 {
-	PyObject *result = binary_op1(v, w, NB_SLOT(nb_add));
-	if (result == Py_NotImplemented) {
-		PySequenceMethods *m = v->ob_type->tp_as_sequence;
-		Py_DECREF(result);
-		if (m && m->sq_concat) {
-			return (*m->sq_concat)(v, w);
-		}
-		result = binop_type_error(v, w, "+");
-	}
-	return result;
+    PyObject *result = binary_op1(v, w, NB_SLOT(nb_add));
+    if (result == Py_NotImplemented) {
+        PySequenceMethods *m = v->ob_type->tp_as_sequence;
+        Py_DECREF(result);
+        if (m && m->sq_concat) {
+            return (*m->sq_concat)(v, w);
+        }
+        result = binop_type_error(v, w, "+");
+    }
+    return result;
 }
 
 static PyObject *
 sequence_repeat(ssizeargfunc repeatfunc, PyObject *seq, PyObject *n)
 {
-	Py_ssize_t count;
-	if (PyIndex_Check(n)) {
-		count = PyNumber_AsSsize_t(n, PyExc_OverflowError);
-		if (count == -1 && PyErr_Occurred())
-			return NULL;
-	}
-	else {
-		return type_error("can't multiply sequence by "
-				  "non-int of type '%.200s'", n);
-	}
-	return (*repeatfunc)(seq, count);
+    Py_ssize_t count;
+    if (PyIndex_Check(n)) {
+        count = PyNumber_AsSsize_t(n, PyExc_OverflowError);
+        if (count == -1 && PyErr_Occurred())
+            return NULL;
+    }
+    else {
+        return type_error("can't multiply sequence by "
+                          "non-int of type '%.200s'", n);
+    }
+    return (*repeatfunc)(seq, count);
 }
 
 PyObject *
 PyNumber_Multiply(PyObject *v, PyObject *w)
 {
-	PyObject *result = binary_op1(v, w, NB_SLOT(nb_multiply));
-	if (result == Py_NotImplemented) {
-		PySequenceMethods *mv = v->ob_type->tp_as_sequence;
-		PySequenceMethods *mw = w->ob_type->tp_as_sequence;
-		Py_DECREF(result);
-		if  (mv && mv->sq_repeat) {
-			return sequence_repeat(mv->sq_repeat, v, w);
-		}
-		else if (mw && mw->sq_repeat) {
-			return sequence_repeat(mw->sq_repeat, w, v);
-		}
-		result = binop_type_error(v, w, "*");
-	}
-	return result;
+    PyObject *result = binary_op1(v, w, NB_SLOT(nb_multiply));
+    if (result == Py_NotImplemented) {
+        PySequenceMethods *mv = v->ob_type->tp_as_sequence;
+        PySequenceMethods *mw = w->ob_type->tp_as_sequence;
+        Py_DECREF(result);
+        if  (mv && mv->sq_repeat) {
+            return sequence_repeat(mv->sq_repeat, v, w);
+        }
+        else if (mw && mw->sq_repeat) {
+            return sequence_repeat(mw->sq_repeat, w, v);
+        }
+        result = binop_type_error(v, w, "*");
+    }
+    return result;
 }
 
 PyObject *
 PyNumber_FloorDivide(PyObject *v, PyObject *w)
 {
-	/* XXX tp_flags test */
-	return binary_op(v, w, NB_SLOT(nb_floor_divide), "//");
+    /* XXX tp_flags test */
+    return binary_op(v, w, NB_SLOT(nb_floor_divide), "//");
 }
 
 PyObject *
 PyNumber_TrueDivide(PyObject *v, PyObject *w)
 {
-	/* XXX tp_flags test */
-	return binary_op(v, w, NB_SLOT(nb_true_divide), "/");
+    /* XXX tp_flags test */
+    return binary_op(v, w, NB_SLOT(nb_true_divide), "/");
 }
 
 PyObject *
 PyNumber_Remainder(PyObject *v, PyObject *w)
 {
-	return binary_op(v, w, NB_SLOT(nb_remainder), "%");
+    return binary_op(v, w, NB_SLOT(nb_remainder), "%");
 }
 
 PyObject *
 PyNumber_Power(PyObject *v, PyObject *w, PyObject *z)
 {
-	return ternary_op(v, w, z, NB_SLOT(nb_power), "** or pow()");
+    return ternary_op(v, w, z, NB_SLOT(nb_power), "** or pow()");
 }
 
 /* Binary in-place operators */
@@ -1286,42 +1286,42 @@
    */
 
 #define HASINPLACE(t) \
-	PyType_HasFeature((t)->ob_type, Py_TPFLAGS_HAVE_INPLACEOPS)
+    PyType_HasFeature((t)->ob_type, Py_TPFLAGS_HAVE_INPLACEOPS)
 
 static PyObject *
 binary_iop1(PyObject *v, PyObject *w, const int iop_slot, const int op_slot)
 {
-	PyNumberMethods *mv = v->ob_type->tp_as_number;
-	if (mv != NULL && HASINPLACE(v)) {
-		binaryfunc slot = NB_BINOP(mv, iop_slot);
-		if (slot) {
-			PyObject *x = (slot)(v, w);
-			if (x != Py_NotImplemented) {
-				return x;
-			}
-			Py_DECREF(x);
-		}
-	}
-	return binary_op1(v, w, op_slot);
+    PyNumberMethods *mv = v->ob_type->tp_as_number;
+    if (mv != NULL && HASINPLACE(v)) {
+        binaryfunc slot = NB_BINOP(mv, iop_slot);
+        if (slot) {
+            PyObject *x = (slot)(v, w);
+            if (x != Py_NotImplemented) {
+                return x;
+            }
+            Py_DECREF(x);
+        }
+    }
+    return binary_op1(v, w, op_slot);
 }
 
 static PyObject *
 binary_iop(PyObject *v, PyObject *w, const int iop_slot, const int op_slot,
-		const char *op_name)
+                const char *op_name)
 {
-	PyObject *result = binary_iop1(v, w, iop_slot, op_slot);
-	if (result == Py_NotImplemented) {
-		Py_DECREF(result);
-		return binop_type_error(v, w, op_name);
-	}
-	return result;
+    PyObject *result = binary_iop1(v, w, iop_slot, op_slot);
+    if (result == Py_NotImplemented) {
+        Py_DECREF(result);
+        return binop_type_error(v, w, op_name);
+    }
+    return result;
 }
 
 #define INPLACE_BINOP(func, iop, op, op_name) \
-	PyObject * \
-	func(PyObject *v, PyObject *w) { \
-		return binary_iop(v, w, NB_SLOT(iop), NB_SLOT(op), op_name); \
-	}
+    PyObject * \
+    func(PyObject *v, PyObject *w) { \
+        return binary_iop(v, w, NB_SLOT(iop), NB_SLOT(op), op_name); \
+    }
 
 INPLACE_BINOP(PyNumber_InPlaceOr, nb_inplace_or, nb_or, "|=")
 INPLACE_BINOP(PyNumber_InPlaceXor, nb_inplace_xor, nb_xor, "^=")
@@ -1334,88 +1334,88 @@
 PyObject *
 PyNumber_InPlaceFloorDivide(PyObject *v, PyObject *w)
 {
-	/* XXX tp_flags test */
-	return binary_iop(v, w, NB_SLOT(nb_inplace_floor_divide),
-			  NB_SLOT(nb_floor_divide), "//=");
+    /* XXX tp_flags test */
+    return binary_iop(v, w, NB_SLOT(nb_inplace_floor_divide),
+                      NB_SLOT(nb_floor_divide), "//=");
 }
 
 PyObject *
 PyNumber_InPlaceTrueDivide(PyObject *v, PyObject *w)
 {
-	/* XXX tp_flags test */
-	return binary_iop(v, w, NB_SLOT(nb_inplace_true_divide),
-			  NB_SLOT(nb_true_divide), "/=");
+    /* XXX tp_flags test */
+    return binary_iop(v, w, NB_SLOT(nb_inplace_true_divide),
+                      NB_SLOT(nb_true_divide), "/=");
 }
 
 PyObject *
 PyNumber_InPlaceAdd(PyObject *v, PyObject *w)
 {
-	PyObject *result = binary_iop1(v, w, NB_SLOT(nb_inplace_add),
-				       NB_SLOT(nb_add));
-	if (result == Py_NotImplemented) {
-		PySequenceMethods *m = v->ob_type->tp_as_sequence;
-		Py_DECREF(result);
-		if (m != NULL) {
-			binaryfunc f = NULL;
-			if (HASINPLACE(v))
-				f = m->sq_inplace_concat;
-			if (f == NULL)
-				f = m->sq_concat;
-			if (f != NULL)
-				return (*f)(v, w);
-		}
-		result = binop_type_error(v, w, "+=");
-	}
-	return result;
+    PyObject *result = binary_iop1(v, w, NB_SLOT(nb_inplace_add),
+                                   NB_SLOT(nb_add));
+    if (result == Py_NotImplemented) {
+        PySequenceMethods *m = v->ob_type->tp_as_sequence;
+        Py_DECREF(result);
+        if (m != NULL) {
+            binaryfunc f = NULL;
+            if (HASINPLACE(v))
+                f = m->sq_inplace_concat;
+            if (f == NULL)
+                f = m->sq_concat;
+            if (f != NULL)
+                return (*f)(v, w);
+        }
+        result = binop_type_error(v, w, "+=");
+    }
+    return result;
 }
 
 PyObject *
 PyNumber_InPlaceMultiply(PyObject *v, PyObject *w)
 {
-	PyObject *result = binary_iop1(v, w, NB_SLOT(nb_inplace_multiply),
-				       NB_SLOT(nb_multiply));
-	if (result == Py_NotImplemented) {
-		ssizeargfunc f = NULL;
-		PySequenceMethods *mv = v->ob_type->tp_as_sequence;
-		PySequenceMethods *mw = w->ob_type->tp_as_sequence;
-		Py_DECREF(result);
-		if (mv != NULL) {
-			if (HASINPLACE(v))
-				f = mv->sq_inplace_repeat;
-			if (f == NULL)
-				f = mv->sq_repeat;
-			if (f != NULL)
-				return sequence_repeat(f, v, w);
-		}
-		else if (mw != NULL) {
-			/* Note that the right hand operand should not be
-			 * mutated in this case so sq_inplace_repeat is not
-			 * used. */
-			if (mw->sq_repeat)
-				return sequence_repeat(mw->sq_repeat, w, v);
-		}
-		result = binop_type_error(v, w, "*=");
-	}
-	return result;
+    PyObject *result = binary_iop1(v, w, NB_SLOT(nb_inplace_multiply),
+                                   NB_SLOT(nb_multiply));
+    if (result == Py_NotImplemented) {
+        ssizeargfunc f = NULL;
+        PySequenceMethods *mv = v->ob_type->tp_as_sequence;
+        PySequenceMethods *mw = w->ob_type->tp_as_sequence;
+        Py_DECREF(result);
+        if (mv != NULL) {
+            if (HASINPLACE(v))
+                f = mv->sq_inplace_repeat;
+            if (f == NULL)
+                f = mv->sq_repeat;
+            if (f != NULL)
+                return sequence_repeat(f, v, w);
+        }
+        else if (mw != NULL) {
+            /* Note that the right hand operand should not be
+             * mutated in this case so sq_inplace_repeat is not
+             * used. */
+            if (mw->sq_repeat)
+                return sequence_repeat(mw->sq_repeat, w, v);
+        }
+        result = binop_type_error(v, w, "*=");
+    }
+    return result;
 }
 
 PyObject *
 PyNumber_InPlaceRemainder(PyObject *v, PyObject *w)
 {
-	return binary_iop(v, w, NB_SLOT(nb_inplace_remainder),
-				NB_SLOT(nb_remainder), "%=");
+    return binary_iop(v, w, NB_SLOT(nb_inplace_remainder),
+                            NB_SLOT(nb_remainder), "%=");
 }
 
 PyObject *
 PyNumber_InPlacePower(PyObject *v, PyObject *w, PyObject *z)
 {
-	if (HASINPLACE(v) && v->ob_type->tp_as_number &&
-	    v->ob_type->tp_as_number->nb_inplace_power != NULL) {
-		return ternary_op(v, w, z, NB_SLOT(nb_inplace_power), "**=");
-	}
-	else {
-		return ternary_op(v, w, z, NB_SLOT(nb_power), "**=");
-	}
+    if (HASINPLACE(v) && v->ob_type->tp_as_number &&
+        v->ob_type->tp_as_number->nb_inplace_power != NULL) {
+        return ternary_op(v, w, z, NB_SLOT(nb_inplace_power), "**=");
+    }
+    else {
+        return ternary_op(v, w, z, NB_SLOT(nb_power), "**=");
+    }
 }
 
 
@@ -1424,110 +1424,110 @@
 PyObject *
 PyNumber_Negative(PyObject *o)
 {
-	PyNumberMethods *m;
+    PyNumberMethods *m;
 
-	if (o == NULL)
-		return null_error();
-	m = o->ob_type->tp_as_number;
-	if (m && m->nb_negative)
-		return (*m->nb_negative)(o);
+    if (o == NULL)
+        return null_error();
+    m = o->ob_type->tp_as_number;
+    if (m && m->nb_negative)
+        return (*m->nb_negative)(o);
 
-	return type_error("bad operand type for unary -: '%.200s'", o);
+    return type_error("bad operand type for unary -: '%.200s'", o);
 }
 
 PyObject *
 PyNumber_Positive(PyObject *o)
 {
-	PyNumberMethods *m;
+    PyNumberMethods *m;
 
-	if (o == NULL)
-		return null_error();
-	m = o->ob_type->tp_as_number;
-	if (m && m->nb_positive)
-		return (*m->nb_positive)(o);
+    if (o == NULL)
+        return null_error();
+    m = o->ob_type->tp_as_number;
+    if (m && m->nb_positive)
+        return (*m->nb_positive)(o);
 
-	return type_error("bad operand type for unary +: '%.200s'", o);
+    return type_error("bad operand type for unary +: '%.200s'", o);
 }
 
 PyObject *
 PyNumber_Invert(PyObject *o)
 {
-	PyNumberMethods *m;
+    PyNumberMethods *m;
 
-	if (o == NULL)
-		return null_error();
-	m = o->ob_type->tp_as_number;
-	if (m && m->nb_invert)
-		return (*m->nb_invert)(o);
+    if (o == NULL)
+        return null_error();
+    m = o->ob_type->tp_as_number;
+    if (m && m->nb_invert)
+        return (*m->nb_invert)(o);
 
-	return type_error("bad operand type for unary ~: '%.200s'", o);
+    return type_error("bad operand type for unary ~: '%.200s'", o);
 }
 
 PyObject *
 PyNumber_Absolute(PyObject *o)
 {
-	PyNumberMethods *m;
+    PyNumberMethods *m;
 
-	if (o == NULL)
-		return null_error();
-	m = o->ob_type->tp_as_number;
-	if (m && m->nb_absolute)
-		return m->nb_absolute(o);
+    if (o == NULL)
+        return null_error();
+    m = o->ob_type->tp_as_number;
+    if (m && m->nb_absolute)
+        return m->nb_absolute(o);
 
-	return type_error("bad operand type for abs(): '%.200s'", o);
+    return type_error("bad operand type for abs(): '%.200s'", o);
 }
 
 /* Add a check for embedded NULL-bytes in the argument. */
 static PyObject *
 int_from_string(const char *s, Py_ssize_t len)
 {
-	char *end;
-	PyObject *x;
+    char *end;
+    PyObject *x;
 
-	x = PyInt_FromString((char*)s, &end, 10);
-	if (x == NULL)
-		return NULL;
-	if (end != s + len) {
-		PyErr_SetString(PyExc_ValueError,
-				"null byte in argument for int()");
-		Py_DECREF(x);
-		return NULL;
-	}
-	return x;
+    x = PyInt_FromString((char*)s, &end, 10);
+    if (x == NULL)
+        return NULL;
+    if (end != s + len) {
+        PyErr_SetString(PyExc_ValueError,
+                        "null byte in argument for int()");
+        Py_DECREF(x);
+        return NULL;
+    }
+    return x;
 }
 
-/* Return a Python Int or Long from the object item 
+/* Return a Python Int or Long from the object item
    Raise TypeError if the result is not an int-or-long
-   or if the object cannot be interpreted as an index. 
+   or if the object cannot be interpreted as an index.
 */
 PyObject *
 PyNumber_Index(PyObject *item)
 {
-	PyObject *result = NULL;
-	if (item == NULL)
-		return null_error();
-	if (PyInt_Check(item) || PyLong_Check(item)) {
-		Py_INCREF(item);
-		return item;
-	}
-	if (PyIndex_Check(item)) {
-		result = item->ob_type->tp_as_number->nb_index(item);
-		if (result &&
-		    !PyInt_Check(result) && !PyLong_Check(result)) {
-			PyErr_Format(PyExc_TypeError,
-				     "__index__ returned non-(int,long) " \
-				     "(type %.200s)",
-				     result->ob_type->tp_name);
-			Py_DECREF(result);
-			return NULL;
-		}
-	}
-	else {
-		PyErr_Format(PyExc_TypeError,
-			     "'%.200s' object cannot be interpreted "
-			     "as an index", item->ob_type->tp_name);
-	}
-	return result;
+    PyObject *result = NULL;
+    if (item == NULL)
+        return null_error();
+    if (PyInt_Check(item) || PyLong_Check(item)) {
+        Py_INCREF(item);
+        return item;
+    }
+    if (PyIndex_Check(item)) {
+        result = item->ob_type->tp_as_number->nb_index(item);
+        if (result &&
+            !PyInt_Check(result) && !PyLong_Check(result)) {
+            PyErr_Format(PyExc_TypeError,
+                         "__index__ returned non-(int,long) " \
+                         "(type %.200s)",
+                         result->ob_type->tp_name);
+            Py_DECREF(result);
+            return NULL;
+        }
+    }
+    else {
+        PyErr_Format(PyExc_TypeError,
+                     "'%.200s' object cannot be interpreted "
+                     "as an index", item->ob_type->tp_name);
+    }
+    return result;
 }
 
 /* Return an error on Overflow only if err is not NULL*/
@@ -1535,296 +1535,296 @@
 Py_ssize_t
 PyNumber_AsSsize_t(PyObject *item, PyObject *err)
 {
-	Py_ssize_t result;
-	PyObject *runerr;
-	PyObject *value = PyNumber_Index(item);
-	if (value == NULL)
-		return -1;
+    Py_ssize_t result;
+    PyObject *runerr;
+    PyObject *value = PyNumber_Index(item);
+    if (value == NULL)
+        return -1;
 
-	/* We're done if PyInt_AsSsize_t() returns without error. */
-	result = PyInt_AsSsize_t(value);
-	if (result != -1 || !(runerr = PyErr_Occurred()))
-		goto finish;
+    /* We're done if PyInt_AsSsize_t() returns without error. */
+    result = PyInt_AsSsize_t(value);
+    if (result != -1 || !(runerr = PyErr_Occurred()))
+        goto finish;
 
-	/* Error handling code -- only manage OverflowError differently */
-	if (!PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) 
-		goto finish;
+    /* Error handling code -- only manage OverflowError differently */
+    if (!PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError))
+        goto finish;
 
-	PyErr_Clear();
-	/* If no error-handling desired then the default clipping 
-	   is sufficient.
-	 */
-	if (!err) {
-		assert(PyLong_Check(value));
-		/* Whether or not it is less than or equal to 
-		   zero is determined by the sign of ob_size
-		*/
-		if (_PyLong_Sign(value) < 0) 
-			result = PY_SSIZE_T_MIN;
-		else
-			result = PY_SSIZE_T_MAX;
-	}
-	else {
-		/* Otherwise replace the error with caller's error object. */
-		PyErr_Format(err,
-			     "cannot fit '%.200s' into an index-sized integer", 
-			     item->ob_type->tp_name); 
-	}
-	
+    PyErr_Clear();
+    /* If no error-handling desired then the default clipping
+       is sufficient.
+     */
+    if (!err) {
+        assert(PyLong_Check(value));
+        /* Whether or not it is less than or equal to
+           zero is determined by the sign of ob_size
+        */
+        if (_PyLong_Sign(value) < 0)
+            result = PY_SSIZE_T_MIN;
+        else
+            result = PY_SSIZE_T_MAX;
+    }
+    else {
+        /* Otherwise replace the error with caller's error object. */
+        PyErr_Format(err,
+                     "cannot fit '%.200s' into an index-sized integer",
+                     item->ob_type->tp_name);
+    }
+
  finish:
-	Py_DECREF(value);
-	return result;
+    Py_DECREF(value);
+    return result;
 }
 
 
 PyObject *
 _PyNumber_ConvertIntegralToInt(PyObject *integral, const char* error_format)
 {
-	const char *type_name;
-	static PyObject *int_name = NULL;
-	if (int_name == NULL) {
-		int_name = PyString_InternFromString("__int__");
-		if (int_name == NULL)
-			return NULL;
-	}
+    const char *type_name;
+    static PyObject *int_name = NULL;
+    if (int_name == NULL) {
+        int_name = PyString_InternFromString("__int__");
+        if (int_name == NULL)
+            return NULL;
+    }
 
-	if (integral && (!PyInt_Check(integral) &&
-			 !PyLong_Check(integral))) {
-		/* Don't go through tp_as_number->nb_int to avoid
-		   hitting the classic class fallback to __trunc__. */
-		PyObject *int_func = PyObject_GetAttr(integral, int_name);
-		if (int_func == NULL) {
-			PyErr_Clear(); /* Raise a different error. */
-			goto non_integral_error;
-		}
-		Py_DECREF(integral);
-		integral = PyEval_CallObject(int_func, NULL);
-		Py_DECREF(int_func);
-		if (integral && (!PyInt_Check(integral) &&
-				  !PyLong_Check(integral))) {
-			goto non_integral_error;
-		}
-	}
-	return integral;
+    if (integral && (!PyInt_Check(integral) &&
+                     !PyLong_Check(integral))) {
+        /* Don't go through tp_as_number->nb_int to avoid
+           hitting the classic class fallback to __trunc__. */
+        PyObject *int_func = PyObject_GetAttr(integral, int_name);
+        if (int_func == NULL) {
+            PyErr_Clear(); /* Raise a different error. */
+            goto non_integral_error;
+        }
+        Py_DECREF(integral);
+        integral = PyEval_CallObject(int_func, NULL);
+        Py_DECREF(int_func);
+        if (integral && (!PyInt_Check(integral) &&
+                          !PyLong_Check(integral))) {
+            goto non_integral_error;
+        }
+    }
+    return integral;
 
 non_integral_error:
-	if (PyInstance_Check(integral)) {
-		type_name = PyString_AS_STRING(((PyInstanceObject *)integral)
-					       ->in_class->cl_name);
-	}
-	else {
-		type_name = integral->ob_type->tp_name;
-	}
-	PyErr_Format(PyExc_TypeError, error_format, type_name);
-	Py_DECREF(integral);
-	return NULL;
+    if (PyInstance_Check(integral)) {
+        type_name = PyString_AS_STRING(((PyInstanceObject *)integral)
+                                       ->in_class->cl_name);
+    }
+    else {
+        type_name = integral->ob_type->tp_name;
+    }
+    PyErr_Format(PyExc_TypeError, error_format, type_name);
+    Py_DECREF(integral);
+    return NULL;
 }
 
 
 PyObject *
 PyNumber_Int(PyObject *o)
 {
-	PyNumberMethods *m;
-	static PyObject *trunc_name = NULL;
-	PyObject *trunc_func;
-	const char *buffer;
-	Py_ssize_t buffer_len;
+    PyNumberMethods *m;
+    static PyObject *trunc_name = NULL;
+    PyObject *trunc_func;
+    const char *buffer;
+    Py_ssize_t buffer_len;
 
-	if (trunc_name == NULL) {
-		trunc_name = PyString_InternFromString("__trunc__");
-		if (trunc_name == NULL)
-			return NULL;
-	}
+    if (trunc_name == NULL) {
+        trunc_name = PyString_InternFromString("__trunc__");
+        if (trunc_name == NULL)
+            return NULL;
+    }
 
-	if (o == NULL)
-		return null_error();
-	if (PyInt_CheckExact(o)) {
-		Py_INCREF(o);
-		return o;
-	}
-	m = o->ob_type->tp_as_number;
-	if (m && m->nb_int) { /* This should include subclasses of int */
-		/* Classic classes always take this branch. */
-		PyObject *res = m->nb_int(o);
-		if (res && (!PyInt_Check(res) && !PyLong_Check(res))) {
-			PyErr_Format(PyExc_TypeError,
-				     "__int__ returned non-int (type %.200s)",
-				     res->ob_type->tp_name);
-			Py_DECREF(res);
-			return NULL;
-		}
-		return res;
-	}
-	if (PyInt_Check(o)) { /* A int subclass without nb_int */
-		PyIntObject *io = (PyIntObject*)o;
-		return PyInt_FromLong(io->ob_ival);
-	}
-	trunc_func = PyObject_GetAttr(o, trunc_name);
-	if (trunc_func) {
-		PyObject *truncated = PyEval_CallObject(trunc_func, NULL);
-		Py_DECREF(trunc_func);
-		/* __trunc__ is specified to return an Integral type, but
-		   int() needs to return an int. */
-		return _PyNumber_ConvertIntegralToInt(
-			truncated,
-			"__trunc__ returned non-Integral (type %.200s)");
-	}
-	PyErr_Clear();  /* It's not an error if  o.__trunc__ doesn't exist. */
+    if (o == NULL)
+        return null_error();
+    if (PyInt_CheckExact(o)) {
+        Py_INCREF(o);
+        return o;
+    }
+    m = o->ob_type->tp_as_number;
+    if (m && m->nb_int) { /* This should include subclasses of int */
+        /* Classic classes always take this branch. */
+        PyObject *res = m->nb_int(o);
+        if (res && (!PyInt_Check(res) && !PyLong_Check(res))) {
+            PyErr_Format(PyExc_TypeError,
+                         "__int__ returned non-int (type %.200s)",
+                         res->ob_type->tp_name);
+            Py_DECREF(res);
+            return NULL;
+        }
+        return res;
+    }
+    if (PyInt_Check(o)) { /* A int subclass without nb_int */
+        PyIntObject *io = (PyIntObject*)o;
+        return PyInt_FromLong(io->ob_ival);
+    }
+    trunc_func = PyObject_GetAttr(o, trunc_name);
+    if (trunc_func) {
+        PyObject *truncated = PyEval_CallObject(trunc_func, NULL);
+        Py_DECREF(trunc_func);
+        /* __trunc__ is specified to return an Integral type, but
+           int() needs to return an int. */
+        return _PyNumber_ConvertIntegralToInt(
+            truncated,
+            "__trunc__ returned non-Integral (type %.200s)");
+    }
+    PyErr_Clear();  /* It's not an error if  o.__trunc__ doesn't exist. */
 
-	if (PyString_Check(o))
-		return int_from_string(PyString_AS_STRING(o),
-				       PyString_GET_SIZE(o));
+    if (PyString_Check(o))
+        return int_from_string(PyString_AS_STRING(o),
+                               PyString_GET_SIZE(o));
 #ifdef Py_USING_UNICODE
-	if (PyUnicode_Check(o))
-		return PyInt_FromUnicode(PyUnicode_AS_UNICODE(o),
-					 PyUnicode_GET_SIZE(o),
-					 10);
+    if (PyUnicode_Check(o))
+        return PyInt_FromUnicode(PyUnicode_AS_UNICODE(o),
+                                 PyUnicode_GET_SIZE(o),
+                                 10);
 #endif
-	if (!PyObject_AsCharBuffer(o, &buffer, &buffer_len))
-		return int_from_string((char*)buffer, buffer_len);
+    if (!PyObject_AsCharBuffer(o, &buffer, &buffer_len))
+        return int_from_string((char*)buffer, buffer_len);
 
-	return type_error("int() argument must be a string or a "
-			  "number, not '%.200s'", o);
+    return type_error("int() argument must be a string or a "
+                      "number, not '%.200s'", o);
 }
 
 /* Add a check for embedded NULL-bytes in the argument. */
 static PyObject *
 long_from_string(const char *s, Py_ssize_t len)
 {
-	char *end;
-	PyObject *x;
+    char *end;
+    PyObject *x;
 
-	x = PyLong_FromString((char*)s, &end, 10);
-	if (x == NULL)
-		return NULL;
-	if (end != s + len) {
-		PyErr_SetString(PyExc_ValueError,
-				"null byte in argument for long()");
-		Py_DECREF(x);
-		return NULL;
-	}
-	return x;
+    x = PyLong_FromString((char*)s, &end, 10);
+    if (x == NULL)
+        return NULL;
+    if (end != s + len) {
+        PyErr_SetString(PyExc_ValueError,
+                        "null byte in argument for long()");
+        Py_DECREF(x);
+        return NULL;
+    }
+    return x;
 }
 
 PyObject *
 PyNumber_Long(PyObject *o)
 {
-	PyNumberMethods *m;
-	static PyObject *trunc_name = NULL;
-	PyObject *trunc_func;
-	const char *buffer;
-	Py_ssize_t buffer_len;
+    PyNumberMethods *m;
+    static PyObject *trunc_name = NULL;
+    PyObject *trunc_func;
+    const char *buffer;
+    Py_ssize_t buffer_len;
 
-	if (trunc_name == NULL) {
-		trunc_name = PyString_InternFromString("__trunc__");
-		if (trunc_name == NULL)
-			return NULL;
-	}
+    if (trunc_name == NULL) {
+        trunc_name = PyString_InternFromString("__trunc__");
+        if (trunc_name == NULL)
+            return NULL;
+    }
 
-	if (o == NULL)
-		return null_error();
-	m = o->ob_type->tp_as_number;
-	if (m && m->nb_long) { /* This should include subclasses of long */
-		/* Classic classes always take this branch. */
-		PyObject *res = m->nb_long(o);
-		if (res && (!PyInt_Check(res) && !PyLong_Check(res))) {
-			PyErr_Format(PyExc_TypeError,
-				     "__long__ returned non-long (type %.200s)",
-				     res->ob_type->tp_name);
-			Py_DECREF(res);
-			return NULL;
-		}
-		return res;
-	}
-	if (PyLong_Check(o)) /* A long subclass without nb_long */
-		return _PyLong_Copy((PyLongObject *)o);
-	trunc_func = PyObject_GetAttr(o, trunc_name);
-	if (trunc_func) {
-		PyObject *truncated = PyEval_CallObject(trunc_func, NULL);
-		PyObject *int_instance;
-		Py_DECREF(trunc_func);
-		/* __trunc__ is specified to return an Integral type,
-		   but long() needs to return a long. */
-		int_instance = _PyNumber_ConvertIntegralToInt(
-			truncated,
-			"__trunc__ returned non-Integral (type %.200s)");
-		if (int_instance && PyInt_Check(int_instance)) {
-			/* Make sure that long() returns a long instance. */
-			long value = PyInt_AS_LONG(int_instance);
-			Py_DECREF(int_instance);
-			return PyLong_FromLong(value);
-		}
-		return int_instance;
-	}
-	PyErr_Clear();  /* It's not an error if  o.__trunc__ doesn't exist. */
+    if (o == NULL)
+        return null_error();
+    m = o->ob_type->tp_as_number;
+    if (m && m->nb_long) { /* This should include subclasses of long */
+        /* Classic classes always take this branch. */
+        PyObject *res = m->nb_long(o);
+        if (res && (!PyInt_Check(res) && !PyLong_Check(res))) {
+            PyErr_Format(PyExc_TypeError,
+                         "__long__ returned non-long (type %.200s)",
+                         res->ob_type->tp_name);
+            Py_DECREF(res);
+            return NULL;
+        }
+        return res;
+    }
+    if (PyLong_Check(o)) /* A long subclass without nb_long */
+        return _PyLong_Copy((PyLongObject *)o);
+    trunc_func = PyObject_GetAttr(o, trunc_name);
+    if (trunc_func) {
+        PyObject *truncated = PyEval_CallObject(trunc_func, NULL);
+        PyObject *int_instance;
+        Py_DECREF(trunc_func);
+        /* __trunc__ is specified to return an Integral type,
+           but long() needs to return a long. */
+        int_instance = _PyNumber_ConvertIntegralToInt(
+            truncated,
+            "__trunc__ returned non-Integral (type %.200s)");
+        if (int_instance && PyInt_Check(int_instance)) {
+            /* Make sure that long() returns a long instance. */
+            long value = PyInt_AS_LONG(int_instance);
+            Py_DECREF(int_instance);
+            return PyLong_FromLong(value);
+        }
+        return int_instance;
+    }
+    PyErr_Clear();  /* It's not an error if  o.__trunc__ doesn't exist. */
 
-	if (PyString_Check(o))
-		/* need to do extra error checking that PyLong_FromString()
-		 * doesn't do.  In particular long('9.5') must raise an
-		 * exception, not truncate the float.
-		 */
-		return long_from_string(PyString_AS_STRING(o),
-					PyString_GET_SIZE(o));
+    if (PyString_Check(o))
+        /* need to do extra error checking that PyLong_FromString()
+         * doesn't do.  In particular long('9.5') must raise an
+         * exception, not truncate the float.
+         */
+        return long_from_string(PyString_AS_STRING(o),
+                                PyString_GET_SIZE(o));
 #ifdef Py_USING_UNICODE
-	if (PyUnicode_Check(o))
-		/* The above check is done in PyLong_FromUnicode(). */
-		return PyLong_FromUnicode(PyUnicode_AS_UNICODE(o),
-					  PyUnicode_GET_SIZE(o),
-					  10);
+    if (PyUnicode_Check(o))
+        /* The above check is done in PyLong_FromUnicode(). */
+        return PyLong_FromUnicode(PyUnicode_AS_UNICODE(o),
+                                  PyUnicode_GET_SIZE(o),
+                                  10);
 #endif
-	if (!PyObject_AsCharBuffer(o, &buffer, &buffer_len))
-		return long_from_string(buffer, buffer_len);
+    if (!PyObject_AsCharBuffer(o, &buffer, &buffer_len))
+        return long_from_string(buffer, buffer_len);
 
-	return type_error("long() argument must be a string or a "
-			  "number, not '%.200s'", o);
+    return type_error("long() argument must be a string or a "
+                      "number, not '%.200s'", o);
 }
 
 PyObject *
 PyNumber_Float(PyObject *o)
 {
-	PyNumberMethods *m;
+    PyNumberMethods *m;
 
-	if (o == NULL)
-		return null_error();
-	m = o->ob_type->tp_as_number;
-	if (m && m->nb_float) { /* This should include subclasses of float */
-		PyObject *res = m->nb_float(o);
-		if (res && !PyFloat_Check(res)) {
-			PyErr_Format(PyExc_TypeError,
-		          "__float__ returned non-float (type %.200s)",
-		          res->ob_type->tp_name);
-			Py_DECREF(res);
-			return NULL;
-		}
-		return res;
-	}
-	if (PyFloat_Check(o)) { /* A float subclass with nb_float == NULL */
-		PyFloatObject *po = (PyFloatObject *)o;
-		return PyFloat_FromDouble(po->ob_fval);
-	}
-	return PyFloat_FromString(o, NULL);
+    if (o == NULL)
+        return null_error();
+    m = o->ob_type->tp_as_number;
+    if (m && m->nb_float) { /* This should include subclasses of float */
+        PyObject *res = m->nb_float(o);
+        if (res && !PyFloat_Check(res)) {
+            PyErr_Format(PyExc_TypeError,
+              "__float__ returned non-float (type %.200s)",
+              res->ob_type->tp_name);
+            Py_DECREF(res);
+            return NULL;
+        }
+        return res;
+    }
+    if (PyFloat_Check(o)) { /* A float subclass with nb_float == NULL */
+        PyFloatObject *po = (PyFloatObject *)o;
+        return PyFloat_FromDouble(po->ob_fval);
+    }
+    return PyFloat_FromString(o, NULL);
 }
 
 PyObject *
 PyNumber_ToBase(PyObject *n, int base)
 {
-	PyObject *res = NULL;
-	PyObject *index = PyNumber_Index(n);
+    PyObject *res = NULL;
+    PyObject *index = PyNumber_Index(n);
 
-	if (!index)
-		return NULL;
-	if (PyLong_Check(index))
-		res = _PyLong_Format(index, base, 0, 1);
-	else if (PyInt_Check(index))
-	  	res = _PyInt_Format((PyIntObject*)index, base, 1);
-	else
-		/* It should not be possible to get here, as
-		   PyNumber_Index already has a check for the same
-		   condition */
-		PyErr_SetString(PyExc_ValueError, "PyNumber_ToBase: index not "
-				"int or long");
-	Py_DECREF(index);
-	return res;
+    if (!index)
+        return NULL;
+    if (PyLong_Check(index))
+        res = _PyLong_Format(index, base, 0, 1);
+    else if (PyInt_Check(index))
+        res = _PyInt_Format((PyIntObject*)index, base, 1);
+    else
+        /* It should not be possible to get here, as
+           PyNumber_Index already has a check for the same
+           condition */
+        PyErr_SetString(PyExc_ValueError, "PyNumber_ToBase: index not "
+                        "int or long");
+    Py_DECREF(index);
+    return res;
 }
 
 
@@ -1833,544 +1833,544 @@
 int
 PySequence_Check(PyObject *s)
 {
-	if (s == NULL)
-		return 0;
-	if (PyInstance_Check(s))
-		return PyObject_HasAttrString(s, "__getitem__");
-	if (PyDict_Check(s))
-		return 0;
-	return  s->ob_type->tp_as_sequence &&
-		s->ob_type->tp_as_sequence->sq_item != NULL;
+    if (s == NULL)
+        return 0;
+    if (PyInstance_Check(s))
+        return PyObject_HasAttrString(s, "__getitem__");
+    if (PyDict_Check(s))
+        return 0;
+    return  s->ob_type->tp_as_sequence &&
+        s->ob_type->tp_as_sequence->sq_item != NULL;
 }
 
 Py_ssize_t
 PySequence_Size(PyObject *s)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (s == NULL) {
-		null_error();
-		return -1;
-	}
+    if (s == NULL) {
+        null_error();
+        return -1;
+    }
 
-	m = s->ob_type->tp_as_sequence;
-	if (m && m->sq_length)
-		return m->sq_length(s);
+    m = s->ob_type->tp_as_sequence;
+    if (m && m->sq_length)
+        return m->sq_length(s);
 
-	type_error("object of type '%.200s' has no len()", s);
-	return -1;
+    type_error("object of type '%.200s' has no len()", s);
+    return -1;
 }
 
 #undef PySequence_Length
 Py_ssize_t
 PySequence_Length(PyObject *s)
 {
-	return PySequence_Size(s);
+    return PySequence_Size(s);
 }
 #define PySequence_Length PySequence_Size
 
 PyObject *
 PySequence_Concat(PyObject *s, PyObject *o)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (s == NULL || o == NULL)
-		return null_error();
+    if (s == NULL || o == NULL)
+        return null_error();
 
-	m = s->ob_type->tp_as_sequence;
-	if (m && m->sq_concat)
-		return m->sq_concat(s, o);
+    m = s->ob_type->tp_as_sequence;
+    if (m && m->sq_concat)
+        return m->sq_concat(s, o);
 
-	/* Instances of user classes defining an __add__() method only
-	   have an nb_add slot, not an sq_concat slot.  So we fall back
-	   to nb_add if both arguments appear to be sequences. */
-	if (PySequence_Check(s) && PySequence_Check(o)) {
-		PyObject *result = binary_op1(s, o, NB_SLOT(nb_add));
-		if (result != Py_NotImplemented)
-			return result;
-		Py_DECREF(result);
-	}
-	return type_error("'%.200s' object can't be concatenated", s);
+    /* Instances of user classes defining an __add__() method only
+       have an nb_add slot, not an sq_concat slot.  So we fall back
+       to nb_add if both arguments appear to be sequences. */
+    if (PySequence_Check(s) && PySequence_Check(o)) {
+        PyObject *result = binary_op1(s, o, NB_SLOT(nb_add));
+        if (result != Py_NotImplemented)
+            return result;
+        Py_DECREF(result);
+    }
+    return type_error("'%.200s' object can't be concatenated", s);
 }
 
 PyObject *
 PySequence_Repeat(PyObject *o, Py_ssize_t count)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (o == NULL)
-		return null_error();
+    if (o == NULL)
+        return null_error();
 
-	m = o->ob_type->tp_as_sequence;
-	if (m && m->sq_repeat)
-		return m->sq_repeat(o, count);
+    m = o->ob_type->tp_as_sequence;
+    if (m && m->sq_repeat)
+        return m->sq_repeat(o, count);
 
-	/* Instances of user classes defining a __mul__() method only
-	   have an nb_multiply slot, not an sq_repeat slot. so we fall back
-	   to nb_multiply if o appears to be a sequence. */
-	if (PySequence_Check(o)) {
-		PyObject *n, *result;
-		n = PyInt_FromSsize_t(count);
-		if (n == NULL)
-			return NULL;
-		result = binary_op1(o, n, NB_SLOT(nb_multiply));
-		Py_DECREF(n);
-		if (result != Py_NotImplemented)
-			return result;
-		Py_DECREF(result);
-	}
-	return type_error("'%.200s' object can't be repeated", o);
+    /* Instances of user classes defining a __mul__() method only
+       have an nb_multiply slot, not an sq_repeat slot. so we fall back
+       to nb_multiply if o appears to be a sequence. */
+    if (PySequence_Check(o)) {
+        PyObject *n, *result;
+        n = PyInt_FromSsize_t(count);
+        if (n == NULL)
+            return NULL;
+        result = binary_op1(o, n, NB_SLOT(nb_multiply));
+        Py_DECREF(n);
+        if (result != Py_NotImplemented)
+            return result;
+        Py_DECREF(result);
+    }
+    return type_error("'%.200s' object can't be repeated", o);
 }
 
 PyObject *
 PySequence_InPlaceConcat(PyObject *s, PyObject *o)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (s == NULL || o == NULL)
-		return null_error();
+    if (s == NULL || o == NULL)
+        return null_error();
 
-	m = s->ob_type->tp_as_sequence;
-	if (m && HASINPLACE(s) && m->sq_inplace_concat)
-		return m->sq_inplace_concat(s, o);
-	if (m && m->sq_concat)
-		return m->sq_concat(s, o);
+    m = s->ob_type->tp_as_sequence;
+    if (m && HASINPLACE(s) && m->sq_inplace_concat)
+        return m->sq_inplace_concat(s, o);
+    if (m && m->sq_concat)
+        return m->sq_concat(s, o);
 
-	if (PySequence_Check(s) && PySequence_Check(o)) {
-		PyObject *result = binary_iop1(s, o, NB_SLOT(nb_inplace_add),
-					       NB_SLOT(nb_add));
-		if (result != Py_NotImplemented)
-			return result;
-		Py_DECREF(result);
-	}
-	return type_error("'%.200s' object can't be concatenated", s);
+    if (PySequence_Check(s) && PySequence_Check(o)) {
+        PyObject *result = binary_iop1(s, o, NB_SLOT(nb_inplace_add),
+                                       NB_SLOT(nb_add));
+        if (result != Py_NotImplemented)
+            return result;
+        Py_DECREF(result);
+    }
+    return type_error("'%.200s' object can't be concatenated", s);
 }
 
 PyObject *
 PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (o == NULL)
-		return null_error();
+    if (o == NULL)
+        return null_error();
 
-	m = o->ob_type->tp_as_sequence;
-	if (m && HASINPLACE(o) && m->sq_inplace_repeat)
-		return m->sq_inplace_repeat(o, count);
-	if (m && m->sq_repeat)
-		return m->sq_repeat(o, count);
+    m = o->ob_type->tp_as_sequence;
+    if (m && HASINPLACE(o) && m->sq_inplace_repeat)
+        return m->sq_inplace_repeat(o, count);
+    if (m && m->sq_repeat)
+        return m->sq_repeat(o, count);
 
-	if (PySequence_Check(o)) {
-		PyObject *n, *result;
-		n = PyInt_FromSsize_t(count);
-		if (n == NULL)
-			return NULL;
-		result = binary_iop1(o, n, NB_SLOT(nb_inplace_multiply),
-				     NB_SLOT(nb_multiply));
-		Py_DECREF(n);
-		if (result != Py_NotImplemented)
-			return result;
-		Py_DECREF(result);
-	}
-	return type_error("'%.200s' object can't be repeated", o);
+    if (PySequence_Check(o)) {
+        PyObject *n, *result;
+        n = PyInt_FromSsize_t(count);
+        if (n == NULL)
+            return NULL;
+        result = binary_iop1(o, n, NB_SLOT(nb_inplace_multiply),
+                             NB_SLOT(nb_multiply));
+        Py_DECREF(n);
+        if (result != Py_NotImplemented)
+            return result;
+        Py_DECREF(result);
+    }
+    return type_error("'%.200s' object can't be repeated", o);
 }
 
 PyObject *
 PySequence_GetItem(PyObject *s, Py_ssize_t i)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (s == NULL)
-		return null_error();
+    if (s == NULL)
+        return null_error();
 
-	m = s->ob_type->tp_as_sequence;
-	if (m && m->sq_item) {
-		if (i < 0) {
-			if (m->sq_length) {
-				Py_ssize_t l = (*m->sq_length)(s);
-				if (l < 0)
-					return NULL;
-				i += l;
-			}
-		}
-		return m->sq_item(s, i);
-	}
+    m = s->ob_type->tp_as_sequence;
+    if (m && m->sq_item) {
+        if (i < 0) {
+            if (m->sq_length) {
+                Py_ssize_t l = (*m->sq_length)(s);
+                if (l < 0)
+                    return NULL;
+                i += l;
+            }
+        }
+        return m->sq_item(s, i);
+    }
 
-	return type_error("'%.200s' object does not support indexing", s);
+    return type_error("'%.200s' object does not support indexing", s);
 }
 
 PyObject *
 PySequence_GetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2)
 {
-	PySequenceMethods *m;
-	PyMappingMethods *mp;
+    PySequenceMethods *m;
+    PyMappingMethods *mp;
 
-	if (!s) return null_error();
+    if (!s) return null_error();
 
-	m = s->ob_type->tp_as_sequence;
-	if (m && m->sq_slice) {
-		if (i1 < 0 || i2 < 0) {
-			if (m->sq_length) {
-				Py_ssize_t l = (*m->sq_length)(s);
-				if (l < 0)
-					return NULL;
-				if (i1 < 0)
-					i1 += l;
-				if (i2 < 0)
-					i2 += l;
-			}
-		}
-		return m->sq_slice(s, i1, i2);
-	} else if ((mp = s->ob_type->tp_as_mapping) && mp->mp_subscript) {
-		PyObject *res;
-		PyObject *slice = _PySlice_FromIndices(i1, i2);
-		if (!slice)
-			return NULL;
-		res = mp->mp_subscript(s, slice);
-		Py_DECREF(slice);
-		return res;
-	}
+    m = s->ob_type->tp_as_sequence;
+    if (m && m->sq_slice) {
+        if (i1 < 0 || i2 < 0) {
+            if (m->sq_length) {
+                Py_ssize_t l = (*m->sq_length)(s);
+                if (l < 0)
+                    return NULL;
+                if (i1 < 0)
+                    i1 += l;
+                if (i2 < 0)
+                    i2 += l;
+            }
+        }
+        return m->sq_slice(s, i1, i2);
+    } else if ((mp = s->ob_type->tp_as_mapping) && mp->mp_subscript) {
+        PyObject *res;
+        PyObject *slice = _PySlice_FromIndices(i1, i2);
+        if (!slice)
+            return NULL;
+        res = mp->mp_subscript(s, slice);
+        Py_DECREF(slice);
+        return res;
+    }
 
-	return type_error("'%.200s' object is unsliceable", s);
+    return type_error("'%.200s' object is unsliceable", s);
 }
 
 int
 PySequence_SetItem(PyObject *s, Py_ssize_t i, PyObject *o)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (s == NULL) {
-		null_error();
-		return -1;
-	}
+    if (s == NULL) {
+        null_error();
+        return -1;
+    }
 
-	m = s->ob_type->tp_as_sequence;
-	if (m && m->sq_ass_item) {
-		if (i < 0) {
-			if (m->sq_length) {
-				Py_ssize_t l = (*m->sq_length)(s);
-				if (l < 0)
-					return -1;
-				i += l;
-			}
-		}
-		return m->sq_ass_item(s, i, o);
-	}
+    m = s->ob_type->tp_as_sequence;
+    if (m && m->sq_ass_item) {
+        if (i < 0) {
+            if (m->sq_length) {
+                Py_ssize_t l = (*m->sq_length)(s);
+                if (l < 0)
+                    return -1;
+                i += l;
+            }
+        }
+        return m->sq_ass_item(s, i, o);
+    }
 
-	type_error("'%.200s' object does not support item assignment", s);
-	return -1;
+    type_error("'%.200s' object does not support item assignment", s);
+    return -1;
 }
 
 int
 PySequence_DelItem(PyObject *s, Py_ssize_t i)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (s == NULL) {
-		null_error();
-		return -1;
-	}
+    if (s == NULL) {
+        null_error();
+        return -1;
+    }
 
-	m = s->ob_type->tp_as_sequence;
-	if (m && m->sq_ass_item) {
-		if (i < 0) {
-			if (m->sq_length) {
-				Py_ssize_t l = (*m->sq_length)(s);
-				if (l < 0)
-					return -1;
-				i += l;
-			}
-		}
-		return m->sq_ass_item(s, i, (PyObject *)NULL);
-	}
+    m = s->ob_type->tp_as_sequence;
+    if (m && m->sq_ass_item) {
+        if (i < 0) {
+            if (m->sq_length) {
+                Py_ssize_t l = (*m->sq_length)(s);
+                if (l < 0)
+                    return -1;
+                i += l;
+            }
+        }
+        return m->sq_ass_item(s, i, (PyObject *)NULL);
+    }
 
-	type_error("'%.200s' object doesn't support item deletion", s);
-	return -1;
+    type_error("'%.200s' object doesn't support item deletion", s);
+    return -1;
 }
 
 int
 PySequence_SetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2, PyObject *o)
 {
-	PySequenceMethods *m;
-	PyMappingMethods *mp;
+    PySequenceMethods *m;
+    PyMappingMethods *mp;
 
-	if (s == NULL) {
-		null_error();
-		return -1;
-	}
+    if (s == NULL) {
+        null_error();
+        return -1;
+    }
 
-	m = s->ob_type->tp_as_sequence;
-	if (m && m->sq_ass_slice) {
-		if (i1 < 0 || i2 < 0) {
-			if (m->sq_length) {
-				Py_ssize_t l = (*m->sq_length)(s);
-				if (l < 0)
-					return -1;
-				if (i1 < 0)
-					i1 += l;
-				if (i2 < 0)
-					i2 += l;
-			}
-		}
-		return m->sq_ass_slice(s, i1, i2, o);
-	} else if ((mp = s->ob_type->tp_as_mapping) && mp->mp_ass_subscript) {
-		int res;
-		PyObject *slice = _PySlice_FromIndices(i1, i2);
-		if (!slice)
-			return -1;
-		res = mp->mp_ass_subscript(s, slice, o);
-		Py_DECREF(slice);
-		return res;
-	}
+    m = s->ob_type->tp_as_sequence;
+    if (m && m->sq_ass_slice) {
+        if (i1 < 0 || i2 < 0) {
+            if (m->sq_length) {
+                Py_ssize_t l = (*m->sq_length)(s);
+                if (l < 0)
+                    return -1;
+                if (i1 < 0)
+                    i1 += l;
+                if (i2 < 0)
+                    i2 += l;
+            }
+        }
+        return m->sq_ass_slice(s, i1, i2, o);
+    } else if ((mp = s->ob_type->tp_as_mapping) && mp->mp_ass_subscript) {
+        int res;
+        PyObject *slice = _PySlice_FromIndices(i1, i2);
+        if (!slice)
+            return -1;
+        res = mp->mp_ass_subscript(s, slice, o);
+        Py_DECREF(slice);
+        return res;
+    }
 
-	type_error("'%.200s' object doesn't support slice assignment", s);
-	return -1;
+    type_error("'%.200s' object doesn't support slice assignment", s);
+    return -1;
 }
 
 int
 PySequence_DelSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2)
 {
-	PySequenceMethods *m;
+    PySequenceMethods *m;
 
-	if (s == NULL) {
-		null_error();
-		return -1;
-	}
+    if (s == NULL) {
+        null_error();
+        return -1;
+    }
 
-	m = s->ob_type->tp_as_sequence;
-	if (m && m->sq_ass_slice) {
-		if (i1 < 0 || i2 < 0) {
-			if (m->sq_length) {
-				Py_ssize_t l = (*m->sq_length)(s);
-				if (l < 0)
-					return -1;
-				if (i1 < 0)
-					i1 += l;
-				if (i2 < 0)
-					i2 += l;
-			}
-		}
-		return m->sq_ass_slice(s, i1, i2, (PyObject *)NULL);
-	}
-	type_error("'%.200s' object doesn't support slice deletion", s);
-	return -1;
+    m = s->ob_type->tp_as_sequence;
+    if (m && m->sq_ass_slice) {
+        if (i1 < 0 || i2 < 0) {
+            if (m->sq_length) {
+                Py_ssize_t l = (*m->sq_length)(s);
+                if (l < 0)
+                    return -1;
+                if (i1 < 0)
+                    i1 += l;
+                if (i2 < 0)
+                    i2 += l;
+            }
+        }
+        return m->sq_ass_slice(s, i1, i2, (PyObject *)NULL);
+    }
+    type_error("'%.200s' object doesn't support slice deletion", s);
+    return -1;
 }
 
 PyObject *
 PySequence_Tuple(PyObject *v)
 {
-	PyObject *it;  /* iter(v) */
-	Py_ssize_t n;         /* guess for result tuple size */
-	PyObject *result = NULL;
-	Py_ssize_t j;
+    PyObject *it;  /* iter(v) */
+    Py_ssize_t n;         /* guess for result tuple size */
+    PyObject *result = NULL;
+    Py_ssize_t j;
 
-	if (v == NULL)
-		return null_error();
+    if (v == NULL)
+        return null_error();
 
-	/* Special-case the common tuple and list cases, for efficiency. */
-	if (PyTuple_CheckExact(v)) {
-		/* Note that we can't know whether it's safe to return
-		   a tuple *subclass* instance as-is, hence the restriction
-		   to exact tuples here.  In contrast, lists always make
-		   a copy, so there's no need for exactness below. */
-		Py_INCREF(v);
-		return v;
-	}
-	if (PyList_Check(v))
-		return PyList_AsTuple(v);
+    /* Special-case the common tuple and list cases, for efficiency. */
+    if (PyTuple_CheckExact(v)) {
+        /* Note that we can't know whether it's safe to return
+           a tuple *subclass* instance as-is, hence the restriction
+           to exact tuples here.  In contrast, lists always make
+           a copy, so there's no need for exactness below. */
+        Py_INCREF(v);
+        return v;
+    }
+    if (PyList_Check(v))
+        return PyList_AsTuple(v);
 
-	/* Get iterator. */
-	it = PyObject_GetIter(v);
-	if (it == NULL)
-		return NULL;
+    /* Get iterator. */
+    it = PyObject_GetIter(v);
+    if (it == NULL)
+        return NULL;
 
-	/* Guess result size and allocate space. */
-	n = _PyObject_LengthHint(v, 10);
-	if (n == -1)
-		goto Fail;
-	result = PyTuple_New(n);
-	if (result == NULL)
-		goto Fail;
+    /* Guess result size and allocate space. */
+    n = _PyObject_LengthHint(v, 10);
+    if (n == -1)
+        goto Fail;
+    result = PyTuple_New(n);
+    if (result == NULL)
+        goto Fail;
 
-	/* Fill the tuple. */
-	for (j = 0; ; ++j) {
-		PyObject *item = PyIter_Next(it);
-		if (item == NULL) {
-			if (PyErr_Occurred())
-				goto Fail;
-			break;
-		}
-		if (j >= n) {
-			Py_ssize_t oldn = n;
-			/* The over-allocation strategy can grow a bit faster
-			   than for lists because unlike lists the 
-			   over-allocation isn't permanent -- we reclaim
-			   the excess before the end of this routine.
-			   So, grow by ten and then add 25%.
-			*/
-			n += 10;
-			n += n >> 2;
-			if (n < oldn) {
-				/* Check for overflow */
-				PyErr_NoMemory();
-				Py_DECREF(item);
-				goto Fail; 
-			}
-			if (_PyTuple_Resize(&result, n) != 0) {
-				Py_DECREF(item);
-				goto Fail;
-			}
-		}
-		PyTuple_SET_ITEM(result, j, item);
-	}
+    /* Fill the tuple. */
+    for (j = 0; ; ++j) {
+        PyObject *item = PyIter_Next(it);
+        if (item == NULL) {
+            if (PyErr_Occurred())
+                goto Fail;
+            break;
+        }
+        if (j >= n) {
+            Py_ssize_t oldn = n;
+            /* The over-allocation strategy can grow a bit faster
+               than for lists because unlike lists the
+               over-allocation isn't permanent -- we reclaim
+               the excess before the end of this routine.
+               So, grow by ten and then add 25%.
+            */
+            n += 10;
+            n += n >> 2;
+            if (n < oldn) {
+                /* Check for overflow */
+                PyErr_NoMemory();
+                Py_DECREF(item);
+                goto Fail;
+            }
+            if (_PyTuple_Resize(&result, n) != 0) {
+                Py_DECREF(item);
+                goto Fail;
+            }
+        }
+        PyTuple_SET_ITEM(result, j, item);
+    }
 
-	/* Cut tuple back if guess was too large. */
-	if (j < n &&
-	    _PyTuple_Resize(&result, j) != 0)
-		goto Fail;
+    /* Cut tuple back if guess was too large. */
+    if (j < n &&
+        _PyTuple_Resize(&result, j) != 0)
+        goto Fail;
 
-	Py_DECREF(it);
-	return result;
+    Py_DECREF(it);
+    return result;
 
 Fail:
-	Py_XDECREF(result);
-	Py_DECREF(it);
-	return NULL;
+    Py_XDECREF(result);
+    Py_DECREF(it);
+    return NULL;
 }
 
 PyObject *
 PySequence_List(PyObject *v)
 {
-	PyObject *result;  /* result list */
-	PyObject *rv;      /* return value from PyList_Extend */
+    PyObject *result;  /* result list */
+    PyObject *rv;      /* return value from PyList_Extend */
 
-	if (v == NULL)
-		return null_error();
+    if (v == NULL)
+        return null_error();
 
-	result = PyList_New(0);
-	if (result == NULL)
-		return NULL;
+    result = PyList_New(0);
+    if (result == NULL)
+        return NULL;
 
-	rv = _PyList_Extend((PyListObject *)result, v);
-	if (rv == NULL) {
-		Py_DECREF(result);
-		return NULL;
-	}
-	Py_DECREF(rv);
-	return result;
+    rv = _PyList_Extend((PyListObject *)result, v);
+    if (rv == NULL) {
+        Py_DECREF(result);
+        return NULL;
+    }
+    Py_DECREF(rv);
+    return result;
 }
 
 PyObject *
 PySequence_Fast(PyObject *v, const char *m)
 {
-	PyObject *it;
+    PyObject *it;
 
-	if (v == NULL)
-		return null_error();
+    if (v == NULL)
+        return null_error();
 
-	if (PyList_CheckExact(v) || PyTuple_CheckExact(v)) {
-		Py_INCREF(v);
-		return v;
-	}
+    if (PyList_CheckExact(v) || PyTuple_CheckExact(v)) {
+        Py_INCREF(v);
+        return v;
+    }
 
- 	it = PyObject_GetIter(v);
-	if (it == NULL) {
-		if (PyErr_ExceptionMatches(PyExc_TypeError))
-			PyErr_SetString(PyExc_TypeError, m);
-		return NULL;
-	}
+    it = PyObject_GetIter(v);
+    if (it == NULL) {
+        if (PyErr_ExceptionMatches(PyExc_TypeError))
+            PyErr_SetString(PyExc_TypeError, m);
+        return NULL;
+    }
 
-	v = PySequence_List(it);
-	Py_DECREF(it);
+    v = PySequence_List(it);
+    Py_DECREF(it);
 
-	return v;
+    return v;
 }
 
 /* Iterate over seq.  Result depends on the operation:
    PY_ITERSEARCH_COUNT:  -1 if error, else # of times obj appears in seq.
    PY_ITERSEARCH_INDEX:  0-based index of first occurrence of obj in seq;
-   	set ValueError and return -1 if none found; also return -1 on error.
+    set ValueError and return -1 if none found; also return -1 on error.
    Py_ITERSEARCH_CONTAINS:  return 1 if obj in seq, else 0; -1 on error.
 */
 Py_ssize_t
 _PySequence_IterSearch(PyObject *seq, PyObject *obj, int operation)
 {
-	Py_ssize_t n;
-	int wrapped;  /* for PY_ITERSEARCH_INDEX, true iff n wrapped around */
-	PyObject *it;  /* iter(seq) */
+    Py_ssize_t n;
+    int wrapped;  /* for PY_ITERSEARCH_INDEX, true iff n wrapped around */
+    PyObject *it;  /* iter(seq) */
 
-	if (seq == NULL || obj == NULL) {
-		null_error();
-		return -1;
-	}
+    if (seq == NULL || obj == NULL) {
+        null_error();
+        return -1;
+    }
 
-	it = PyObject_GetIter(seq);
-	if (it == NULL) {
-		type_error("argument of type '%.200s' is not iterable", seq);
-		return -1;
-	}
+    it = PyObject_GetIter(seq);
+    if (it == NULL) {
+        type_error("argument of type '%.200s' is not iterable", seq);
+        return -1;
+    }
 
-	n = wrapped = 0;
-	for (;;) {
-		int cmp;
-		PyObject *item = PyIter_Next(it);
-		if (item == NULL) {
-			if (PyErr_Occurred())
-				goto Fail;
-			break;
-		}
+    n = wrapped = 0;
+    for (;;) {
+        int cmp;
+        PyObject *item = PyIter_Next(it);
+        if (item == NULL) {
+            if (PyErr_Occurred())
+                goto Fail;
+            break;
+        }
 
-		cmp = PyObject_RichCompareBool(obj, item, Py_EQ);
-		Py_DECREF(item);
-		if (cmp < 0)
-			goto Fail;
-		if (cmp > 0) {
-			switch (operation) {
-			case PY_ITERSEARCH_COUNT:
-				if (n == PY_SSIZE_T_MAX) {
-					PyErr_SetString(PyExc_OverflowError,
-					       "count exceeds C integer size");
-					goto Fail;
-				}
-				++n;
-				break;
+        cmp = PyObject_RichCompareBool(obj, item, Py_EQ);
+        Py_DECREF(item);
+        if (cmp < 0)
+            goto Fail;
+        if (cmp > 0) {
+            switch (operation) {
+            case PY_ITERSEARCH_COUNT:
+                if (n == PY_SSIZE_T_MAX) {
+                    PyErr_SetString(PyExc_OverflowError,
+                           "count exceeds C integer size");
+                    goto Fail;
+                }
+                ++n;
+                break;
 
-			case PY_ITERSEARCH_INDEX:
-				if (wrapped) {
-					PyErr_SetString(PyExc_OverflowError,
-					       "index exceeds C integer size");
-					goto Fail;
-				}
-				goto Done;
+            case PY_ITERSEARCH_INDEX:
+                if (wrapped) {
+                    PyErr_SetString(PyExc_OverflowError,
+                           "index exceeds C integer size");
+                    goto Fail;
+                }
+                goto Done;
 
-			case PY_ITERSEARCH_CONTAINS:
-				n = 1;
-				goto Done;
+            case PY_ITERSEARCH_CONTAINS:
+                n = 1;
+                goto Done;
 
-			default:
-				assert(!"unknown operation");
-			}
-		}
+            default:
+                assert(!"unknown operation");
+            }
+        }
 
-		if (operation == PY_ITERSEARCH_INDEX) {
-			if (n == PY_SSIZE_T_MAX)
-				wrapped = 1;
-			++n;
-		}
-	}
+        if (operation == PY_ITERSEARCH_INDEX) {
+            if (n == PY_SSIZE_T_MAX)
+                wrapped = 1;
+            ++n;
+        }
+    }
 
-	if (operation != PY_ITERSEARCH_INDEX)
-		goto Done;
+    if (operation != PY_ITERSEARCH_INDEX)
+        goto Done;
 
-	PyErr_SetString(PyExc_ValueError,
-		        "sequence.index(x): x not in sequence");
-	/* fall into failure code */
+    PyErr_SetString(PyExc_ValueError,
+                    "sequence.index(x): x not in sequence");
+    /* fall into failure code */
 Fail:
-	n = -1;
-	/* fall through */
+    n = -1;
+    /* fall through */
 Done:
-	Py_DECREF(it);
-	return n;
+    Py_DECREF(it);
+    return n;
 
 }
 
@@ -2378,7 +2378,7 @@
 Py_ssize_t
 PySequence_Count(PyObject *s, PyObject *o)
 {
-	return _PySequence_IterSearch(s, o, PY_ITERSEARCH_COUNT);
+    return _PySequence_IterSearch(s, o, PY_ITERSEARCH_COUNT);
 }
 
 /* Return -1 if error; 1 if ob in seq; 0 if ob not in seq.
@@ -2387,14 +2387,14 @@
 int
 PySequence_Contains(PyObject *seq, PyObject *ob)
 {
-	Py_ssize_t result;
-	if (PyType_HasFeature(seq->ob_type, Py_TPFLAGS_HAVE_SEQUENCE_IN)) {
-		PySequenceMethods *sqm = seq->ob_type->tp_as_sequence;
-	        if (sqm != NULL && sqm->sq_contains != NULL)
-			return (*sqm->sq_contains)(seq, ob);
-	}
-	result = _PySequence_IterSearch(seq, ob, PY_ITERSEARCH_CONTAINS);
-	return Py_SAFE_DOWNCAST(result, Py_ssize_t, int);
+    Py_ssize_t result;
+    if (PyType_HasFeature(seq->ob_type, Py_TPFLAGS_HAVE_SEQUENCE_IN)) {
+        PySequenceMethods *sqm = seq->ob_type->tp_as_sequence;
+        if (sqm != NULL && sqm->sq_contains != NULL)
+            return (*sqm->sq_contains)(seq, ob);
+    }
+    result = _PySequence_IterSearch(seq, ob, PY_ITERSEARCH_CONTAINS);
+    return Py_SAFE_DOWNCAST(result, Py_ssize_t, int);
 }
 
 /* Backwards compatibility */
@@ -2402,13 +2402,13 @@
 int
 PySequence_In(PyObject *w, PyObject *v)
 {
-	return PySequence_Contains(w, v);
+    return PySequence_Contains(w, v);
 }
 
 Py_ssize_t
 PySequence_Index(PyObject *s, PyObject *o)
 {
-	return _PySequence_IterSearch(s, o, PY_ITERSEARCH_INDEX);
+    return _PySequence_IterSearch(s, o, PY_ITERSEARCH_INDEX);
 }
 
 /* Operations on mappings */
@@ -2416,102 +2416,102 @@
 int
 PyMapping_Check(PyObject *o)
 {
-	if (o && PyInstance_Check(o))
-		return PyObject_HasAttrString(o, "__getitem__");
+    if (o && PyInstance_Check(o))
+        return PyObject_HasAttrString(o, "__getitem__");
 
-	return  o && o->ob_type->tp_as_mapping &&
-		o->ob_type->tp_as_mapping->mp_subscript &&
-		!(o->ob_type->tp_as_sequence && 
-		  o->ob_type->tp_as_sequence->sq_slice);
+    return  o && o->ob_type->tp_as_mapping &&
+        o->ob_type->tp_as_mapping->mp_subscript &&
+        !(o->ob_type->tp_as_sequence &&
+          o->ob_type->tp_as_sequence->sq_slice);
 }
 
 Py_ssize_t
 PyMapping_Size(PyObject *o)
 {
-	PyMappingMethods *m;
+    PyMappingMethods *m;
 
-	if (o == NULL) {
-		null_error();
-		return -1;
-	}
+    if (o == NULL) {
+        null_error();
+        return -1;
+    }
 
-	m = o->ob_type->tp_as_mapping;
-	if (m && m->mp_length)
-		return m->mp_length(o);
+    m = o->ob_type->tp_as_mapping;
+    if (m && m->mp_length)
+        return m->mp_length(o);
 
-	type_error("object of type '%.200s' has no len()", o);
-	return -1;
+    type_error("object of type '%.200s' has no len()", o);
+    return -1;
 }
 
 #undef PyMapping_Length
 Py_ssize_t
 PyMapping_Length(PyObject *o)
 {
-	return PyMapping_Size(o);
+    return PyMapping_Size(o);
 }
 #define PyMapping_Length PyMapping_Size
 
 PyObject *
 PyMapping_GetItemString(PyObject *o, char *key)
 {
-	PyObject *okey, *r;
+    PyObject *okey, *r;
 
-	if (key == NULL)
-		return null_error();
+    if (key == NULL)
+        return null_error();
 
-	okey = PyString_FromString(key);
-	if (okey == NULL)
-		return NULL;
-	r = PyObject_GetItem(o, okey);
-	Py_DECREF(okey);
-	return r;
+    okey = PyString_FromString(key);
+    if (okey == NULL)
+        return NULL;
+    r = PyObject_GetItem(o, okey);
+    Py_DECREF(okey);
+    return r;
 }
 
 int
 PyMapping_SetItemString(PyObject *o, char *key, PyObject *value)
 {
-	PyObject *okey;
-	int r;
+    PyObject *okey;
+    int r;
 
-	if (key == NULL) {
-		null_error();
-		return -1;
-	}
+    if (key == NULL) {
+        null_error();
+        return -1;
+    }
 
-	okey = PyString_FromString(key);
-	if (okey == NULL)
-		return -1;
-	r = PyObject_SetItem(o, okey, value);
-	Py_DECREF(okey);
-	return r;
+    okey = PyString_FromString(key);
+    if (okey == NULL)
+        return -1;
+    r = PyObject_SetItem(o, okey, value);
+    Py_DECREF(okey);
+    return r;
 }
 
 int
 PyMapping_HasKeyString(PyObject *o, char *key)
 {
-	PyObject *v;
+    PyObject *v;
 
-	v = PyMapping_GetItemString(o, key);
-	if (v) {
-		Py_DECREF(v);
-		return 1;
-	}
-	PyErr_Clear();
-	return 0;
+    v = PyMapping_GetItemString(o, key);
+    if (v) {
+        Py_DECREF(v);
+        return 1;
+    }
+    PyErr_Clear();
+    return 0;
 }
 
 int
 PyMapping_HasKey(PyObject *o, PyObject *key)
 {
-	PyObject *v;
+    PyObject *v;
 
-	v = PyObject_GetItem(o, key);
-	if (v) {
-		Py_DECREF(v);
-		return 1;
-	}
-	PyErr_Clear();
-	return 0;
+    v = PyObject_GetItem(o, key);
+    if (v) {
+        Py_DECREF(v);
+        return 1;
+    }
+    PyErr_Clear();
+    return 0;
 }
 
 /* Operations on callable objects */
@@ -2521,253 +2521,253 @@
 PyObject *
 PyObject_CallObject(PyObject *o, PyObject *a)
 {
-	return PyEval_CallObjectWithKeywords(o, a, NULL);
+    return PyEval_CallObjectWithKeywords(o, a, NULL);
 }
 
 PyObject *
 PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
 {
-        ternaryfunc call;
+    ternaryfunc call;
 
-	if ((call = func->ob_type->tp_call) != NULL) {
-		PyObject *result;
-		if (Py_EnterRecursiveCall(" while calling a Python object"))
-		    return NULL;
-		result = (*call)(func, arg, kw);
-		Py_LeaveRecursiveCall();
-		if (result == NULL && !PyErr_Occurred())
-			PyErr_SetString(
-				PyExc_SystemError,
-				"NULL result without error in PyObject_Call");
-		return result;
-	}
-	PyErr_Format(PyExc_TypeError, "'%.200s' object is not callable",
-		     func->ob_type->tp_name);
-	return NULL;
+    if ((call = func->ob_type->tp_call) != NULL) {
+        PyObject *result;
+        if (Py_EnterRecursiveCall(" while calling a Python object"))
+            return NULL;
+        result = (*call)(func, arg, kw);
+        Py_LeaveRecursiveCall();
+        if (result == NULL && !PyErr_Occurred())
+            PyErr_SetString(
+                PyExc_SystemError,
+                "NULL result without error in PyObject_Call");
+        return result;
+    }
+    PyErr_Format(PyExc_TypeError, "'%.200s' object is not callable",
+                 func->ob_type->tp_name);
+    return NULL;
 }
 
 static PyObject*
 call_function_tail(PyObject *callable, PyObject *args)
 {
-	PyObject *retval;
+    PyObject *retval;
 
-	if (args == NULL)
-		return NULL;
+    if (args == NULL)
+        return NULL;
 
-	if (!PyTuple_Check(args)) {
-		PyObject *a;
+    if (!PyTuple_Check(args)) {
+        PyObject *a;
 
-		a = PyTuple_New(1);
-		if (a == NULL) {
-			Py_DECREF(args);
-			return NULL;
-		}
-		PyTuple_SET_ITEM(a, 0, args);
-		args = a;
-	}
-	retval = PyObject_Call(callable, args, NULL);
+        a = PyTuple_New(1);
+        if (a == NULL) {
+            Py_DECREF(args);
+            return NULL;
+        }
+        PyTuple_SET_ITEM(a, 0, args);
+        args = a;
+    }
+    retval = PyObject_Call(callable, args, NULL);
 
-	Py_DECREF(args);
+    Py_DECREF(args);
 
-	return retval;
+    return retval;
 }
 
 PyObject *
 PyObject_CallFunction(PyObject *callable, char *format, ...)
 {
-	va_list va;
-	PyObject *args;
+    va_list va;
+    PyObject *args;
 
-	if (callable == NULL)
-		return null_error();
+    if (callable == NULL)
+        return null_error();
 
-	if (format && *format) {
-		va_start(va, format);
-		args = Py_VaBuildValue(format, va);
-		va_end(va);
-	}
-	else
-		args = PyTuple_New(0);
+    if (format && *format) {
+        va_start(va, format);
+        args = Py_VaBuildValue(format, va);
+        va_end(va);
+    }
+    else
+        args = PyTuple_New(0);
 
-	return call_function_tail(callable, args);
+    return call_function_tail(callable, args);
 }
 
 PyObject *
 _PyObject_CallFunction_SizeT(PyObject *callable, char *format, ...)
 {
-	va_list va;
-	PyObject *args;
+    va_list va;
+    PyObject *args;
 
-	if (callable == NULL)
-		return null_error();
+    if (callable == NULL)
+        return null_error();
 
-	if (format && *format) {
-		va_start(va, format);
-		args = _Py_VaBuildValue_SizeT(format, va);
-		va_end(va);
-	}
-	else
-		args = PyTuple_New(0);
+    if (format && *format) {
+        va_start(va, format);
+        args = _Py_VaBuildValue_SizeT(format, va);
+        va_end(va);
+    }
+    else
+        args = PyTuple_New(0);
 
-	return call_function_tail(callable, args);
+    return call_function_tail(callable, args);
 }
 
 PyObject *
 PyObject_CallMethod(PyObject *o, char *name, char *format, ...)
 {
-	va_list va;
-	PyObject *args;
-	PyObject *func = NULL;
-	PyObject *retval = NULL;
+    va_list va;
+    PyObject *args;
+    PyObject *func = NULL;
+    PyObject *retval = NULL;
 
-	if (o == NULL || name == NULL)
-		return null_error();
+    if (o == NULL || name == NULL)
+        return null_error();
 
-	func = PyObject_GetAttrString(o, name);
-	if (func == NULL) {
-		PyErr_SetString(PyExc_AttributeError, name);
-		return 0;
-	}
+    func = PyObject_GetAttrString(o, name);
+    if (func == NULL) {
+        PyErr_SetString(PyExc_AttributeError, name);
+        return 0;
+    }
 
-	if (!PyCallable_Check(func)) {
-		type_error("attribute of type '%.200s' is not callable", func); 
-		goto exit;
-	}
+    if (!PyCallable_Check(func)) {
+        type_error("attribute of type '%.200s' is not callable", func);
+        goto exit;
+    }
 
-	if (format && *format) {
-		va_start(va, format);
-		args = Py_VaBuildValue(format, va);
-		va_end(va);
-	}
-	else
-		args = PyTuple_New(0);
+    if (format && *format) {
+        va_start(va, format);
+        args = Py_VaBuildValue(format, va);
+        va_end(va);
+    }
+    else
+        args = PyTuple_New(0);
 
-	retval = call_function_tail(func, args);
+    retval = call_function_tail(func, args);
 
   exit:
-	/* args gets consumed in call_function_tail */
-	Py_XDECREF(func);
+    /* args gets consumed in call_function_tail */
+    Py_XDECREF(func);
 
-	return retval;
+    return retval;
 }
 
 PyObject *
 _PyObject_CallMethod_SizeT(PyObject *o, char *name, char *format, ...)
 {
-	va_list va;
-	PyObject *args;
-	PyObject *func = NULL;
-	PyObject *retval = NULL;
+    va_list va;
+    PyObject *args;
+    PyObject *func = NULL;
+    PyObject *retval = NULL;
 
-	if (o == NULL || name == NULL)
-		return null_error();
+    if (o == NULL || name == NULL)
+        return null_error();
 
-	func = PyObject_GetAttrString(o, name);
-	if (func == NULL) {
-		PyErr_SetString(PyExc_AttributeError, name);
-		return 0;
-	}
+    func = PyObject_GetAttrString(o, name);
+    if (func == NULL) {
+        PyErr_SetString(PyExc_AttributeError, name);
+        return 0;
+    }
 
-	if (!PyCallable_Check(func)) {
-		type_error("attribute of type '%.200s' is not callable", func); 
-		goto exit;
-	}
+    if (!PyCallable_Check(func)) {
+        type_error("attribute of type '%.200s' is not callable", func);
+        goto exit;
+    }
 
-	if (format && *format) {
-		va_start(va, format);
-		args = _Py_VaBuildValue_SizeT(format, va);
-		va_end(va);
-	}
-	else
-		args = PyTuple_New(0);
+    if (format && *format) {
+        va_start(va, format);
+        args = _Py_VaBuildValue_SizeT(format, va);
+        va_end(va);
+    }
+    else
+        args = PyTuple_New(0);
 
-	retval = call_function_tail(func, args);
+    retval = call_function_tail(func, args);
 
   exit:
-	/* args gets consumed in call_function_tail */
-	Py_XDECREF(func);
+    /* args gets consumed in call_function_tail */
+    Py_XDECREF(func);
 
-	return retval;
+    return retval;
 }
 
 
 static PyObject *
 objargs_mktuple(va_list va)
 {
-	int i, n = 0;
-	va_list countva;
-	PyObject *result, *tmp;
+    int i, n = 0;
+    va_list countva;
+    PyObject *result, *tmp;
 
 #ifdef VA_LIST_IS_ARRAY
-	memcpy(countva, va, sizeof(va_list));
+    memcpy(countva, va, sizeof(va_list));
 #else
 #ifdef __va_copy
-	__va_copy(countva, va);
+    __va_copy(countva, va);
 #else
-	countva = va;
+    countva = va;
 #endif
 #endif
 
-	while (((PyObject *)va_arg(countva, PyObject *)) != NULL)
-		++n;
-	result = PyTuple_New(n);
-	if (result != NULL && n > 0) {
-		for (i = 0; i < n; ++i) {
-			tmp = (PyObject *)va_arg(va, PyObject *);
-			PyTuple_SET_ITEM(result, i, tmp);
-			Py_INCREF(tmp);
-		}
-	}
-	return result;
+    while (((PyObject *)va_arg(countva, PyObject *)) != NULL)
+        ++n;
+    result = PyTuple_New(n);
+    if (result != NULL && n > 0) {
+        for (i = 0; i < n; ++i) {
+            tmp = (PyObject *)va_arg(va, PyObject *);
+            PyTuple_SET_ITEM(result, i, tmp);
+            Py_INCREF(tmp);
+        }
+    }
+    return result;
 }
 
 PyObject *
 PyObject_CallMethodObjArgs(PyObject *callable, PyObject *name, ...)
 {
-	PyObject *args, *tmp;
-	va_list vargs;
+    PyObject *args, *tmp;
+    va_list vargs;
 
-	if (callable == NULL || name == NULL)
-		return null_error();
+    if (callable == NULL || name == NULL)
+        return null_error();
 
-	callable = PyObject_GetAttr(callable, name);
-	if (callable == NULL)
-		return NULL;
+    callable = PyObject_GetAttr(callable, name);
+    if (callable == NULL)
+        return NULL;
 
-	/* count the args */
-	va_start(vargs, name);
-	args = objargs_mktuple(vargs);
-	va_end(vargs);
-	if (args == NULL) {
-		Py_DECREF(callable);
-		return NULL;
-	}
-	tmp = PyObject_Call(callable, args, NULL);
-	Py_DECREF(args);
-	Py_DECREF(callable);
+    /* count the args */
+    va_start(vargs, name);
+    args = objargs_mktuple(vargs);
+    va_end(vargs);
+    if (args == NULL) {
+        Py_DECREF(callable);
+        return NULL;
+    }
+    tmp = PyObject_Call(callable, args, NULL);
+    Py_DECREF(args);
+    Py_DECREF(callable);
 
-	return tmp;
+    return tmp;
 }
 
 PyObject *
 PyObject_CallFunctionObjArgs(PyObject *callable, ...)
 {
-	PyObject *args, *tmp;
-	va_list vargs;
+    PyObject *args, *tmp;
+    va_list vargs;
 
-	if (callable == NULL)
-		return null_error();
+    if (callable == NULL)
+        return null_error();
 
-	/* count the args */
-	va_start(vargs, callable);
-	args = objargs_mktuple(vargs);
-	va_end(vargs);
-	if (args == NULL)
-		return NULL;
-	tmp = PyObject_Call(callable, args, NULL);
-	Py_DECREF(args);
+    /* count the args */
+    va_start(vargs, callable);
+    args = objargs_mktuple(vargs);
+    va_end(vargs);
+    if (args == NULL)
+        return NULL;
+    tmp = PyObject_Call(callable, args, NULL);
+    Py_DECREF(args);
 
-	return tmp;
+    return tmp;
 }
 
 
@@ -2802,302 +2802,302 @@
 static PyObject *
 abstract_get_bases(PyObject *cls)
 {
-	static PyObject *__bases__ = NULL;
-	PyObject *bases;
+    static PyObject *__bases__ = NULL;
+    PyObject *bases;
 
-	if (__bases__ == NULL) {
-		__bases__ = PyString_InternFromString("__bases__");
-		if (__bases__ == NULL)
-			return NULL;
-	}
-	bases = PyObject_GetAttr(cls, __bases__);
-	if (bases == NULL) {
-		if (PyErr_ExceptionMatches(PyExc_AttributeError))
-			PyErr_Clear();
-		return NULL;
-	}
-	if (!PyTuple_Check(bases)) {
-	        Py_DECREF(bases);
-		return NULL;
-	}
-	return bases;
+    if (__bases__ == NULL) {
+        __bases__ = PyString_InternFromString("__bases__");
+        if (__bases__ == NULL)
+            return NULL;
+    }
+    bases = PyObject_GetAttr(cls, __bases__);
+    if (bases == NULL) {
+        if (PyErr_ExceptionMatches(PyExc_AttributeError))
+            PyErr_Clear();
+        return NULL;
+    }
+    if (!PyTuple_Check(bases)) {
+        Py_DECREF(bases);
+        return NULL;
+    }
+    return bases;
 }
 
 
 static int
 abstract_issubclass(PyObject *derived, PyObject *cls)
 {
-	PyObject *bases = NULL;
-	Py_ssize_t i, n;
-	int r = 0;
+    PyObject *bases = NULL;
+    Py_ssize_t i, n;
+    int r = 0;
 
-	while (1) {
-		if (derived == cls)
-			return 1;
-		bases = abstract_get_bases(derived);
-		if (bases == NULL) {
-			if (PyErr_Occurred())
-				return -1;
-			return 0;
-		}
-		n = PyTuple_GET_SIZE(bases);
-		if (n == 0) {
-			Py_DECREF(bases);
-			return 0;
-		}
-		/* Avoid recursivity in the single inheritance case */
-		if (n == 1) {
-			derived = PyTuple_GET_ITEM(bases, 0);
-			Py_DECREF(bases);
-			continue;
-		}
-		for (i = 0; i < n; i++) {
-			r = abstract_issubclass(PyTuple_GET_ITEM(bases, i), cls);
-			if (r != 0)
-				break;
-		}
-		Py_DECREF(bases);
-		return r;
-	}
+    while (1) {
+        if (derived == cls)
+            return 1;
+        bases = abstract_get_bases(derived);
+        if (bases == NULL) {
+            if (PyErr_Occurred())
+                return -1;
+            return 0;
+        }
+        n = PyTuple_GET_SIZE(bases);
+        if (n == 0) {
+            Py_DECREF(bases);
+            return 0;
+        }
+        /* Avoid recursivity in the single inheritance case */
+        if (n == 1) {
+            derived = PyTuple_GET_ITEM(bases, 0);
+            Py_DECREF(bases);
+            continue;
+        }
+        for (i = 0; i < n; i++) {
+            r = abstract_issubclass(PyTuple_GET_ITEM(bases, i), cls);
+            if (r != 0)
+                break;
+        }
+        Py_DECREF(bases);
+        return r;
+    }
 }
 
 static int
 check_class(PyObject *cls, const char *error)
 {
-	PyObject *bases = abstract_get_bases(cls);
-	if (bases == NULL) {
-		/* Do not mask errors. */
-		if (!PyErr_Occurred())
-			PyErr_SetString(PyExc_TypeError, error);
-		return 0;
-	}
-	Py_DECREF(bases);
-	return -1;
+    PyObject *bases = abstract_get_bases(cls);
+    if (bases == NULL) {
+        /* Do not mask errors. */
+        if (!PyErr_Occurred())
+            PyErr_SetString(PyExc_TypeError, error);
+        return 0;
+    }
+    Py_DECREF(bases);
+    return -1;
 }
 
 static int
 recursive_isinstance(PyObject *inst, PyObject *cls)
 {
-	PyObject *icls;
-	static PyObject *__class__ = NULL;
-	int retval = 0;
+    PyObject *icls;
+    static PyObject *__class__ = NULL;
+    int retval = 0;
 
-	if (__class__ == NULL) {
-		__class__ = PyString_InternFromString("__class__");
-		if (__class__ == NULL)
-			return -1;
-	}
+    if (__class__ == NULL) {
+        __class__ = PyString_InternFromString("__class__");
+        if (__class__ == NULL)
+            return -1;
+    }
 
-	if (PyClass_Check(cls) && PyInstance_Check(inst)) {
-		PyObject *inclass =
-			(PyObject*)((PyInstanceObject*)inst)->in_class;
-		retval = PyClass_IsSubclass(inclass, cls);
-	}
-	else if (PyType_Check(cls)) {
-		retval = PyObject_TypeCheck(inst, (PyTypeObject *)cls);
-		if (retval == 0) {
-			PyObject *c = PyObject_GetAttr(inst, __class__);
-			if (c == NULL) {
-				PyErr_Clear();
-			}
-			else {
-				if (c != (PyObject *)(inst->ob_type) &&
-				    PyType_Check(c))
-					retval = PyType_IsSubtype(
-						(PyTypeObject *)c,
-						(PyTypeObject *)cls);
-				Py_DECREF(c);
-			}
-		}
-	}
-	else {
-		if (!check_class(cls,
-			"isinstance() arg 2 must be a class, type,"
-			" or tuple of classes and types"))
-			return -1;
-		icls = PyObject_GetAttr(inst, __class__);
-		if (icls == NULL) {
-			PyErr_Clear();
-			retval = 0;
-		}
-		else {
-			retval = abstract_issubclass(icls, cls);
-			Py_DECREF(icls);
-		}
-	}
+    if (PyClass_Check(cls) && PyInstance_Check(inst)) {
+        PyObject *inclass =
+            (PyObject*)((PyInstanceObject*)inst)->in_class;
+        retval = PyClass_IsSubclass(inclass, cls);
+    }
+    else if (PyType_Check(cls)) {
+        retval = PyObject_TypeCheck(inst, (PyTypeObject *)cls);
+        if (retval == 0) {
+            PyObject *c = PyObject_GetAttr(inst, __class__);
+            if (c == NULL) {
+                PyErr_Clear();
+            }
+            else {
+                if (c != (PyObject *)(inst->ob_type) &&
+                    PyType_Check(c))
+                    retval = PyType_IsSubtype(
+                        (PyTypeObject *)c,
+                        (PyTypeObject *)cls);
+                Py_DECREF(c);
+            }
+        }
+    }
+    else {
+        if (!check_class(cls,
+            "isinstance() arg 2 must be a class, type,"
+            " or tuple of classes and types"))
+            return -1;
+        icls = PyObject_GetAttr(inst, __class__);
+        if (icls == NULL) {
+            PyErr_Clear();
+            retval = 0;
+        }
+        else {
+            retval = abstract_issubclass(icls, cls);
+            Py_DECREF(icls);
+        }
+    }
 
-	return retval;
+    return retval;
 }
 
 int
 PyObject_IsInstance(PyObject *inst, PyObject *cls)
 {
-	static PyObject *name = NULL;
+    static PyObject *name = NULL;
 
-	/* Quick test for an exact match */
-	if (Py_TYPE(inst) == (PyTypeObject *)cls)
-		return 1;
+    /* Quick test for an exact match */
+    if (Py_TYPE(inst) == (PyTypeObject *)cls)
+        return 1;
 
-	if (PyTuple_Check(cls)) {
-		Py_ssize_t i;
-		Py_ssize_t n;
-		int r = 0;
+    if (PyTuple_Check(cls)) {
+        Py_ssize_t i;
+        Py_ssize_t n;
+        int r = 0;
 
-		if (Py_EnterRecursiveCall(" in __instancecheck__"))
-			return -1;
-		n = PyTuple_GET_SIZE(cls);
-		for (i = 0; i < n; ++i) {
-			PyObject *item = PyTuple_GET_ITEM(cls, i);
-			r = PyObject_IsInstance(inst, item);
-			if (r != 0)
-				/* either found it, or got an error */
-				break;
-		}
-		Py_LeaveRecursiveCall();
-		return r;
-	}
+        if (Py_EnterRecursiveCall(" in __instancecheck__"))
+            return -1;
+        n = PyTuple_GET_SIZE(cls);
+        for (i = 0; i < n; ++i) {
+            PyObject *item = PyTuple_GET_ITEM(cls, i);
+            r = PyObject_IsInstance(inst, item);
+            if (r != 0)
+                /* either found it, or got an error */
+                break;
+        }
+        Py_LeaveRecursiveCall();
+        return r;
+    }
 
-	if (!(PyClass_Check(cls) || PyInstance_Check(cls))) {
-		PyObject *checker;
-		checker = _PyObject_LookupSpecial(cls, "__instancecheck__", &name);
-		if (checker != NULL) {
-			PyObject *res;
-			int ok = -1;
-			if (Py_EnterRecursiveCall(" in __instancecheck__")) {
-				Py_DECREF(checker);
-				return ok;
-			}
-			res = PyObject_CallFunctionObjArgs(checker, inst, NULL);
-			Py_LeaveRecursiveCall();
-			Py_DECREF(checker);
-			if (res != NULL) {
-				ok = PyObject_IsTrue(res);
-				Py_DECREF(res);
-			}
-			return ok;
-		}
-		else if (PyErr_Occurred())
-			return -1;
-	}
-	return recursive_isinstance(inst, cls);
+    if (!(PyClass_Check(cls) || PyInstance_Check(cls))) {
+        PyObject *checker;
+        checker = _PyObject_LookupSpecial(cls, "__instancecheck__", &name);
+        if (checker != NULL) {
+            PyObject *res;
+            int ok = -1;
+            if (Py_EnterRecursiveCall(" in __instancecheck__")) {
+                Py_DECREF(checker);
+                return ok;
+            }
+            res = PyObject_CallFunctionObjArgs(checker, inst, NULL);
+            Py_LeaveRecursiveCall();
+            Py_DECREF(checker);
+            if (res != NULL) {
+                ok = PyObject_IsTrue(res);
+                Py_DECREF(res);
+            }
+            return ok;
+        }
+        else if (PyErr_Occurred())
+            return -1;
+    }
+    return recursive_isinstance(inst, cls);
 }
 
 static  int
 recursive_issubclass(PyObject *derived, PyObject *cls)
 {
-	int retval;
+    int retval;
 
- 	if (PyType_Check(cls) && PyType_Check(derived)) {
- 		/* Fast path (non-recursive) */
- 		return PyType_IsSubtype(
-			(PyTypeObject *)derived, (PyTypeObject *)cls);
- 	}
-	if (!PyClass_Check(derived) || !PyClass_Check(cls)) {
-		if (!check_class(derived,
-				 "issubclass() arg 1 must be a class"))
-			return -1;
+    if (PyType_Check(cls) && PyType_Check(derived)) {
+        /* Fast path (non-recursive) */
+        return PyType_IsSubtype(
+            (PyTypeObject *)derived, (PyTypeObject *)cls);
+    }
+    if (!PyClass_Check(derived) || !PyClass_Check(cls)) {
+        if (!check_class(derived,
+                         "issubclass() arg 1 must be a class"))
+            return -1;
 
-		if (!check_class(cls,
-				"issubclass() arg 2 must be a class"
-				" or tuple of classes"))
-			return -1;
-		retval = abstract_issubclass(derived, cls);
-	}
-	else {
-		/* shortcut */
-	  	if (!(retval = (derived == cls)))
-			retval = PyClass_IsSubclass(derived, cls);
-	}
+        if (!check_class(cls,
+                        "issubclass() arg 2 must be a class"
+                        " or tuple of classes"))
+            return -1;
+        retval = abstract_issubclass(derived, cls);
+    }
+    else {
+        /* shortcut */
+        if (!(retval = (derived == cls)))
+            retval = PyClass_IsSubclass(derived, cls);
+    }
 
-	return retval;
+    return retval;
 }
 
 int
 PyObject_IsSubclass(PyObject *derived, PyObject *cls)
 {
-	static PyObject *name = NULL;
-	
- 	if (PyTuple_Check(cls)) {
- 		Py_ssize_t i;
- 		Py_ssize_t n;
- 		int r = 0;
- 
- 		if (Py_EnterRecursiveCall(" in __subclasscheck__"))
- 			return -1;
- 		n = PyTuple_GET_SIZE(cls);
- 		for (i = 0; i < n; ++i) {
- 			PyObject *item = PyTuple_GET_ITEM(cls, i);
- 			r = PyObject_IsSubclass(derived, item);
- 			if (r != 0)
- 				/* either found it, or got an error */
- 				break;
- 		}
- 		Py_LeaveRecursiveCall();
- 		return r;
- 	}
-	if (!(PyClass_Check(cls) || PyInstance_Check(cls))) {
-		PyObject *checker;
-		checker = _PyObject_LookupSpecial(cls, "__subclasscheck__", &name);
-		if (checker != NULL) {
-			PyObject *res;
-			int ok = -1;
-			if (Py_EnterRecursiveCall(" in __subclasscheck__")) {
-				Py_DECREF(checker);
-				return ok;
-			}
-			res = PyObject_CallFunctionObjArgs(checker, derived, NULL);
-			Py_LeaveRecursiveCall();
-			Py_DECREF(checker);
-			if (res != NULL) {
-				ok = PyObject_IsTrue(res);
-				Py_DECREF(res);
-			}
-			return ok;
-		}
-		else if (PyErr_Occurred()) {
-			return -1;
-		}
-	}
-	return recursive_issubclass(derived, cls);
+    static PyObject *name = NULL;
+
+    if (PyTuple_Check(cls)) {
+        Py_ssize_t i;
+        Py_ssize_t n;
+        int r = 0;
+
+        if (Py_EnterRecursiveCall(" in __subclasscheck__"))
+            return -1;
+        n = PyTuple_GET_SIZE(cls);
+        for (i = 0; i < n; ++i) {
+            PyObject *item = PyTuple_GET_ITEM(cls, i);
+            r = PyObject_IsSubclass(derived, item);
+            if (r != 0)
+                /* either found it, or got an error */
+                break;
+        }
+        Py_LeaveRecursiveCall();
+        return r;
+    }
+    if (!(PyClass_Check(cls) || PyInstance_Check(cls))) {
+        PyObject *checker;
+        checker = _PyObject_LookupSpecial(cls, "__subclasscheck__", &name);
+        if (checker != NULL) {
+            PyObject *res;
+            int ok = -1;
+            if (Py_EnterRecursiveCall(" in __subclasscheck__")) {
+                Py_DECREF(checker);
+                return ok;
+            }
+            res = PyObject_CallFunctionObjArgs(checker, derived, NULL);
+            Py_LeaveRecursiveCall();
+            Py_DECREF(checker);
+            if (res != NULL) {
+                ok = PyObject_IsTrue(res);
+                Py_DECREF(res);
+            }
+            return ok;
+        }
+        else if (PyErr_Occurred()) {
+            return -1;
+        }
+    }
+    return recursive_issubclass(derived, cls);
 }
 
 int
 _PyObject_RealIsInstance(PyObject *inst, PyObject *cls)
 {
-	return recursive_isinstance(inst, cls);
+    return recursive_isinstance(inst, cls);
 }
 
 int
 _PyObject_RealIsSubclass(PyObject *derived, PyObject *cls)
 {
-	return recursive_issubclass(derived, cls);
+    return recursive_issubclass(derived, cls);
 }
 
 
 PyObject *
 PyObject_GetIter(PyObject *o)
 {
-	PyTypeObject *t = o->ob_type;
-	getiterfunc f = NULL;
-	if (PyType_HasFeature(t, Py_TPFLAGS_HAVE_ITER))
-		f = t->tp_iter;
-	if (f == NULL) {
-		if (PySequence_Check(o))
-			return PySeqIter_New(o);
-		return type_error("'%.200s' object is not iterable", o);
-	}
-	else {
-		PyObject *res = (*f)(o);
-		if (res != NULL && !PyIter_Check(res)) {
-			PyErr_Format(PyExc_TypeError,
-				     "iter() returned non-iterator "
-				     "of type '%.100s'",
-				     res->ob_type->tp_name);
-			Py_DECREF(res);
-			res = NULL;
-		}
-		return res;
-	}
+    PyTypeObject *t = o->ob_type;
+    getiterfunc f = NULL;
+    if (PyType_HasFeature(t, Py_TPFLAGS_HAVE_ITER))
+        f = t->tp_iter;
+    if (f == NULL) {
+        if (PySequence_Check(o))
+            return PySeqIter_New(o);
+        return type_error("'%.200s' object is not iterable", o);
+    }
+    else {
+        PyObject *res = (*f)(o);
+        if (res != NULL && !PyIter_Check(res)) {
+            PyErr_Format(PyExc_TypeError,
+                         "iter() returned non-iterator "
+                         "of type '%.100s'",
+                         res->ob_type->tp_name);
+            Py_DECREF(res);
+            res = NULL;
+        }
+        return res;
+    }
 }
 
 /* Return next item.
@@ -3110,11 +3110,11 @@
 PyObject *
 PyIter_Next(PyObject *iter)
 {
-	PyObject *result;
-	result = (*iter->ob_type->tp_iternext)(iter);
-	if (result == NULL &&
-	    PyErr_Occurred() &&
-	    PyErr_ExceptionMatches(PyExc_StopIteration))
-		PyErr_Clear();
-	return result;
+    PyObject *result;
+    result = (*iter->ob_type->tp_iternext)(iter);
+    if (result == NULL &&
+        PyErr_Occurred() &&
+        PyErr_ExceptionMatches(PyExc_StopIteration))
+        PyErr_Clear();
+    return result;
 }
diff --git a/Objects/boolobject.c b/Objects/boolobject.c
index fd73d28..595832a 100644
--- a/Objects/boolobject.c
+++ b/Objects/boolobject.c
@@ -7,10 +7,10 @@
 static int
 bool_print(PyBoolObject *self, FILE *fp, int flags)
 {
-	Py_BEGIN_ALLOW_THREADS
-	fputs(self->ob_ival == 0 ? "False" : "True", fp);
-	Py_END_ALLOW_THREADS
-	return 0;
+    Py_BEGIN_ALLOW_THREADS
+    fputs(self->ob_ival == 0 ? "False" : "True", fp);
+    Py_END_ALLOW_THREADS
+    return 0;
 }
 
 /* We define bool_repr to return "False" or "True" */
@@ -21,30 +21,30 @@
 static PyObject *
 bool_repr(PyBoolObject *self)
 {
-	PyObject *s;
+    PyObject *s;
 
-	if (self->ob_ival)
-		s = true_str ? true_str :
-			(true_str = PyString_InternFromString("True"));
-	else
-		s = false_str ? false_str :
-			(false_str = PyString_InternFromString("False"));
-	Py_XINCREF(s);
-	return s;
+    if (self->ob_ival)
+        s = true_str ? true_str :
+            (true_str = PyString_InternFromString("True"));
+    else
+        s = false_str ? false_str :
+            (false_str = PyString_InternFromString("False"));
+    Py_XINCREF(s);
+    return s;
 }
 
 /* Function to return a bool from a C long */
 
 PyObject *PyBool_FromLong(long ok)
 {
-	PyObject *result;
+    PyObject *result;
 
-	if (ok)
-		result = Py_True;
-	else
-		result = Py_False;
-	Py_INCREF(result);
-	return result;
+    if (ok)
+        result = Py_True;
+    else
+        result = Py_False;
+    Py_INCREF(result);
+    return result;
 }
 
 /* We define bool_new to always return either Py_True or Py_False */
@@ -52,16 +52,16 @@
 static PyObject *
 bool_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	static char *kwlist[] = {"x", 0};
-	PyObject *x = Py_False;
-	long ok;
+    static char *kwlist[] = {"x", 0};
+    PyObject *x = Py_False;
+    long ok;
 
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:bool", kwlist, &x))
-		return NULL;
-	ok = PyObject_IsTrue(x);
-	if (ok < 0)
-		return NULL;
-	return PyBool_FromLong(ok);
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:bool", kwlist, &x))
+        return NULL;
+    ok = PyObject_IsTrue(x);
+    if (ok < 0)
+        return NULL;
+    return PyBool_FromLong(ok);
 }
 
 /* Arithmetic operations redefined to return bool if both args are bool. */
@@ -69,28 +69,28 @@
 static PyObject *
 bool_and(PyObject *a, PyObject *b)
 {
-	if (!PyBool_Check(a) || !PyBool_Check(b))
-		return PyInt_Type.tp_as_number->nb_and(a, b);
-	return PyBool_FromLong(
-		((PyBoolObject *)a)->ob_ival & ((PyBoolObject *)b)->ob_ival);
+    if (!PyBool_Check(a) || !PyBool_Check(b))
+        return PyInt_Type.tp_as_number->nb_and(a, b);
+    return PyBool_FromLong(
+        ((PyBoolObject *)a)->ob_ival & ((PyBoolObject *)b)->ob_ival);
 }
 
 static PyObject *
 bool_or(PyObject *a, PyObject *b)
 {
-	if (!PyBool_Check(a) || !PyBool_Check(b))
-		return PyInt_Type.tp_as_number->nb_or(a, b);
-	return PyBool_FromLong(
-		((PyBoolObject *)a)->ob_ival | ((PyBoolObject *)b)->ob_ival);
+    if (!PyBool_Check(a) || !PyBool_Check(b))
+        return PyInt_Type.tp_as_number->nb_or(a, b);
+    return PyBool_FromLong(
+        ((PyBoolObject *)a)->ob_ival | ((PyBoolObject *)b)->ob_ival);
 }
 
 static PyObject *
 bool_xor(PyObject *a, PyObject *b)
 {
-	if (!PyBool_Check(a) || !PyBool_Check(b))
-		return PyInt_Type.tp_as_number->nb_xor(a, b);
-	return PyBool_FromLong(
-		((PyBoolObject *)a)->ob_ival ^ ((PyBoolObject *)b)->ob_ival);
+    if (!PyBool_Check(a) || !PyBool_Check(b))
+        return PyInt_Type.tp_as_number->nb_xor(a, b);
+    return PyBool_FromLong(
+        ((PyBoolObject *)a)->ob_ival ^ ((PyBoolObject *)b)->ob_ival);
 }
 
 /* Doc string */
@@ -105,98 +105,98 @@
 /* Arithmetic methods -- only so we can override &, |, ^. */
 
 static PyNumberMethods bool_as_number = {
-	0,			/* nb_add */
-	0,			/* nb_subtract */
-	0,			/* nb_multiply */
-	0,			/* nb_divide */
-	0,			/* nb_remainder */
-	0,			/* nb_divmod */
-	0,			/* nb_power */
-	0,			/* nb_negative */
-	0,			/* nb_positive */
-	0,			/* nb_absolute */
-	0,			/* nb_nonzero */
-	0,			/* nb_invert */
-	0,			/* nb_lshift */
-	0,			/* nb_rshift */
-	bool_and,		/* nb_and */
-	bool_xor,		/* nb_xor */
-	bool_or,		/* nb_or */
-	0,			/* nb_coerce */
-	0,			/* nb_int */
-	0,			/* nb_long */
-	0,			/* nb_float */
-	0,			/* nb_oct */
-	0,		 	/* nb_hex */
-	0,			/* nb_inplace_add */
-	0,			/* nb_inplace_subtract */
-	0,			/* nb_inplace_multiply */
-	0,			/* nb_inplace_divide */
-	0,			/* nb_inplace_remainder */
-	0,			/* nb_inplace_power */
-	0,			/* nb_inplace_lshift */
-	0,			/* nb_inplace_rshift */
-	0,			/* nb_inplace_and */
-	0,			/* nb_inplace_xor */
-	0,			/* nb_inplace_or */
-	0,			/* nb_floor_divide */
-	0,			/* nb_true_divide */
-	0,			/* nb_inplace_floor_divide */
-	0,			/* nb_inplace_true_divide */
+    0,                          /* nb_add */
+    0,                          /* nb_subtract */
+    0,                          /* nb_multiply */
+    0,                          /* nb_divide */
+    0,                          /* nb_remainder */
+    0,                          /* nb_divmod */
+    0,                          /* nb_power */
+    0,                          /* nb_negative */
+    0,                          /* nb_positive */
+    0,                          /* nb_absolute */
+    0,                          /* nb_nonzero */
+    0,                          /* nb_invert */
+    0,                          /* nb_lshift */
+    0,                          /* nb_rshift */
+    bool_and,                   /* nb_and */
+    bool_xor,                   /* nb_xor */
+    bool_or,                    /* nb_or */
+    0,                          /* nb_coerce */
+    0,                          /* nb_int */
+    0,                          /* nb_long */
+    0,                          /* nb_float */
+    0,                          /* nb_oct */
+    0,                          /* nb_hex */
+    0,                          /* nb_inplace_add */
+    0,                          /* nb_inplace_subtract */
+    0,                          /* nb_inplace_multiply */
+    0,                          /* nb_inplace_divide */
+    0,                          /* nb_inplace_remainder */
+    0,                          /* nb_inplace_power */
+    0,                          /* nb_inplace_lshift */
+    0,                          /* nb_inplace_rshift */
+    0,                          /* nb_inplace_and */
+    0,                          /* nb_inplace_xor */
+    0,                          /* nb_inplace_or */
+    0,                          /* nb_floor_divide */
+    0,                          /* nb_true_divide */
+    0,                          /* nb_inplace_floor_divide */
+    0,                          /* nb_inplace_true_divide */
 };
 
 /* The type object for bool.  Note that this cannot be subclassed! */
 
 PyTypeObject PyBool_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"bool",
-	sizeof(PyIntObject),
-	0,
-	0,					/* tp_dealloc */
-	(printfunc)bool_print,			/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)bool_repr,			/* tp_repr */
-	&bool_as_number,			/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-        0,					/* tp_call */
-        (reprfunc)bool_repr,			/* tp_str */
-	0,					/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES, /* tp_flags */
-	bool_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	&PyInt_Type,				/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	bool_new,				/* tp_new */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "bool",
+    sizeof(PyIntObject),
+    0,
+    0,                                          /* tp_dealloc */
+    (printfunc)bool_print,                      /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)bool_repr,                        /* tp_repr */
+    &bool_as_number,                            /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    (reprfunc)bool_repr,                        /* tp_str */
+    0,                                          /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES, /* tp_flags */
+    bool_doc,                                   /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    &PyInt_Type,                                /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    bool_new,                                   /* tp_new */
 };
 
 /* The objects representing bool values False and True */
 
 /* Named Zero for link-level compatibility */
 PyIntObject _Py_ZeroStruct = {
-	PyObject_HEAD_INIT(&PyBool_Type)
-	0
+    PyObject_HEAD_INIT(&PyBool_Type)
+    0
 };
 
 PyIntObject _Py_TrueStruct = {
-	PyObject_HEAD_INIT(&PyBool_Type)
-	1
+    PyObject_HEAD_INIT(&PyBool_Type)
+    1
 };
diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c
index 5b08e1e..0f7e763 100644
--- a/Objects/bufferobject.c
+++ b/Objects/bufferobject.c
@@ -5,13 +5,13 @@
 
 
 typedef struct {
-	PyObject_HEAD
-	PyObject *b_base;
-	void *b_ptr;
-	Py_ssize_t b_size;
-	Py_ssize_t b_offset;
-	int b_readonly;
-	long b_hash;
+    PyObject_HEAD
+    PyObject *b_base;
+    void *b_ptr;
+    Py_ssize_t b_size;
+    Py_ssize_t b_offset;
+    int b_readonly;
+    long b_hash;
 } PyBufferObject;
 
 
@@ -24,207 +24,207 @@
 
 static int
 get_buf(PyBufferObject *self, void **ptr, Py_ssize_t *size,
-	enum buffer_t buffer_type)
+    enum buffer_t buffer_type)
 {
-	if (self->b_base == NULL) {
-		assert (ptr != NULL);
-		*ptr = self->b_ptr;
-		*size = self->b_size;
-	}
-	else {
-		Py_ssize_t count, offset;
-		readbufferproc proc = 0;
-		PyBufferProcs *bp = self->b_base->ob_type->tp_as_buffer;
-		if ((*bp->bf_getsegcount)(self->b_base, NULL) != 1) {
-			PyErr_SetString(PyExc_TypeError,
-				"single-segment buffer object expected");
-			return 0;
-		}
-		if ((buffer_type == READ_BUFFER) ||
-			((buffer_type == ANY_BUFFER) && self->b_readonly))
-		    proc = bp->bf_getreadbuffer;
-		else if ((buffer_type == WRITE_BUFFER) ||
-			(buffer_type == ANY_BUFFER))
-    		    proc = (readbufferproc)bp->bf_getwritebuffer;
-		else if (buffer_type == CHAR_BUFFER) {
-		    if (!PyType_HasFeature(self->ob_type,
-				Py_TPFLAGS_HAVE_GETCHARBUFFER)) {
-			PyErr_SetString(PyExc_TypeError,
-				"Py_TPFLAGS_HAVE_GETCHARBUFFER needed");
-			return 0;
-		    }
-		    proc = (readbufferproc)bp->bf_getcharbuffer;
-		}
-		if (!proc) {
-		    char *buffer_type_name;
-		    switch (buffer_type) {
-			case READ_BUFFER:
-			    buffer_type_name = "read";
-			    break;
-			case WRITE_BUFFER:
-			    buffer_type_name = "write";
-			    break;
-			case CHAR_BUFFER:
-			    buffer_type_name = "char";
-			    break;
-			default:
-			    buffer_type_name = "no";
-			    break;
-		    }
-		    PyErr_Format(PyExc_TypeError,
-			    "%s buffer type not available",
-			    buffer_type_name);
-		    return 0;
-		}
-		if ((count = (*proc)(self->b_base, 0, ptr)) < 0)
-			return 0;
-		/* apply constraints to the start/end */
-		if (self->b_offset > count)
-			offset = count;
-		else
-			offset = self->b_offset;
-		*(char **)ptr = *(char **)ptr + offset;
-		if (self->b_size == Py_END_OF_BUFFER)
-			*size = count;
-		else
-			*size = self->b_size;
-		if (offset + *size > count)
-			*size = count - offset;
-	}
-	return 1;
+    if (self->b_base == NULL) {
+        assert (ptr != NULL);
+        *ptr = self->b_ptr;
+        *size = self->b_size;
+    }
+    else {
+        Py_ssize_t count, offset;
+        readbufferproc proc = 0;
+        PyBufferProcs *bp = self->b_base->ob_type->tp_as_buffer;
+        if ((*bp->bf_getsegcount)(self->b_base, NULL) != 1) {
+            PyErr_SetString(PyExc_TypeError,
+                "single-segment buffer object expected");
+            return 0;
+        }
+        if ((buffer_type == READ_BUFFER) ||
+            ((buffer_type == ANY_BUFFER) && self->b_readonly))
+            proc = bp->bf_getreadbuffer;
+        else if ((buffer_type == WRITE_BUFFER) ||
+            (buffer_type == ANY_BUFFER))
+            proc = (readbufferproc)bp->bf_getwritebuffer;
+        else if (buffer_type == CHAR_BUFFER) {
+            if (!PyType_HasFeature(self->ob_type,
+                        Py_TPFLAGS_HAVE_GETCHARBUFFER)) {
+            PyErr_SetString(PyExc_TypeError,
+                "Py_TPFLAGS_HAVE_GETCHARBUFFER needed");
+            return 0;
+            }
+            proc = (readbufferproc)bp->bf_getcharbuffer;
+        }
+        if (!proc) {
+            char *buffer_type_name;
+            switch (buffer_type) {
+            case READ_BUFFER:
+                buffer_type_name = "read";
+                break;
+            case WRITE_BUFFER:
+                buffer_type_name = "write";
+                break;
+            case CHAR_BUFFER:
+                buffer_type_name = "char";
+                break;
+            default:
+                buffer_type_name = "no";
+                break;
+            }
+            PyErr_Format(PyExc_TypeError,
+                "%s buffer type not available",
+                buffer_type_name);
+            return 0;
+        }
+        if ((count = (*proc)(self->b_base, 0, ptr)) < 0)
+            return 0;
+        /* apply constraints to the start/end */
+        if (self->b_offset > count)
+            offset = count;
+        else
+            offset = self->b_offset;
+        *(char **)ptr = *(char **)ptr + offset;
+        if (self->b_size == Py_END_OF_BUFFER)
+            *size = count;
+        else
+            *size = self->b_size;
+        if (offset + *size > count)
+            *size = count - offset;
+    }
+    return 1;
 }
 
 
 static PyObject *
 buffer_from_memory(PyObject *base, Py_ssize_t size, Py_ssize_t offset, void *ptr,
-		   int readonly)
+                   int readonly)
 {
-	PyBufferObject * b;
+    PyBufferObject * b;
 
-	if (size < 0 && size != Py_END_OF_BUFFER) {
-		PyErr_SetString(PyExc_ValueError,
-				"size must be zero or positive");
-		return NULL;
-	}
-	if (offset < 0) {
-		PyErr_SetString(PyExc_ValueError,
-				"offset must be zero or positive");
-		return NULL;
-	}
+    if (size < 0 && size != Py_END_OF_BUFFER) {
+        PyErr_SetString(PyExc_ValueError,
+                        "size must be zero or positive");
+        return NULL;
+    }
+    if (offset < 0) {
+        PyErr_SetString(PyExc_ValueError,
+                        "offset must be zero or positive");
+        return NULL;
+    }
 
-	b = PyObject_NEW(PyBufferObject, &PyBuffer_Type);
-	if ( b == NULL )
-		return NULL;
+    b = PyObject_NEW(PyBufferObject, &PyBuffer_Type);
+    if ( b == NULL )
+        return NULL;
 
-	Py_XINCREF(base);
-	b->b_base = base;
-	b->b_ptr = ptr;
-	b->b_size = size;
-	b->b_offset = offset;
-	b->b_readonly = readonly;
-	b->b_hash = -1;
+    Py_XINCREF(base);
+    b->b_base = base;
+    b->b_ptr = ptr;
+    b->b_size = size;
+    b->b_offset = offset;
+    b->b_readonly = readonly;
+    b->b_hash = -1;
 
-	return (PyObject *) b;
+    return (PyObject *) b;
 }
 
 static PyObject *
 buffer_from_object(PyObject *base, Py_ssize_t size, Py_ssize_t offset, int readonly)
 {
-	if (offset < 0) {
-		PyErr_SetString(PyExc_ValueError,
-				"offset must be zero or positive");
-		return NULL;
-	}
-	if ( PyBuffer_Check(base) && (((PyBufferObject *)base)->b_base) ) {
-		/* another buffer, refer to the base object */
-		PyBufferObject *b = (PyBufferObject *)base;
-		if (b->b_size != Py_END_OF_BUFFER) {
-			Py_ssize_t base_size = b->b_size - offset;
-			if (base_size < 0)
-				base_size = 0;
-			if (size == Py_END_OF_BUFFER || size > base_size)
-				size = base_size;
-		}
-		offset += b->b_offset;
-		base = b->b_base;
-	}
-	return buffer_from_memory(base, size, offset, NULL, readonly);
+    if (offset < 0) {
+        PyErr_SetString(PyExc_ValueError,
+                        "offset must be zero or positive");
+        return NULL;
+    }
+    if ( PyBuffer_Check(base) && (((PyBufferObject *)base)->b_base) ) {
+        /* another buffer, refer to the base object */
+        PyBufferObject *b = (PyBufferObject *)base;
+        if (b->b_size != Py_END_OF_BUFFER) {
+            Py_ssize_t base_size = b->b_size - offset;
+            if (base_size < 0)
+                base_size = 0;
+            if (size == Py_END_OF_BUFFER || size > base_size)
+                size = base_size;
+        }
+        offset += b->b_offset;
+        base = b->b_base;
+    }
+    return buffer_from_memory(base, size, offset, NULL, readonly);
 }
 
 
 PyObject *
 PyBuffer_FromObject(PyObject *base, Py_ssize_t offset, Py_ssize_t size)
 {
-	PyBufferProcs *pb = base->ob_type->tp_as_buffer;
+    PyBufferProcs *pb = base->ob_type->tp_as_buffer;
 
-	if ( pb == NULL ||
-	     pb->bf_getreadbuffer == NULL ||
-	     pb->bf_getsegcount == NULL )
-	{
-		PyErr_SetString(PyExc_TypeError, "buffer object expected");
-		return NULL;
-	}
+    if ( pb == NULL ||
+         pb->bf_getreadbuffer == NULL ||
+         pb->bf_getsegcount == NULL )
+    {
+        PyErr_SetString(PyExc_TypeError, "buffer object expected");
+        return NULL;
+    }
 
-	return buffer_from_object(base, size, offset, 1);
+    return buffer_from_object(base, size, offset, 1);
 }
 
 PyObject *
 PyBuffer_FromReadWriteObject(PyObject *base, Py_ssize_t offset, Py_ssize_t size)
 {
-	PyBufferProcs *pb = base->ob_type->tp_as_buffer;
+    PyBufferProcs *pb = base->ob_type->tp_as_buffer;
 
-	if ( pb == NULL ||
-	     pb->bf_getwritebuffer == NULL ||
-	     pb->bf_getsegcount == NULL )
-	{
-		PyErr_SetString(PyExc_TypeError, "buffer object expected");
-		return NULL;
-	}
+    if ( pb == NULL ||
+         pb->bf_getwritebuffer == NULL ||
+         pb->bf_getsegcount == NULL )
+    {
+        PyErr_SetString(PyExc_TypeError, "buffer object expected");
+        return NULL;
+    }
 
-	return buffer_from_object(base, size,  offset, 0);
+    return buffer_from_object(base, size,  offset, 0);
 }
 
 PyObject *
 PyBuffer_FromMemory(void *ptr, Py_ssize_t size)
 {
-	return buffer_from_memory(NULL, size, 0, ptr, 1);
+    return buffer_from_memory(NULL, size, 0, ptr, 1);
 }
 
 PyObject *
 PyBuffer_FromReadWriteMemory(void *ptr, Py_ssize_t size)
 {
-	return buffer_from_memory(NULL, size, 0, ptr, 0);
+    return buffer_from_memory(NULL, size, 0, ptr, 0);
 }
 
 PyObject *
 PyBuffer_New(Py_ssize_t size)
 {
-	PyObject *o;
-	PyBufferObject * b;
+    PyObject *o;
+    PyBufferObject * b;
 
-	if (size < 0) {
-		PyErr_SetString(PyExc_ValueError,
-				"size must be zero or positive");
-		return NULL;
-	}
-	if (sizeof(*b) > PY_SSIZE_T_MAX - size) {
-		/* unlikely */
-		return PyErr_NoMemory();
-	}
-	/* Inline PyObject_New */
-	o = (PyObject *)PyObject_MALLOC(sizeof(*b) + size);
-	if ( o == NULL )
-		return PyErr_NoMemory();
-	b = (PyBufferObject *) PyObject_INIT(o, &PyBuffer_Type);
+    if (size < 0) {
+        PyErr_SetString(PyExc_ValueError,
+                        "size must be zero or positive");
+        return NULL;
+    }
+    if (sizeof(*b) > PY_SSIZE_T_MAX - size) {
+        /* unlikely */
+        return PyErr_NoMemory();
+    }
+    /* Inline PyObject_New */
+    o = (PyObject *)PyObject_MALLOC(sizeof(*b) + size);
+    if ( o == NULL )
+        return PyErr_NoMemory();
+    b = (PyBufferObject *) PyObject_INIT(o, &PyBuffer_Type);
 
-	b->b_base = NULL;
-	b->b_ptr = (void *)(b + 1);
-	b->b_size = size;
-	b->b_offset = 0;
-	b->b_readonly = 0;
-	b->b_hash = -1;
+    b->b_base = NULL;
+    b->b_ptr = (void *)(b + 1);
+    b->b_size = size;
+    b->b_offset = 0;
+    b->b_readonly = 0;
+    b->b_hash = -1;
 
-	return o;
+    return o;
 }
 
 /* Methods */
@@ -232,19 +232,19 @@
 static PyObject *
 buffer_new(PyTypeObject *type, PyObject *args, PyObject *kw)
 {
-	PyObject *ob;
-	Py_ssize_t offset = 0;
-	Py_ssize_t size = Py_END_OF_BUFFER;
+    PyObject *ob;
+    Py_ssize_t offset = 0;
+    Py_ssize_t size = Py_END_OF_BUFFER;
 
-	if (PyErr_WarnPy3k("buffer() not supported in 3.x", 1) < 0)
-		return NULL;
-	
-	if (!_PyArg_NoKeywords("buffer()", kw))
-		return NULL;
+    if (PyErr_WarnPy3k("buffer() not supported in 3.x", 1) < 0)
+        return NULL;
 
-	if (!PyArg_ParseTuple(args, "O|nn:buffer", &ob, &offset, &size))
-	    return NULL;
-	return PyBuffer_FromObject(ob, offset, size);
+    if (!_PyArg_NoKeywords("buffer()", kw))
+        return NULL;
+
+    if (!PyArg_ParseTuple(args, "O|nn:buffer", &ob, &offset, &size))
+        return NULL;
+    return PyBuffer_FromObject(ob, offset, size);
 }
 
 PyDoc_STRVAR(buffer_doc,
@@ -259,99 +259,99 @@
 static void
 buffer_dealloc(PyBufferObject *self)
 {
-	Py_XDECREF(self->b_base);
-	PyObject_DEL(self);
+    Py_XDECREF(self->b_base);
+    PyObject_DEL(self);
 }
 
 static int
 buffer_compare(PyBufferObject *self, PyBufferObject *other)
 {
-	void *p1, *p2;
-	Py_ssize_t len_self, len_other, min_len;
-	int cmp;
+    void *p1, *p2;
+    Py_ssize_t len_self, len_other, min_len;
+    int cmp;
 
-	if (!get_buf(self, &p1, &len_self, ANY_BUFFER))
-		return -1;
-	if (!get_buf(other, &p2, &len_other, ANY_BUFFER))
-		return -1;
-	min_len = (len_self < len_other) ? len_self : len_other;
-	if (min_len > 0) {
-		cmp = memcmp(p1, p2, min_len);
-		if (cmp != 0)
-			return cmp < 0 ? -1 : 1;
-	}
-	return (len_self < len_other) ? -1 : (len_self > len_other) ? 1 : 0;
+    if (!get_buf(self, &p1, &len_self, ANY_BUFFER))
+        return -1;
+    if (!get_buf(other, &p2, &len_other, ANY_BUFFER))
+        return -1;
+    min_len = (len_self < len_other) ? len_self : len_other;
+    if (min_len > 0) {
+        cmp = memcmp(p1, p2, min_len);
+        if (cmp != 0)
+            return cmp < 0 ? -1 : 1;
+    }
+    return (len_self < len_other) ? -1 : (len_self > len_other) ? 1 : 0;
 }
 
 static PyObject *
 buffer_repr(PyBufferObject *self)
 {
-	const char *status = self->b_readonly ? "read-only" : "read-write";
+    const char *status = self->b_readonly ? "read-only" : "read-write";
 
-	if ( self->b_base == NULL )
-		return PyString_FromFormat("<%s buffer ptr %p, size %zd at %p>",
-					   status,
-					   self->b_ptr,
-					   self->b_size,
-					   self);
-	else
-		return PyString_FromFormat(
-			"<%s buffer for %p, size %zd, offset %zd at %p>",
-			status,
-			self->b_base,
-			self->b_size,
-			self->b_offset,
-			self);
+    if ( self->b_base == NULL )
+        return PyString_FromFormat("<%s buffer ptr %p, size %zd at %p>",
+                                   status,
+                                   self->b_ptr,
+                                   self->b_size,
+                                   self);
+    else
+        return PyString_FromFormat(
+            "<%s buffer for %p, size %zd, offset %zd at %p>",
+            status,
+            self->b_base,
+            self->b_size,
+            self->b_offset,
+            self);
 }
 
 static long
 buffer_hash(PyBufferObject *self)
 {
-	void *ptr;
-	Py_ssize_t size;
-	register Py_ssize_t len;
-	register unsigned char *p;
-	register long x;
+    void *ptr;
+    Py_ssize_t size;
+    register Py_ssize_t len;
+    register unsigned char *p;
+    register long x;
 
-	if ( self->b_hash != -1 )
-		return self->b_hash;
+    if ( self->b_hash != -1 )
+        return self->b_hash;
 
-	/* XXX potential bugs here, a readonly buffer does not imply that the
-	 * underlying memory is immutable.  b_readonly is a necessary but not
-	 * sufficient condition for a buffer to be hashable.  Perhaps it would
-	 * be better to only allow hashing if the underlying object is known to
-	 * be immutable (e.g. PyString_Check() is true).  Another idea would
-	 * be to call tp_hash on the underlying object and see if it raises
-	 * an error. */
-	if ( !self->b_readonly )
-	{
-		PyErr_SetString(PyExc_TypeError,
-				"writable buffers are not hashable");
-		return -1;
-	}
+    /* XXX potential bugs here, a readonly buffer does not imply that the
+     * underlying memory is immutable.  b_readonly is a necessary but not
+     * sufficient condition for a buffer to be hashable.  Perhaps it would
+     * be better to only allow hashing if the underlying object is known to
+     * be immutable (e.g. PyString_Check() is true).  Another idea would
+     * be to call tp_hash on the underlying object and see if it raises
+     * an error. */
+    if ( !self->b_readonly )
+    {
+        PyErr_SetString(PyExc_TypeError,
+                        "writable buffers are not hashable");
+        return -1;
+    }
 
-	if (!get_buf(self, &ptr, &size, ANY_BUFFER))
-		return -1;
-	p = (unsigned char *) ptr;
-	len = size;
-	x = *p << 7;
-	while (--len >= 0)
-		x = (1000003*x) ^ *p++;
-	x ^= size;
-	if (x == -1)
-		x = -2;
-	self->b_hash = x;
-	return x;
+    if (!get_buf(self, &ptr, &size, ANY_BUFFER))
+        return -1;
+    p = (unsigned char *) ptr;
+    len = size;
+    x = *p << 7;
+    while (--len >= 0)
+        x = (1000003*x) ^ *p++;
+    x ^= size;
+    if (x == -1)
+        x = -2;
+    self->b_hash = x;
+    return x;
 }
 
 static PyObject *
 buffer_str(PyBufferObject *self)
 {
-	void *ptr;
-	Py_ssize_t size;
-	if (!get_buf(self, &ptr, &size, ANY_BUFFER))
-		return NULL;
-	return PyString_FromStringAndSize((const char *)ptr, size);
+    void *ptr;
+    Py_ssize_t size;
+    if (!get_buf(self, &ptr, &size, ANY_BUFFER))
+        return NULL;
+    return PyString_FromStringAndSize((const char *)ptr, size);
 }
 
 /* Sequence methods */
@@ -359,372 +359,372 @@
 static Py_ssize_t
 buffer_length(PyBufferObject *self)
 {
-	void *ptr;
-	Py_ssize_t size;
-	if (!get_buf(self, &ptr, &size, ANY_BUFFER))
-		return -1;
-	return size;
+    void *ptr;
+    Py_ssize_t size;
+    if (!get_buf(self, &ptr, &size, ANY_BUFFER))
+        return -1;
+    return size;
 }
 
 static PyObject *
 buffer_concat(PyBufferObject *self, PyObject *other)
 {
-	PyBufferProcs *pb = other->ob_type->tp_as_buffer;
-	void *ptr1, *ptr2;
-	char *p;
-	PyObject *ob;
-	Py_ssize_t size, count;
+    PyBufferProcs *pb = other->ob_type->tp_as_buffer;
+    void *ptr1, *ptr2;
+    char *p;
+    PyObject *ob;
+    Py_ssize_t size, count;
 
-	if ( pb == NULL ||
-	     pb->bf_getreadbuffer == NULL ||
-	     pb->bf_getsegcount == NULL )
-	{
-		PyErr_BadArgument();
-		return NULL;
-	}
-	if ( (*pb->bf_getsegcount)(other, NULL) != 1 )
-	{
-		/* ### use a different exception type/message? */
-		PyErr_SetString(PyExc_TypeError,
-				"single-segment buffer object expected");
-		return NULL;
-	}
+    if ( pb == NULL ||
+         pb->bf_getreadbuffer == NULL ||
+         pb->bf_getsegcount == NULL )
+    {
+        PyErr_BadArgument();
+        return NULL;
+    }
+    if ( (*pb->bf_getsegcount)(other, NULL) != 1 )
+    {
+        /* ### use a different exception type/message? */
+        PyErr_SetString(PyExc_TypeError,
+                        "single-segment buffer object expected");
+        return NULL;
+    }
 
- 	if (!get_buf(self, &ptr1, &size, ANY_BUFFER))
- 		return NULL;
- 
-	/* optimize special case */
-	if ( size == 0 )
-	{
-	    Py_INCREF(other);
-	    return other;
-	}
+    if (!get_buf(self, &ptr1, &size, ANY_BUFFER))
+        return NULL;
 
-	if ( (count = (*pb->bf_getreadbuffer)(other, 0, &ptr2)) < 0 )
-		return NULL;
+    /* optimize special case */
+    if ( size == 0 )
+    {
+        Py_INCREF(other);
+        return other;
+    }
 
-	assert(count <= PY_SIZE_MAX - size);
+    if ( (count = (*pb->bf_getreadbuffer)(other, 0, &ptr2)) < 0 )
+        return NULL;
 
- 	ob = PyString_FromStringAndSize(NULL, size + count);
-	if ( ob == NULL )
-		return NULL;
- 	p = PyString_AS_STRING(ob);
- 	memcpy(p, ptr1, size);
- 	memcpy(p + size, ptr2, count);
+    assert(count <= PY_SIZE_MAX - size);
 
-	/* there is an extra byte in the string object, so this is safe */
-	p[size + count] = '\0';
+    ob = PyString_FromStringAndSize(NULL, size + count);
+    if ( ob == NULL )
+        return NULL;
+    p = PyString_AS_STRING(ob);
+    memcpy(p, ptr1, size);
+    memcpy(p + size, ptr2, count);
 
-	return ob;
+    /* there is an extra byte in the string object, so this is safe */
+    p[size + count] = '\0';
+
+    return ob;
 }
 
 static PyObject *
 buffer_repeat(PyBufferObject *self, Py_ssize_t count)
 {
-	PyObject *ob;
-	register char *p;
-	void *ptr;
-	Py_ssize_t size;
+    PyObject *ob;
+    register char *p;
+    void *ptr;
+    Py_ssize_t size;
 
-	if ( count < 0 )
-		count = 0;
-	if (!get_buf(self, &ptr, &size, ANY_BUFFER))
-		return NULL;
-	if (count > PY_SSIZE_T_MAX / size) {
-		PyErr_SetString(PyExc_MemoryError, "result too large");
-		return NULL;
-	}
-	ob = PyString_FromStringAndSize(NULL, size * count);
-	if ( ob == NULL )
-		return NULL;
+    if ( count < 0 )
+        count = 0;
+    if (!get_buf(self, &ptr, &size, ANY_BUFFER))
+        return NULL;
+    if (count > PY_SSIZE_T_MAX / size) {
+        PyErr_SetString(PyExc_MemoryError, "result too large");
+        return NULL;
+    }
+    ob = PyString_FromStringAndSize(NULL, size * count);
+    if ( ob == NULL )
+        return NULL;
 
-	p = PyString_AS_STRING(ob);
-	while ( count-- )
-	{
-	    memcpy(p, ptr, size);
-	    p += size;
-	}
+    p = PyString_AS_STRING(ob);
+    while ( count-- )
+    {
+        memcpy(p, ptr, size);
+        p += size;
+    }
 
-	/* there is an extra byte in the string object, so this is safe */
-	*p = '\0';
+    /* there is an extra byte in the string object, so this is safe */
+    *p = '\0';
 
-	return ob;
+    return ob;
 }
 
 static PyObject *
 buffer_item(PyBufferObject *self, Py_ssize_t idx)
 {
-	void *ptr;
-	Py_ssize_t size;
-	if (!get_buf(self, &ptr, &size, ANY_BUFFER))
-		return NULL;
-	if ( idx < 0 || idx >= size ) {
-		PyErr_SetString(PyExc_IndexError, "buffer index out of range");
-		return NULL;
-	}
-	return PyString_FromStringAndSize((char *)ptr + idx, 1);
+    void *ptr;
+    Py_ssize_t size;
+    if (!get_buf(self, &ptr, &size, ANY_BUFFER))
+        return NULL;
+    if ( idx < 0 || idx >= size ) {
+        PyErr_SetString(PyExc_IndexError, "buffer index out of range");
+        return NULL;
+    }
+    return PyString_FromStringAndSize((char *)ptr + idx, 1);
 }
 
 static PyObject *
 buffer_slice(PyBufferObject *self, Py_ssize_t left, Py_ssize_t right)
 {
-	void *ptr;
-	Py_ssize_t size;
-	if (!get_buf(self, &ptr, &size, ANY_BUFFER))
-		return NULL;
-	if ( left < 0 )
-		left = 0;
-	if ( right < 0 )
-		right = 0;
-	if ( right > size )
-		right = size;
-	if ( right < left )
-		right = left;
-	return PyString_FromStringAndSize((char *)ptr + left,
-					  right - left);
+    void *ptr;
+    Py_ssize_t size;
+    if (!get_buf(self, &ptr, &size, ANY_BUFFER))
+        return NULL;
+    if ( left < 0 )
+        left = 0;
+    if ( right < 0 )
+        right = 0;
+    if ( right > size )
+        right = size;
+    if ( right < left )
+        right = left;
+    return PyString_FromStringAndSize((char *)ptr + left,
+                                      right - left);
 }
 
 static PyObject *
 buffer_subscript(PyBufferObject *self, PyObject *item)
 {
-	void *p;
-	Py_ssize_t size;
-	
-	if (!get_buf(self, &p, &size, ANY_BUFFER))
-		return NULL;
-	if (PyIndex_Check(item)) {
-		Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
-		if (i == -1 && PyErr_Occurred())
-			return NULL;
-		if (i < 0)
-			i += size;
-		return buffer_item(self, i);
-	}
-	else if (PySlice_Check(item)) {
-		Py_ssize_t start, stop, step, slicelength, cur, i;
+    void *p;
+    Py_ssize_t size;
 
-		if (PySlice_GetIndicesEx((PySliceObject*)item, size,
-				 &start, &stop, &step, &slicelength) < 0) {
-			return NULL;
-		}
+    if (!get_buf(self, &p, &size, ANY_BUFFER))
+        return NULL;
+    if (PyIndex_Check(item)) {
+        Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
+        if (i == -1 && PyErr_Occurred())
+            return NULL;
+        if (i < 0)
+            i += size;
+        return buffer_item(self, i);
+    }
+    else if (PySlice_Check(item)) {
+        Py_ssize_t start, stop, step, slicelength, cur, i;
 
-		if (slicelength <= 0)
-			return PyString_FromStringAndSize("", 0);
-		else if (step == 1)
-			return PyString_FromStringAndSize((char *)p + start,
-							  stop - start);
-		else {
-			PyObject *result;
-			char *source_buf = (char *)p;
-			char *result_buf = (char *)PyMem_Malloc(slicelength);
+        if (PySlice_GetIndicesEx((PySliceObject*)item, size,
+                         &start, &stop, &step, &slicelength) < 0) {
+            return NULL;
+        }
 
-			if (result_buf == NULL)
-				return PyErr_NoMemory();
+        if (slicelength <= 0)
+            return PyString_FromStringAndSize("", 0);
+        else if (step == 1)
+            return PyString_FromStringAndSize((char *)p + start,
+                                              stop - start);
+        else {
+            PyObject *result;
+            char *source_buf = (char *)p;
+            char *result_buf = (char *)PyMem_Malloc(slicelength);
 
-			for (cur = start, i = 0; i < slicelength;
-			     cur += step, i++) {
-				result_buf[i] = source_buf[cur];
-			}
+            if (result_buf == NULL)
+                return PyErr_NoMemory();
 
-			result = PyString_FromStringAndSize(result_buf,
-							    slicelength);
-			PyMem_Free(result_buf);
-			return result;
-		}
-	}
-	else {
-		PyErr_SetString(PyExc_TypeError,
-				"sequence index must be integer");
-		return NULL;
-	}
+            for (cur = start, i = 0; i < slicelength;
+                 cur += step, i++) {
+                result_buf[i] = source_buf[cur];
+            }
+
+            result = PyString_FromStringAndSize(result_buf,
+                                                slicelength);
+            PyMem_Free(result_buf);
+            return result;
+        }
+    }
+    else {
+        PyErr_SetString(PyExc_TypeError,
+                        "sequence index must be integer");
+        return NULL;
+    }
 }
 
 static int
 buffer_ass_item(PyBufferObject *self, Py_ssize_t idx, PyObject *other)
 {
-	PyBufferProcs *pb;
-	void *ptr1, *ptr2;
-	Py_ssize_t size;
-	Py_ssize_t count;
+    PyBufferProcs *pb;
+    void *ptr1, *ptr2;
+    Py_ssize_t size;
+    Py_ssize_t count;
 
-	if ( self->b_readonly ) {
-		PyErr_SetString(PyExc_TypeError,
-				"buffer is read-only");
-		return -1;
-	}
+    if ( self->b_readonly ) {
+        PyErr_SetString(PyExc_TypeError,
+                        "buffer is read-only");
+        return -1;
+    }
 
-	if (!get_buf(self, &ptr1, &size, ANY_BUFFER))
-		return -1;
+    if (!get_buf(self, &ptr1, &size, ANY_BUFFER))
+        return -1;
 
-	if (idx < 0 || idx >= size) {
-		PyErr_SetString(PyExc_IndexError,
-				"buffer assignment index out of range");
-		return -1;
-	}
+    if (idx < 0 || idx >= size) {
+        PyErr_SetString(PyExc_IndexError,
+                        "buffer assignment index out of range");
+        return -1;
+    }
 
-	pb = other ? other->ob_type->tp_as_buffer : NULL;
-	if ( pb == NULL ||
-	     pb->bf_getreadbuffer == NULL ||
-	     pb->bf_getsegcount == NULL )
-	{
-		PyErr_BadArgument();
-		return -1;
-	}
-	if ( (*pb->bf_getsegcount)(other, NULL) != 1 )
-	{
-		/* ### use a different exception type/message? */
-		PyErr_SetString(PyExc_TypeError,
-				"single-segment buffer object expected");
-		return -1;
-	}
+    pb = other ? other->ob_type->tp_as_buffer : NULL;
+    if ( pb == NULL ||
+         pb->bf_getreadbuffer == NULL ||
+         pb->bf_getsegcount == NULL )
+    {
+        PyErr_BadArgument();
+        return -1;
+    }
+    if ( (*pb->bf_getsegcount)(other, NULL) != 1 )
+    {
+        /* ### use a different exception type/message? */
+        PyErr_SetString(PyExc_TypeError,
+                        "single-segment buffer object expected");
+        return -1;
+    }
 
-	if ( (count = (*pb->bf_getreadbuffer)(other, 0, &ptr2)) < 0 )
-		return -1;
-	if ( count != 1 ) {
-		PyErr_SetString(PyExc_TypeError,
-				"right operand must be a single byte");
-		return -1;
-	}
+    if ( (count = (*pb->bf_getreadbuffer)(other, 0, &ptr2)) < 0 )
+        return -1;
+    if ( count != 1 ) {
+        PyErr_SetString(PyExc_TypeError,
+                        "right operand must be a single byte");
+        return -1;
+    }
 
-	((char *)ptr1)[idx] = *(char *)ptr2;
-	return 0;
+    ((char *)ptr1)[idx] = *(char *)ptr2;
+    return 0;
 }
 
 static int
 buffer_ass_slice(PyBufferObject *self, Py_ssize_t left, Py_ssize_t right, PyObject *other)
 {
-	PyBufferProcs *pb;
-	void *ptr1, *ptr2;
-	Py_ssize_t size;
-	Py_ssize_t slice_len;
-	Py_ssize_t count;
+    PyBufferProcs *pb;
+    void *ptr1, *ptr2;
+    Py_ssize_t size;
+    Py_ssize_t slice_len;
+    Py_ssize_t count;
 
-	if ( self->b_readonly ) {
-		PyErr_SetString(PyExc_TypeError,
-				"buffer is read-only");
-		return -1;
-	}
+    if ( self->b_readonly ) {
+        PyErr_SetString(PyExc_TypeError,
+                        "buffer is read-only");
+        return -1;
+    }
 
-	pb = other ? other->ob_type->tp_as_buffer : NULL;
-	if ( pb == NULL ||
-	     pb->bf_getreadbuffer == NULL ||
-	     pb->bf_getsegcount == NULL )
-	{
-		PyErr_BadArgument();
-		return -1;
-	}
-	if ( (*pb->bf_getsegcount)(other, NULL) != 1 )
-	{
-		/* ### use a different exception type/message? */
-		PyErr_SetString(PyExc_TypeError,
-				"single-segment buffer object expected");
-		return -1;
-	}
-	if (!get_buf(self, &ptr1, &size, ANY_BUFFER))
-		return -1;
-	if ( (count = (*pb->bf_getreadbuffer)(other, 0, &ptr2)) < 0 )
-		return -1;
+    pb = other ? other->ob_type->tp_as_buffer : NULL;
+    if ( pb == NULL ||
+         pb->bf_getreadbuffer == NULL ||
+         pb->bf_getsegcount == NULL )
+    {
+        PyErr_BadArgument();
+        return -1;
+    }
+    if ( (*pb->bf_getsegcount)(other, NULL) != 1 )
+    {
+        /* ### use a different exception type/message? */
+        PyErr_SetString(PyExc_TypeError,
+                        "single-segment buffer object expected");
+        return -1;
+    }
+    if (!get_buf(self, &ptr1, &size, ANY_BUFFER))
+        return -1;
+    if ( (count = (*pb->bf_getreadbuffer)(other, 0, &ptr2)) < 0 )
+        return -1;
 
-	if ( left < 0 )
-		left = 0;
-	else if ( left > size )
-		left = size;
-	if ( right < left )
-		right = left;
-	else if ( right > size )
-		right = size;
-	slice_len = right - left;
+    if ( left < 0 )
+        left = 0;
+    else if ( left > size )
+        left = size;
+    if ( right < left )
+        right = left;
+    else if ( right > size )
+        right = size;
+    slice_len = right - left;
 
-	if ( count != slice_len ) {
-		PyErr_SetString(
-			PyExc_TypeError,
-			"right operand length must match slice length");
-		return -1;
-	}
+    if ( count != slice_len ) {
+        PyErr_SetString(
+            PyExc_TypeError,
+            "right operand length must match slice length");
+        return -1;
+    }
 
-	if ( slice_len )
-	    memcpy((char *)ptr1 + left, ptr2, slice_len);
+    if ( slice_len )
+        memcpy((char *)ptr1 + left, ptr2, slice_len);
 
-	return 0;
+    return 0;
 }
 
 static int
 buffer_ass_subscript(PyBufferObject *self, PyObject *item, PyObject *value)
 {
-	PyBufferProcs *pb;
-	void *ptr1, *ptr2;
-	Py_ssize_t selfsize;
-	Py_ssize_t othersize;
+    PyBufferProcs *pb;
+    void *ptr1, *ptr2;
+    Py_ssize_t selfsize;
+    Py_ssize_t othersize;
 
-	if ( self->b_readonly ) {
-		PyErr_SetString(PyExc_TypeError,
-				"buffer is read-only");
-		return -1;
-	}
+    if ( self->b_readonly ) {
+        PyErr_SetString(PyExc_TypeError,
+                        "buffer is read-only");
+        return -1;
+    }
 
-	pb = value ? value->ob_type->tp_as_buffer : NULL;
-	if ( pb == NULL ||
-	     pb->bf_getreadbuffer == NULL ||
-	     pb->bf_getsegcount == NULL )
-	{
-		PyErr_BadArgument();
-		return -1;
-	}
-	if ( (*pb->bf_getsegcount)(value, NULL) != 1 )
-	{
-		/* ### use a different exception type/message? */
-		PyErr_SetString(PyExc_TypeError,
-				"single-segment buffer object expected");
-		return -1;
-	}
-	if (!get_buf(self, &ptr1, &selfsize, ANY_BUFFER))
-		return -1;
-	if (PyIndex_Check(item)) {
-		Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
-		if (i == -1 && PyErr_Occurred())
-			return -1;
-		if (i < 0)
-			i += selfsize;
-		return buffer_ass_item(self, i, value);
-	}
-	else if (PySlice_Check(item)) {
-		Py_ssize_t start, stop, step, slicelength;
-		
-		if (PySlice_GetIndicesEx((PySliceObject *)item, selfsize,
-				&start, &stop, &step, &slicelength) < 0)
-			return -1;
+    pb = value ? value->ob_type->tp_as_buffer : NULL;
+    if ( pb == NULL ||
+         pb->bf_getreadbuffer == NULL ||
+         pb->bf_getsegcount == NULL )
+    {
+        PyErr_BadArgument();
+        return -1;
+    }
+    if ( (*pb->bf_getsegcount)(value, NULL) != 1 )
+    {
+        /* ### use a different exception type/message? */
+        PyErr_SetString(PyExc_TypeError,
+                        "single-segment buffer object expected");
+        return -1;
+    }
+    if (!get_buf(self, &ptr1, &selfsize, ANY_BUFFER))
+        return -1;
+    if (PyIndex_Check(item)) {
+        Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
+        if (i == -1 && PyErr_Occurred())
+            return -1;
+        if (i < 0)
+            i += selfsize;
+        return buffer_ass_item(self, i, value);
+    }
+    else if (PySlice_Check(item)) {
+        Py_ssize_t start, stop, step, slicelength;
 
-		if ((othersize = (*pb->bf_getreadbuffer)(value, 0, &ptr2)) < 0)
-			return -1;
+        if (PySlice_GetIndicesEx((PySliceObject *)item, selfsize,
+                        &start, &stop, &step, &slicelength) < 0)
+            return -1;
 
-		if (othersize != slicelength) {
-			PyErr_SetString(
-				PyExc_TypeError,
-				"right operand length must match slice length");
-			return -1;
-		}
+        if ((othersize = (*pb->bf_getreadbuffer)(value, 0, &ptr2)) < 0)
+            return -1;
 
-		if (slicelength == 0)
-			return 0;
-		else if (step == 1) {
-			memcpy((char *)ptr1 + start, ptr2, slicelength);
-			return 0;
-		}
-		else {
-			Py_ssize_t cur, i;
-			
-			for (cur = start, i = 0; i < slicelength;
-			     cur += step, i++) {
-				((char *)ptr1)[cur] = ((char *)ptr2)[i];
-			}
+        if (othersize != slicelength) {
+            PyErr_SetString(
+                PyExc_TypeError,
+                "right operand length must match slice length");
+            return -1;
+        }
 
-			return 0;
-		}
-	} else {
-		PyErr_SetString(PyExc_TypeError,
-				"buffer indices must be integers");
-		return -1;
-	}
+        if (slicelength == 0)
+            return 0;
+        else if (step == 1) {
+            memcpy((char *)ptr1 + start, ptr2, slicelength);
+            return 0;
+        }
+        else {
+            Py_ssize_t cur, i;
+
+            for (cur = start, i = 0; i < slicelength;
+                 cur += step, i++) {
+                ((char *)ptr1)[cur] = ((char *)ptr2)[i];
+            }
+
+            return 0;
+        }
+    } else {
+        PyErr_SetString(PyExc_TypeError,
+                        "buffer indices must be integers");
+        return -1;
+    }
 }
 
 /* Buffer methods */
@@ -732,126 +732,126 @@
 static Py_ssize_t
 buffer_getreadbuf(PyBufferObject *self, Py_ssize_t idx, void **pp)
 {
-	Py_ssize_t size;
-	if ( idx != 0 ) {
-		PyErr_SetString(PyExc_SystemError,
-				"accessing non-existent buffer segment");
-		return -1;
-	}
-	if (!get_buf(self, pp, &size, READ_BUFFER))
-		return -1;
-	return size;
+    Py_ssize_t size;
+    if ( idx != 0 ) {
+        PyErr_SetString(PyExc_SystemError,
+                        "accessing non-existent buffer segment");
+        return -1;
+    }
+    if (!get_buf(self, pp, &size, READ_BUFFER))
+        return -1;
+    return size;
 }
 
 static Py_ssize_t
 buffer_getwritebuf(PyBufferObject *self, Py_ssize_t idx, void **pp)
 {
-	Py_ssize_t size;
+    Py_ssize_t size;
 
-	if ( self->b_readonly )
-	{
-		PyErr_SetString(PyExc_TypeError, "buffer is read-only");
-		return -1;
-	}
+    if ( self->b_readonly )
+    {
+        PyErr_SetString(PyExc_TypeError, "buffer is read-only");
+        return -1;
+    }
 
-	if ( idx != 0 ) {
-		PyErr_SetString(PyExc_SystemError,
-				"accessing non-existent buffer segment");
-		return -1;
-	}
-	if (!get_buf(self, pp, &size, WRITE_BUFFER))
-		return -1;
-	return size;
+    if ( idx != 0 ) {
+        PyErr_SetString(PyExc_SystemError,
+                        "accessing non-existent buffer segment");
+        return -1;
+    }
+    if (!get_buf(self, pp, &size, WRITE_BUFFER))
+        return -1;
+    return size;
 }
 
 static Py_ssize_t
 buffer_getsegcount(PyBufferObject *self, Py_ssize_t *lenp)
 {
-	void *ptr;
-	Py_ssize_t size;
-	if (!get_buf(self, &ptr, &size, ANY_BUFFER))
-		return -1;
-	if (lenp)
-		*lenp = size;
-	return 1;
+    void *ptr;
+    Py_ssize_t size;
+    if (!get_buf(self, &ptr, &size, ANY_BUFFER))
+        return -1;
+    if (lenp)
+        *lenp = size;
+    return 1;
 }
 
 static Py_ssize_t
 buffer_getcharbuf(PyBufferObject *self, Py_ssize_t idx, const char **pp)
 {
-	void *ptr;
-	Py_ssize_t size;
-	if ( idx != 0 ) {
-		PyErr_SetString(PyExc_SystemError,
-				"accessing non-existent buffer segment");
-		return -1;
-	}
-	if (!get_buf(self, &ptr, &size, CHAR_BUFFER))
-		return -1;
-	*pp = (const char *)ptr;
-	return size;
+    void *ptr;
+    Py_ssize_t size;
+    if ( idx != 0 ) {
+        PyErr_SetString(PyExc_SystemError,
+                        "accessing non-existent buffer segment");
+        return -1;
+    }
+    if (!get_buf(self, &ptr, &size, CHAR_BUFFER))
+        return -1;
+    *pp = (const char *)ptr;
+    return size;
 }
 
 static PySequenceMethods buffer_as_sequence = {
-	(lenfunc)buffer_length, /*sq_length*/
-	(binaryfunc)buffer_concat, /*sq_concat*/
-	(ssizeargfunc)buffer_repeat, /*sq_repeat*/
-	(ssizeargfunc)buffer_item, /*sq_item*/
-	(ssizessizeargfunc)buffer_slice, /*sq_slice*/
-	(ssizeobjargproc)buffer_ass_item, /*sq_ass_item*/
-	(ssizessizeobjargproc)buffer_ass_slice, /*sq_ass_slice*/
+    (lenfunc)buffer_length, /*sq_length*/
+    (binaryfunc)buffer_concat, /*sq_concat*/
+    (ssizeargfunc)buffer_repeat, /*sq_repeat*/
+    (ssizeargfunc)buffer_item, /*sq_item*/
+    (ssizessizeargfunc)buffer_slice, /*sq_slice*/
+    (ssizeobjargproc)buffer_ass_item, /*sq_ass_item*/
+    (ssizessizeobjargproc)buffer_ass_slice, /*sq_ass_slice*/
 };
 
 static PyMappingMethods buffer_as_mapping = {
-	(lenfunc)buffer_length,
-	(binaryfunc)buffer_subscript,
-	(objobjargproc)buffer_ass_subscript,
+    (lenfunc)buffer_length,
+    (binaryfunc)buffer_subscript,
+    (objobjargproc)buffer_ass_subscript,
 };
 
 static PyBufferProcs buffer_as_buffer = {
-	(readbufferproc)buffer_getreadbuf,
-	(writebufferproc)buffer_getwritebuf,
-	(segcountproc)buffer_getsegcount,
-	(charbufferproc)buffer_getcharbuf,
+    (readbufferproc)buffer_getreadbuf,
+    (writebufferproc)buffer_getwritebuf,
+    (segcountproc)buffer_getsegcount,
+    (charbufferproc)buffer_getcharbuf,
 };
 
 PyTypeObject PyBuffer_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"buffer",
-	sizeof(PyBufferObject),
-	0,
-	(destructor)buffer_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)buffer_compare,		/* tp_compare */
-	(reprfunc)buffer_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	&buffer_as_sequence,			/* tp_as_sequence */
-	&buffer_as_mapping,			/* tp_as_mapping */
-	(hashfunc)buffer_hash,			/* tp_hash */
-	0,					/* tp_call */
-	(reprfunc)buffer_str,			/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	&buffer_as_buffer,			/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GETCHARBUFFER, /* tp_flags */
-	buffer_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */	
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	buffer_new,				/* tp_new */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "buffer",
+    sizeof(PyBufferObject),
+    0,
+    (destructor)buffer_dealloc,                 /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)buffer_compare,                    /* tp_compare */
+    (reprfunc)buffer_repr,                      /* tp_repr */
+    0,                                          /* tp_as_number */
+    &buffer_as_sequence,                        /* tp_as_sequence */
+    &buffer_as_mapping,                         /* tp_as_mapping */
+    (hashfunc)buffer_hash,                      /* tp_hash */
+    0,                                          /* tp_call */
+    (reprfunc)buffer_str,                       /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    &buffer_as_buffer,                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GETCHARBUFFER, /* tp_flags */
+    buffer_doc,                                 /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    buffer_new,                                 /* tp_new */
 };
diff --git a/Objects/bytes_methods.c b/Objects/bytes_methods.c
index 4d25520..a5d0c5b 100644
--- a/Objects/bytes_methods.c
+++ b/Objects/bytes_methods.c
@@ -24,7 +24,7 @@
 
     e = p + len;
     for (; p < e; p++) {
-	if (!Py_ISSPACE(*p))
+        if (!Py_ISSPACE(*p))
             Py_RETURN_FALSE;
     }
     Py_RETURN_TRUE;
@@ -46,16 +46,16 @@
 
     /* Shortcut for single character strings */
     if (len == 1 && Py_ISALPHA(*p))
-	Py_RETURN_TRUE;
+        Py_RETURN_TRUE;
 
     /* Special case for empty strings */
     if (len == 0)
-	Py_RETURN_FALSE;
+        Py_RETURN_FALSE;
 
     e = p + len;
     for (; p < e; p++) {
-	if (!Py_ISALPHA(*p))
-	    Py_RETURN_FALSE;
+        if (!Py_ISALPHA(*p))
+            Py_RETURN_FALSE;
     }
     Py_RETURN_TRUE;
 }
@@ -76,16 +76,16 @@
 
     /* Shortcut for single character strings */
     if (len == 1 && Py_ISALNUM(*p))
-	Py_RETURN_TRUE;
+        Py_RETURN_TRUE;
 
     /* Special case for empty strings */
     if (len == 0)
-	Py_RETURN_FALSE;
+        Py_RETURN_FALSE;
 
     e = p + len;
     for (; p < e; p++) {
-	if (!Py_ISALNUM(*p))
-	    Py_RETURN_FALSE;
+        if (!Py_ISALNUM(*p))
+            Py_RETURN_FALSE;
     }
     Py_RETURN_TRUE;
 }
@@ -106,16 +106,16 @@
 
     /* Shortcut for single character strings */
     if (len == 1 && Py_ISDIGIT(*p))
-	Py_RETURN_TRUE;
+        Py_RETURN_TRUE;
 
     /* Special case for empty strings */
     if (len == 0)
-	Py_RETURN_FALSE;
+        Py_RETURN_FALSE;
 
     e = p + len;
     for (; p < e; p++) {
-	if (!Py_ISDIGIT(*p))
-	    Py_RETURN_FALSE;
+        if (!Py_ISDIGIT(*p))
+            Py_RETURN_FALSE;
     }
     Py_RETURN_TRUE;
 }
@@ -137,19 +137,19 @@
 
     /* Shortcut for single character strings */
     if (len == 1)
-	return PyBool_FromLong(Py_ISLOWER(*p));
+        return PyBool_FromLong(Py_ISLOWER(*p));
 
     /* Special case for empty strings */
     if (len == 0)
-	Py_RETURN_FALSE;
+        Py_RETURN_FALSE;
 
     e = p + len;
     cased = 0;
     for (; p < e; p++) {
-	if (Py_ISUPPER(*p))
-	    Py_RETURN_FALSE;
-	else if (!cased && Py_ISLOWER(*p))
-	    cased = 1;
+        if (Py_ISUPPER(*p))
+            Py_RETURN_FALSE;
+        else if (!cased && Py_ISLOWER(*p))
+            cased = 1;
     }
     return PyBool_FromLong(cased);
 }
@@ -171,19 +171,19 @@
 
     /* Shortcut for single character strings */
     if (len == 1)
-	return PyBool_FromLong(Py_ISUPPER(*p));
+        return PyBool_FromLong(Py_ISUPPER(*p));
 
     /* Special case for empty strings */
     if (len == 0)
-	Py_RETURN_FALSE;
+        Py_RETURN_FALSE;
 
     e = p + len;
     cased = 0;
     for (; p < e; p++) {
-	if (Py_ISLOWER(*p))
-	    Py_RETURN_FALSE;
-	else if (!cased && Py_ISUPPER(*p))
-	    cased = 1;
+        if (Py_ISLOWER(*p))
+            Py_RETURN_FALSE;
+        else if (!cased && Py_ISUPPER(*p))
+            cased = 1;
     }
     return PyBool_FromLong(cased);
 }
@@ -207,32 +207,32 @@
 
     /* Shortcut for single character strings */
     if (len == 1)
-	return PyBool_FromLong(Py_ISUPPER(*p));
+        return PyBool_FromLong(Py_ISUPPER(*p));
 
     /* Special case for empty strings */
     if (len == 0)
-	Py_RETURN_FALSE;
+        Py_RETURN_FALSE;
 
     e = p + len;
     cased = 0;
     previous_is_cased = 0;
     for (; p < e; p++) {
-	register const unsigned char ch = *p;
+        register const unsigned char ch = *p;
 
-	if (Py_ISUPPER(ch)) {
-	    if (previous_is_cased)
-		Py_RETURN_FALSE;
-	    previous_is_cased = 1;
-	    cased = 1;
-	}
-	else if (Py_ISLOWER(ch)) {
-	    if (!previous_is_cased)
-		Py_RETURN_FALSE;
-	    previous_is_cased = 1;
-	    cased = 1;
-	}
-	else
-	    previous_is_cased = 0;
+        if (Py_ISUPPER(ch)) {
+            if (previous_is_cased)
+                Py_RETURN_FALSE;
+            previous_is_cased = 1;
+            cased = 1;
+        }
+        else if (Py_ISLOWER(ch)) {
+            if (!previous_is_cased)
+                Py_RETURN_FALSE;
+            previous_is_cased = 1;
+            cased = 1;
+        }
+        else
+            previous_is_cased = 0;
     }
     return PyBool_FromLong(cased);
 }
@@ -246,23 +246,23 @@
 void
 _Py_bytes_lower(char *result, const char *cptr, Py_ssize_t len)
 {
-	Py_ssize_t i;
+        Py_ssize_t i;
 
         /*
-	newobj = PyString_FromStringAndSize(NULL, len);
-	if (!newobj)
-		return NULL;
+        newobj = PyString_FromStringAndSize(NULL, len);
+        if (!newobj)
+                return NULL;
 
-	s = PyString_AS_STRING(newobj);
+        s = PyString_AS_STRING(newobj);
         */
 
-	Py_MEMCPY(result, cptr, len);
+        Py_MEMCPY(result, cptr, len);
 
-	for (i = 0; i < len; i++) {
-		int c = Py_CHARMASK(result[i]);
-		if (Py_ISUPPER(c))
-			result[i] = Py_TOLOWER(c);
-	}
+        for (i = 0; i < len; i++) {
+                int c = Py_CHARMASK(result[i]);
+                if (Py_ISUPPER(c))
+                        result[i] = Py_TOLOWER(c);
+        }
 }
 
 
@@ -274,23 +274,23 @@
 void
 _Py_bytes_upper(char *result, const char *cptr, Py_ssize_t len)
 {
-	Py_ssize_t i;
+        Py_ssize_t i;
 
         /*
-	newobj = PyString_FromStringAndSize(NULL, len);
-	if (!newobj)
-		return NULL;
+        newobj = PyString_FromStringAndSize(NULL, len);
+        if (!newobj)
+                return NULL;
 
-	s = PyString_AS_STRING(newobj);
+        s = PyString_AS_STRING(newobj);
         */
 
-	Py_MEMCPY(result, cptr, len);
+        Py_MEMCPY(result, cptr, len);
 
-	for (i = 0; i < len; i++) {
-		int c = Py_CHARMASK(result[i]);
-		if (Py_ISLOWER(c))
-			result[i] = Py_TOUPPER(c);
-	}
+        for (i = 0; i < len; i++) {
+                int c = Py_CHARMASK(result[i]);
+                if (Py_ISLOWER(c))
+                        result[i] = Py_TOUPPER(c);
+        }
 }
 
 
@@ -303,29 +303,29 @@
 void
 _Py_bytes_title(char *result, char *s, Py_ssize_t len)
 {
-	Py_ssize_t i;
-	int previous_is_cased = 0;
+        Py_ssize_t i;
+        int previous_is_cased = 0;
 
         /*
-	newobj = PyString_FromStringAndSize(NULL, len);
-	if (newobj == NULL)
-		return NULL;
-	s_new = PyString_AsString(newobj);
+        newobj = PyString_FromStringAndSize(NULL, len);
+        if (newobj == NULL)
+                return NULL;
+        s_new = PyString_AsString(newobj);
         */
-	for (i = 0; i < len; i++) {
-		int c = Py_CHARMASK(*s++);
-		if (Py_ISLOWER(c)) {
-			if (!previous_is_cased)
-			    c = Py_TOUPPER(c);
-			previous_is_cased = 1;
-		} else if (Py_ISUPPER(c)) {
-			if (previous_is_cased)
-			    c = Py_TOLOWER(c);
-			previous_is_cased = 1;
-		} else
-			previous_is_cased = 0;
-		*result++ = c;
-	}
+        for (i = 0; i < len; i++) {
+                int c = Py_CHARMASK(*s++);
+                if (Py_ISLOWER(c)) {
+                        if (!previous_is_cased)
+                            c = Py_TOUPPER(c);
+                        previous_is_cased = 1;
+                } else if (Py_ISUPPER(c)) {
+                        if (previous_is_cased)
+                            c = Py_TOLOWER(c);
+                        previous_is_cased = 1;
+                } else
+                        previous_is_cased = 0;
+                *result++ = c;
+        }
 }
 
 
@@ -337,30 +337,30 @@
 void
 _Py_bytes_capitalize(char *result, char *s, Py_ssize_t len)
 {
-	Py_ssize_t i;
+        Py_ssize_t i;
 
         /*
-	newobj = PyString_FromStringAndSize(NULL, len);
-	if (newobj == NULL)
-		return NULL;
-	s_new = PyString_AsString(newobj);
+        newobj = PyString_FromStringAndSize(NULL, len);
+        if (newobj == NULL)
+                return NULL;
+        s_new = PyString_AsString(newobj);
         */
-	if (0 < len) {
-		int c = Py_CHARMASK(*s++);
-		if (Py_ISLOWER(c))
-			*result = Py_TOUPPER(c);
-		else
-			*result = c;
-		result++;
-	}
-	for (i = 1; i < len; i++) {
-		int c = Py_CHARMASK(*s++);
-		if (Py_ISUPPER(c))
-			*result = Py_TOLOWER(c);
-		else
-			*result = c;
-		result++;
-	}
+        if (0 < len) {
+                int c = Py_CHARMASK(*s++);
+                if (Py_ISLOWER(c))
+                        *result = Py_TOUPPER(c);
+                else
+                        *result = c;
+                result++;
+        }
+        for (i = 1; i < len; i++) {
+                int c = Py_CHARMASK(*s++);
+                if (Py_ISUPPER(c))
+                        *result = Py_TOLOWER(c);
+                else
+                        *result = c;
+                result++;
+        }
 }
 
 
@@ -373,25 +373,25 @@
 void
 _Py_bytes_swapcase(char *result, char *s, Py_ssize_t len)
 {
-	Py_ssize_t i;
+        Py_ssize_t i;
 
         /*
-	newobj = PyString_FromStringAndSize(NULL, len);
-	if (newobj == NULL)
-		return NULL;
-	s_new = PyString_AsString(newobj);
+        newobj = PyString_FromStringAndSize(NULL, len);
+        if (newobj == NULL)
+                return NULL;
+        s_new = PyString_AsString(newobj);
         */
-	for (i = 0; i < len; i++) {
-		int c = Py_CHARMASK(*s++);
-		if (Py_ISLOWER(c)) {
-			*result = Py_TOUPPER(c);
-		}
-		else if (Py_ISUPPER(c)) {
-			*result = Py_TOLOWER(c);
-		}
-		else
-			*result = c;
-		result++;
-	}
+        for (i = 0; i < len; i++) {
+                int c = Py_CHARMASK(*s++);
+                if (Py_ISLOWER(c)) {
+                        *result = Py_TOUPPER(c);
+                }
+                else if (Py_ISUPPER(c)) {
+                        *result = Py_TOLOWER(c);
+                }
+                else
+                        *result = c;
+                result++;
+        }
 }
 
diff --git a/Objects/cellobject.c b/Objects/cellobject.c
index 4e0bcf8..d0f6cda 100644
--- a/Objects/cellobject.c
+++ b/Objects/cellobject.c
@@ -5,141 +5,141 @@
 PyObject *
 PyCell_New(PyObject *obj)
 {
-	PyCellObject *op;
+    PyCellObject *op;
 
-	op = (PyCellObject *)PyObject_GC_New(PyCellObject, &PyCell_Type);
-	if (op == NULL)
-		return NULL;
-	op->ob_ref = obj;
-	Py_XINCREF(obj);
+    op = (PyCellObject *)PyObject_GC_New(PyCellObject, &PyCell_Type);
+    if (op == NULL)
+        return NULL;
+    op->ob_ref = obj;
+    Py_XINCREF(obj);
 
-	_PyObject_GC_TRACK(op);
-	return (PyObject *)op;
+    _PyObject_GC_TRACK(op);
+    return (PyObject *)op;
 }
 
 PyObject *
 PyCell_Get(PyObject *op)
 {
-	if (!PyCell_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	Py_XINCREF(((PyCellObject*)op)->ob_ref);
-	return PyCell_GET(op);
+    if (!PyCell_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    Py_XINCREF(((PyCellObject*)op)->ob_ref);
+    return PyCell_GET(op);
 }
 
 int
 PyCell_Set(PyObject *op, PyObject *obj)
 {
-	PyObject* oldobj;
-	if (!PyCell_Check(op)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	oldobj = PyCell_GET(op);
-	Py_XINCREF(obj);
-	PyCell_SET(op, obj);
-	Py_XDECREF(oldobj);
-	return 0;
+    PyObject* oldobj;
+    if (!PyCell_Check(op)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    oldobj = PyCell_GET(op);
+    Py_XINCREF(obj);
+    PyCell_SET(op, obj);
+    Py_XDECREF(oldobj);
+    return 0;
 }
 
 static void
 cell_dealloc(PyCellObject *op)
 {
-	_PyObject_GC_UNTRACK(op);
-	Py_XDECREF(op->ob_ref);
-	PyObject_GC_Del(op);
+    _PyObject_GC_UNTRACK(op);
+    Py_XDECREF(op->ob_ref);
+    PyObject_GC_Del(op);
 }
 
 static int
 cell_compare(PyCellObject *a, PyCellObject *b)
 {
-	/* Py3K warning for comparisons  */
-	if (PyErr_WarnPy3k("cell comparisons not supported in 3.x",
-			   1) < 0) {
-		return -2;
-	}
+    /* Py3K warning for comparisons  */
+    if (PyErr_WarnPy3k("cell comparisons not supported in 3.x",
+                       1) < 0) {
+        return -2;
+    }
 
-	if (a->ob_ref == NULL) {
-		if (b->ob_ref == NULL)
-			return 0;
-		return -1;
-	} else if (b->ob_ref == NULL)
-		return 1;
-	return PyObject_Compare(a->ob_ref, b->ob_ref);
+    if (a->ob_ref == NULL) {
+        if (b->ob_ref == NULL)
+            return 0;
+        return -1;
+    } else if (b->ob_ref == NULL)
+        return 1;
+    return PyObject_Compare(a->ob_ref, b->ob_ref);
 }
 
 static PyObject *
 cell_repr(PyCellObject *op)
 {
-	if (op->ob_ref == NULL)
-		return PyString_FromFormat("<cell at %p: empty>", op);
+    if (op->ob_ref == NULL)
+        return PyString_FromFormat("<cell at %p: empty>", op);
 
-	return PyString_FromFormat("<cell at %p: %.80s object at %p>",
-				   op, op->ob_ref->ob_type->tp_name,
-				   op->ob_ref);
+    return PyString_FromFormat("<cell at %p: %.80s object at %p>",
+                               op, op->ob_ref->ob_type->tp_name,
+                               op->ob_ref);
 }
 
 static int
 cell_traverse(PyCellObject *op, visitproc visit, void *arg)
 {
-	Py_VISIT(op->ob_ref);
-	return 0;
+    Py_VISIT(op->ob_ref);
+    return 0;
 }
 
 static int
 cell_clear(PyCellObject *op)
 {
-	Py_CLEAR(op->ob_ref);
-	return 0;
+    Py_CLEAR(op->ob_ref);
+    return 0;
 }
 
 static PyObject *
 cell_get_contents(PyCellObject *op, void *closure)
 {
-	if (op->ob_ref == NULL)
-	{
-		PyErr_SetString(PyExc_ValueError, "Cell is empty");
-		return NULL;
-	}
-	Py_INCREF(op->ob_ref);
-	return op->ob_ref;
+    if (op->ob_ref == NULL)
+    {
+        PyErr_SetString(PyExc_ValueError, "Cell is empty");
+        return NULL;
+    }
+    Py_INCREF(op->ob_ref);
+    return op->ob_ref;
 }
 
 static PyGetSetDef cell_getsetlist[] = {
-	{"cell_contents", (getter)cell_get_contents, NULL},
-	{NULL} /* sentinel */
+    {"cell_contents", (getter)cell_get_contents, NULL},
+    {NULL} /* sentinel */
 };
 
 PyTypeObject PyCell_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"cell",
-	sizeof(PyCellObject),
-	0,
-	(destructor)cell_dealloc,               /* tp_dealloc */
-	0,                                      /* tp_print */
-	0,	                                /* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)cell_compare,			/* tp_compare */
-	(reprfunc)cell_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,			                /* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)cell_traverse,		/* tp_traverse */
- 	(inquiry)cell_clear,			/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0, 					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	0,					/* tp_members */
-	cell_getsetlist,			/* tp_getset */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "cell",
+    sizeof(PyCellObject),
+    0,
+    (destructor)cell_dealloc,               /* tp_dealloc */
+    0,                                      /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)cell_compare,                      /* tp_compare */
+    (reprfunc)cell_repr,                        /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)cell_traverse,                /* tp_traverse */
+    (inquiry)cell_clear,                        /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    0,                                          /* tp_members */
+    cell_getsetlist,                            /* tp_getset */
 };
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 032d354..0832531 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -18,7 +18,7 @@
 
 /* Forward */
 static PyObject *class_lookup(PyClassObject *, PyObject *,
-			      PyClassObject **);
+                              PyClassObject **);
 static PyObject *instance_getattr1(PyInstanceObject *, PyObject *);
 static PyObject *instance_getattr2(PyInstanceObject *, PyObject *);
 
@@ -29,140 +29,140 @@
 PyClass_New(PyObject *bases, PyObject *dict, PyObject *name)
      /* bases is NULL or tuple of classobjects! */
 {
-	PyClassObject *op, *dummy;
-	static PyObject *docstr, *modstr, *namestr;
-	if (docstr == NULL) {
-		docstr= PyString_InternFromString("__doc__");
-		if (docstr == NULL)
-			return NULL;
-	}
-	if (modstr == NULL) {
-		modstr= PyString_InternFromString("__module__");
-		if (modstr == NULL)
-			return NULL;
-	}
-	if (namestr == NULL) {
-		namestr= PyString_InternFromString("__name__");
-		if (namestr == NULL)
-			return NULL;
-	}
-	if (name == NULL || !PyString_Check(name)) {
-		PyErr_SetString(PyExc_TypeError,
-				"PyClass_New: name must be a string");
-		return NULL;
-	}
-	if (dict == NULL || !PyDict_Check(dict)) {
-		PyErr_SetString(PyExc_TypeError,
-				"PyClass_New: dict must be a dictionary");
-		return NULL;
-	}
-	if (PyDict_GetItem(dict, docstr) == NULL) {
-		if (PyDict_SetItem(dict, docstr, Py_None) < 0)
-			return NULL;
-	}
-	if (PyDict_GetItem(dict, modstr) == NULL) {
-		PyObject *globals = PyEval_GetGlobals();
-		if (globals != NULL) {
-			PyObject *modname = PyDict_GetItem(globals, namestr);
-			if (modname != NULL) {
-				if (PyDict_SetItem(dict, modstr, modname) < 0)
-					return NULL;
-			}
-		}
-	}
-	if (bases == NULL) {
-		bases = PyTuple_New(0);
-		if (bases == NULL)
-			return NULL;
-	}
-	else {
-		Py_ssize_t i, n;
-		PyObject *base;
-		if (!PyTuple_Check(bases)) {
-			PyErr_SetString(PyExc_TypeError,
-					"PyClass_New: bases must be a tuple");
-			return NULL;
-		}
-		n = PyTuple_Size(bases);
-		for (i = 0; i < n; i++) {
-			base = PyTuple_GET_ITEM(bases, i);
-			if (!PyClass_Check(base)) {
-				if (PyCallable_Check(
-					(PyObject *) base->ob_type))
-					return PyObject_CallFunctionObjArgs(
-						(PyObject *) base->ob_type,
-						name, bases, dict, NULL);
-				PyErr_SetString(PyExc_TypeError,
-					"PyClass_New: base must be a class");
-				return NULL;
-			}
-		}
-		Py_INCREF(bases);
-	}
+    PyClassObject *op, *dummy;
+    static PyObject *docstr, *modstr, *namestr;
+    if (docstr == NULL) {
+        docstr= PyString_InternFromString("__doc__");
+        if (docstr == NULL)
+            return NULL;
+    }
+    if (modstr == NULL) {
+        modstr= PyString_InternFromString("__module__");
+        if (modstr == NULL)
+            return NULL;
+    }
+    if (namestr == NULL) {
+        namestr= PyString_InternFromString("__name__");
+        if (namestr == NULL)
+            return NULL;
+    }
+    if (name == NULL || !PyString_Check(name)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "PyClass_New: name must be a string");
+        return NULL;
+    }
+    if (dict == NULL || !PyDict_Check(dict)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "PyClass_New: dict must be a dictionary");
+        return NULL;
+    }
+    if (PyDict_GetItem(dict, docstr) == NULL) {
+        if (PyDict_SetItem(dict, docstr, Py_None) < 0)
+            return NULL;
+    }
+    if (PyDict_GetItem(dict, modstr) == NULL) {
+        PyObject *globals = PyEval_GetGlobals();
+        if (globals != NULL) {
+            PyObject *modname = PyDict_GetItem(globals, namestr);
+            if (modname != NULL) {
+                if (PyDict_SetItem(dict, modstr, modname) < 0)
+                    return NULL;
+            }
+        }
+    }
+    if (bases == NULL) {
+        bases = PyTuple_New(0);
+        if (bases == NULL)
+            return NULL;
+    }
+    else {
+        Py_ssize_t i, n;
+        PyObject *base;
+        if (!PyTuple_Check(bases)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "PyClass_New: bases must be a tuple");
+            return NULL;
+        }
+        n = PyTuple_Size(bases);
+        for (i = 0; i < n; i++) {
+            base = PyTuple_GET_ITEM(bases, i);
+            if (!PyClass_Check(base)) {
+                if (PyCallable_Check(
+                    (PyObject *) base->ob_type))
+                    return PyObject_CallFunctionObjArgs(
+                        (PyObject *) base->ob_type,
+                        name, bases, dict, NULL);
+                PyErr_SetString(PyExc_TypeError,
+                    "PyClass_New: base must be a class");
+                return NULL;
+            }
+        }
+        Py_INCREF(bases);
+    }
 
-	if (getattrstr == NULL) {
-		getattrstr = PyString_InternFromString("__getattr__");
-		if (getattrstr == NULL)
-			goto alloc_error;
-		setattrstr = PyString_InternFromString("__setattr__");
-		if (setattrstr == NULL)
-			goto alloc_error;
-		delattrstr = PyString_InternFromString("__delattr__");
-		if (delattrstr == NULL)
-			goto alloc_error;
-	}
+    if (getattrstr == NULL) {
+        getattrstr = PyString_InternFromString("__getattr__");
+        if (getattrstr == NULL)
+            goto alloc_error;
+        setattrstr = PyString_InternFromString("__setattr__");
+        if (setattrstr == NULL)
+            goto alloc_error;
+        delattrstr = PyString_InternFromString("__delattr__");
+        if (delattrstr == NULL)
+            goto alloc_error;
+    }
 
-	op = PyObject_GC_New(PyClassObject, &PyClass_Type);
-	if (op == NULL) {
+    op = PyObject_GC_New(PyClassObject, &PyClass_Type);
+    if (op == NULL) {
 alloc_error:
-		Py_DECREF(bases);
-		return NULL;
-	}
-	op->cl_bases = bases;
-	Py_INCREF(dict);
-	op->cl_dict = dict;
-	Py_XINCREF(name);
-	op->cl_name = name;
-	op->cl_weakreflist = NULL;
+        Py_DECREF(bases);
+        return NULL;
+    }
+    op->cl_bases = bases;
+    Py_INCREF(dict);
+    op->cl_dict = dict;
+    Py_XINCREF(name);
+    op->cl_name = name;
+    op->cl_weakreflist = NULL;
 
-	op->cl_getattr = class_lookup(op, getattrstr, &dummy);
-	op->cl_setattr = class_lookup(op, setattrstr, &dummy);
-	op->cl_delattr = class_lookup(op, delattrstr, &dummy);
-	Py_XINCREF(op->cl_getattr);
-	Py_XINCREF(op->cl_setattr);
-	Py_XINCREF(op->cl_delattr);
-	_PyObject_GC_TRACK(op);
-	return (PyObject *) op;
+    op->cl_getattr = class_lookup(op, getattrstr, &dummy);
+    op->cl_setattr = class_lookup(op, setattrstr, &dummy);
+    op->cl_delattr = class_lookup(op, delattrstr, &dummy);
+    Py_XINCREF(op->cl_getattr);
+    Py_XINCREF(op->cl_setattr);
+    Py_XINCREF(op->cl_delattr);
+    _PyObject_GC_TRACK(op);
+    return (PyObject *) op;
 }
 
 PyObject *
 PyMethod_Function(PyObject *im)
 {
-	if (!PyMethod_Check(im)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyMethodObject *)im)->im_func;
+    if (!PyMethod_Check(im)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyMethodObject *)im)->im_func;
 }
 
 PyObject *
 PyMethod_Self(PyObject *im)
 {
-	if (!PyMethod_Check(im)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyMethodObject *)im)->im_self;
+    if (!PyMethod_Check(im)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyMethodObject *)im)->im_self;
 }
 
 PyObject *
 PyMethod_Class(PyObject *im)
 {
-	if (!PyMethod_Check(im)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyMethodObject *)im)->im_class;
+    if (!PyMethod_Check(im)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyMethodObject *)im)->im_class;
 }
 
 PyDoc_STRVAR(class_doc,
@@ -174,13 +174,13 @@
 static PyObject *
 class_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *name, *bases, *dict;
-	static char *kwlist[] = {"name", "bases", "dict", 0};
+    PyObject *name, *bases, *dict;
+    static char *kwlist[] = {"name", "bases", "dict", 0};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "SOO", kwlist,
-					 &name, &bases, &dict))
-		return NULL;
-	return PyClass_New(bases, dict, name);
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "SOO", kwlist,
+                                     &name, &bases, &dict))
+        return NULL;
+    return PyClass_New(bases, dict, name);
 }
 
 /* Class methods */
@@ -188,315 +188,315 @@
 static void
 class_dealloc(PyClassObject *op)
 {
-	_PyObject_GC_UNTRACK(op);
-	if (op->cl_weakreflist != NULL)
-		PyObject_ClearWeakRefs((PyObject *) op);
-	Py_DECREF(op->cl_bases);
-	Py_DECREF(op->cl_dict);
-	Py_XDECREF(op->cl_name);
-	Py_XDECREF(op->cl_getattr);
-	Py_XDECREF(op->cl_setattr);
-	Py_XDECREF(op->cl_delattr);
-	PyObject_GC_Del(op);
+    _PyObject_GC_UNTRACK(op);
+    if (op->cl_weakreflist != NULL)
+        PyObject_ClearWeakRefs((PyObject *) op);
+    Py_DECREF(op->cl_bases);
+    Py_DECREF(op->cl_dict);
+    Py_XDECREF(op->cl_name);
+    Py_XDECREF(op->cl_getattr);
+    Py_XDECREF(op->cl_setattr);
+    Py_XDECREF(op->cl_delattr);
+    PyObject_GC_Del(op);
 }
 
 static PyObject *
 class_lookup(PyClassObject *cp, PyObject *name, PyClassObject **pclass)
 {
-	Py_ssize_t i, n;
-	PyObject *value = PyDict_GetItem(cp->cl_dict, name);
-	if (value != NULL) {
-		*pclass = cp;
-		return value;
-	}
-	n = PyTuple_Size(cp->cl_bases);
-	for (i = 0; i < n; i++) {
-		/* XXX What if one of the bases is not a class? */
-		PyObject *v = class_lookup(
-			(PyClassObject *)
-			PyTuple_GetItem(cp->cl_bases, i), name, pclass);
-		if (v != NULL)
-			return v;
-	}
-	return NULL;
+    Py_ssize_t i, n;
+    PyObject *value = PyDict_GetItem(cp->cl_dict, name);
+    if (value != NULL) {
+        *pclass = cp;
+        return value;
+    }
+    n = PyTuple_Size(cp->cl_bases);
+    for (i = 0; i < n; i++) {
+        /* XXX What if one of the bases is not a class? */
+        PyObject *v = class_lookup(
+            (PyClassObject *)
+            PyTuple_GetItem(cp->cl_bases, i), name, pclass);
+        if (v != NULL)
+            return v;
+    }
+    return NULL;
 }
 
 static PyObject *
 class_getattr(register PyClassObject *op, PyObject *name)
 {
-	register PyObject *v;
-	register char *sname = PyString_AsString(name);
-	PyClassObject *klass;
-	descrgetfunc f;
+    register PyObject *v;
+    register char *sname = PyString_AsString(name);
+    PyClassObject *klass;
+    descrgetfunc f;
 
-	if (sname[0] == '_' && sname[1] == '_') {
-		if (strcmp(sname, "__dict__") == 0) {
-			if (PyEval_GetRestricted()) {
-				PyErr_SetString(PyExc_RuntimeError,
-			   "class.__dict__ not accessible in restricted mode");
-				return NULL;
-			}
-			Py_INCREF(op->cl_dict);
-			return op->cl_dict;
-		}
-		if (strcmp(sname, "__bases__") == 0) {
-			Py_INCREF(op->cl_bases);
-			return op->cl_bases;
-		}
-		if (strcmp(sname, "__name__") == 0) {
-			if (op->cl_name == NULL)
-				v = Py_None;
-			else
-				v = op->cl_name;
-			Py_INCREF(v);
-			return v;
-		}
-	}
-	v = class_lookup(op, name, &klass);
-	if (v == NULL) {
-		PyErr_Format(PyExc_AttributeError,
-			     "class %.50s has no attribute '%.400s'",
-			     PyString_AS_STRING(op->cl_name), sname);
-		return NULL;
-	}
-	f = TP_DESCR_GET(v->ob_type);
-	if (f == NULL)
-		Py_INCREF(v);
-	else
-		v = f(v, (PyObject *)NULL, (PyObject *)op);
-	return v;
+    if (sname[0] == '_' && sname[1] == '_') {
+        if (strcmp(sname, "__dict__") == 0) {
+            if (PyEval_GetRestricted()) {
+                PyErr_SetString(PyExc_RuntimeError,
+               "class.__dict__ not accessible in restricted mode");
+                return NULL;
+            }
+            Py_INCREF(op->cl_dict);
+            return op->cl_dict;
+        }
+        if (strcmp(sname, "__bases__") == 0) {
+            Py_INCREF(op->cl_bases);
+            return op->cl_bases;
+        }
+        if (strcmp(sname, "__name__") == 0) {
+            if (op->cl_name == NULL)
+                v = Py_None;
+            else
+                v = op->cl_name;
+            Py_INCREF(v);
+            return v;
+        }
+    }
+    v = class_lookup(op, name, &klass);
+    if (v == NULL) {
+        PyErr_Format(PyExc_AttributeError,
+                     "class %.50s has no attribute '%.400s'",
+                     PyString_AS_STRING(op->cl_name), sname);
+        return NULL;
+    }
+    f = TP_DESCR_GET(v->ob_type);
+    if (f == NULL)
+        Py_INCREF(v);
+    else
+        v = f(v, (PyObject *)NULL, (PyObject *)op);
+    return v;
 }
 
 static void
 set_slot(PyObject **slot, PyObject *v)
 {
-	PyObject *temp = *slot;
-	Py_XINCREF(v);
-	*slot = v;
-	Py_XDECREF(temp);
+    PyObject *temp = *slot;
+    Py_XINCREF(v);
+    *slot = v;
+    Py_XDECREF(temp);
 }
 
 static void
 set_attr_slots(PyClassObject *c)
 {
-	PyClassObject *dummy;
+    PyClassObject *dummy;
 
-	set_slot(&c->cl_getattr, class_lookup(c, getattrstr, &dummy));
-	set_slot(&c->cl_setattr, class_lookup(c, setattrstr, &dummy));
-	set_slot(&c->cl_delattr, class_lookup(c, delattrstr, &dummy));
+    set_slot(&c->cl_getattr, class_lookup(c, getattrstr, &dummy));
+    set_slot(&c->cl_setattr, class_lookup(c, setattrstr, &dummy));
+    set_slot(&c->cl_delattr, class_lookup(c, delattrstr, &dummy));
 }
 
 static char *
 set_dict(PyClassObject *c, PyObject *v)
 {
-	if (v == NULL || !PyDict_Check(v))
-		return "__dict__ must be a dictionary object";
-	set_slot(&c->cl_dict, v);
-	set_attr_slots(c);
-	return "";
+    if (v == NULL || !PyDict_Check(v))
+        return "__dict__ must be a dictionary object";
+    set_slot(&c->cl_dict, v);
+    set_attr_slots(c);
+    return "";
 }
 
 static char *
 set_bases(PyClassObject *c, PyObject *v)
 {
-	Py_ssize_t i, n;
+    Py_ssize_t i, n;
 
-	if (v == NULL || !PyTuple_Check(v))
-		return "__bases__ must be a tuple object";
-	n = PyTuple_Size(v);
-	for (i = 0; i < n; i++) {
-		PyObject *x = PyTuple_GET_ITEM(v, i);
-		if (!PyClass_Check(x))
-			return "__bases__ items must be classes";
-		if (PyClass_IsSubclass(x, (PyObject *)c))
-			return "a __bases__ item causes an inheritance cycle";
-	}
-	set_slot(&c->cl_bases, v);
-	set_attr_slots(c);
-	return "";
+    if (v == NULL || !PyTuple_Check(v))
+        return "__bases__ must be a tuple object";
+    n = PyTuple_Size(v);
+    for (i = 0; i < n; i++) {
+        PyObject *x = PyTuple_GET_ITEM(v, i);
+        if (!PyClass_Check(x))
+            return "__bases__ items must be classes";
+        if (PyClass_IsSubclass(x, (PyObject *)c))
+            return "a __bases__ item causes an inheritance cycle";
+    }
+    set_slot(&c->cl_bases, v);
+    set_attr_slots(c);
+    return "";
 }
 
 static char *
 set_name(PyClassObject *c, PyObject *v)
 {
-	if (v == NULL || !PyString_Check(v))
-		return "__name__ must be a string object";
-	if (strlen(PyString_AS_STRING(v)) != (size_t)PyString_GET_SIZE(v))
-		return "__name__ must not contain null bytes";
-	set_slot(&c->cl_name, v);
-	return "";
+    if (v == NULL || !PyString_Check(v))
+        return "__name__ must be a string object";
+    if (strlen(PyString_AS_STRING(v)) != (size_t)PyString_GET_SIZE(v))
+        return "__name__ must not contain null bytes";
+    set_slot(&c->cl_name, v);
+    return "";
 }
 
 static int
 class_setattr(PyClassObject *op, PyObject *name, PyObject *v)
 {
-	char *sname;
-	if (PyEval_GetRestricted()) {
-		PyErr_SetString(PyExc_RuntimeError,
-			   "classes are read-only in restricted mode");
-		return -1;
-	}
-	sname = PyString_AsString(name);
-	if (sname[0] == '_' && sname[1] == '_') {
-		Py_ssize_t n = PyString_Size(name);
-		if (sname[n-1] == '_' && sname[n-2] == '_') {
-			char *err = NULL;
-			if (strcmp(sname, "__dict__") == 0)
-				err = set_dict(op, v);
-			else if (strcmp(sname, "__bases__") == 0)
-				err = set_bases(op, v);
-			else if (strcmp(sname, "__name__") == 0)
-				err = set_name(op, v);
-			else if (strcmp(sname, "__getattr__") == 0)
-				set_slot(&op->cl_getattr, v);
-			else if (strcmp(sname, "__setattr__") == 0)
-				set_slot(&op->cl_setattr, v);
-			else if (strcmp(sname, "__delattr__") == 0)
-				set_slot(&op->cl_delattr, v);
-			/* For the last three, we fall through to update the
-			   dictionary as well. */
-			if (err != NULL) {
-				if (*err == '\0')
-					return 0;
-				PyErr_SetString(PyExc_TypeError, err);
-				return -1;
-			}
-		}
-	}
-	if (v == NULL) {
-		int rv = PyDict_DelItem(op->cl_dict, name);
-		if (rv < 0)
-			PyErr_Format(PyExc_AttributeError,
-				     "class %.50s has no attribute '%.400s'",
-				     PyString_AS_STRING(op->cl_name), sname);
-		return rv;
-	}
-	else
-		return PyDict_SetItem(op->cl_dict, name, v);
+    char *sname;
+    if (PyEval_GetRestricted()) {
+        PyErr_SetString(PyExc_RuntimeError,
+                   "classes are read-only in restricted mode");
+        return -1;
+    }
+    sname = PyString_AsString(name);
+    if (sname[0] == '_' && sname[1] == '_') {
+        Py_ssize_t n = PyString_Size(name);
+        if (sname[n-1] == '_' && sname[n-2] == '_') {
+            char *err = NULL;
+            if (strcmp(sname, "__dict__") == 0)
+                err = set_dict(op, v);
+            else if (strcmp(sname, "__bases__") == 0)
+                err = set_bases(op, v);
+            else if (strcmp(sname, "__name__") == 0)
+                err = set_name(op, v);
+            else if (strcmp(sname, "__getattr__") == 0)
+                set_slot(&op->cl_getattr, v);
+            else if (strcmp(sname, "__setattr__") == 0)
+                set_slot(&op->cl_setattr, v);
+            else if (strcmp(sname, "__delattr__") == 0)
+                set_slot(&op->cl_delattr, v);
+            /* For the last three, we fall through to update the
+               dictionary as well. */
+            if (err != NULL) {
+                if (*err == '\0')
+                    return 0;
+                PyErr_SetString(PyExc_TypeError, err);
+                return -1;
+            }
+        }
+    }
+    if (v == NULL) {
+        int rv = PyDict_DelItem(op->cl_dict, name);
+        if (rv < 0)
+            PyErr_Format(PyExc_AttributeError,
+                         "class %.50s has no attribute '%.400s'",
+                         PyString_AS_STRING(op->cl_name), sname);
+        return rv;
+    }
+    else
+        return PyDict_SetItem(op->cl_dict, name, v);
 }
 
 static PyObject *
 class_repr(PyClassObject *op)
 {
-	PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__");
-	char *name;
-	if (op->cl_name == NULL || !PyString_Check(op->cl_name))
-		name = "?";
-	else
-		name = PyString_AsString(op->cl_name);
-	if (mod == NULL || !PyString_Check(mod))
-		return PyString_FromFormat("<class ?.%s at %p>", name, op);
-	else
-		return PyString_FromFormat("<class %s.%s at %p>",
-					   PyString_AsString(mod),
-					   name, op);
+    PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__");
+    char *name;
+    if (op->cl_name == NULL || !PyString_Check(op->cl_name))
+        name = "?";
+    else
+        name = PyString_AsString(op->cl_name);
+    if (mod == NULL || !PyString_Check(mod))
+        return PyString_FromFormat("<class ?.%s at %p>", name, op);
+    else
+        return PyString_FromFormat("<class %s.%s at %p>",
+                                   PyString_AsString(mod),
+                                   name, op);
 }
 
 static PyObject *
 class_str(PyClassObject *op)
 {
-	PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__");
-	PyObject *name = op->cl_name;
-	PyObject *res;
-	Py_ssize_t m, n;
+    PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__");
+    PyObject *name = op->cl_name;
+    PyObject *res;
+    Py_ssize_t m, n;
 
-	if (name == NULL || !PyString_Check(name))
-		return class_repr(op);
-	if (mod == NULL || !PyString_Check(mod)) {
-		Py_INCREF(name);
-		return name;
-	}
-	m = PyString_GET_SIZE(mod);
-	n = PyString_GET_SIZE(name);
-	res = PyString_FromStringAndSize((char *)NULL, m+1+n);
-	if (res != NULL) {
-		char *s = PyString_AS_STRING(res);
-		memcpy(s, PyString_AS_STRING(mod), m);
-		s += m;
-		*s++ = '.';
-		memcpy(s, PyString_AS_STRING(name), n);
-	}
-	return res;
+    if (name == NULL || !PyString_Check(name))
+        return class_repr(op);
+    if (mod == NULL || !PyString_Check(mod)) {
+        Py_INCREF(name);
+        return name;
+    }
+    m = PyString_GET_SIZE(mod);
+    n = PyString_GET_SIZE(name);
+    res = PyString_FromStringAndSize((char *)NULL, m+1+n);
+    if (res != NULL) {
+        char *s = PyString_AS_STRING(res);
+        memcpy(s, PyString_AS_STRING(mod), m);
+        s += m;
+        *s++ = '.';
+        memcpy(s, PyString_AS_STRING(name), n);
+    }
+    return res;
 }
 
 static int
 class_traverse(PyClassObject *o, visitproc visit, void *arg)
 {
-	Py_VISIT(o->cl_bases);
-	Py_VISIT(o->cl_dict);
-	Py_VISIT(o->cl_name);
-	Py_VISIT(o->cl_getattr);
-	Py_VISIT(o->cl_setattr);
-	Py_VISIT(o->cl_delattr);
-	return 0;
+    Py_VISIT(o->cl_bases);
+    Py_VISIT(o->cl_dict);
+    Py_VISIT(o->cl_name);
+    Py_VISIT(o->cl_getattr);
+    Py_VISIT(o->cl_setattr);
+    Py_VISIT(o->cl_delattr);
+    return 0;
 }
 
 PyTypeObject PyClass_Type = {
-	PyObject_HEAD_INIT(&PyType_Type)
-	0,
-	"classobj",
-	sizeof(PyClassObject),
-	0,
-	(destructor)class_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)class_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	PyInstance_New,				/* tp_call */
-	(reprfunc)class_str,			/* tp_str */
-	(getattrofunc)class_getattr,		/* tp_getattro */
-	(setattrofunc)class_setattr,		/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
-	class_doc,				/* tp_doc */
-	(traverseproc)class_traverse,		/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	offsetof(PyClassObject, cl_weakreflist), /* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	class_new,				/* tp_new */
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,
+    "classobj",
+    sizeof(PyClassObject),
+    0,
+    (destructor)class_dealloc,                  /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)class_repr,                       /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    PyInstance_New,                             /* tp_call */
+    (reprfunc)class_str,                        /* tp_str */
+    (getattrofunc)class_getattr,                /* tp_getattro */
+    (setattrofunc)class_setattr,                /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    class_doc,                                  /* tp_doc */
+    (traverseproc)class_traverse,               /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    offsetof(PyClassObject, cl_weakreflist), /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    class_new,                                  /* tp_new */
 };
 
 int
 PyClass_IsSubclass(PyObject *klass, PyObject *base)
 {
-	Py_ssize_t i, n;
-	PyClassObject *cp;
-	if (klass == base)
-		return 1;
-	if (PyTuple_Check(base)) {
-		n = PyTuple_GET_SIZE(base);
-		for (i = 0; i < n; i++) {
-			if (PyClass_IsSubclass(klass, PyTuple_GET_ITEM(base, i)))
-				return 1;
-		}
-		return 0;
-	}
-	if (klass == NULL || !PyClass_Check(klass))
-		return 0;
-	cp = (PyClassObject *)klass;
-	n = PyTuple_Size(cp->cl_bases);
-	for (i = 0; i < n; i++) {
-		if (PyClass_IsSubclass(PyTuple_GetItem(cp->cl_bases, i), base))
-			return 1;
-	}
-	return 0;
+    Py_ssize_t i, n;
+    PyClassObject *cp;
+    if (klass == base)
+        return 1;
+    if (PyTuple_Check(base)) {
+        n = PyTuple_GET_SIZE(base);
+        for (i = 0; i < n; i++) {
+            if (PyClass_IsSubclass(klass, PyTuple_GET_ITEM(base, i)))
+                return 1;
+        }
+        return 0;
+    }
+    if (klass == NULL || !PyClass_Check(klass))
+        return 0;
+    cp = (PyClassObject *)klass;
+    n = PyTuple_Size(cp->cl_bases);
+    for (i = 0; i < n; i++) {
+        if (PyClass_IsSubclass(PyTuple_GetItem(cp->cl_bases, i), base))
+            return 1;
+    }
+    return 0;
 }
 
 
@@ -505,86 +505,86 @@
 PyObject *
 PyInstance_NewRaw(PyObject *klass, PyObject *dict)
 {
-	PyInstanceObject *inst;
+    PyInstanceObject *inst;
 
-	if (!PyClass_Check(klass)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	if (dict == NULL) {
-		dict = PyDict_New();
-		if (dict == NULL)
-			return NULL;
-	}
-	else {
-		if (!PyDict_Check(dict)) {
-			PyErr_BadInternalCall();
-			return NULL;
-		}
-		Py_INCREF(dict);
-	}
-	inst = PyObject_GC_New(PyInstanceObject, &PyInstance_Type);
-	if (inst == NULL) {
-		Py_DECREF(dict);
-		return NULL;
-	}
-	inst->in_weakreflist = NULL;
-	Py_INCREF(klass);
-	inst->in_class = (PyClassObject *)klass;
-	inst->in_dict = dict;
-	_PyObject_GC_TRACK(inst);
-	return (PyObject *)inst;
+    if (!PyClass_Check(klass)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    if (dict == NULL) {
+        dict = PyDict_New();
+        if (dict == NULL)
+            return NULL;
+    }
+    else {
+        if (!PyDict_Check(dict)) {
+            PyErr_BadInternalCall();
+            return NULL;
+        }
+        Py_INCREF(dict);
+    }
+    inst = PyObject_GC_New(PyInstanceObject, &PyInstance_Type);
+    if (inst == NULL) {
+        Py_DECREF(dict);
+        return NULL;
+    }
+    inst->in_weakreflist = NULL;
+    Py_INCREF(klass);
+    inst->in_class = (PyClassObject *)klass;
+    inst->in_dict = dict;
+    _PyObject_GC_TRACK(inst);
+    return (PyObject *)inst;
 }
 
 PyObject *
 PyInstance_New(PyObject *klass, PyObject *arg, PyObject *kw)
 {
-	register PyInstanceObject *inst;
-	PyObject *init;
-	static PyObject *initstr;
+    register PyInstanceObject *inst;
+    PyObject *init;
+    static PyObject *initstr;
 
-	if (initstr == NULL) {
-		initstr = PyString_InternFromString("__init__");
-		if (initstr == NULL)
-			return NULL;
-	}
-	inst = (PyInstanceObject *) PyInstance_NewRaw(klass, NULL);
-	if (inst == NULL)
-		return NULL;
-	init = instance_getattr2(inst, initstr);
-	if (init == NULL) {
-		if (PyErr_Occurred()) {
-			Py_DECREF(inst);
-			return NULL;
-		}
-		if ((arg != NULL && (!PyTuple_Check(arg) ||
-				     PyTuple_Size(arg) != 0))
-		    || (kw != NULL && (!PyDict_Check(kw) ||
-				      PyDict_Size(kw) != 0))) {
-			PyErr_SetString(PyExc_TypeError,
-				   "this constructor takes no arguments");
-			Py_DECREF(inst);
-			inst = NULL;
-		}
-	}
-	else {
-		PyObject *res = PyEval_CallObjectWithKeywords(init, arg, kw);
-		Py_DECREF(init);
-		if (res == NULL) {
-			Py_DECREF(inst);
-			inst = NULL;
-		}
-		else {
-			if (res != Py_None) {
-				PyErr_SetString(PyExc_TypeError,
-					   "__init__() should return None");
-				Py_DECREF(inst);
-				inst = NULL;
-			}
-			Py_DECREF(res);
-		}
-	}
-	return (PyObject *)inst;
+    if (initstr == NULL) {
+        initstr = PyString_InternFromString("__init__");
+        if (initstr == NULL)
+            return NULL;
+    }
+    inst = (PyInstanceObject *) PyInstance_NewRaw(klass, NULL);
+    if (inst == NULL)
+        return NULL;
+    init = instance_getattr2(inst, initstr);
+    if (init == NULL) {
+        if (PyErr_Occurred()) {
+            Py_DECREF(inst);
+            return NULL;
+        }
+        if ((arg != NULL && (!PyTuple_Check(arg) ||
+                             PyTuple_Size(arg) != 0))
+            || (kw != NULL && (!PyDict_Check(kw) ||
+                              PyDict_Size(kw) != 0))) {
+            PyErr_SetString(PyExc_TypeError,
+                       "this constructor takes no arguments");
+            Py_DECREF(inst);
+            inst = NULL;
+        }
+    }
+    else {
+        PyObject *res = PyEval_CallObjectWithKeywords(init, arg, kw);
+        Py_DECREF(init);
+        if (res == NULL) {
+            Py_DECREF(inst);
+            inst = NULL;
+        }
+        else {
+            if (res != Py_None) {
+                PyErr_SetString(PyExc_TypeError,
+                           "__init__() should return None");
+                Py_DECREF(inst);
+                inst = NULL;
+            }
+            Py_DECREF(res);
+        }
+    }
+    return (PyObject *)inst;
 }
 
 /* Instance methods */
@@ -599,174 +599,174 @@
 static PyObject *
 instance_new(PyTypeObject* type, PyObject* args, PyObject *kw)
 {
-	PyObject *klass;
-	PyObject *dict = Py_None;
+    PyObject *klass;
+    PyObject *dict = Py_None;
 
-	if (!PyArg_ParseTuple(args, "O!|O:instance",
-			      &PyClass_Type, &klass, &dict))
-		return NULL;
+    if (!PyArg_ParseTuple(args, "O!|O:instance",
+                          &PyClass_Type, &klass, &dict))
+        return NULL;
 
-	if (dict == Py_None)
-		dict = NULL;
-	else if (!PyDict_Check(dict)) {
-		PyErr_SetString(PyExc_TypeError,
-		      "instance() second arg must be dictionary or None");
-		return NULL;
-	}
-	return PyInstance_NewRaw(klass, dict);
+    if (dict == Py_None)
+        dict = NULL;
+    else if (!PyDict_Check(dict)) {
+        PyErr_SetString(PyExc_TypeError,
+              "instance() second arg must be dictionary or None");
+        return NULL;
+    }
+    return PyInstance_NewRaw(klass, dict);
 }
 
 
 static void
 instance_dealloc(register PyInstanceObject *inst)
 {
-	PyObject *error_type, *error_value, *error_traceback;
-	PyObject *del;
-	static PyObject *delstr;
+    PyObject *error_type, *error_value, *error_traceback;
+    PyObject *del;
+    static PyObject *delstr;
 
-	_PyObject_GC_UNTRACK(inst);
-	if (inst->in_weakreflist != NULL)
-		PyObject_ClearWeakRefs((PyObject *) inst);
+    _PyObject_GC_UNTRACK(inst);
+    if (inst->in_weakreflist != NULL)
+        PyObject_ClearWeakRefs((PyObject *) inst);
 
-	/* Temporarily resurrect the object. */
-	assert(inst->ob_type == &PyInstance_Type);
-	assert(inst->ob_refcnt == 0);
-	inst->ob_refcnt = 1;
+    /* Temporarily resurrect the object. */
+    assert(inst->ob_type == &PyInstance_Type);
+    assert(inst->ob_refcnt == 0);
+    inst->ob_refcnt = 1;
 
-	/* Save the current exception, if any. */
-	PyErr_Fetch(&error_type, &error_value, &error_traceback);
-	/* Execute __del__ method, if any. */
-	if (delstr == NULL) {
-		delstr = PyString_InternFromString("__del__");
-		if (delstr == NULL)
-			PyErr_WriteUnraisable((PyObject*)inst);
-	}
-	if (delstr && (del = instance_getattr2(inst, delstr)) != NULL) {
-		PyObject *res = PyEval_CallObject(del, (PyObject *)NULL);
-		if (res == NULL)
-			PyErr_WriteUnraisable(del);
-		else
-			Py_DECREF(res);
-		Py_DECREF(del);
-	}
-	/* Restore the saved exception. */
-	PyErr_Restore(error_type, error_value, error_traceback);
+    /* Save the current exception, if any. */
+    PyErr_Fetch(&error_type, &error_value, &error_traceback);
+    /* Execute __del__ method, if any. */
+    if (delstr == NULL) {
+        delstr = PyString_InternFromString("__del__");
+        if (delstr == NULL)
+            PyErr_WriteUnraisable((PyObject*)inst);
+    }
+    if (delstr && (del = instance_getattr2(inst, delstr)) != NULL) {
+        PyObject *res = PyEval_CallObject(del, (PyObject *)NULL);
+        if (res == NULL)
+            PyErr_WriteUnraisable(del);
+        else
+            Py_DECREF(res);
+        Py_DECREF(del);
+    }
+    /* Restore the saved exception. */
+    PyErr_Restore(error_type, error_value, error_traceback);
 
-	/* Undo the temporary resurrection; can't use DECREF here, it would
-	 * cause a recursive call.
-	 */
-	assert(inst->ob_refcnt > 0);
-	if (--inst->ob_refcnt == 0) {
+    /* Undo the temporary resurrection; can't use DECREF here, it would
+     * cause a recursive call.
+     */
+    assert(inst->ob_refcnt > 0);
+    if (--inst->ob_refcnt == 0) {
 
-		/* New weakrefs could be created during the finalizer call.
-		    If this occurs, clear them out without calling their
-		    finalizers since they might rely on part of the object
-		    being finalized that has already been destroyed. */
-		while (inst->in_weakreflist != NULL) {
-			_PyWeakref_ClearRef((PyWeakReference *)
-                                            (inst->in_weakreflist));
-		}
+        /* New weakrefs could be created during the finalizer call.
+            If this occurs, clear them out without calling their
+            finalizers since they might rely on part of the object
+            being finalized that has already been destroyed. */
+        while (inst->in_weakreflist != NULL) {
+            _PyWeakref_ClearRef((PyWeakReference *)
+                                (inst->in_weakreflist));
+        }
 
-		Py_DECREF(inst->in_class);
-		Py_XDECREF(inst->in_dict);
-		PyObject_GC_Del(inst);
-	}
-	else {
-		Py_ssize_t refcnt = inst->ob_refcnt;
-		/* __del__ resurrected it!  Make it look like the original
-		 * Py_DECREF never happened.
-		 */
-		_Py_NewReference((PyObject *)inst);
-		inst->ob_refcnt = refcnt;
-		_PyObject_GC_TRACK(inst);
-		/* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
-		 * we need to undo that. */
-		_Py_DEC_REFTOTAL;
-		/* If Py_TRACE_REFS, _Py_NewReference re-added self to the
-		 * object chain, so no more to do there.
-		 * If COUNT_ALLOCS, the original decref bumped tp_frees, and
-		 * _Py_NewReference bumped tp_allocs: both of those need to be
-		 * undone.
-		 */
+        Py_DECREF(inst->in_class);
+        Py_XDECREF(inst->in_dict);
+        PyObject_GC_Del(inst);
+    }
+    else {
+        Py_ssize_t refcnt = inst->ob_refcnt;
+        /* __del__ resurrected it!  Make it look like the original
+         * Py_DECREF never happened.
+         */
+        _Py_NewReference((PyObject *)inst);
+        inst->ob_refcnt = refcnt;
+        _PyObject_GC_TRACK(inst);
+        /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
+         * we need to undo that. */
+        _Py_DEC_REFTOTAL;
+        /* If Py_TRACE_REFS, _Py_NewReference re-added self to the
+         * object chain, so no more to do there.
+         * If COUNT_ALLOCS, the original decref bumped tp_frees, and
+         * _Py_NewReference bumped tp_allocs: both of those need to be
+         * undone.
+         */
 #ifdef COUNT_ALLOCS
-		--inst->ob_type->tp_frees;
-		--inst->ob_type->tp_allocs;
+        --inst->ob_type->tp_frees;
+        --inst->ob_type->tp_allocs;
 #endif
-	}
+    }
 }
 
 static PyObject *
 instance_getattr1(register PyInstanceObject *inst, PyObject *name)
 {
-	register PyObject *v;
-	register char *sname = PyString_AsString(name);
-	if (sname[0] == '_' && sname[1] == '_') {
-		if (strcmp(sname, "__dict__") == 0) {
-			if (PyEval_GetRestricted()) {
-				PyErr_SetString(PyExc_RuntimeError,
-			"instance.__dict__ not accessible in restricted mode");
-				return NULL;
-			}
-			Py_INCREF(inst->in_dict);
-			return inst->in_dict;
-		}
-		if (strcmp(sname, "__class__") == 0) {
-			Py_INCREF(inst->in_class);
-			return (PyObject *)inst->in_class;
-		}
-	}
-	v = instance_getattr2(inst, name);
-	if (v == NULL && !PyErr_Occurred()) {
-		PyErr_Format(PyExc_AttributeError,
-			     "%.50s instance has no attribute '%.400s'",
-			     PyString_AS_STRING(inst->in_class->cl_name), sname);
-	}
-	return v;
+    register PyObject *v;
+    register char *sname = PyString_AsString(name);
+    if (sname[0] == '_' && sname[1] == '_') {
+        if (strcmp(sname, "__dict__") == 0) {
+            if (PyEval_GetRestricted()) {
+                PyErr_SetString(PyExc_RuntimeError,
+            "instance.__dict__ not accessible in restricted mode");
+                return NULL;
+            }
+            Py_INCREF(inst->in_dict);
+            return inst->in_dict;
+        }
+        if (strcmp(sname, "__class__") == 0) {
+            Py_INCREF(inst->in_class);
+            return (PyObject *)inst->in_class;
+        }
+    }
+    v = instance_getattr2(inst, name);
+    if (v == NULL && !PyErr_Occurred()) {
+        PyErr_Format(PyExc_AttributeError,
+                     "%.50s instance has no attribute '%.400s'",
+                     PyString_AS_STRING(inst->in_class->cl_name), sname);
+    }
+    return v;
 }
 
 static PyObject *
 instance_getattr2(register PyInstanceObject *inst, PyObject *name)
 {
-	register PyObject *v;
-	PyClassObject *klass;
-	descrgetfunc f;
+    register PyObject *v;
+    PyClassObject *klass;
+    descrgetfunc f;
 
-	v = PyDict_GetItem(inst->in_dict, name);
-	if (v != NULL) {
-		Py_INCREF(v);
-		return v;
-	}
-	v = class_lookup(inst->in_class, name, &klass);
-	if (v != NULL) {
-		Py_INCREF(v);
-		f = TP_DESCR_GET(v->ob_type);
-		if (f != NULL) {
-			PyObject *w = f(v, (PyObject *)inst,
-					(PyObject *)(inst->in_class));
-			Py_DECREF(v);
-			v = w;
-		}
-	}
-	return v;
+    v = PyDict_GetItem(inst->in_dict, name);
+    if (v != NULL) {
+        Py_INCREF(v);
+        return v;
+    }
+    v = class_lookup(inst->in_class, name, &klass);
+    if (v != NULL) {
+        Py_INCREF(v);
+        f = TP_DESCR_GET(v->ob_type);
+        if (f != NULL) {
+            PyObject *w = f(v, (PyObject *)inst,
+                            (PyObject *)(inst->in_class));
+            Py_DECREF(v);
+            v = w;
+        }
+    }
+    return v;
 }
 
 static PyObject *
 instance_getattr(register PyInstanceObject *inst, PyObject *name)
 {
-	register PyObject *func, *res;
-	res = instance_getattr1(inst, name);
-	if (res == NULL && (func = inst->in_class->cl_getattr) != NULL) {
-		PyObject *args;
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return NULL;
-		PyErr_Clear();
-		args = PyTuple_Pack(2, inst, name);
-		if (args == NULL)
-			return NULL;
-		res = PyEval_CallObject(func, args);
-		Py_DECREF(args);
-	}
-	return res;
+    register PyObject *func, *res;
+    res = instance_getattr1(inst, name);
+    if (res == NULL && (func = inst->in_class->cl_getattr) != NULL) {
+        PyObject *args;
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return NULL;
+        PyErr_Clear();
+        args = PyTuple_Pack(2, inst, name);
+        if (args == NULL)
+            return NULL;
+        res = PyEval_CallObject(func, args);
+        Py_DECREF(args);
+    }
+    return res;
 }
 
 /* See classobject.h comments:  this only does dict lookups, and is always
@@ -775,235 +775,235 @@
 PyObject *
 _PyInstance_Lookup(PyObject *pinst, PyObject *name)
 {
-	PyObject *v;
-	PyClassObject *klass;
-	PyInstanceObject *inst;	/* pinst cast to the right type */
+    PyObject *v;
+    PyClassObject *klass;
+    PyInstanceObject *inst;     /* pinst cast to the right type */
 
-	assert(PyInstance_Check(pinst));
-	inst = (PyInstanceObject *)pinst;
+    assert(PyInstance_Check(pinst));
+    inst = (PyInstanceObject *)pinst;
 
-	assert(PyString_Check(name));
+    assert(PyString_Check(name));
 
- 	v = PyDict_GetItem(inst->in_dict, name);
-	if (v == NULL)
-		v = class_lookup(inst->in_class, name, &klass);
-	return v;
+    v = PyDict_GetItem(inst->in_dict, name);
+    if (v == NULL)
+        v = class_lookup(inst->in_class, name, &klass);
+    return v;
 }
 
 static int
 instance_setattr1(PyInstanceObject *inst, PyObject *name, PyObject *v)
 {
-	if (v == NULL) {
-		int rv = PyDict_DelItem(inst->in_dict, name);
-		if (rv < 0)
-			PyErr_Format(PyExc_AttributeError,
-				     "%.50s instance has no attribute '%.400s'",
-				     PyString_AS_STRING(inst->in_class->cl_name),
-				     PyString_AS_STRING(name));
-		return rv;
-	}
-	else
-		return PyDict_SetItem(inst->in_dict, name, v);
+    if (v == NULL) {
+        int rv = PyDict_DelItem(inst->in_dict, name);
+        if (rv < 0)
+            PyErr_Format(PyExc_AttributeError,
+                         "%.50s instance has no attribute '%.400s'",
+                         PyString_AS_STRING(inst->in_class->cl_name),
+                         PyString_AS_STRING(name));
+        return rv;
+    }
+    else
+        return PyDict_SetItem(inst->in_dict, name, v);
 }
 
 static int
 instance_setattr(PyInstanceObject *inst, PyObject *name, PyObject *v)
 {
-	PyObject *func, *args, *res, *tmp;
-	char *sname = PyString_AsString(name);
-	if (sname[0] == '_' && sname[1] == '_') {
-		Py_ssize_t n = PyString_Size(name);
-		if (sname[n-1] == '_' && sname[n-2] == '_') {
-			if (strcmp(sname, "__dict__") == 0) {
-				if (PyEval_GetRestricted()) {
-					PyErr_SetString(PyExc_RuntimeError,
-				 "__dict__ not accessible in restricted mode");
-					return -1;
-				}
-				if (v == NULL || !PyDict_Check(v)) {
-				    PyErr_SetString(PyExc_TypeError,
-				       "__dict__ must be set to a dictionary");
-				    return -1;
-				}
-				tmp = inst->in_dict;
-				Py_INCREF(v);
-				inst->in_dict = v;
-				Py_DECREF(tmp);
-				return 0;
-			}
-			if (strcmp(sname, "__class__") == 0) {
-				if (PyEval_GetRestricted()) {
-					PyErr_SetString(PyExc_RuntimeError,
-				"__class__ not accessible in restricted mode");
-					return -1;
-				}
-				if (v == NULL || !PyClass_Check(v)) {
-					PyErr_SetString(PyExc_TypeError,
-					   "__class__ must be set to a class");
-					return -1;
-				}
-				tmp = (PyObject *)(inst->in_class);
-				Py_INCREF(v);
-				inst->in_class = (PyClassObject *)v;
-				Py_DECREF(tmp);
-				return 0;
-			}
-		}
-	}
-	if (v == NULL)
-		func = inst->in_class->cl_delattr;
-	else
-		func = inst->in_class->cl_setattr;
-	if (func == NULL)
-		return instance_setattr1(inst, name, v);
-	if (v == NULL)
-		args = PyTuple_Pack(2, inst, name);
-	else
-		args = PyTuple_Pack(3, inst, name, v);
-	if (args == NULL)
-		return -1;
-	res = PyEval_CallObject(func, args);
-	Py_DECREF(args);
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+    PyObject *func, *args, *res, *tmp;
+    char *sname = PyString_AsString(name);
+    if (sname[0] == '_' && sname[1] == '_') {
+        Py_ssize_t n = PyString_Size(name);
+        if (sname[n-1] == '_' && sname[n-2] == '_') {
+            if (strcmp(sname, "__dict__") == 0) {
+                if (PyEval_GetRestricted()) {
+                    PyErr_SetString(PyExc_RuntimeError,
+                 "__dict__ not accessible in restricted mode");
+                    return -1;
+                }
+                if (v == NULL || !PyDict_Check(v)) {
+                    PyErr_SetString(PyExc_TypeError,
+                       "__dict__ must be set to a dictionary");
+                    return -1;
+                }
+                tmp = inst->in_dict;
+                Py_INCREF(v);
+                inst->in_dict = v;
+                Py_DECREF(tmp);
+                return 0;
+            }
+            if (strcmp(sname, "__class__") == 0) {
+                if (PyEval_GetRestricted()) {
+                    PyErr_SetString(PyExc_RuntimeError,
+                "__class__ not accessible in restricted mode");
+                    return -1;
+                }
+                if (v == NULL || !PyClass_Check(v)) {
+                    PyErr_SetString(PyExc_TypeError,
+                       "__class__ must be set to a class");
+                    return -1;
+                }
+                tmp = (PyObject *)(inst->in_class);
+                Py_INCREF(v);
+                inst->in_class = (PyClassObject *)v;
+                Py_DECREF(tmp);
+                return 0;
+            }
+        }
+    }
+    if (v == NULL)
+        func = inst->in_class->cl_delattr;
+    else
+        func = inst->in_class->cl_setattr;
+    if (func == NULL)
+        return instance_setattr1(inst, name, v);
+    if (v == NULL)
+        args = PyTuple_Pack(2, inst, name);
+    else
+        args = PyTuple_Pack(3, inst, name, v);
+    if (args == NULL)
+        return -1;
+    res = PyEval_CallObject(func, args);
+    Py_DECREF(args);
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 static PyObject *
 instance_repr(PyInstanceObject *inst)
 {
-	PyObject *func;
-	PyObject *res;
-	static PyObject *reprstr;
+    PyObject *func;
+    PyObject *res;
+    static PyObject *reprstr;
 
-	if (reprstr == NULL) {
-		reprstr = PyString_InternFromString("__repr__");
-		if (reprstr == NULL)
-			return NULL;
-	}
-	func = instance_getattr(inst, reprstr);
-	if (func == NULL) {
-		PyObject *classname, *mod;
-		char *cname;
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return NULL;
-		PyErr_Clear();
-		classname = inst->in_class->cl_name;
-		mod = PyDict_GetItemString(inst->in_class->cl_dict,
-					   "__module__");
-		if (classname != NULL && PyString_Check(classname))
-			cname = PyString_AsString(classname);
-		else
-			cname = "?";
-		if (mod == NULL || !PyString_Check(mod))
-			return PyString_FromFormat("<?.%s instance at %p>",
-						   cname, inst);
-		else
-			return PyString_FromFormat("<%s.%s instance at %p>",
-						   PyString_AsString(mod),
-						   cname, inst);
-	}
-	res = PyEval_CallObject(func, (PyObject *)NULL);
-	Py_DECREF(func);
-	return res;
+    if (reprstr == NULL) {
+        reprstr = PyString_InternFromString("__repr__");
+        if (reprstr == NULL)
+            return NULL;
+    }
+    func = instance_getattr(inst, reprstr);
+    if (func == NULL) {
+        PyObject *classname, *mod;
+        char *cname;
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return NULL;
+        PyErr_Clear();
+        classname = inst->in_class->cl_name;
+        mod = PyDict_GetItemString(inst->in_class->cl_dict,
+                                   "__module__");
+        if (classname != NULL && PyString_Check(classname))
+            cname = PyString_AsString(classname);
+        else
+            cname = "?";
+        if (mod == NULL || !PyString_Check(mod))
+            return PyString_FromFormat("<?.%s instance at %p>",
+                                       cname, inst);
+        else
+            return PyString_FromFormat("<%s.%s instance at %p>",
+                                       PyString_AsString(mod),
+                                       cname, inst);
+    }
+    res = PyEval_CallObject(func, (PyObject *)NULL);
+    Py_DECREF(func);
+    return res;
 }
 
 static PyObject *
 instance_str(PyInstanceObject *inst)
 {
-	PyObject *func;
-	PyObject *res;
-	static PyObject *strstr;
+    PyObject *func;
+    PyObject *res;
+    static PyObject *strstr;
 
-	if (strstr == NULL) {
-		strstr = PyString_InternFromString("__str__");
-		if (strstr == NULL)
-			return NULL;
-	}
-	func = instance_getattr(inst, strstr);
-	if (func == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return NULL;
-		PyErr_Clear();
-		return instance_repr(inst);
-	}
-	res = PyEval_CallObject(func, (PyObject *)NULL);
-	Py_DECREF(func);
-	return res;
+    if (strstr == NULL) {
+        strstr = PyString_InternFromString("__str__");
+        if (strstr == NULL)
+            return NULL;
+    }
+    func = instance_getattr(inst, strstr);
+    if (func == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return NULL;
+        PyErr_Clear();
+        return instance_repr(inst);
+    }
+    res = PyEval_CallObject(func, (PyObject *)NULL);
+    Py_DECREF(func);
+    return res;
 }
 
 static long
 instance_hash(PyInstanceObject *inst)
 {
-	PyObject *func;
-	PyObject *res;
-	long outcome;
-	static PyObject *hashstr, *eqstr, *cmpstr;
+    PyObject *func;
+    PyObject *res;
+    long outcome;
+    static PyObject *hashstr, *eqstr, *cmpstr;
 
-	if (hashstr == NULL) {
-		hashstr = PyString_InternFromString("__hash__");
-		if (hashstr == NULL)
-			return -1;
-	}
-	func = instance_getattr(inst, hashstr);
-	if (func == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return -1;
-		PyErr_Clear();
-		/* If there is no __eq__ and no __cmp__ method, we hash on the
-		   address.  If an __eq__ or __cmp__ method exists, there must
-		   be a __hash__. */
-		if (eqstr == NULL) {
-			eqstr = PyString_InternFromString("__eq__");
-			if (eqstr == NULL)
-				return -1;
-		}
-		func = instance_getattr(inst, eqstr);
-		if (func == NULL) {
-			if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-				return -1;
-			PyErr_Clear();
-			if (cmpstr == NULL) {
-				cmpstr = PyString_InternFromString("__cmp__");
-				if (cmpstr == NULL)
-					return -1;
-			}
-			func = instance_getattr(inst, cmpstr);
-			if (func == NULL) {
-				if (!PyErr_ExceptionMatches(
-					PyExc_AttributeError))
-					return -1;
-				PyErr_Clear();
-				return _Py_HashPointer(inst);
-			}
-		}
-		Py_XDECREF(func);
-		PyErr_SetString(PyExc_TypeError, "unhashable instance");
-		return -1;
-	}
-	res = PyEval_CallObject(func, (PyObject *)NULL);
-	Py_DECREF(func);
-	if (res == NULL)
-		return -1;
-	if (PyInt_Check(res) || PyLong_Check(res))
-		/* This already converts a -1 result to -2. */
-		outcome = res->ob_type->tp_hash(res);
-	else {
-		PyErr_SetString(PyExc_TypeError,
-				"__hash__() should return an int");
-		outcome = -1;
-	}
-	Py_DECREF(res);
-	return outcome;
+    if (hashstr == NULL) {
+        hashstr = PyString_InternFromString("__hash__");
+        if (hashstr == NULL)
+            return -1;
+    }
+    func = instance_getattr(inst, hashstr);
+    if (func == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return -1;
+        PyErr_Clear();
+        /* If there is no __eq__ and no __cmp__ method, we hash on the
+           address.  If an __eq__ or __cmp__ method exists, there must
+           be a __hash__. */
+        if (eqstr == NULL) {
+            eqstr = PyString_InternFromString("__eq__");
+            if (eqstr == NULL)
+                return -1;
+        }
+        func = instance_getattr(inst, eqstr);
+        if (func == NULL) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+                return -1;
+            PyErr_Clear();
+            if (cmpstr == NULL) {
+                cmpstr = PyString_InternFromString("__cmp__");
+                if (cmpstr == NULL)
+                    return -1;
+            }
+            func = instance_getattr(inst, cmpstr);
+            if (func == NULL) {
+                if (!PyErr_ExceptionMatches(
+                    PyExc_AttributeError))
+                    return -1;
+                PyErr_Clear();
+                return _Py_HashPointer(inst);
+            }
+        }
+        Py_XDECREF(func);
+        PyErr_SetString(PyExc_TypeError, "unhashable instance");
+        return -1;
+    }
+    res = PyEval_CallObject(func, (PyObject *)NULL);
+    Py_DECREF(func);
+    if (res == NULL)
+        return -1;
+    if (PyInt_Check(res) || PyLong_Check(res))
+        /* This already converts a -1 result to -2. */
+        outcome = res->ob_type->tp_hash(res);
+    else {
+        PyErr_SetString(PyExc_TypeError,
+                        "__hash__() should return an int");
+        outcome = -1;
+    }
+    Py_DECREF(res);
+    return outcome;
 }
 
 static int
 instance_traverse(PyInstanceObject *o, visitproc visit, void *arg)
 {
-	Py_VISIT(o->in_class);
-	Py_VISIT(o->in_dict);
-	return 0;
+    Py_VISIT(o->in_class);
+    Py_VISIT(o->in_dict);
+    return 0;
 }
 
 static PyObject *getitemstr, *setitemstr, *delitemstr, *lenstr;
@@ -1012,413 +1012,413 @@
 static Py_ssize_t
 instance_length(PyInstanceObject *inst)
 {
-	PyObject *func;
-	PyObject *res;
-	Py_ssize_t outcome;
+    PyObject *func;
+    PyObject *res;
+    Py_ssize_t outcome;
 
-	if (lenstr == NULL) {
-		lenstr = PyString_InternFromString("__len__");
-		if (lenstr == NULL)
-			return -1;
-	}
-	func = instance_getattr(inst, lenstr);
-	if (func == NULL)
-		return -1;
-	res = PyEval_CallObject(func, (PyObject *)NULL);
-	Py_DECREF(func);
-	if (res == NULL)
-		return -1;
-	if (PyInt_Check(res)) {
-		outcome = PyInt_AsSsize_t(res);
-		if (outcome == -1 && PyErr_Occurred()) {
-			Py_DECREF(res);
-			return -1;
-		}
+    if (lenstr == NULL) {
+        lenstr = PyString_InternFromString("__len__");
+        if (lenstr == NULL)
+            return -1;
+    }
+    func = instance_getattr(inst, lenstr);
+    if (func == NULL)
+        return -1;
+    res = PyEval_CallObject(func, (PyObject *)NULL);
+    Py_DECREF(func);
+    if (res == NULL)
+        return -1;
+    if (PyInt_Check(res)) {
+        outcome = PyInt_AsSsize_t(res);
+        if (outcome == -1 && PyErr_Occurred()) {
+            Py_DECREF(res);
+            return -1;
+        }
 #if SIZEOF_SIZE_T < SIZEOF_INT
-		/* Overflow check -- range of PyInt is more than C int */
-		if (outcome != (int)outcome) {
-			PyErr_SetString(PyExc_OverflowError,
-			 "__len__() should return 0 <= outcome < 2**31");
-			outcome = -1;
-		}
-		else
+        /* Overflow check -- range of PyInt is more than C int */
+        if (outcome != (int)outcome) {
+            PyErr_SetString(PyExc_OverflowError,
+             "__len__() should return 0 <= outcome < 2**31");
+            outcome = -1;
+        }
+        else
 #endif
-		if (outcome < 0) {
-			PyErr_SetString(PyExc_ValueError,
-					"__len__() should return >= 0");
-			outcome = -1;
-		}
-	}
-	else {
-		PyErr_SetString(PyExc_TypeError,
-				"__len__() should return an int");
-		outcome = -1;
-	}
-	Py_DECREF(res);
-	return outcome;
+        if (outcome < 0) {
+            PyErr_SetString(PyExc_ValueError,
+                            "__len__() should return >= 0");
+            outcome = -1;
+        }
+    }
+    else {
+        PyErr_SetString(PyExc_TypeError,
+                        "__len__() should return an int");
+        outcome = -1;
+    }
+    Py_DECREF(res);
+    return outcome;
 }
 
 static PyObject *
 instance_subscript(PyInstanceObject *inst, PyObject *key)
 {
-	PyObject *func;
-	PyObject *arg;
-	PyObject *res;
+    PyObject *func;
+    PyObject *arg;
+    PyObject *res;
 
-	if (getitemstr == NULL) {
-		getitemstr = PyString_InternFromString("__getitem__");
-		if (getitemstr == NULL)
-			return NULL;
-	}
-	func = instance_getattr(inst, getitemstr);
-	if (func == NULL)
-		return NULL;
-	arg = PyTuple_Pack(1, key);
-	if (arg == NULL) {
-		Py_DECREF(func);
-		return NULL;
-	}
-	res = PyEval_CallObject(func, arg);
-	Py_DECREF(func);
-	Py_DECREF(arg);
-	return res;
+    if (getitemstr == NULL) {
+        getitemstr = PyString_InternFromString("__getitem__");
+        if (getitemstr == NULL)
+            return NULL;
+    }
+    func = instance_getattr(inst, getitemstr);
+    if (func == NULL)
+        return NULL;
+    arg = PyTuple_Pack(1, key);
+    if (arg == NULL) {
+        Py_DECREF(func);
+        return NULL;
+    }
+    res = PyEval_CallObject(func, arg);
+    Py_DECREF(func);
+    Py_DECREF(arg);
+    return res;
 }
 
 static int
 instance_ass_subscript(PyInstanceObject *inst, PyObject *key, PyObject *value)
 {
-	PyObject *func;
-	PyObject *arg;
-	PyObject *res;
+    PyObject *func;
+    PyObject *arg;
+    PyObject *res;
 
-	if (value == NULL) {
-		if (delitemstr == NULL) {
-			delitemstr = PyString_InternFromString("__delitem__");
-			if (delitemstr == NULL)
-				return -1;
-		}
-		func = instance_getattr(inst, delitemstr);
-	}
-	else {
-		if (setitemstr == NULL) {
-			setitemstr = PyString_InternFromString("__setitem__");
-			if (setitemstr == NULL)
-				return -1;
-		}
-		func = instance_getattr(inst, setitemstr);
-	}
-	if (func == NULL)
-		return -1;
-	if (value == NULL)
-		arg = PyTuple_Pack(1, key);
-	else
-		arg = PyTuple_Pack(2, key, value);
-	if (arg == NULL) {
-		Py_DECREF(func);
-		return -1;
-	}
-	res = PyEval_CallObject(func, arg);
-	Py_DECREF(func);
-	Py_DECREF(arg);
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+    if (value == NULL) {
+        if (delitemstr == NULL) {
+            delitemstr = PyString_InternFromString("__delitem__");
+            if (delitemstr == NULL)
+                return -1;
+        }
+        func = instance_getattr(inst, delitemstr);
+    }
+    else {
+        if (setitemstr == NULL) {
+            setitemstr = PyString_InternFromString("__setitem__");
+            if (setitemstr == NULL)
+                return -1;
+        }
+        func = instance_getattr(inst, setitemstr);
+    }
+    if (func == NULL)
+        return -1;
+    if (value == NULL)
+        arg = PyTuple_Pack(1, key);
+    else
+        arg = PyTuple_Pack(2, key, value);
+    if (arg == NULL) {
+        Py_DECREF(func);
+        return -1;
+    }
+    res = PyEval_CallObject(func, arg);
+    Py_DECREF(func);
+    Py_DECREF(arg);
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 static PyMappingMethods instance_as_mapping = {
-	(lenfunc)instance_length,		/* mp_length */
-	(binaryfunc)instance_subscript,		/* mp_subscript */
-	(objobjargproc)instance_ass_subscript,	/* mp_ass_subscript */
+    (lenfunc)instance_length,                   /* mp_length */
+    (binaryfunc)instance_subscript,             /* mp_subscript */
+    (objobjargproc)instance_ass_subscript,      /* mp_ass_subscript */
 };
 
 static PyObject *
 instance_item(PyInstanceObject *inst, Py_ssize_t i)
 {
-	PyObject *func, *res;
+    PyObject *func, *res;
 
-	if (getitemstr == NULL) {
-		getitemstr = PyString_InternFromString("__getitem__");
-		if (getitemstr == NULL)
-			return NULL;
-	}
-	func = instance_getattr(inst, getitemstr);
-	if (func == NULL)
-		return NULL;
-	res = PyObject_CallFunction(func, "n", i);
-	Py_DECREF(func);
-	return res;
+    if (getitemstr == NULL) {
+        getitemstr = PyString_InternFromString("__getitem__");
+        if (getitemstr == NULL)
+            return NULL;
+    }
+    func = instance_getattr(inst, getitemstr);
+    if (func == NULL)
+        return NULL;
+    res = PyObject_CallFunction(func, "n", i);
+    Py_DECREF(func);
+    return res;
 }
 
 static PyObject *
 instance_slice(PyInstanceObject *inst, Py_ssize_t i, Py_ssize_t j)
 {
-	PyObject *func, *arg, *res;
-	static PyObject *getslicestr;
+    PyObject *func, *arg, *res;
+    static PyObject *getslicestr;
 
-	if (getslicestr == NULL) {
-		getslicestr = PyString_InternFromString("__getslice__");
-		if (getslicestr == NULL)
-			return NULL;
-	}
-	func = instance_getattr(inst, getslicestr);
+    if (getslicestr == NULL) {
+        getslicestr = PyString_InternFromString("__getslice__");
+        if (getslicestr == NULL)
+            return NULL;
+    }
+    func = instance_getattr(inst, getslicestr);
 
-	if (func == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return NULL;
-		PyErr_Clear();
+    if (func == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return NULL;
+        PyErr_Clear();
 
-		if (getitemstr == NULL) {
-			getitemstr = PyString_InternFromString("__getitem__");
-			if (getitemstr == NULL)
-				return NULL;
-		}
-		func = instance_getattr(inst, getitemstr);
-		if (func == NULL)
-			return NULL;
-		arg = Py_BuildValue("(N)", _PySlice_FromIndices(i, j));
-	}
-	else {
-		if (PyErr_WarnPy3k("in 3.x, __getslice__ has been removed; "
-				   "use __getitem__", 1) < 0) {
-			Py_DECREF(func);
-			return NULL;
-		}
-		arg = Py_BuildValue("(nn)", i, j);
-	}
+        if (getitemstr == NULL) {
+            getitemstr = PyString_InternFromString("__getitem__");
+            if (getitemstr == NULL)
+                return NULL;
+        }
+        func = instance_getattr(inst, getitemstr);
+        if (func == NULL)
+            return NULL;
+        arg = Py_BuildValue("(N)", _PySlice_FromIndices(i, j));
+    }
+    else {
+        if (PyErr_WarnPy3k("in 3.x, __getslice__ has been removed; "
+                           "use __getitem__", 1) < 0) {
+            Py_DECREF(func);
+            return NULL;
+        }
+        arg = Py_BuildValue("(nn)", i, j);
+    }
 
-	if (arg == NULL) {
-		Py_DECREF(func);
-		return NULL;
-	}
-	res = PyEval_CallObject(func, arg);
-	Py_DECREF(func);
-	Py_DECREF(arg);
-	return res;
+    if (arg == NULL) {
+        Py_DECREF(func);
+        return NULL;
+    }
+    res = PyEval_CallObject(func, arg);
+    Py_DECREF(func);
+    Py_DECREF(arg);
+    return res;
 }
 
 static int
 instance_ass_item(PyInstanceObject *inst, Py_ssize_t i, PyObject *item)
 {
-	PyObject *func, *arg, *res;
+    PyObject *func, *arg, *res;
 
-	if (item == NULL) {
-		if (delitemstr == NULL) {
-			delitemstr = PyString_InternFromString("__delitem__");
-			if (delitemstr == NULL)
-				return -1;
-		}
-		func = instance_getattr(inst, delitemstr);
-	}
-	else {
-		if (setitemstr == NULL) {
-			setitemstr = PyString_InternFromString("__setitem__");
-			if (setitemstr == NULL)
-				return -1;
-		}
-		func = instance_getattr(inst, setitemstr);
-	}
-	if (func == NULL)
-		return -1;
-	if (item == NULL)
-		arg = PyInt_FromSsize_t(i);
-	else
-		arg = Py_BuildValue("(nO)", i, item);
-	if (arg == NULL) {
-		Py_DECREF(func);
-		return -1;
-	}
-	res = PyEval_CallObject(func, arg);
-	Py_DECREF(func);
-	Py_DECREF(arg);
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+    if (item == NULL) {
+        if (delitemstr == NULL) {
+            delitemstr = PyString_InternFromString("__delitem__");
+            if (delitemstr == NULL)
+                return -1;
+        }
+        func = instance_getattr(inst, delitemstr);
+    }
+    else {
+        if (setitemstr == NULL) {
+            setitemstr = PyString_InternFromString("__setitem__");
+            if (setitemstr == NULL)
+                return -1;
+        }
+        func = instance_getattr(inst, setitemstr);
+    }
+    if (func == NULL)
+        return -1;
+    if (item == NULL)
+        arg = PyInt_FromSsize_t(i);
+    else
+        arg = Py_BuildValue("(nO)", i, item);
+    if (arg == NULL) {
+        Py_DECREF(func);
+        return -1;
+    }
+    res = PyEval_CallObject(func, arg);
+    Py_DECREF(func);
+    Py_DECREF(arg);
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 static int
 instance_ass_slice(PyInstanceObject *inst, Py_ssize_t i, Py_ssize_t j, PyObject *value)
 {
-	PyObject *func, *arg, *res;
-	static PyObject *setslicestr, *delslicestr;
+    PyObject *func, *arg, *res;
+    static PyObject *setslicestr, *delslicestr;
 
-	if (value == NULL) {
-		if (delslicestr == NULL) {
-			delslicestr =
-				PyString_InternFromString("__delslice__");
-			if (delslicestr == NULL)
-				return -1;
-		}
-		func = instance_getattr(inst, delslicestr);
-		if (func == NULL) {
-			if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-				return -1;
-			PyErr_Clear();
-			if (delitemstr == NULL) {
-				delitemstr =
-				    PyString_InternFromString("__delitem__");
-				if (delitemstr == NULL)
-					return -1;
-			}
-			func = instance_getattr(inst, delitemstr);
-			if (func == NULL)
-				return -1;
+    if (value == NULL) {
+        if (delslicestr == NULL) {
+            delslicestr =
+                PyString_InternFromString("__delslice__");
+            if (delslicestr == NULL)
+                return -1;
+        }
+        func = instance_getattr(inst, delslicestr);
+        if (func == NULL) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+                return -1;
+            PyErr_Clear();
+            if (delitemstr == NULL) {
+                delitemstr =
+                    PyString_InternFromString("__delitem__");
+                if (delitemstr == NULL)
+                    return -1;
+            }
+            func = instance_getattr(inst, delitemstr);
+            if (func == NULL)
+                return -1;
 
-			arg = Py_BuildValue("(N)",
-					    _PySlice_FromIndices(i, j));
-		}
-		else {
-			if (PyErr_WarnPy3k("in 3.x, __delslice__ has been "
-				            "removed; use __delitem__", 1) < 0) {
-				Py_DECREF(func);
-				return -1;
-			}
-			arg = Py_BuildValue("(nn)", i, j);
-		}
-	}
-	else {
-		if (setslicestr == NULL) {
-			setslicestr =
-				PyString_InternFromString("__setslice__");
-			if (setslicestr == NULL)
-				return -1;
-		}
-		func = instance_getattr(inst, setslicestr);
-		if (func == NULL) {
-			if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-				return -1;
-			PyErr_Clear();
-			if (setitemstr == NULL) {
-				setitemstr =
-				    PyString_InternFromString("__setitem__");
-				if (setitemstr == NULL)
-					return -1;
-			}
-			func = instance_getattr(inst, setitemstr);
-			if (func == NULL)
-				return -1;
+            arg = Py_BuildValue("(N)",
+                                _PySlice_FromIndices(i, j));
+        }
+        else {
+            if (PyErr_WarnPy3k("in 3.x, __delslice__ has been "
+                                "removed; use __delitem__", 1) < 0) {
+                Py_DECREF(func);
+                return -1;
+            }
+            arg = Py_BuildValue("(nn)", i, j);
+        }
+    }
+    else {
+        if (setslicestr == NULL) {
+            setslicestr =
+                PyString_InternFromString("__setslice__");
+            if (setslicestr == NULL)
+                return -1;
+        }
+        func = instance_getattr(inst, setslicestr);
+        if (func == NULL) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+                return -1;
+            PyErr_Clear();
+            if (setitemstr == NULL) {
+                setitemstr =
+                    PyString_InternFromString("__setitem__");
+                if (setitemstr == NULL)
+                    return -1;
+            }
+            func = instance_getattr(inst, setitemstr);
+            if (func == NULL)
+                return -1;
 
-			arg = Py_BuildValue("(NO)",
-					    _PySlice_FromIndices(i, j), value);
-		}
-		else {
-			if (PyErr_WarnPy3k("in 3.x, __setslice__ has been "
-					   "removed; use __setitem__", 1) < 0) {
-				Py_DECREF(func);
-				return -1;
-			}
-			arg = Py_BuildValue("(nnO)", i, j, value);
-		}
-	}
-	if (arg == NULL) {
-		Py_DECREF(func);
-		return -1;
-	}
-	res = PyEval_CallObject(func, arg);
-	Py_DECREF(func);
-	Py_DECREF(arg);
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+            arg = Py_BuildValue("(NO)",
+                                _PySlice_FromIndices(i, j), value);
+        }
+        else {
+            if (PyErr_WarnPy3k("in 3.x, __setslice__ has been "
+                               "removed; use __setitem__", 1) < 0) {
+                Py_DECREF(func);
+                return -1;
+            }
+            arg = Py_BuildValue("(nnO)", i, j, value);
+        }
+    }
+    if (arg == NULL) {
+        Py_DECREF(func);
+        return -1;
+    }
+    res = PyEval_CallObject(func, arg);
+    Py_DECREF(func);
+    Py_DECREF(arg);
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 static int
 instance_contains(PyInstanceObject *inst, PyObject *member)
 {
-	static PyObject *__contains__;
-	PyObject *func;
+    static PyObject *__contains__;
+    PyObject *func;
 
-	/* Try __contains__ first.
-	 * If that can't be done, try iterator-based searching.
-	 */
+    /* Try __contains__ first.
+     * If that can't be done, try iterator-based searching.
+     */
 
-	if(__contains__ == NULL) {
-		__contains__ = PyString_InternFromString("__contains__");
-		if(__contains__ == NULL)
-			return -1;
-	}
-	func = instance_getattr(inst, __contains__);
-	if (func) {
-		PyObject *res;
-		int ret;
-		PyObject *arg = PyTuple_Pack(1, member);
-		if(arg == NULL) {
-			Py_DECREF(func);
-			return -1;
-		}
-		res = PyEval_CallObject(func, arg);
-		Py_DECREF(func);
-		Py_DECREF(arg);
-		if(res == NULL)
-			return -1;
-		ret = PyObject_IsTrue(res);
-		Py_DECREF(res);
-		return ret;
-	}
+    if(__contains__ == NULL) {
+        __contains__ = PyString_InternFromString("__contains__");
+        if(__contains__ == NULL)
+            return -1;
+    }
+    func = instance_getattr(inst, __contains__);
+    if (func) {
+        PyObject *res;
+        int ret;
+        PyObject *arg = PyTuple_Pack(1, member);
+        if(arg == NULL) {
+            Py_DECREF(func);
+            return -1;
+        }
+        res = PyEval_CallObject(func, arg);
+        Py_DECREF(func);
+        Py_DECREF(arg);
+        if(res == NULL)
+            return -1;
+        ret = PyObject_IsTrue(res);
+        Py_DECREF(res);
+        return ret;
+    }
 
-	/* Couldn't find __contains__. */
-	if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
-		Py_ssize_t rc;
-		/* Assume the failure was simply due to that there is no
-		 * __contains__ attribute, and try iterating instead.
-		 */
-		PyErr_Clear();
-		rc = _PySequence_IterSearch((PyObject *)inst, member,
-					    PY_ITERSEARCH_CONTAINS);
-		if (rc >= 0)
-			return rc > 0;
-	}
-	return -1;
+    /* Couldn't find __contains__. */
+    if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+        Py_ssize_t rc;
+        /* Assume the failure was simply due to that there is no
+         * __contains__ attribute, and try iterating instead.
+         */
+        PyErr_Clear();
+        rc = _PySequence_IterSearch((PyObject *)inst, member,
+                                    PY_ITERSEARCH_CONTAINS);
+        if (rc >= 0)
+            return rc > 0;
+    }
+    return -1;
 }
 
 static PySequenceMethods
 instance_as_sequence = {
-	(lenfunc)instance_length,		/* sq_length */
-	0,					/* sq_concat */
-	0,					/* sq_repeat */
-	(ssizeargfunc)instance_item,		/* sq_item */
-	(ssizessizeargfunc)instance_slice,	/* sq_slice */
-	(ssizeobjargproc)instance_ass_item,	/* sq_ass_item */
-	(ssizessizeobjargproc)instance_ass_slice,/* sq_ass_slice */
-	(objobjproc)instance_contains,		/* sq_contains */
+    (lenfunc)instance_length,                   /* sq_length */
+    0,                                          /* sq_concat */
+    0,                                          /* sq_repeat */
+    (ssizeargfunc)instance_item,                /* sq_item */
+    (ssizessizeargfunc)instance_slice,          /* sq_slice */
+    (ssizeobjargproc)instance_ass_item,         /* sq_ass_item */
+    (ssizessizeobjargproc)instance_ass_slice,/* sq_ass_slice */
+    (objobjproc)instance_contains,              /* sq_contains */
 };
 
 static PyObject *
 generic_unary_op(PyInstanceObject *self, PyObject *methodname)
 {
-	PyObject *func, *res;
+    PyObject *func, *res;
 
-	if ((func = instance_getattr(self, methodname)) == NULL)
-		return NULL;
-	res = PyEval_CallObject(func, (PyObject *)NULL);
-	Py_DECREF(func);
-	return res;
+    if ((func = instance_getattr(self, methodname)) == NULL)
+        return NULL;
+    res = PyEval_CallObject(func, (PyObject *)NULL);
+    Py_DECREF(func);
+    return res;
 }
 
 static PyObject *
 generic_binary_op(PyObject *v, PyObject *w, char *opname)
 {
-	PyObject *result;
-	PyObject *args;
-	PyObject *func = PyObject_GetAttrString(v, opname);
-	if (func == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return NULL;
-		PyErr_Clear();
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	args = PyTuple_Pack(1, w);
-	if (args == NULL) {
-		Py_DECREF(func);
-		return NULL;
-	}
-	result = PyEval_CallObject(func, args);
-	Py_DECREF(args);
-	Py_DECREF(func);
-	return result;
+    PyObject *result;
+    PyObject *args;
+    PyObject *func = PyObject_GetAttrString(v, opname);
+    if (func == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return NULL;
+        PyErr_Clear();
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    args = PyTuple_Pack(1, w);
+    if (args == NULL) {
+        Py_DECREF(func);
+        return NULL;
+    }
+    result = PyEval_CallObject(func, args);
+    Py_DECREF(args);
+    Py_DECREF(func);
+    return result;
 }
 
 
@@ -1427,70 +1427,70 @@
 /* Try one half of a binary operator involving a class instance. */
 static PyObject *
 half_binop(PyObject *v, PyObject *w, char *opname, binaryfunc thisfunc,
-		int swapped)
+                int swapped)
 {
-	PyObject *args;
-	PyObject *coercefunc;
-	PyObject *coerced = NULL;
-	PyObject *v1;
-	PyObject *result;
+    PyObject *args;
+    PyObject *coercefunc;
+    PyObject *coerced = NULL;
+    PyObject *v1;
+    PyObject *result;
 
-	if (!PyInstance_Check(v)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
+    if (!PyInstance_Check(v)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 
-	if (coerce_obj == NULL) {
-		coerce_obj = PyString_InternFromString("__coerce__");
-		if (coerce_obj == NULL)
-			return NULL;
-	}
-	coercefunc = PyObject_GetAttr(v, coerce_obj);
-	if (coercefunc == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return NULL;
-		PyErr_Clear();
-		return generic_binary_op(v, w, opname);
-	}
+    if (coerce_obj == NULL) {
+        coerce_obj = PyString_InternFromString("__coerce__");
+        if (coerce_obj == NULL)
+            return NULL;
+    }
+    coercefunc = PyObject_GetAttr(v, coerce_obj);
+    if (coercefunc == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return NULL;
+        PyErr_Clear();
+        return generic_binary_op(v, w, opname);
+    }
 
-	args = PyTuple_Pack(1, w);
-	if (args == NULL) {
-		Py_DECREF(coercefunc);
-		return NULL;
-	}
-	coerced = PyEval_CallObject(coercefunc, args);
-	Py_DECREF(args);
-	Py_DECREF(coercefunc);
-	if (coerced == NULL) {
-		return NULL;
-	}
-	if (coerced == Py_None || coerced == Py_NotImplemented) {
-		Py_DECREF(coerced);
-		return generic_binary_op(v, w, opname);
-	}
-	if (!PyTuple_Check(coerced) || PyTuple_Size(coerced) != 2) {
-		Py_DECREF(coerced);
-		PyErr_SetString(PyExc_TypeError,
-				"coercion should return None or 2-tuple");
-		return NULL;
-	}
-	v1 = PyTuple_GetItem(coerced, 0);
-	w = PyTuple_GetItem(coerced, 1);
-	if (v1->ob_type == v->ob_type && PyInstance_Check(v)) {
-		/* prevent recursion if __coerce__ returns self as the first
-		 * argument */
-		result = generic_binary_op(v1, w, opname);
-	} else {
-		if (Py_EnterRecursiveCall(" after coercion"))
-		    return NULL;
-		if (swapped)
-			result = (thisfunc)(w, v1);
-		else
-			result = (thisfunc)(v1, w);
-		Py_LeaveRecursiveCall();
-	}
-	Py_DECREF(coerced);
-	return result;
+    args = PyTuple_Pack(1, w);
+    if (args == NULL) {
+        Py_DECREF(coercefunc);
+        return NULL;
+    }
+    coerced = PyEval_CallObject(coercefunc, args);
+    Py_DECREF(args);
+    Py_DECREF(coercefunc);
+    if (coerced == NULL) {
+        return NULL;
+    }
+    if (coerced == Py_None || coerced == Py_NotImplemented) {
+        Py_DECREF(coerced);
+        return generic_binary_op(v, w, opname);
+    }
+    if (!PyTuple_Check(coerced) || PyTuple_Size(coerced) != 2) {
+        Py_DECREF(coerced);
+        PyErr_SetString(PyExc_TypeError,
+                        "coercion should return None or 2-tuple");
+        return NULL;
+    }
+    v1 = PyTuple_GetItem(coerced, 0);
+    w = PyTuple_GetItem(coerced, 1);
+    if (v1->ob_type == v->ob_type && PyInstance_Check(v)) {
+        /* prevent recursion if __coerce__ returns self as the first
+         * argument */
+        result = generic_binary_op(v1, w, opname);
+    } else {
+        if (Py_EnterRecursiveCall(" after coercion"))
+            return NULL;
+        if (swapped)
+            result = (thisfunc)(w, v1);
+        else
+            result = (thisfunc)(v1, w);
+        Py_LeaveRecursiveCall();
+    }
+    Py_DECREF(coerced);
+    return result;
 }
 
 /* Implement a binary operator involving at least one class instance. */
@@ -1498,110 +1498,110 @@
 do_binop(PyObject *v, PyObject *w, char *opname, char *ropname,
                    binaryfunc thisfunc)
 {
-	PyObject *result = half_binop(v, w, opname, thisfunc, 0);
-	if (result == Py_NotImplemented) {
-		Py_DECREF(result);
-		result = half_binop(w, v, ropname, thisfunc, 1);
-	}
-	return result;
+    PyObject *result = half_binop(v, w, opname, thisfunc, 0);
+    if (result == Py_NotImplemented) {
+        Py_DECREF(result);
+        result = half_binop(w, v, ropname, thisfunc, 1);
+    }
+    return result;
 }
 
 static PyObject *
 do_binop_inplace(PyObject *v, PyObject *w, char *iopname, char *opname,
-			char *ropname, binaryfunc thisfunc)
+                        char *ropname, binaryfunc thisfunc)
 {
-	PyObject *result = half_binop(v, w, iopname, thisfunc, 0);
-	if (result == Py_NotImplemented) {
-		Py_DECREF(result);
-		result = do_binop(v, w, opname, ropname, thisfunc);
-	}
-	return result;
+    PyObject *result = half_binop(v, w, iopname, thisfunc, 0);
+    if (result == Py_NotImplemented) {
+        Py_DECREF(result);
+        result = do_binop(v, w, opname, ropname, thisfunc);
+    }
+    return result;
 }
 
 static int
 instance_coerce(PyObject **pv, PyObject **pw)
 {
-	PyObject *v = *pv;
-	PyObject *w = *pw;
-	PyObject *coercefunc;
-	PyObject *args;
-	PyObject *coerced;
+    PyObject *v = *pv;
+    PyObject *w = *pw;
+    PyObject *coercefunc;
+    PyObject *args;
+    PyObject *coerced;
 
-	if (coerce_obj == NULL) {
-		coerce_obj = PyString_InternFromString("__coerce__");
-		if (coerce_obj == NULL)
-			return -1;
-	}
-	coercefunc = PyObject_GetAttr(v, coerce_obj);
-	if (coercefunc == NULL) {
-		/* No __coerce__ method */
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return -1;
-		PyErr_Clear();
-		return 1;
-	}
-	/* Has __coerce__ method: call it */
-	args = PyTuple_Pack(1, w);
-	if (args == NULL) {
-		return -1;
-	}
-	coerced = PyEval_CallObject(coercefunc, args);
-	Py_DECREF(args);
-	Py_DECREF(coercefunc);
-	if (coerced == NULL) {
-		/* __coerce__ call raised an exception */
-		return -1;
-	}
-	if (coerced == Py_None || coerced == Py_NotImplemented) {
-		/* __coerce__ says "I can't do it" */
-		Py_DECREF(coerced);
-		return 1;
-	}
-	if (!PyTuple_Check(coerced) || PyTuple_Size(coerced) != 2) {
-		/* __coerce__ return value is malformed */
-		Py_DECREF(coerced);
-		PyErr_SetString(PyExc_TypeError,
-			   "coercion should return None or 2-tuple");
-		return -1;
-	}
-	/* __coerce__ returned two new values */
-	*pv = PyTuple_GetItem(coerced, 0);
-	*pw = PyTuple_GetItem(coerced, 1);
-	Py_INCREF(*pv);
-	Py_INCREF(*pw);
-	Py_DECREF(coerced);
-	return 0;
+    if (coerce_obj == NULL) {
+        coerce_obj = PyString_InternFromString("__coerce__");
+        if (coerce_obj == NULL)
+            return -1;
+    }
+    coercefunc = PyObject_GetAttr(v, coerce_obj);
+    if (coercefunc == NULL) {
+        /* No __coerce__ method */
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return -1;
+        PyErr_Clear();
+        return 1;
+    }
+    /* Has __coerce__ method: call it */
+    args = PyTuple_Pack(1, w);
+    if (args == NULL) {
+        return -1;
+    }
+    coerced = PyEval_CallObject(coercefunc, args);
+    Py_DECREF(args);
+    Py_DECREF(coercefunc);
+    if (coerced == NULL) {
+        /* __coerce__ call raised an exception */
+        return -1;
+    }
+    if (coerced == Py_None || coerced == Py_NotImplemented) {
+        /* __coerce__ says "I can't do it" */
+        Py_DECREF(coerced);
+        return 1;
+    }
+    if (!PyTuple_Check(coerced) || PyTuple_Size(coerced) != 2) {
+        /* __coerce__ return value is malformed */
+        Py_DECREF(coerced);
+        PyErr_SetString(PyExc_TypeError,
+                   "coercion should return None or 2-tuple");
+        return -1;
+    }
+    /* __coerce__ returned two new values */
+    *pv = PyTuple_GetItem(coerced, 0);
+    *pw = PyTuple_GetItem(coerced, 1);
+    Py_INCREF(*pv);
+    Py_INCREF(*pw);
+    Py_DECREF(coerced);
+    return 0;
 }
 
 #define UNARY(funcname, methodname) \
 static PyObject *funcname(PyInstanceObject *self) { \
-	static PyObject *o; \
-	if (o == NULL) { o = PyString_InternFromString(methodname); \
-			 if (o == NULL) return NULL; } \
-	return generic_unary_op(self, o); \
+    static PyObject *o; \
+    if (o == NULL) { o = PyString_InternFromString(methodname); \
+                     if (o == NULL) return NULL; } \
+    return generic_unary_op(self, o); \
 }
 
 /* unary function with a fallback */
 #define UNARY_FB(funcname, methodname, funcname_fb) \
 static PyObject *funcname(PyInstanceObject *self) { \
-	static PyObject *o; \
-	if (o == NULL) { o = PyString_InternFromString(methodname); \
-			 if (o == NULL) return NULL; } \
-	if (PyObject_HasAttr((PyObject*)self, o)) \
-		return generic_unary_op(self, o); \
-	else \
-		return funcname_fb(self); \
+    static PyObject *o; \
+    if (o == NULL) { o = PyString_InternFromString(methodname); \
+                     if (o == NULL) return NULL; } \
+    if (PyObject_HasAttr((PyObject*)self, o)) \
+        return generic_unary_op(self, o); \
+    else \
+        return funcname_fb(self); \
 }
 
 #define BINARY(f, m, n) \
 static PyObject *f(PyObject *v, PyObject *w) { \
-	return do_binop(v, w, "__" m "__", "__r" m "__", n); \
+    return do_binop(v, w, "__" m "__", "__r" m "__", n); \
 }
 
 #define BINARY_INPLACE(f, m, n) \
 static PyObject *f(PyObject *v, PyObject *w) { \
-	return do_binop_inplace(v, w, "__i" m "__", "__" m "__", \
-			"__r" m "__", n); \
+    return do_binop_inplace(v, w, "__i" m "__", "__" m "__", \
+                    "__r" m "__", n); \
 }
 
 UNARY(instance_neg, "__neg__")
@@ -1645,55 +1645,55 @@
 static int
 half_cmp(PyObject *v, PyObject *w)
 {
-	static PyObject *cmp_obj;
-	PyObject *args;
-	PyObject *cmp_func;
-	PyObject *result;
-	long l;
+    static PyObject *cmp_obj;
+    PyObject *args;
+    PyObject *cmp_func;
+    PyObject *result;
+    long l;
 
-	assert(PyInstance_Check(v));
+    assert(PyInstance_Check(v));
 
-	if (cmp_obj == NULL) {
-		cmp_obj = PyString_InternFromString("__cmp__");
-		if (cmp_obj == NULL)
-			return -2;
-	}
+    if (cmp_obj == NULL) {
+        cmp_obj = PyString_InternFromString("__cmp__");
+        if (cmp_obj == NULL)
+            return -2;
+    }
 
-	cmp_func = PyObject_GetAttr(v, cmp_obj);
-	if (cmp_func == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return -2;
-		PyErr_Clear();
-		return 2;
-	}
+    cmp_func = PyObject_GetAttr(v, cmp_obj);
+    if (cmp_func == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return -2;
+        PyErr_Clear();
+        return 2;
+    }
 
-	args = PyTuple_Pack(1, w);
-	if (args == NULL) {
-		Py_DECREF(cmp_func);
-		return -2;
-	}
+    args = PyTuple_Pack(1, w);
+    if (args == NULL) {
+        Py_DECREF(cmp_func);
+        return -2;
+    }
 
-	result = PyEval_CallObject(cmp_func, args);
-	Py_DECREF(args);
-	Py_DECREF(cmp_func);
+    result = PyEval_CallObject(cmp_func, args);
+    Py_DECREF(args);
+    Py_DECREF(cmp_func);
 
-	if (result == NULL)
-		return -2;
+    if (result == NULL)
+        return -2;
 
-	if (result == Py_NotImplemented) {
-		Py_DECREF(result);
-		return 2;
-	}
+    if (result == Py_NotImplemented) {
+        Py_DECREF(result);
+        return 2;
+    }
 
-	l = PyInt_AsLong(result);
-	Py_DECREF(result);
-	if (l == -1 && PyErr_Occurred()) {
-		PyErr_SetString(PyExc_TypeError,
-			     "comparison did not return an int");
-		return -2;
-	}
+    l = PyInt_AsLong(result);
+    Py_DECREF(result);
+    if (l == -1 && PyErr_Occurred()) {
+        PyErr_SetString(PyExc_TypeError,
+                     "comparison did not return an int");
+        return -2;
+    }
 
-	return l < 0 ? -1 : l > 0 ? 1 : 0;
+    return l < 0 ? -1 : l > 0 ? 1 : 0;
 }
 
 /* Try a 3-way comparison, returning an int; either v or w is an instance.
@@ -1708,124 +1708,124 @@
 static int
 instance_compare(PyObject *v, PyObject *w)
 {
-	int c;
+    int c;
 
-	c = PyNumber_CoerceEx(&v, &w);
-	if (c < 0)
-		return -2;
-	if (c == 0) {
-		/* If neither is now an instance, use regular comparison */
-		if (!PyInstance_Check(v) && !PyInstance_Check(w)) {
-			c = PyObject_Compare(v, w);
-			Py_DECREF(v);
-			Py_DECREF(w);
-			if (PyErr_Occurred())
-				return -2;
-			return c < 0 ? -1 : c > 0 ? 1 : 0;
-		}
-	}
-	else {
-		/* The coercion didn't do anything.
-		   Treat this the same as returning v and w unchanged. */
-		Py_INCREF(v);
-		Py_INCREF(w);
-	}
+    c = PyNumber_CoerceEx(&v, &w);
+    if (c < 0)
+        return -2;
+    if (c == 0) {
+        /* If neither is now an instance, use regular comparison */
+        if (!PyInstance_Check(v) && !PyInstance_Check(w)) {
+            c = PyObject_Compare(v, w);
+            Py_DECREF(v);
+            Py_DECREF(w);
+            if (PyErr_Occurred())
+                return -2;
+            return c < 0 ? -1 : c > 0 ? 1 : 0;
+        }
+    }
+    else {
+        /* The coercion didn't do anything.
+           Treat this the same as returning v and w unchanged. */
+        Py_INCREF(v);
+        Py_INCREF(w);
+    }
 
-	if (PyInstance_Check(v)) {
-		c = half_cmp(v, w);
-		if (c <= 1) {
-			Py_DECREF(v);
-			Py_DECREF(w);
-			return c;
-		}
-	}
-	if (PyInstance_Check(w)) {
-		c = half_cmp(w, v);
-		if (c <= 1) {
-			Py_DECREF(v);
-			Py_DECREF(w);
-			if (c >= -1)
-				c = -c;
-			return c;
-		}
-	}
-	Py_DECREF(v);
-	Py_DECREF(w);
-	return 2;
+    if (PyInstance_Check(v)) {
+        c = half_cmp(v, w);
+        if (c <= 1) {
+            Py_DECREF(v);
+            Py_DECREF(w);
+            return c;
+        }
+    }
+    if (PyInstance_Check(w)) {
+        c = half_cmp(w, v);
+        if (c <= 1) {
+            Py_DECREF(v);
+            Py_DECREF(w);
+            if (c >= -1)
+                c = -c;
+            return c;
+        }
+    }
+    Py_DECREF(v);
+    Py_DECREF(w);
+    return 2;
 }
 
 static int
 instance_nonzero(PyInstanceObject *self)
 {
-	PyObject *func, *res;
-	long outcome;
-	static PyObject *nonzerostr;
+    PyObject *func, *res;
+    long outcome;
+    static PyObject *nonzerostr;
 
-	if (nonzerostr == NULL) {
-		nonzerostr = PyString_InternFromString("__nonzero__");
-		if (nonzerostr == NULL)
-			return -1;
-	}
-	if ((func = instance_getattr(self, nonzerostr)) == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return -1;
-		PyErr_Clear();
-		if (lenstr == NULL) {
-			lenstr = PyString_InternFromString("__len__");
-			if (lenstr == NULL)
-				return -1;
-		}
-		if ((func = instance_getattr(self, lenstr)) == NULL) {
-			if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-				return -1;
-			PyErr_Clear();
-			/* Fall back to the default behavior:
-			   all instances are nonzero */
-			return 1;
-		}
-	}
-	res = PyEval_CallObject(func, (PyObject *)NULL);
-	Py_DECREF(func);
-	if (res == NULL)
-		return -1;
-	if (!PyInt_Check(res)) {
-		Py_DECREF(res);
-		PyErr_SetString(PyExc_TypeError,
-				"__nonzero__ should return an int");
-		return -1;
-	}
-	outcome = PyInt_AsLong(res);
-	Py_DECREF(res);
-	if (outcome < 0) {
-		PyErr_SetString(PyExc_ValueError,
-				"__nonzero__ should return >= 0");
-		return -1;
-	}
-	return outcome > 0;
+    if (nonzerostr == NULL) {
+        nonzerostr = PyString_InternFromString("__nonzero__");
+        if (nonzerostr == NULL)
+            return -1;
+    }
+    if ((func = instance_getattr(self, nonzerostr)) == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return -1;
+        PyErr_Clear();
+        if (lenstr == NULL) {
+            lenstr = PyString_InternFromString("__len__");
+            if (lenstr == NULL)
+                return -1;
+        }
+        if ((func = instance_getattr(self, lenstr)) == NULL) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+                return -1;
+            PyErr_Clear();
+            /* Fall back to the default behavior:
+               all instances are nonzero */
+            return 1;
+        }
+    }
+    res = PyEval_CallObject(func, (PyObject *)NULL);
+    Py_DECREF(func);
+    if (res == NULL)
+        return -1;
+    if (!PyInt_Check(res)) {
+        Py_DECREF(res);
+        PyErr_SetString(PyExc_TypeError,
+                        "__nonzero__ should return an int");
+        return -1;
+    }
+    outcome = PyInt_AsLong(res);
+    Py_DECREF(res);
+    if (outcome < 0) {
+        PyErr_SetString(PyExc_ValueError,
+                        "__nonzero__ should return >= 0");
+        return -1;
+    }
+    return outcome > 0;
 }
 
 static PyObject *
 instance_index(PyInstanceObject *self)
 {
-	PyObject *func, *res;
-	static PyObject *indexstr = NULL;
+    PyObject *func, *res;
+    static PyObject *indexstr = NULL;
 
-	if (indexstr == NULL) {
-		indexstr = PyString_InternFromString("__index__");
-		if (indexstr == NULL)
-			return NULL;
-	}	
-	if ((func = instance_getattr(self, indexstr)) == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return NULL;
-		PyErr_Clear();
-		PyErr_SetString(PyExc_TypeError, 
-				"object cannot be interpreted as an index");
-		return NULL;
-	}
-	res = PyEval_CallObject(func, (PyObject *)NULL);
-	Py_DECREF(func);
-	return res;
+    if (indexstr == NULL) {
+        indexstr = PyString_InternFromString("__index__");
+        if (indexstr == NULL)
+            return NULL;
+    }
+    if ((func = instance_getattr(self, indexstr)) == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return NULL;
+        PyErr_Clear();
+        PyErr_SetString(PyExc_TypeError,
+                        "object cannot be interpreted as an index");
+        return NULL;
+    }
+    res = PyEval_CallObject(func, (PyObject *)NULL);
+    Py_DECREF(func);
+    return res;
 }
 
 
@@ -1835,22 +1835,22 @@
 static PyObject *
 instance_int(PyInstanceObject *self)
 {
-	PyObject *truncated;
-	static PyObject *int_name;
-	if (int_name == NULL) {
-		int_name = PyString_InternFromString("__int__");
-		if (int_name == NULL)
-			return NULL;
-	}
-	if (PyObject_HasAttr((PyObject*)self, int_name))
-		return generic_unary_op(self, int_name);
+    PyObject *truncated;
+    static PyObject *int_name;
+    if (int_name == NULL) {
+        int_name = PyString_InternFromString("__int__");
+        if (int_name == NULL)
+            return NULL;
+    }
+    if (PyObject_HasAttr((PyObject*)self, int_name))
+        return generic_unary_op(self, int_name);
 
-	truncated = _instance_trunc(self);
-	/* __trunc__ is specified to return an Integral type, but
-	   int() needs to return an int. */
-	return _PyNumber_ConvertIntegralToInt(
-		truncated,
-		"__trunc__ returned non-Integral (type %.200s)");
+    truncated = _instance_trunc(self);
+    /* __trunc__ is specified to return an Integral type, but
+       int() needs to return an int. */
+    return _PyNumber_ConvertIntegralToInt(
+        truncated,
+        "__trunc__ returned non-Integral (type %.200s)");
 }
 
 UNARY_FB(instance_long, "__long__", instance_int)
@@ -1861,74 +1861,74 @@
 static PyObject *
 bin_power(PyObject *v, PyObject *w)
 {
-	return PyNumber_Power(v, w, Py_None);
+    return PyNumber_Power(v, w, Py_None);
 }
 
 /* This version is for ternary calls only (z != None) */
 static PyObject *
 instance_pow(PyObject *v, PyObject *w, PyObject *z)
 {
-	if (z == Py_None) {
-		return do_binop(v, w, "__pow__", "__rpow__", bin_power);
-	}
-	else {
-		PyObject *func;
-		PyObject *args;
-		PyObject *result;
+    if (z == Py_None) {
+        return do_binop(v, w, "__pow__", "__rpow__", bin_power);
+    }
+    else {
+        PyObject *func;
+        PyObject *args;
+        PyObject *result;
 
-		/* XXX Doesn't do coercions... */
-		func = PyObject_GetAttrString(v, "__pow__");
-		if (func == NULL)
-			return NULL;
-		args = PyTuple_Pack(2, w, z);
-		if (args == NULL) {
-			Py_DECREF(func);
-			return NULL;
-		}
-		result = PyEval_CallObject(func, args);
-		Py_DECREF(func);
-		Py_DECREF(args);
-		return result;
-	}
+        /* XXX Doesn't do coercions... */
+        func = PyObject_GetAttrString(v, "__pow__");
+        if (func == NULL)
+            return NULL;
+        args = PyTuple_Pack(2, w, z);
+        if (args == NULL) {
+            Py_DECREF(func);
+            return NULL;
+        }
+        result = PyEval_CallObject(func, args);
+        Py_DECREF(func);
+        Py_DECREF(args);
+        return result;
+    }
 }
 
 static PyObject *
 bin_inplace_power(PyObject *v, PyObject *w)
 {
-	return PyNumber_InPlacePower(v, w, Py_None);
+    return PyNumber_InPlacePower(v, w, Py_None);
 }
 
 
 static PyObject *
 instance_ipow(PyObject *v, PyObject *w, PyObject *z)
 {
-	if (z == Py_None) {
-		return do_binop_inplace(v, w, "__ipow__", "__pow__",
-			"__rpow__", bin_inplace_power);
-	}
-	else {
-		/* XXX Doesn't do coercions... */
-		PyObject *func;
-		PyObject *args;
-		PyObject *result;
+    if (z == Py_None) {
+        return do_binop_inplace(v, w, "__ipow__", "__pow__",
+            "__rpow__", bin_inplace_power);
+    }
+    else {
+        /* XXX Doesn't do coercions... */
+        PyObject *func;
+        PyObject *args;
+        PyObject *result;
 
-		func = PyObject_GetAttrString(v, "__ipow__");
-		if (func == NULL) {
-			if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-				return NULL;
-			PyErr_Clear();
-			return instance_pow(v, w, z);
-		}
-		args = PyTuple_Pack(2, w, z);
-		if (args == NULL) {
-			Py_DECREF(func);
-			return NULL;
-		}
-		result = PyEval_CallObject(func, args);
-		Py_DECREF(func);
-		Py_DECREF(args);
-		return result;
-	}
+        func = PyObject_GetAttrString(v, "__ipow__");
+        if (func == NULL) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+                return NULL;
+            PyErr_Clear();
+            return instance_pow(v, w, z);
+        }
+        args = PyTuple_Pack(2, w, z);
+        if (args == NULL) {
+            Py_DECREF(func);
+            return NULL;
+        }
+        result = PyEval_CallObject(func, args);
+        Py_DECREF(func);
+        Py_DECREF(args);
+        return result;
+    }
 }
 
 
@@ -1939,93 +1939,93 @@
 static int
 init_name_op(void)
 {
-	int i;
-	char *_name_op[] = {
-		"__lt__",
-		"__le__",
-		"__eq__",
-		"__ne__",
-		"__gt__",
-		"__ge__",
-	};
+    int i;
+    char *_name_op[] = {
+        "__lt__",
+        "__le__",
+        "__eq__",
+        "__ne__",
+        "__gt__",
+        "__ge__",
+    };
 
-	name_op = (PyObject **)malloc(sizeof(PyObject *) * NAME_OPS);
-	if (name_op == NULL)
-		return -1;
-	for (i = 0; i < NAME_OPS; ++i) {
-		name_op[i] = PyString_InternFromString(_name_op[i]);
-		if (name_op[i] == NULL)
-			return -1;
-	}
-	return 0;
+    name_op = (PyObject **)malloc(sizeof(PyObject *) * NAME_OPS);
+    if (name_op == NULL)
+        return -1;
+    for (i = 0; i < NAME_OPS; ++i) {
+        name_op[i] = PyString_InternFromString(_name_op[i]);
+        if (name_op[i] == NULL)
+            return -1;
+    }
+    return 0;
 }
 
 static PyObject *
 half_richcompare(PyObject *v, PyObject *w, int op)
 {
-	PyObject *method;
-	PyObject *args;
-	PyObject *res;
+    PyObject *method;
+    PyObject *args;
+    PyObject *res;
 
-	assert(PyInstance_Check(v));
+    assert(PyInstance_Check(v));
 
-	if (name_op == NULL) {
-		if (init_name_op() < 0)
-			return NULL;
-	}
-	/* If the instance doesn't define an __getattr__ method, use
-	   instance_getattr2 directly because it will not set an
-	   exception on failure. */
-	if (((PyInstanceObject *)v)->in_class->cl_getattr == NULL)
-		method = instance_getattr2((PyInstanceObject *)v,
-					   name_op[op]);
-	else
-		method = PyObject_GetAttr(v, name_op[op]);
-	if (method == NULL) {
-		if (PyErr_Occurred()) {
-			if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-				return NULL;
-			PyErr_Clear();
-		}
-		res = Py_NotImplemented;
-		Py_INCREF(res);
-		return res;
-	}
+    if (name_op == NULL) {
+        if (init_name_op() < 0)
+            return NULL;
+    }
+    /* If the instance doesn't define an __getattr__ method, use
+       instance_getattr2 directly because it will not set an
+       exception on failure. */
+    if (((PyInstanceObject *)v)->in_class->cl_getattr == NULL)
+        method = instance_getattr2((PyInstanceObject *)v,
+                                   name_op[op]);
+    else
+        method = PyObject_GetAttr(v, name_op[op]);
+    if (method == NULL) {
+        if (PyErr_Occurred()) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+                return NULL;
+            PyErr_Clear();
+        }
+        res = Py_NotImplemented;
+        Py_INCREF(res);
+        return res;
+    }
 
-	args = PyTuple_Pack(1, w);
-	if (args == NULL) {
-		Py_DECREF(method);
-		return NULL;
-	}
+    args = PyTuple_Pack(1, w);
+    if (args == NULL) {
+        Py_DECREF(method);
+        return NULL;
+    }
 
-	res = PyEval_CallObject(method, args);
-	Py_DECREF(args);
-	Py_DECREF(method);
+    res = PyEval_CallObject(method, args);
+    Py_DECREF(args);
+    Py_DECREF(method);
 
-	return res;
+    return res;
 }
 
 static PyObject *
 instance_richcompare(PyObject *v, PyObject *w, int op)
 {
-	PyObject *res;
+    PyObject *res;
 
-	if (PyInstance_Check(v)) {
-		res = half_richcompare(v, w, op);
-		if (res != Py_NotImplemented)
-			return res;
-		Py_DECREF(res);
-	}
+    if (PyInstance_Check(v)) {
+        res = half_richcompare(v, w, op);
+        if (res != Py_NotImplemented)
+            return res;
+        Py_DECREF(res);
+    }
 
-	if (PyInstance_Check(w)) {
-		res = half_richcompare(w, v, _Py_SwappedOp[op]);
-		if (res != Py_NotImplemented)
-			return res;
-		Py_DECREF(res);
-	}
+    if (PyInstance_Check(w)) {
+        res = half_richcompare(w, v, _Py_SwappedOp[op]);
+        if (res != Py_NotImplemented)
+            return res;
+        Py_DECREF(res);
+    }
 
-	Py_INCREF(Py_NotImplemented);
-	return Py_NotImplemented;
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
 }
 
 
@@ -2033,42 +2033,42 @@
 static PyObject *
 instance_getiter(PyInstanceObject *self)
 {
-	PyObject *func;
+    PyObject *func;
 
-	if (iterstr == NULL) {
-		iterstr = PyString_InternFromString("__iter__");
-		if (iterstr == NULL)
-			return NULL;
-	}
-	if (getitemstr == NULL) {
-		getitemstr = PyString_InternFromString("__getitem__");
-		if (getitemstr == NULL)
-			return NULL;
-	}
+    if (iterstr == NULL) {
+        iterstr = PyString_InternFromString("__iter__");
+        if (iterstr == NULL)
+            return NULL;
+    }
+    if (getitemstr == NULL) {
+        getitemstr = PyString_InternFromString("__getitem__");
+        if (getitemstr == NULL)
+            return NULL;
+    }
 
-	if ((func = instance_getattr(self, iterstr)) != NULL) {
-		PyObject *res = PyEval_CallObject(func, (PyObject *)NULL);
-		Py_DECREF(func);
-		if (res != NULL && !PyIter_Check(res)) {
-			PyErr_Format(PyExc_TypeError,
-				     "__iter__ returned non-iterator "
-				     "of type '%.100s'",
-				     res->ob_type->tp_name);
-			Py_DECREF(res);
-			res = NULL;
-		}
-		return res;
-	}
-	if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-		return NULL;
-	PyErr_Clear();
-	if ((func = instance_getattr(self, getitemstr)) == NULL) {
-		PyErr_SetString(PyExc_TypeError,
-				"iteration over non-sequence");
-		return NULL;
-	}
-	Py_DECREF(func);
-	return PySeqIter_New((PyObject *)self);
+    if ((func = instance_getattr(self, iterstr)) != NULL) {
+        PyObject *res = PyEval_CallObject(func, (PyObject *)NULL);
+        Py_DECREF(func);
+        if (res != NULL && !PyIter_Check(res)) {
+            PyErr_Format(PyExc_TypeError,
+                         "__iter__ returned non-iterator "
+                         "of type '%.100s'",
+                         res->ob_type->tp_name);
+            Py_DECREF(res);
+            res = NULL;
+        }
+        return res;
+    }
+    if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+        return NULL;
+    PyErr_Clear();
+    if ((func = instance_getattr(self, getitemstr)) == NULL) {
+        PyErr_SetString(PyExc_TypeError,
+                        "iteration over non-sequence");
+        return NULL;
+    }
+    Py_DECREF(func);
+    return PySeqIter_New((PyObject *)self);
 }
 
 
@@ -2076,146 +2076,146 @@
 static PyObject *
 instance_iternext(PyInstanceObject *self)
 {
-	PyObject *func;
+    PyObject *func;
 
-	if (nextstr == NULL) {
-		nextstr = PyString_InternFromString("next");
-		if (nextstr == NULL)
-			return NULL;
-	}
+    if (nextstr == NULL) {
+        nextstr = PyString_InternFromString("next");
+        if (nextstr == NULL)
+            return NULL;
+    }
 
-	if ((func = instance_getattr(self, nextstr)) != NULL) {
-		PyObject *res = PyEval_CallObject(func, (PyObject *)NULL);
-		Py_DECREF(func);
-		if (res != NULL) {
-			return res;
-		}
-		if (PyErr_ExceptionMatches(PyExc_StopIteration)) {
-			PyErr_Clear();
-			return NULL;
-		}
-		return NULL;
-	}
-	PyErr_SetString(PyExc_TypeError, "instance has no next() method");
-	return NULL;
+    if ((func = instance_getattr(self, nextstr)) != NULL) {
+        PyObject *res = PyEval_CallObject(func, (PyObject *)NULL);
+        Py_DECREF(func);
+        if (res != NULL) {
+            return res;
+        }
+        if (PyErr_ExceptionMatches(PyExc_StopIteration)) {
+            PyErr_Clear();
+            return NULL;
+        }
+        return NULL;
+    }
+    PyErr_SetString(PyExc_TypeError, "instance has no next() method");
+    return NULL;
 }
 
 static PyObject *
 instance_call(PyObject *func, PyObject *arg, PyObject *kw)
 {
-	PyObject *res, *call = PyObject_GetAttrString(func, "__call__");
-	if (call == NULL) {
-		PyInstanceObject *inst = (PyInstanceObject*) func;
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return NULL;
-		PyErr_Clear();
-		PyErr_Format(PyExc_AttributeError,
-			     "%.200s instance has no __call__ method",
-			     PyString_AsString(inst->in_class->cl_name));
-		return NULL;
-	}
-	/* We must check and increment the recursion depth here. Scenario:
-	       class A:
-	           pass
-	       A.__call__ = A() # that's right
-	       a = A() # ok
-	       a() # infinite recursion
-	   This bounces between instance_call() and PyObject_Call() without
-	   ever hitting eval_frame() (which has the main recursion check). */
-	if (Py_EnterRecursiveCall(" in __call__")) {
-		res = NULL;
-	}
-	else {
-		res = PyObject_Call(call, arg, kw);
-		Py_LeaveRecursiveCall();
-	}
-	Py_DECREF(call);
-	return res;
+    PyObject *res, *call = PyObject_GetAttrString(func, "__call__");
+    if (call == NULL) {
+        PyInstanceObject *inst = (PyInstanceObject*) func;
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return NULL;
+        PyErr_Clear();
+        PyErr_Format(PyExc_AttributeError,
+                     "%.200s instance has no __call__ method",
+                     PyString_AsString(inst->in_class->cl_name));
+        return NULL;
+    }
+    /* We must check and increment the recursion depth here. Scenario:
+           class A:
+           pass
+           A.__call__ = A() # that's right
+           a = A() # ok
+           a() # infinite recursion
+       This bounces between instance_call() and PyObject_Call() without
+       ever hitting eval_frame() (which has the main recursion check). */
+    if (Py_EnterRecursiveCall(" in __call__")) {
+        res = NULL;
+    }
+    else {
+        res = PyObject_Call(call, arg, kw);
+        Py_LeaveRecursiveCall();
+    }
+    Py_DECREF(call);
+    return res;
 }
 
 
 static PyNumberMethods instance_as_number = {
-	instance_add,			/* nb_add */
-	instance_sub,			/* nb_subtract */
-	instance_mul,			/* nb_multiply */
-	instance_div,			/* nb_divide */
-	instance_mod,			/* nb_remainder */
-	instance_divmod,		/* nb_divmod */
-	instance_pow,			/* nb_power */
-	(unaryfunc)instance_neg,	/* nb_negative */
-	(unaryfunc)instance_pos,	/* nb_positive */
-	(unaryfunc)instance_abs,	/* nb_absolute */
-	(inquiry)instance_nonzero,	/* nb_nonzero */
-	(unaryfunc)instance_invert,	/* nb_invert */
-	instance_lshift,		/* nb_lshift */
-	instance_rshift,		/* nb_rshift */
-	instance_and,			/* nb_and */
-	instance_xor,			/* nb_xor */
-	instance_or,			/* nb_or */
-	instance_coerce,		/* nb_coerce */
-	(unaryfunc)instance_int,	/* nb_int */
-	(unaryfunc)instance_long,	/* nb_long */
-	(unaryfunc)instance_float,	/* nb_float */
-	(unaryfunc)instance_oct,	/* nb_oct */
-	(unaryfunc)instance_hex,	/* nb_hex */
-	instance_iadd,			/* nb_inplace_add */
-	instance_isub,			/* nb_inplace_subtract */
-	instance_imul,			/* nb_inplace_multiply */
-	instance_idiv,			/* nb_inplace_divide */
-	instance_imod,			/* nb_inplace_remainder */
-	instance_ipow,			/* nb_inplace_power */
-	instance_ilshift,		/* nb_inplace_lshift */
-	instance_irshift,		/* nb_inplace_rshift */
-	instance_iand,			/* nb_inplace_and */
-	instance_ixor,			/* nb_inplace_xor */
-	instance_ior,			/* nb_inplace_or */
-	instance_floordiv,		/* nb_floor_divide */
-	instance_truediv,		/* nb_true_divide */
-	instance_ifloordiv,		/* nb_inplace_floor_divide */
-	instance_itruediv,		/* nb_inplace_true_divide */
-	(unaryfunc)instance_index,	/* nb_index */
+    instance_add,                       /* nb_add */
+    instance_sub,                       /* nb_subtract */
+    instance_mul,                       /* nb_multiply */
+    instance_div,                       /* nb_divide */
+    instance_mod,                       /* nb_remainder */
+    instance_divmod,                    /* nb_divmod */
+    instance_pow,                       /* nb_power */
+    (unaryfunc)instance_neg,            /* nb_negative */
+    (unaryfunc)instance_pos,            /* nb_positive */
+    (unaryfunc)instance_abs,            /* nb_absolute */
+    (inquiry)instance_nonzero,          /* nb_nonzero */
+    (unaryfunc)instance_invert,         /* nb_invert */
+    instance_lshift,                    /* nb_lshift */
+    instance_rshift,                    /* nb_rshift */
+    instance_and,                       /* nb_and */
+    instance_xor,                       /* nb_xor */
+    instance_or,                        /* nb_or */
+    instance_coerce,                    /* nb_coerce */
+    (unaryfunc)instance_int,            /* nb_int */
+    (unaryfunc)instance_long,           /* nb_long */
+    (unaryfunc)instance_float,          /* nb_float */
+    (unaryfunc)instance_oct,            /* nb_oct */
+    (unaryfunc)instance_hex,            /* nb_hex */
+    instance_iadd,                      /* nb_inplace_add */
+    instance_isub,                      /* nb_inplace_subtract */
+    instance_imul,                      /* nb_inplace_multiply */
+    instance_idiv,                      /* nb_inplace_divide */
+    instance_imod,                      /* nb_inplace_remainder */
+    instance_ipow,                      /* nb_inplace_power */
+    instance_ilshift,                   /* nb_inplace_lshift */
+    instance_irshift,                   /* nb_inplace_rshift */
+    instance_iand,                      /* nb_inplace_and */
+    instance_ixor,                      /* nb_inplace_xor */
+    instance_ior,                       /* nb_inplace_or */
+    instance_floordiv,                  /* nb_floor_divide */
+    instance_truediv,                   /* nb_true_divide */
+    instance_ifloordiv,                 /* nb_inplace_floor_divide */
+    instance_itruediv,                  /* nb_inplace_true_divide */
+    (unaryfunc)instance_index,          /* nb_index */
 };
 
 PyTypeObject PyInstance_Type = {
-	PyObject_HEAD_INIT(&PyType_Type)
-	0,
-	"instance",
-	sizeof(PyInstanceObject),
-	0,
-	(destructor)instance_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	instance_compare,			/* tp_compare */
-	(reprfunc)instance_repr,		/* tp_repr */
-	&instance_as_number,			/* tp_as_number */
-	&instance_as_sequence,			/* tp_as_sequence */
-	&instance_as_mapping,			/* tp_as_mapping */
-	(hashfunc)instance_hash,		/* tp_hash */
-	instance_call,				/* tp_call */
-	(reprfunc)instance_str,			/* tp_str */
-	(getattrofunc)instance_getattr,		/* tp_getattro */
-	(setattrofunc)instance_setattr,		/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_CHECKTYPES,/*tp_flags*/
-	instance_doc,				/* tp_doc */
-	(traverseproc)instance_traverse,	/* tp_traverse */
-	0,					/* tp_clear */
-	instance_richcompare,			/* tp_richcompare */
- 	offsetof(PyInstanceObject, in_weakreflist), /* tp_weaklistoffset */
-	(getiterfunc)instance_getiter,		/* tp_iter */
-	(iternextfunc)instance_iternext,	/* tp_iternext */
-	0,					/* tp_methods */
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	instance_new,				/* tp_new */
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,
+    "instance",
+    sizeof(PyInstanceObject),
+    0,
+    (destructor)instance_dealloc,               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    instance_compare,                           /* tp_compare */
+    (reprfunc)instance_repr,                    /* tp_repr */
+    &instance_as_number,                        /* tp_as_number */
+    &instance_as_sequence,                      /* tp_as_sequence */
+    &instance_as_mapping,                       /* tp_as_mapping */
+    (hashfunc)instance_hash,                    /* tp_hash */
+    instance_call,                              /* tp_call */
+    (reprfunc)instance_str,                     /* tp_str */
+    (getattrofunc)instance_getattr,             /* tp_getattro */
+    (setattrofunc)instance_setattr,             /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_CHECKTYPES,/*tp_flags*/
+    instance_doc,                               /* tp_doc */
+    (traverseproc)instance_traverse,            /* tp_traverse */
+    0,                                          /* tp_clear */
+    instance_richcompare,                       /* tp_richcompare */
+    offsetof(PyInstanceObject, in_weakreflist), /* tp_weaklistoffset */
+    (getiterfunc)instance_getiter,              /* tp_iter */
+    (iternextfunc)instance_iternext,            /* tp_iternext */
+    0,                                          /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    instance_new,                               /* tp_new */
 };
 
 
@@ -2228,27 +2228,27 @@
 PyObject *
 PyMethod_New(PyObject *func, PyObject *self, PyObject *klass)
 {
-	register PyMethodObject *im;
-	im = free_list;
-	if (im != NULL) {
-		free_list = (PyMethodObject *)(im->im_self);
-		PyObject_INIT(im, &PyMethod_Type);
-		numfree--;
-	}
-	else {
-		im = PyObject_GC_New(PyMethodObject, &PyMethod_Type);
-		if (im == NULL)
-			return NULL;
-	}
-	im->im_weakreflist = NULL;
-	Py_INCREF(func);
-	im->im_func = func;
-	Py_XINCREF(self);
-	im->im_self = self;
-	Py_XINCREF(klass);
-	im->im_class = klass;
-	_PyObject_GC_TRACK(im);
-	return (PyObject *)im;
+    register PyMethodObject *im;
+    im = free_list;
+    if (im != NULL) {
+        free_list = (PyMethodObject *)(im->im_self);
+        PyObject_INIT(im, &PyMethod_Type);
+        numfree--;
+    }
+    else {
+        im = PyObject_GC_New(PyMethodObject, &PyMethod_Type);
+        if (im == NULL)
+            return NULL;
+    }
+    im->im_weakreflist = NULL;
+    Py_INCREF(func);
+    im->im_func = func;
+    Py_XINCREF(self);
+    im->im_self = self;
+    Py_XINCREF(klass);
+    im->im_class = klass;
+    _PyObject_GC_TRACK(im);
+    return (PyObject *)im;
 }
 
 /* Descriptors for PyMethod attributes */
@@ -2258,17 +2258,17 @@
 #define OFF(x) offsetof(PyMethodObject, x)
 
 static PyMemberDef instancemethod_memberlist[] = {
-	{"im_class",	T_OBJECT,	OFF(im_class),	READONLY|RESTRICTED,
-	 "the class associated with a method"},
-	{"im_func",	T_OBJECT,	OFF(im_func),	READONLY|RESTRICTED,
-	 "the function (or other callable) implementing a method"},
-	{"__func__",	T_OBJECT,	OFF(im_func),	READONLY|RESTRICTED,
-	 "the function (or other callable) implementing a method"},
-	{"im_self",	T_OBJECT,	OFF(im_self),	READONLY|RESTRICTED,
-	 "the instance to which a method is bound; None for unbound methods"},
-	{"__self__",	T_OBJECT,	OFF(im_self),	READONLY|RESTRICTED,
-	 "the instance to which a method is bound; None for unbound methods"},
-	{NULL}	/* Sentinel */
+    {"im_class",        T_OBJECT,       OFF(im_class),  READONLY|RESTRICTED,
+     "the class associated with a method"},
+    {"im_func",         T_OBJECT,       OFF(im_func),   READONLY|RESTRICTED,
+     "the function (or other callable) implementing a method"},
+    {"__func__",        T_OBJECT,       OFF(im_func),   READONLY|RESTRICTED,
+     "the function (or other callable) implementing a method"},
+    {"im_self",         T_OBJECT,       OFF(im_self),   READONLY|RESTRICTED,
+     "the instance to which a method is bound; None for unbound methods"},
+    {"__self__",        T_OBJECT,       OFF(im_self),   READONLY|RESTRICTED,
+     "the instance to which a method is bound; None for unbound methods"},
+    {NULL}      /* Sentinel */
 };
 
 /* Christian Tismer argued convincingly that method attributes should
@@ -2279,46 +2279,46 @@
 static PyObject *
 instancemethod_get_doc(PyMethodObject *im, void *context)
 {
-	static PyObject *docstr;
-	if (docstr == NULL) {
-		docstr= PyString_InternFromString("__doc__");
-		if (docstr == NULL)
-			return NULL;
-	}
-	return PyObject_GetAttr(im->im_func, docstr);
+    static PyObject *docstr;
+    if (docstr == NULL) {
+        docstr= PyString_InternFromString("__doc__");
+        if (docstr == NULL)
+            return NULL;
+    }
+    return PyObject_GetAttr(im->im_func, docstr);
 }
 
 static PyGetSetDef instancemethod_getset[] = {
-	{"__doc__", (getter)instancemethod_get_doc, NULL, NULL},
-	{0}
+    {"__doc__", (getter)instancemethod_get_doc, NULL, NULL},
+    {0}
 };
 
 static PyObject *
 instancemethod_getattro(PyObject *obj, PyObject *name)
 {
-	PyMethodObject *im = (PyMethodObject *)obj;
-	PyTypeObject *tp = obj->ob_type;
-	PyObject *descr = NULL;
+    PyMethodObject *im = (PyMethodObject *)obj;
+    PyTypeObject *tp = obj->ob_type;
+    PyObject *descr = NULL;
 
-	if (PyType_HasFeature(tp, Py_TPFLAGS_HAVE_CLASS)) {
-		if (tp->tp_dict == NULL) {
-			if (PyType_Ready(tp) < 0)
-				return NULL;
-		}
-		descr = _PyType_Lookup(tp, name);
-	}
+    if (PyType_HasFeature(tp, Py_TPFLAGS_HAVE_CLASS)) {
+        if (tp->tp_dict == NULL) {
+            if (PyType_Ready(tp) < 0)
+                return NULL;
+        }
+        descr = _PyType_Lookup(tp, name);
+    }
 
-	if (descr != NULL) {
-		descrgetfunc f = TP_DESCR_GET(descr->ob_type);
-		if (f != NULL)
-			return f(descr, obj, (PyObject *)obj->ob_type);
-		else {
-			Py_INCREF(descr);
-			return descr;
-		}
-	}
+    if (descr != NULL) {
+        descrgetfunc f = TP_DESCR_GET(descr->ob_type);
+        if (f != NULL)
+            return f(descr, obj, (PyObject *)obj->ob_type);
+        else {
+            Py_INCREF(descr);
+            return descr;
+        }
+    }
 
-	return PyObject_GetAttr(im->im_func, name);
+    return PyObject_GetAttr(im->im_func, name);
 }
 
 PyDoc_STRVAR(instancemethod_doc,
@@ -2329,323 +2329,323 @@
 static PyObject *
 instancemethod_new(PyTypeObject* type, PyObject* args, PyObject *kw)
 {
-	PyObject *func;
-	PyObject *self;
-	PyObject *classObj = NULL;
+    PyObject *func;
+    PyObject *self;
+    PyObject *classObj = NULL;
 
-	if (!_PyArg_NoKeywords("instancemethod", kw))
-		return NULL;
-	if (!PyArg_UnpackTuple(args, "instancemethod", 2, 3,
-			      &func, &self, &classObj))
-		return NULL;
-	if (!PyCallable_Check(func)) {
-		PyErr_SetString(PyExc_TypeError,
-				"first argument must be callable");
-		return NULL;
-	}
-	if (self == Py_None)
-		self = NULL;
-	if (self == NULL && classObj == NULL) {
-		PyErr_SetString(PyExc_TypeError,
-			"unbound methods must have non-NULL im_class");
-		return NULL;
-	}
+    if (!_PyArg_NoKeywords("instancemethod", kw))
+        return NULL;
+    if (!PyArg_UnpackTuple(args, "instancemethod", 2, 3,
+                          &func, &self, &classObj))
+        return NULL;
+    if (!PyCallable_Check(func)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "first argument must be callable");
+        return NULL;
+    }
+    if (self == Py_None)
+        self = NULL;
+    if (self == NULL && classObj == NULL) {
+        PyErr_SetString(PyExc_TypeError,
+            "unbound methods must have non-NULL im_class");
+        return NULL;
+    }
 
-	return PyMethod_New(func, self, classObj);
+    return PyMethod_New(func, self, classObj);
 }
 
 static void
 instancemethod_dealloc(register PyMethodObject *im)
 {
-	_PyObject_GC_UNTRACK(im);
-	if (im->im_weakreflist != NULL)
-		PyObject_ClearWeakRefs((PyObject *)im);
-	Py_DECREF(im->im_func);
-	Py_XDECREF(im->im_self);
-	Py_XDECREF(im->im_class);
-	if (numfree < PyMethod_MAXFREELIST) {
-		im->im_self = (PyObject *)free_list;
-		free_list = im;
-		numfree++;
-	}
-	else {
-		PyObject_GC_Del(im);
-	}
+    _PyObject_GC_UNTRACK(im);
+    if (im->im_weakreflist != NULL)
+        PyObject_ClearWeakRefs((PyObject *)im);
+    Py_DECREF(im->im_func);
+    Py_XDECREF(im->im_self);
+    Py_XDECREF(im->im_class);
+    if (numfree < PyMethod_MAXFREELIST) {
+        im->im_self = (PyObject *)free_list;
+        free_list = im;
+        numfree++;
+    }
+    else {
+        PyObject_GC_Del(im);
+    }
 }
 
 static int
 instancemethod_compare(PyMethodObject *a, PyMethodObject *b)
 {
-	int cmp;
-	cmp = PyObject_Compare(a->im_func, b->im_func);
-	if (cmp)
-		return cmp;
+    int cmp;
+    cmp = PyObject_Compare(a->im_func, b->im_func);
+    if (cmp)
+        return cmp;
 
-	if (a->im_self == b->im_self)
-		return 0;
-	if (a->im_self == NULL || b->im_self == NULL)
-		return (a->im_self < b->im_self) ? -1 : 1;
-	else
-		return PyObject_Compare(a->im_self, b->im_self);
+    if (a->im_self == b->im_self)
+        return 0;
+    if (a->im_self == NULL || b->im_self == NULL)
+        return (a->im_self < b->im_self) ? -1 : 1;
+    else
+        return PyObject_Compare(a->im_self, b->im_self);
 }
 
 static PyObject *
 instancemethod_repr(PyMethodObject *a)
 {
-	PyObject *self = a->im_self;
-	PyObject *func = a->im_func;
-	PyObject *klass = a->im_class;
-	PyObject *funcname = NULL, *klassname = NULL, *result = NULL;
-	char *sfuncname = "?", *sklassname = "?";
+    PyObject *self = a->im_self;
+    PyObject *func = a->im_func;
+    PyObject *klass = a->im_class;
+    PyObject *funcname = NULL, *klassname = NULL, *result = NULL;
+    char *sfuncname = "?", *sklassname = "?";
 
-	funcname = PyObject_GetAttrString(func, "__name__");
-	if (funcname == NULL) {
-		if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-			return NULL;
-		PyErr_Clear();
-	}
-	else if (!PyString_Check(funcname)) {
-		Py_DECREF(funcname);
-		funcname = NULL;
-	}
-	else
-		sfuncname = PyString_AS_STRING(funcname);
-	if (klass == NULL)
-		klassname = NULL;
-	else {
-		klassname = PyObject_GetAttrString(klass, "__name__");
-		if (klassname == NULL) {
-			if (!PyErr_ExceptionMatches(PyExc_AttributeError))
-				return NULL;
-			PyErr_Clear();
-		}
-		else if (!PyString_Check(klassname)) {
-			Py_DECREF(klassname);
-			klassname = NULL;
-		}
-		else
-			sklassname = PyString_AS_STRING(klassname);
-	}
-	if (self == NULL)
-		result = PyString_FromFormat("<unbound method %s.%s>",
-					     sklassname, sfuncname);
-	else {
-		/* XXX Shouldn't use repr() here! */
-		PyObject *selfrepr = PyObject_Repr(self);
-		if (selfrepr == NULL)
-			goto fail;
-		if (!PyString_Check(selfrepr)) {
-			Py_DECREF(selfrepr);
-			goto fail;
-		}
-		result = PyString_FromFormat("<bound method %s.%s of %s>",
-					     sklassname, sfuncname,
-					     PyString_AS_STRING(selfrepr));
-		Py_DECREF(selfrepr);
-	}
+    funcname = PyObject_GetAttrString(func, "__name__");
+    if (funcname == NULL) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            return NULL;
+        PyErr_Clear();
+    }
+    else if (!PyString_Check(funcname)) {
+        Py_DECREF(funcname);
+        funcname = NULL;
+    }
+    else
+        sfuncname = PyString_AS_STRING(funcname);
+    if (klass == NULL)
+        klassname = NULL;
+    else {
+        klassname = PyObject_GetAttrString(klass, "__name__");
+        if (klassname == NULL) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+                return NULL;
+            PyErr_Clear();
+        }
+        else if (!PyString_Check(klassname)) {
+            Py_DECREF(klassname);
+            klassname = NULL;
+        }
+        else
+            sklassname = PyString_AS_STRING(klassname);
+    }
+    if (self == NULL)
+        result = PyString_FromFormat("<unbound method %s.%s>",
+                                     sklassname, sfuncname);
+    else {
+        /* XXX Shouldn't use repr() here! */
+        PyObject *selfrepr = PyObject_Repr(self);
+        if (selfrepr == NULL)
+            goto fail;
+        if (!PyString_Check(selfrepr)) {
+            Py_DECREF(selfrepr);
+            goto fail;
+        }
+        result = PyString_FromFormat("<bound method %s.%s of %s>",
+                                     sklassname, sfuncname,
+                                     PyString_AS_STRING(selfrepr));
+        Py_DECREF(selfrepr);
+    }
   fail:
-	Py_XDECREF(funcname);
-	Py_XDECREF(klassname);
-	return result;
+    Py_XDECREF(funcname);
+    Py_XDECREF(klassname);
+    return result;
 }
 
 static long
 instancemethod_hash(PyMethodObject *a)
 {
-	long x, y;
-	if (a->im_self == NULL)
-		x = PyObject_Hash(Py_None);
-	else
-		x = PyObject_Hash(a->im_self);
-	if (x == -1)
-		return -1;
-	y = PyObject_Hash(a->im_func);
-	if (y == -1)
-		return -1;
-	x = x ^ y;
-	if (x == -1)
-		x = -2;
-	return x;
+    long x, y;
+    if (a->im_self == NULL)
+        x = PyObject_Hash(Py_None);
+    else
+        x = PyObject_Hash(a->im_self);
+    if (x == -1)
+        return -1;
+    y = PyObject_Hash(a->im_func);
+    if (y == -1)
+        return -1;
+    x = x ^ y;
+    if (x == -1)
+        x = -2;
+    return x;
 }
 
 static int
 instancemethod_traverse(PyMethodObject *im, visitproc visit, void *arg)
 {
-	Py_VISIT(im->im_func);
-	Py_VISIT(im->im_self);
-	Py_VISIT(im->im_class);
-	return 0;
+    Py_VISIT(im->im_func);
+    Py_VISIT(im->im_self);
+    Py_VISIT(im->im_class);
+    return 0;
 }
 
 static void
 getclassname(PyObject *klass, char *buf, int bufsize)
 {
-	PyObject *name;
+    PyObject *name;
 
-	assert(bufsize > 1);
-	strcpy(buf, "?"); /* Default outcome */
-	if (klass == NULL)
-		return;
-	name = PyObject_GetAttrString(klass, "__name__");
-	if (name == NULL) {
-		/* This function cannot return an exception */
-		PyErr_Clear();
-		return;
-	}
-	if (PyString_Check(name)) {
-		strncpy(buf, PyString_AS_STRING(name), bufsize);
-		buf[bufsize-1] = '\0';
-	}
-	Py_DECREF(name);
+    assert(bufsize > 1);
+    strcpy(buf, "?"); /* Default outcome */
+    if (klass == NULL)
+        return;
+    name = PyObject_GetAttrString(klass, "__name__");
+    if (name == NULL) {
+        /* This function cannot return an exception */
+        PyErr_Clear();
+        return;
+    }
+    if (PyString_Check(name)) {
+        strncpy(buf, PyString_AS_STRING(name), bufsize);
+        buf[bufsize-1] = '\0';
+    }
+    Py_DECREF(name);
 }
 
 static void
 getinstclassname(PyObject *inst, char *buf, int bufsize)
 {
-	PyObject *klass;
+    PyObject *klass;
 
-	if (inst == NULL) {
-		assert(bufsize > 0 && (size_t)bufsize > strlen("nothing"));
-		strcpy(buf, "nothing");
-		return;
-	}
+    if (inst == NULL) {
+        assert(bufsize > 0 && (size_t)bufsize > strlen("nothing"));
+        strcpy(buf, "nothing");
+        return;
+    }
 
-	klass = PyObject_GetAttrString(inst, "__class__");
-	if (klass == NULL) {
-		/* This function cannot return an exception */
-		PyErr_Clear();
-		klass = (PyObject *)(inst->ob_type);
-		Py_INCREF(klass);
-	}
-	getclassname(klass, buf, bufsize);
-	Py_XDECREF(klass);
+    klass = PyObject_GetAttrString(inst, "__class__");
+    if (klass == NULL) {
+        /* This function cannot return an exception */
+        PyErr_Clear();
+        klass = (PyObject *)(inst->ob_type);
+        Py_INCREF(klass);
+    }
+    getclassname(klass, buf, bufsize);
+    Py_XDECREF(klass);
 }
 
 static PyObject *
 instancemethod_call(PyObject *func, PyObject *arg, PyObject *kw)
 {
-	PyObject *self = PyMethod_GET_SELF(func);
-	PyObject *klass = PyMethod_GET_CLASS(func);
-	PyObject *result;
+    PyObject *self = PyMethod_GET_SELF(func);
+    PyObject *klass = PyMethod_GET_CLASS(func);
+    PyObject *result;
 
-	func = PyMethod_GET_FUNCTION(func);
-	if (self == NULL) {
-		/* Unbound methods must be called with an instance of
-		   the class (or a derived class) as first argument */
-		int ok;
-		if (PyTuple_Size(arg) >= 1)
-			self = PyTuple_GET_ITEM(arg, 0);
-		if (self == NULL)
-			ok = 0;
-		else {
-			ok = PyObject_IsInstance(self, klass);
-			if (ok < 0)
-				return NULL;
-		}
-		if (!ok) {
-			char clsbuf[256];
-			char instbuf[256];
-			getclassname(klass, clsbuf, sizeof(clsbuf));
-			getinstclassname(self, instbuf, sizeof(instbuf));
-			PyErr_Format(PyExc_TypeError,
-				     "unbound method %s%s must be called with "
-				     "%s instance as first argument "
-				     "(got %s%s instead)",
-				     PyEval_GetFuncName(func),
-				     PyEval_GetFuncDesc(func),
-				     clsbuf,
-				     instbuf,
-				     self == NULL ? "" : " instance");
-			return NULL;
-		}
-		Py_INCREF(arg);
-	}
-	else {
-		Py_ssize_t argcount = PyTuple_Size(arg);
-		PyObject *newarg = PyTuple_New(argcount + 1);
-		int i;
-		if (newarg == NULL)
-			return NULL;
-		Py_INCREF(self);
-		PyTuple_SET_ITEM(newarg, 0, self);
-		for (i = 0; i < argcount; i++) {
-			PyObject *v = PyTuple_GET_ITEM(arg, i);
-			Py_XINCREF(v);
-			PyTuple_SET_ITEM(newarg, i+1, v);
-		}
-		arg = newarg;
-	}
-	result = PyObject_Call((PyObject *)func, arg, kw);
-	Py_DECREF(arg);
-	return result;
+    func = PyMethod_GET_FUNCTION(func);
+    if (self == NULL) {
+        /* Unbound methods must be called with an instance of
+           the class (or a derived class) as first argument */
+        int ok;
+        if (PyTuple_Size(arg) >= 1)
+            self = PyTuple_GET_ITEM(arg, 0);
+        if (self == NULL)
+            ok = 0;
+        else {
+            ok = PyObject_IsInstance(self, klass);
+            if (ok < 0)
+                return NULL;
+        }
+        if (!ok) {
+            char clsbuf[256];
+            char instbuf[256];
+            getclassname(klass, clsbuf, sizeof(clsbuf));
+            getinstclassname(self, instbuf, sizeof(instbuf));
+            PyErr_Format(PyExc_TypeError,
+                         "unbound method %s%s must be called with "
+                         "%s instance as first argument "
+                         "(got %s%s instead)",
+                         PyEval_GetFuncName(func),
+                         PyEval_GetFuncDesc(func),
+                         clsbuf,
+                         instbuf,
+                         self == NULL ? "" : " instance");
+            return NULL;
+        }
+        Py_INCREF(arg);
+    }
+    else {
+        Py_ssize_t argcount = PyTuple_Size(arg);
+        PyObject *newarg = PyTuple_New(argcount + 1);
+        int i;
+        if (newarg == NULL)
+            return NULL;
+        Py_INCREF(self);
+        PyTuple_SET_ITEM(newarg, 0, self);
+        for (i = 0; i < argcount; i++) {
+            PyObject *v = PyTuple_GET_ITEM(arg, i);
+            Py_XINCREF(v);
+            PyTuple_SET_ITEM(newarg, i+1, v);
+        }
+        arg = newarg;
+    }
+    result = PyObject_Call((PyObject *)func, arg, kw);
+    Py_DECREF(arg);
+    return result;
 }
 
 static PyObject *
 instancemethod_descr_get(PyObject *meth, PyObject *obj, PyObject *cls)
 {
-	/* Don't rebind an already bound method, or an unbound method
-	   of a class that's not a base class of cls. */
+    /* Don't rebind an already bound method, or an unbound method
+       of a class that's not a base class of cls. */
 
-	if (PyMethod_GET_SELF(meth) != NULL) {
-		/* Already bound */
-		Py_INCREF(meth);
-		return meth;
-	}
-	/* No, it is an unbound method */
-	if (PyMethod_GET_CLASS(meth) != NULL && cls != NULL) {
-		/* Do subclass test.  If it fails, return meth unchanged. */
-		int ok = PyObject_IsSubclass(cls, PyMethod_GET_CLASS(meth));
-		if (ok < 0)
-			return NULL;
-		if (!ok) {
-			Py_INCREF(meth);
-			return meth;
-		}
-	}
-	/* Bind it to obj */
-	return PyMethod_New(PyMethod_GET_FUNCTION(meth), obj, cls);
+    if (PyMethod_GET_SELF(meth) != NULL) {
+        /* Already bound */
+        Py_INCREF(meth);
+        return meth;
+    }
+    /* No, it is an unbound method */
+    if (PyMethod_GET_CLASS(meth) != NULL && cls != NULL) {
+        /* Do subclass test.  If it fails, return meth unchanged. */
+        int ok = PyObject_IsSubclass(cls, PyMethod_GET_CLASS(meth));
+        if (ok < 0)
+            return NULL;
+        if (!ok) {
+            Py_INCREF(meth);
+            return meth;
+        }
+    }
+    /* Bind it to obj */
+    return PyMethod_New(PyMethod_GET_FUNCTION(meth), obj, cls);
 }
 
 PyTypeObject PyMethod_Type = {
-	PyObject_HEAD_INIT(&PyType_Type)
-	0,
-	"instancemethod",
-	sizeof(PyMethodObject),
-	0,
-	(destructor)instancemethod_dealloc,	/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)instancemethod_compare,	/* tp_compare */
-	(reprfunc)instancemethod_repr,		/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	(hashfunc)instancemethod_hash,		/* tp_hash */
-	instancemethod_call,			/* tp_call */
-	0,					/* tp_str */
-	instancemethod_getattro,		/* tp_getattro */
-	PyObject_GenericSetAttr,		/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC  | Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
-	instancemethod_doc,			/* tp_doc */
-	(traverseproc)instancemethod_traverse,	/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
- 	offsetof(PyMethodObject, im_weakreflist), /* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	instancemethod_memberlist,		/* tp_members */
-	instancemethod_getset,			/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	instancemethod_descr_get,		/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	instancemethod_new,			/* tp_new */
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,
+    "instancemethod",
+    sizeof(PyMethodObject),
+    0,
+    (destructor)instancemethod_dealloc,         /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)instancemethod_compare,            /* tp_compare */
+    (reprfunc)instancemethod_repr,              /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)instancemethod_hash,              /* tp_hash */
+    instancemethod_call,                        /* tp_call */
+    0,                                          /* tp_str */
+    instancemethod_getattro,                    /* tp_getattro */
+    PyObject_GenericSetAttr,                    /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC  | Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
+    instancemethod_doc,                         /* tp_doc */
+    (traverseproc)instancemethod_traverse,      /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    offsetof(PyMethodObject, im_weakreflist), /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    instancemethod_memberlist,                  /* tp_members */
+    instancemethod_getset,                      /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    instancemethod_descr_get,                   /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    instancemethod_new,                         /* tp_new */
 };
 
 /* Clear out the free list */
@@ -2653,20 +2653,20 @@
 int
 PyMethod_ClearFreeList(void)
 {
-	int freelist_size = numfree;
-	
-	while (free_list) {
-		PyMethodObject *im = free_list;
-		free_list = (PyMethodObject *)(im->im_self);
-		PyObject_GC_Del(im);
-		numfree--;
-	}
-	assert(numfree == 0);
-	return freelist_size;
+    int freelist_size = numfree;
+
+    while (free_list) {
+        PyMethodObject *im = free_list;
+        free_list = (PyMethodObject *)(im->im_self);
+        PyObject_GC_Del(im);
+        numfree--;
+    }
+    assert(numfree == 0);
+    return freelist_size;
 }
 
 void
 PyMethod_Fini(void)
 {
-	(void)PyMethod_ClearFreeList();
+    (void)PyMethod_ClearFreeList();
 }
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 340cef0..9879df5 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -3,176 +3,176 @@
 #include "structmember.h"
 
 #define NAME_CHARS \
-	"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"
+    "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"
 
 /* all_name_chars(s): true iff all chars in s are valid NAME_CHARS */
 
 static int
 all_name_chars(unsigned char *s)
 {
-	static char ok_name_char[256];
-	static unsigned char *name_chars = (unsigned char *)NAME_CHARS;
+    static char ok_name_char[256];
+    static unsigned char *name_chars = (unsigned char *)NAME_CHARS;
 
-	if (ok_name_char[*name_chars] == 0) {
-		unsigned char *p;
-		for (p = name_chars; *p; p++)
-			ok_name_char[*p] = 1;
-	}
-	while (*s) {
-		if (ok_name_char[*s++] == 0)
-			return 0;
-	}
-	return 1;
+    if (ok_name_char[*name_chars] == 0) {
+        unsigned char *p;
+        for (p = name_chars; *p; p++)
+            ok_name_char[*p] = 1;
+    }
+    while (*s) {
+        if (ok_name_char[*s++] == 0)
+            return 0;
+    }
+    return 1;
 }
 
 static void
 intern_strings(PyObject *tuple)
 {
-	Py_ssize_t i;
+    Py_ssize_t i;
 
-	for (i = PyTuple_GET_SIZE(tuple); --i >= 0; ) {
-		PyObject *v = PyTuple_GET_ITEM(tuple, i);
-		if (v == NULL || !PyString_CheckExact(v)) {
-			Py_FatalError("non-string found in code slot");
-		}
-		PyString_InternInPlace(&PyTuple_GET_ITEM(tuple, i));
-	}
+    for (i = PyTuple_GET_SIZE(tuple); --i >= 0; ) {
+        PyObject *v = PyTuple_GET_ITEM(tuple, i);
+        if (v == NULL || !PyString_CheckExact(v)) {
+            Py_FatalError("non-string found in code slot");
+        }
+        PyString_InternInPlace(&PyTuple_GET_ITEM(tuple, i));
+    }
 }
 
 
 PyCodeObject *
 PyCode_New(int argcount, int nlocals, int stacksize, int flags,
-	   PyObject *code, PyObject *consts, PyObject *names,
-	   PyObject *varnames, PyObject *freevars, PyObject *cellvars,
-	   PyObject *filename, PyObject *name, int firstlineno,
-	   PyObject *lnotab)
+           PyObject *code, PyObject *consts, PyObject *names,
+           PyObject *varnames, PyObject *freevars, PyObject *cellvars,
+           PyObject *filename, PyObject *name, int firstlineno,
+           PyObject *lnotab)
 {
-	PyCodeObject *co;
-	Py_ssize_t i;
-	/* Check argument types */
-	if (argcount < 0 || nlocals < 0 ||
-	    code == NULL ||
-	    consts == NULL || !PyTuple_Check(consts) ||
-	    names == NULL || !PyTuple_Check(names) ||
-	    varnames == NULL || !PyTuple_Check(varnames) ||
-	    freevars == NULL || !PyTuple_Check(freevars) ||
-	    cellvars == NULL || !PyTuple_Check(cellvars) ||
-	    name == NULL || !PyString_Check(name) ||
-	    filename == NULL || !PyString_Check(filename) ||
-	    lnotab == NULL || !PyString_Check(lnotab) ||
-	    !PyObject_CheckReadBuffer(code)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	intern_strings(names);
-	intern_strings(varnames);
-	intern_strings(freevars);
-	intern_strings(cellvars);
-	/* Intern selected string constants */
-	for (i = PyTuple_Size(consts); --i >= 0; ) {
-		PyObject *v = PyTuple_GetItem(consts, i);
-		if (!PyString_Check(v))
-			continue;
-		if (!all_name_chars((unsigned char *)PyString_AS_STRING(v)))
-			continue;
-		PyString_InternInPlace(&PyTuple_GET_ITEM(consts, i));
-	}
-	co = PyObject_NEW(PyCodeObject, &PyCode_Type);
-	if (co != NULL) {
-		co->co_argcount = argcount;
-		co->co_nlocals = nlocals;
-		co->co_stacksize = stacksize;
-		co->co_flags = flags;
-		Py_INCREF(code);
-		co->co_code = code;
-		Py_INCREF(consts);
-		co->co_consts = consts;
-		Py_INCREF(names);
-		co->co_names = names;
-		Py_INCREF(varnames);
-		co->co_varnames = varnames;
-		Py_INCREF(freevars);
-		co->co_freevars = freevars;
-		Py_INCREF(cellvars);
-		co->co_cellvars = cellvars;
-		Py_INCREF(filename);
-		co->co_filename = filename;
-		Py_INCREF(name);
-		co->co_name = name;
-		co->co_firstlineno = firstlineno;
-		Py_INCREF(lnotab);
-		co->co_lnotab = lnotab;
-                co->co_zombieframe = NULL;
-		co->co_weakreflist = NULL;
-	}
-	return co;
+    PyCodeObject *co;
+    Py_ssize_t i;
+    /* Check argument types */
+    if (argcount < 0 || nlocals < 0 ||
+        code == NULL ||
+        consts == NULL || !PyTuple_Check(consts) ||
+        names == NULL || !PyTuple_Check(names) ||
+        varnames == NULL || !PyTuple_Check(varnames) ||
+        freevars == NULL || !PyTuple_Check(freevars) ||
+        cellvars == NULL || !PyTuple_Check(cellvars) ||
+        name == NULL || !PyString_Check(name) ||
+        filename == NULL || !PyString_Check(filename) ||
+        lnotab == NULL || !PyString_Check(lnotab) ||
+        !PyObject_CheckReadBuffer(code)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    intern_strings(names);
+    intern_strings(varnames);
+    intern_strings(freevars);
+    intern_strings(cellvars);
+    /* Intern selected string constants */
+    for (i = PyTuple_Size(consts); --i >= 0; ) {
+        PyObject *v = PyTuple_GetItem(consts, i);
+        if (!PyString_Check(v))
+            continue;
+        if (!all_name_chars((unsigned char *)PyString_AS_STRING(v)))
+            continue;
+        PyString_InternInPlace(&PyTuple_GET_ITEM(consts, i));
+    }
+    co = PyObject_NEW(PyCodeObject, &PyCode_Type);
+    if (co != NULL) {
+        co->co_argcount = argcount;
+        co->co_nlocals = nlocals;
+        co->co_stacksize = stacksize;
+        co->co_flags = flags;
+        Py_INCREF(code);
+        co->co_code = code;
+        Py_INCREF(consts);
+        co->co_consts = consts;
+        Py_INCREF(names);
+        co->co_names = names;
+        Py_INCREF(varnames);
+        co->co_varnames = varnames;
+        Py_INCREF(freevars);
+        co->co_freevars = freevars;
+        Py_INCREF(cellvars);
+        co->co_cellvars = cellvars;
+        Py_INCREF(filename);
+        co->co_filename = filename;
+        Py_INCREF(name);
+        co->co_name = name;
+        co->co_firstlineno = firstlineno;
+        Py_INCREF(lnotab);
+        co->co_lnotab = lnotab;
+        co->co_zombieframe = NULL;
+        co->co_weakreflist = NULL;
+    }
+    return co;
 }
 
 PyCodeObject *
 PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
 {
-	static PyObject *emptystring = NULL;
-	static PyObject *nulltuple = NULL;
-	PyObject *filename_ob = NULL;
-	PyObject *funcname_ob = NULL;
-	PyCodeObject *result = NULL;
-	if (emptystring == NULL) {
-		emptystring = PyString_FromString("");
-		if (emptystring == NULL)
-			goto failed;
-	}
-	if (nulltuple == NULL) {
-		nulltuple = PyTuple_New(0);
-		if (nulltuple == NULL)
-			goto failed;
-	}
-	funcname_ob = PyString_FromString(funcname);
-	if (funcname_ob == NULL)
-		goto failed;
-	filename_ob = PyString_FromString(filename);
-	if (filename_ob == NULL)
-		goto failed;
+    static PyObject *emptystring = NULL;
+    static PyObject *nulltuple = NULL;
+    PyObject *filename_ob = NULL;
+    PyObject *funcname_ob = NULL;
+    PyCodeObject *result = NULL;
+    if (emptystring == NULL) {
+        emptystring = PyString_FromString("");
+        if (emptystring == NULL)
+            goto failed;
+    }
+    if (nulltuple == NULL) {
+        nulltuple = PyTuple_New(0);
+        if (nulltuple == NULL)
+            goto failed;
+    }
+    funcname_ob = PyString_FromString(funcname);
+    if (funcname_ob == NULL)
+        goto failed;
+    filename_ob = PyString_FromString(filename);
+    if (filename_ob == NULL)
+        goto failed;
 
-	result = PyCode_New(0,			/* argcount */
-			    0,			/* nlocals */
-			    0,			/* stacksize */
-			    0,			/* flags */
-			    emptystring,	/* code */
-			    nulltuple,		/* consts */
-			    nulltuple,		/* names */
-			    nulltuple,		/* varnames */
-			    nulltuple,		/* freevars */
-			    nulltuple,		/* cellvars */
-			    filename_ob,	/* filename */
-			    funcname_ob,	/* name */
-			    firstlineno,	/* firstlineno */
-			    emptystring		/* lnotab */
-			    );
+    result = PyCode_New(0,                      /* argcount */
+                0,                              /* nlocals */
+                0,                              /* stacksize */
+                0,                              /* flags */
+                emptystring,                    /* code */
+                nulltuple,                      /* consts */
+                nulltuple,                      /* names */
+                nulltuple,                      /* varnames */
+                nulltuple,                      /* freevars */
+                nulltuple,                      /* cellvars */
+                filename_ob,                    /* filename */
+                funcname_ob,                    /* name */
+                firstlineno,                    /* firstlineno */
+                emptystring                     /* lnotab */
+                );
 
 failed:
-	Py_XDECREF(funcname_ob);
-	Py_XDECREF(filename_ob);
-	return result;
+    Py_XDECREF(funcname_ob);
+    Py_XDECREF(filename_ob);
+    return result;
 }
 
 #define OFF(x) offsetof(PyCodeObject, x)
 
 static PyMemberDef code_memberlist[] = {
-	{"co_argcount",	T_INT,		OFF(co_argcount),	READONLY},
-	{"co_nlocals",	T_INT,		OFF(co_nlocals),	READONLY},
-	{"co_stacksize",T_INT,		OFF(co_stacksize),	READONLY},
-	{"co_flags",	T_INT,		OFF(co_flags),		READONLY},
-	{"co_code",	T_OBJECT,	OFF(co_code),		READONLY},
-	{"co_consts",	T_OBJECT,	OFF(co_consts),		READONLY},
-	{"co_names",	T_OBJECT,	OFF(co_names),		READONLY},
-	{"co_varnames",	T_OBJECT,	OFF(co_varnames),	READONLY},
-	{"co_freevars",	T_OBJECT,	OFF(co_freevars),	READONLY},
-	{"co_cellvars",	T_OBJECT,	OFF(co_cellvars),	READONLY},
-	{"co_filename",	T_OBJECT,	OFF(co_filename),	READONLY},
-	{"co_name",	T_OBJECT,	OFF(co_name),		READONLY},
-	{"co_firstlineno", T_INT,	OFF(co_firstlineno),	READONLY},
-	{"co_lnotab",	T_OBJECT,	OFF(co_lnotab),		READONLY},
-	{NULL}	/* Sentinel */
+    {"co_argcount",     T_INT,          OFF(co_argcount),       READONLY},
+    {"co_nlocals",      T_INT,          OFF(co_nlocals),        READONLY},
+    {"co_stacksize",T_INT,              OFF(co_stacksize),      READONLY},
+    {"co_flags",        T_INT,          OFF(co_flags),          READONLY},
+    {"co_code",         T_OBJECT,       OFF(co_code),           READONLY},
+    {"co_consts",       T_OBJECT,       OFF(co_consts),         READONLY},
+    {"co_names",        T_OBJECT,       OFF(co_names),          READONLY},
+    {"co_varnames",     T_OBJECT,       OFF(co_varnames),       READONLY},
+    {"co_freevars",     T_OBJECT,       OFF(co_freevars),       READONLY},
+    {"co_cellvars",     T_OBJECT,       OFF(co_cellvars),       READONLY},
+    {"co_filename",     T_OBJECT,       OFF(co_filename),       READONLY},
+    {"co_name",         T_OBJECT,       OFF(co_name),           READONLY},
+    {"co_firstlineno", T_INT,           OFF(co_firstlineno),    READONLY},
+    {"co_lnotab",       T_OBJECT,       OFF(co_lnotab),         READONLY},
+    {NULL}      /* Sentinel */
 };
 
 /* Helper for code_new: return a shallow copy of a tuple that is
@@ -181,42 +181,42 @@
 static PyObject*
 validate_and_copy_tuple(PyObject *tup)
 {
-	PyObject *newtuple;
-	PyObject *item;
-	Py_ssize_t i, len;
+    PyObject *newtuple;
+    PyObject *item;
+    Py_ssize_t i, len;
 
-	len = PyTuple_GET_SIZE(tup);
-	newtuple = PyTuple_New(len);
-	if (newtuple == NULL)
-		return NULL;
+    len = PyTuple_GET_SIZE(tup);
+    newtuple = PyTuple_New(len);
+    if (newtuple == NULL)
+        return NULL;
 
-	for (i = 0; i < len; i++) {
-		item = PyTuple_GET_ITEM(tup, i);
-		if (PyString_CheckExact(item)) {
-			Py_INCREF(item);
-		}
-		else if (!PyString_Check(item)) {
-			PyErr_Format(
-				PyExc_TypeError,
-				"name tuples must contain only "
-				"strings, not '%.500s'",
-				item->ob_type->tp_name);
-			Py_DECREF(newtuple);
-			return NULL;
-		}
-		else {
-			item = PyString_FromStringAndSize(
-				PyString_AS_STRING(item),
-				PyString_GET_SIZE(item));
-			if (item == NULL) {
-				Py_DECREF(newtuple);
-				return NULL;
-			}
-		}
-		PyTuple_SET_ITEM(newtuple, i, item);
-	}
+    for (i = 0; i < len; i++) {
+        item = PyTuple_GET_ITEM(tup, i);
+        if (PyString_CheckExact(item)) {
+            Py_INCREF(item);
+        }
+        else if (!PyString_Check(item)) {
+            PyErr_Format(
+                PyExc_TypeError,
+                "name tuples must contain only "
+                "strings, not '%.500s'",
+                item->ob_type->tp_name);
+            Py_DECREF(newtuple);
+            return NULL;
+        }
+        else {
+            item = PyString_FromStringAndSize(
+                PyString_AS_STRING(item),
+                PyString_GET_SIZE(item));
+            if (item == NULL) {
+                Py_DECREF(newtuple);
+                return NULL;
+            }
+        }
+        PyTuple_SET_ITEM(newtuple, i, item);
+    }
 
-	return newtuple;
+    return newtuple;
 }
 
 PyDoc_STRVAR(code_doc,
@@ -228,286 +228,286 @@
 static PyObject *
 code_new(PyTypeObject *type, PyObject *args, PyObject *kw)
 {
-	int argcount;
-	int nlocals;
-	int stacksize;
-	int flags;
-	PyObject *co = NULL;
-	PyObject *code;
-	PyObject *consts;
-	PyObject *names, *ournames = NULL;
-	PyObject *varnames, *ourvarnames = NULL;
-	PyObject *freevars = NULL, *ourfreevars = NULL;
-	PyObject *cellvars = NULL, *ourcellvars = NULL;
-	PyObject *filename;
-	PyObject *name;
-	int firstlineno;
-	PyObject *lnotab;
+    int argcount;
+    int nlocals;
+    int stacksize;
+    int flags;
+    PyObject *co = NULL;
+    PyObject *code;
+    PyObject *consts;
+    PyObject *names, *ournames = NULL;
+    PyObject *varnames, *ourvarnames = NULL;
+    PyObject *freevars = NULL, *ourfreevars = NULL;
+    PyObject *cellvars = NULL, *ourcellvars = NULL;
+    PyObject *filename;
+    PyObject *name;
+    int firstlineno;
+    PyObject *lnotab;
 
-	if (!PyArg_ParseTuple(args, "iiiiSO!O!O!SSiS|O!O!:code",
-			      &argcount, &nlocals, &stacksize, &flags,
-			      &code,
-			      &PyTuple_Type, &consts,
-			      &PyTuple_Type, &names,
-			      &PyTuple_Type, &varnames,
-			      &filename, &name,
-			      &firstlineno, &lnotab,
-			      &PyTuple_Type, &freevars,
-			      &PyTuple_Type, &cellvars))
-		return NULL;
+    if (!PyArg_ParseTuple(args, "iiiiSO!O!O!SSiS|O!O!:code",
+                          &argcount, &nlocals, &stacksize, &flags,
+                          &code,
+                          &PyTuple_Type, &consts,
+                          &PyTuple_Type, &names,
+                          &PyTuple_Type, &varnames,
+                          &filename, &name,
+                          &firstlineno, &lnotab,
+                          &PyTuple_Type, &freevars,
+                          &PyTuple_Type, &cellvars))
+        return NULL;
 
-	if (argcount < 0) {
-		PyErr_SetString(
-			PyExc_ValueError,
-			"code: argcount must not be negative");
-		goto cleanup;
-	}
+    if (argcount < 0) {
+        PyErr_SetString(
+            PyExc_ValueError,
+            "code: argcount must not be negative");
+        goto cleanup;
+    }
 
-	if (nlocals < 0) {
-		PyErr_SetString(
-			PyExc_ValueError,
-			"code: nlocals must not be negative");
-		goto cleanup;
-	}
+    if (nlocals < 0) {
+        PyErr_SetString(
+            PyExc_ValueError,
+            "code: nlocals must not be negative");
+        goto cleanup;
+    }
 
-	ournames = validate_and_copy_tuple(names);
-	if (ournames == NULL)
-		goto cleanup;
-	ourvarnames = validate_and_copy_tuple(varnames);
-	if (ourvarnames == NULL)
-		goto cleanup;
-	if (freevars)
-		ourfreevars = validate_and_copy_tuple(freevars);
-	else
-		ourfreevars = PyTuple_New(0);
-	if (ourfreevars == NULL)
-		goto cleanup;
-	if (cellvars)
-		ourcellvars = validate_and_copy_tuple(cellvars);
-	else
-		ourcellvars = PyTuple_New(0);
-	if (ourcellvars == NULL)
-		goto cleanup;
+    ournames = validate_and_copy_tuple(names);
+    if (ournames == NULL)
+        goto cleanup;
+    ourvarnames = validate_and_copy_tuple(varnames);
+    if (ourvarnames == NULL)
+        goto cleanup;
+    if (freevars)
+        ourfreevars = validate_and_copy_tuple(freevars);
+    else
+        ourfreevars = PyTuple_New(0);
+    if (ourfreevars == NULL)
+        goto cleanup;
+    if (cellvars)
+        ourcellvars = validate_and_copy_tuple(cellvars);
+    else
+        ourcellvars = PyTuple_New(0);
+    if (ourcellvars == NULL)
+        goto cleanup;
 
-	co = (PyObject *)PyCode_New(argcount, nlocals, stacksize, flags,
-				    code, consts, ournames, ourvarnames,
-				    ourfreevars, ourcellvars, filename,
-				    name, firstlineno, lnotab);
+    co = (PyObject *)PyCode_New(argcount, nlocals, stacksize, flags,
+                                code, consts, ournames, ourvarnames,
+                                ourfreevars, ourcellvars, filename,
+                                name, firstlineno, lnotab);
   cleanup:
-	Py_XDECREF(ournames);
-	Py_XDECREF(ourvarnames);
-	Py_XDECREF(ourfreevars);
-	Py_XDECREF(ourcellvars);
-	return co;
+    Py_XDECREF(ournames);
+    Py_XDECREF(ourvarnames);
+    Py_XDECREF(ourfreevars);
+    Py_XDECREF(ourcellvars);
+    return co;
 }
 
 static void
 code_dealloc(PyCodeObject *co)
 {
-	Py_XDECREF(co->co_code);
-	Py_XDECREF(co->co_consts);
-	Py_XDECREF(co->co_names);
-	Py_XDECREF(co->co_varnames);
-	Py_XDECREF(co->co_freevars);
-	Py_XDECREF(co->co_cellvars);
-	Py_XDECREF(co->co_filename);
-	Py_XDECREF(co->co_name);
-	Py_XDECREF(co->co_lnotab);
-        if (co->co_zombieframe != NULL)
-                PyObject_GC_Del(co->co_zombieframe);
-	if (co->co_weakreflist != NULL)
-		PyObject_ClearWeakRefs((PyObject*)co);
-	PyObject_DEL(co);
+    Py_XDECREF(co->co_code);
+    Py_XDECREF(co->co_consts);
+    Py_XDECREF(co->co_names);
+    Py_XDECREF(co->co_varnames);
+    Py_XDECREF(co->co_freevars);
+    Py_XDECREF(co->co_cellvars);
+    Py_XDECREF(co->co_filename);
+    Py_XDECREF(co->co_name);
+    Py_XDECREF(co->co_lnotab);
+    if (co->co_zombieframe != NULL)
+        PyObject_GC_Del(co->co_zombieframe);
+    if (co->co_weakreflist != NULL)
+        PyObject_ClearWeakRefs((PyObject*)co);
+    PyObject_DEL(co);
 }
 
 static PyObject *
 code_repr(PyCodeObject *co)
 {
-	char buf[500];
-	int lineno = -1;
-	char *filename = "???";
-	char *name = "???";
+    char buf[500];
+    int lineno = -1;
+    char *filename = "???";
+    char *name = "???";
 
-	if (co->co_firstlineno != 0)
-		lineno = co->co_firstlineno;
-	if (co->co_filename && PyString_Check(co->co_filename))
-		filename = PyString_AS_STRING(co->co_filename);
-	if (co->co_name && PyString_Check(co->co_name))
-		name = PyString_AS_STRING(co->co_name);
-	PyOS_snprintf(buf, sizeof(buf),
-		      "<code object %.100s at %p, file \"%.300s\", line %d>",
-		      name, co, filename, lineno);
-	return PyString_FromString(buf);
+    if (co->co_firstlineno != 0)
+        lineno = co->co_firstlineno;
+    if (co->co_filename && PyString_Check(co->co_filename))
+        filename = PyString_AS_STRING(co->co_filename);
+    if (co->co_name && PyString_Check(co->co_name))
+        name = PyString_AS_STRING(co->co_name);
+    PyOS_snprintf(buf, sizeof(buf),
+                  "<code object %.100s at %p, file \"%.300s\", line %d>",
+                  name, co, filename, lineno);
+    return PyString_FromString(buf);
 }
 
 static int
 code_compare(PyCodeObject *co, PyCodeObject *cp)
 {
-	int cmp;
-	cmp = PyObject_Compare(co->co_name, cp->co_name);
-	if (cmp) return cmp;
-	cmp = co->co_argcount - cp->co_argcount;
-	if (cmp) goto normalize;
-	cmp = co->co_nlocals - cp->co_nlocals;
-	if (cmp) goto normalize;
-	cmp = co->co_flags - cp->co_flags;
-	if (cmp) goto normalize;
-	cmp = co->co_firstlineno - cp->co_firstlineno;
-	if (cmp) goto normalize;
-	cmp = PyObject_Compare(co->co_code, cp->co_code);
-	if (cmp) return cmp;
-	cmp = PyObject_Compare(co->co_consts, cp->co_consts);
-	if (cmp) return cmp;
-	cmp = PyObject_Compare(co->co_names, cp->co_names);
-	if (cmp) return cmp;
-	cmp = PyObject_Compare(co->co_varnames, cp->co_varnames);
-	if (cmp) return cmp;
-	cmp = PyObject_Compare(co->co_freevars, cp->co_freevars);
-	if (cmp) return cmp;
-	cmp = PyObject_Compare(co->co_cellvars, cp->co_cellvars);
-	return cmp;
+    int cmp;
+    cmp = PyObject_Compare(co->co_name, cp->co_name);
+    if (cmp) return cmp;
+    cmp = co->co_argcount - cp->co_argcount;
+    if (cmp) goto normalize;
+    cmp = co->co_nlocals - cp->co_nlocals;
+    if (cmp) goto normalize;
+    cmp = co->co_flags - cp->co_flags;
+    if (cmp) goto normalize;
+    cmp = co->co_firstlineno - cp->co_firstlineno;
+    if (cmp) goto normalize;
+    cmp = PyObject_Compare(co->co_code, cp->co_code);
+    if (cmp) return cmp;
+    cmp = PyObject_Compare(co->co_consts, cp->co_consts);
+    if (cmp) return cmp;
+    cmp = PyObject_Compare(co->co_names, cp->co_names);
+    if (cmp) return cmp;
+    cmp = PyObject_Compare(co->co_varnames, cp->co_varnames);
+    if (cmp) return cmp;
+    cmp = PyObject_Compare(co->co_freevars, cp->co_freevars);
+    if (cmp) return cmp;
+    cmp = PyObject_Compare(co->co_cellvars, cp->co_cellvars);
+    return cmp;
 
  normalize:
-	if (cmp > 0)
-		return 1;
-	else if (cmp < 0)
-		return -1;
-	else
-		return 0;
+    if (cmp > 0)
+        return 1;
+    else if (cmp < 0)
+        return -1;
+    else
+        return 0;
 }
 
 static PyObject *
 code_richcompare(PyObject *self, PyObject *other, int op)
 {
-	PyCodeObject *co, *cp;
-	int eq;
-	PyObject *res;
+    PyCodeObject *co, *cp;
+    int eq;
+    PyObject *res;
 
-	if ((op != Py_EQ && op != Py_NE) ||
-	    !PyCode_Check(self) ||
-	    !PyCode_Check(other)) {
+    if ((op != Py_EQ && op != Py_NE) ||
+        !PyCode_Check(self) ||
+        !PyCode_Check(other)) {
 
-		/* Py3K warning if types are not equal and comparison
-		isn't == or !=  */
-		if (PyErr_WarnPy3k("code inequality comparisons not supported "
-				   "in 3.x", 1) < 0) {
-			return NULL;
-		}
+        /* Py3K warning if types are not equal and comparison
+        isn't == or !=  */
+        if (PyErr_WarnPy3k("code inequality comparisons not supported "
+                           "in 3.x", 1) < 0) {
+            return NULL;
+        }
 
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 
-	co = (PyCodeObject *)self;
-	cp = (PyCodeObject *)other;
+    co = (PyCodeObject *)self;
+    cp = (PyCodeObject *)other;
 
-	eq = PyObject_RichCompareBool(co->co_name, cp->co_name, Py_EQ);
-	if (eq <= 0) goto unequal;
-	eq = co->co_argcount == cp->co_argcount;
-	if (!eq) goto unequal;
-	eq = co->co_nlocals == cp->co_nlocals;
-	if (!eq) goto unequal;
-	eq = co->co_flags == cp->co_flags;
-	if (!eq) goto unequal;
-	eq = co->co_firstlineno == cp->co_firstlineno;
-	if (!eq) goto unequal;
-	eq = PyObject_RichCompareBool(co->co_code, cp->co_code, Py_EQ);
-	if (eq <= 0) goto unequal;
-	eq = PyObject_RichCompareBool(co->co_consts, cp->co_consts, Py_EQ);
-	if (eq <= 0) goto unequal;
-	eq = PyObject_RichCompareBool(co->co_names, cp->co_names, Py_EQ);
-	if (eq <= 0) goto unequal;
-	eq = PyObject_RichCompareBool(co->co_varnames, cp->co_varnames, Py_EQ);
-	if (eq <= 0) goto unequal;
-	eq = PyObject_RichCompareBool(co->co_freevars, cp->co_freevars, Py_EQ);
-	if (eq <= 0) goto unequal;
-	eq = PyObject_RichCompareBool(co->co_cellvars, cp->co_cellvars, Py_EQ);
-	if (eq <= 0) goto unequal;
+    eq = PyObject_RichCompareBool(co->co_name, cp->co_name, Py_EQ);
+    if (eq <= 0) goto unequal;
+    eq = co->co_argcount == cp->co_argcount;
+    if (!eq) goto unequal;
+    eq = co->co_nlocals == cp->co_nlocals;
+    if (!eq) goto unequal;
+    eq = co->co_flags == cp->co_flags;
+    if (!eq) goto unequal;
+    eq = co->co_firstlineno == cp->co_firstlineno;
+    if (!eq) goto unequal;
+    eq = PyObject_RichCompareBool(co->co_code, cp->co_code, Py_EQ);
+    if (eq <= 0) goto unequal;
+    eq = PyObject_RichCompareBool(co->co_consts, cp->co_consts, Py_EQ);
+    if (eq <= 0) goto unequal;
+    eq = PyObject_RichCompareBool(co->co_names, cp->co_names, Py_EQ);
+    if (eq <= 0) goto unequal;
+    eq = PyObject_RichCompareBool(co->co_varnames, cp->co_varnames, Py_EQ);
+    if (eq <= 0) goto unequal;
+    eq = PyObject_RichCompareBool(co->co_freevars, cp->co_freevars, Py_EQ);
+    if (eq <= 0) goto unequal;
+    eq = PyObject_RichCompareBool(co->co_cellvars, cp->co_cellvars, Py_EQ);
+    if (eq <= 0) goto unequal;
 
-	if (op == Py_EQ)
-		res = Py_True;
-	else
-		res = Py_False;
-	goto done;
+    if (op == Py_EQ)
+        res = Py_True;
+    else
+        res = Py_False;
+    goto done;
 
   unequal:
-	if (eq < 0)
-		return NULL;
-	if (op == Py_NE)
-		res = Py_True;
-	else
-		res = Py_False;
+    if (eq < 0)
+        return NULL;
+    if (op == Py_NE)
+        res = Py_True;
+    else
+        res = Py_False;
 
   done:
-	Py_INCREF(res);
-	return res;
+    Py_INCREF(res);
+    return res;
 }
 
 static long
 code_hash(PyCodeObject *co)
 {
-	long h, h0, h1, h2, h3, h4, h5, h6;
-	h0 = PyObject_Hash(co->co_name);
-	if (h0 == -1) return -1;
-	h1 = PyObject_Hash(co->co_code);
-	if (h1 == -1) return -1;
-	h2 = PyObject_Hash(co->co_consts);
-	if (h2 == -1) return -1;
-	h3 = PyObject_Hash(co->co_names);
-	if (h3 == -1) return -1;
-	h4 = PyObject_Hash(co->co_varnames);
-	if (h4 == -1) return -1;
-	h5 = PyObject_Hash(co->co_freevars);
-	if (h5 == -1) return -1;
-	h6 = PyObject_Hash(co->co_cellvars);
-	if (h6 == -1) return -1;
-	h = h0 ^ h1 ^ h2 ^ h3 ^ h4 ^ h5 ^ h6 ^
-		co->co_argcount ^ co->co_nlocals ^ co->co_flags;
-	if (h == -1) h = -2;
-	return h;
+    long h, h0, h1, h2, h3, h4, h5, h6;
+    h0 = PyObject_Hash(co->co_name);
+    if (h0 == -1) return -1;
+    h1 = PyObject_Hash(co->co_code);
+    if (h1 == -1) return -1;
+    h2 = PyObject_Hash(co->co_consts);
+    if (h2 == -1) return -1;
+    h3 = PyObject_Hash(co->co_names);
+    if (h3 == -1) return -1;
+    h4 = PyObject_Hash(co->co_varnames);
+    if (h4 == -1) return -1;
+    h5 = PyObject_Hash(co->co_freevars);
+    if (h5 == -1) return -1;
+    h6 = PyObject_Hash(co->co_cellvars);
+    if (h6 == -1) return -1;
+    h = h0 ^ h1 ^ h2 ^ h3 ^ h4 ^ h5 ^ h6 ^
+        co->co_argcount ^ co->co_nlocals ^ co->co_flags;
+    if (h == -1) h = -2;
+    return h;
 }
 
 /* XXX code objects need to participate in GC? */
 
 PyTypeObject PyCode_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"code",
-	sizeof(PyCodeObject),
-	0,
-	(destructor)code_dealloc, 	/* tp_dealloc */
-	0,				/* tp_print */
-	0, 				/* tp_getattr */
-	0,				/* tp_setattr */
-	(cmpfunc)code_compare, 		/* tp_compare */
-	(reprfunc)code_repr,		/* tp_repr */
-	0,				/* tp_as_number */
-	0,				/* tp_as_sequence */
-	0,				/* tp_as_mapping */
-	(hashfunc)code_hash, 		/* tp_hash */
-	0,				/* tp_call */
-	0,				/* tp_str */
-	PyObject_GenericGetAttr,	/* tp_getattro */
-	0,				/* tp_setattro */
-	0,				/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,		/* tp_flags */
-	code_doc,			/* tp_doc */
-	0,				/* tp_traverse */
-	0,				/* tp_clear */
-	code_richcompare,		/* tp_richcompare */
-	offsetof(PyCodeObject, co_weakreflist), /* tp_weaklistoffset */
-	0,				/* tp_iter */
-	0,				/* tp_iternext */
-	0,				/* tp_methods */
-	code_memberlist,		/* tp_members */
-	0,				/* tp_getset */
-	0,				/* tp_base */
-	0,				/* tp_dict */
-	0,				/* tp_descr_get */
-	0,				/* tp_descr_set */
-	0,				/* tp_dictoffset */
-	0,				/* tp_init */
-	0,				/* tp_alloc */
-	code_new,			/* tp_new */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "code",
+    sizeof(PyCodeObject),
+    0,
+    (destructor)code_dealloc,           /* tp_dealloc */
+    0,                                  /* tp_print */
+    0,                                  /* tp_getattr */
+    0,                                  /* tp_setattr */
+    (cmpfunc)code_compare,              /* tp_compare */
+    (reprfunc)code_repr,                /* tp_repr */
+    0,                                  /* tp_as_number */
+    0,                                  /* tp_as_sequence */
+    0,                                  /* tp_as_mapping */
+    (hashfunc)code_hash,                /* tp_hash */
+    0,                                  /* tp_call */
+    0,                                  /* tp_str */
+    PyObject_GenericGetAttr,            /* tp_getattro */
+    0,                                  /* tp_setattro */
+    0,                                  /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,                 /* tp_flags */
+    code_doc,                           /* tp_doc */
+    0,                                  /* tp_traverse */
+    0,                                  /* tp_clear */
+    code_richcompare,                   /* tp_richcompare */
+    offsetof(PyCodeObject, co_weakreflist), /* tp_weaklistoffset */
+    0,                                  /* tp_iter */
+    0,                                  /* tp_iternext */
+    0,                                  /* tp_methods */
+    code_memberlist,                    /* tp_members */
+    0,                                  /* tp_getset */
+    0,                                  /* tp_base */
+    0,                                  /* tp_dict */
+    0,                                  /* tp_descr_get */
+    0,                                  /* tp_descr_set */
+    0,                                  /* tp_dictoffset */
+    0,                                  /* tp_init */
+    0,                                  /* tp_alloc */
+    code_new,                           /* tp_new */
 };
 
 /* Use co_lnotab to compute the line number from a bytecode index, addrq.  See
@@ -517,17 +517,17 @@
 int
 PyCode_Addr2Line(PyCodeObject *co, int addrq)
 {
-	int size = PyString_Size(co->co_lnotab) / 2;
-	unsigned char *p = (unsigned char*)PyString_AsString(co->co_lnotab);
-	int line = co->co_firstlineno;
-	int addr = 0;
-	while (--size >= 0) {
-		addr += *p++;
-		if (addr > addrq)
-			break;
-		line += *p++;
-	}
-	return line;
+    int size = PyString_Size(co->co_lnotab) / 2;
+    unsigned char *p = (unsigned char*)PyString_AsString(co->co_lnotab);
+    int line = co->co_firstlineno;
+    int addr = 0;
+    while (--size >= 0) {
+        addr += *p++;
+        if (addr > addrq)
+            break;
+        line += *p++;
+    }
+    return line;
 }
 
 /* Update *bounds to describe the first and one-past-the-last instructions in
@@ -535,47 +535,47 @@
 int
 _PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds)
 {
-        int size, addr, line;
-        unsigned char* p;
+    int size, addr, line;
+    unsigned char* p;
 
-        p = (unsigned char*)PyString_AS_STRING(co->co_lnotab);
-        size = PyString_GET_SIZE(co->co_lnotab) / 2;
+    p = (unsigned char*)PyString_AS_STRING(co->co_lnotab);
+    size = PyString_GET_SIZE(co->co_lnotab) / 2;
 
-        addr = 0;
-        line = co->co_firstlineno;
-        assert(line > 0);
+    addr = 0;
+    line = co->co_firstlineno;
+    assert(line > 0);
 
-        /* possible optimization: if f->f_lasti == instr_ub
-           (likely to be a common case) then we already know
-           instr_lb -- if we stored the matching value of p
-           somwhere we could skip the first while loop. */
+    /* possible optimization: if f->f_lasti == instr_ub
+       (likely to be a common case) then we already know
+       instr_lb -- if we stored the matching value of p
+       somwhere we could skip the first while loop. */
 
-        /* See lnotab_notes.txt for the description of
-           co_lnotab.  A point to remember: increments to p
-           come in (addr, line) pairs. */
+    /* See lnotab_notes.txt for the description of
+       co_lnotab.  A point to remember: increments to p
+       come in (addr, line) pairs. */
 
-        bounds->ap_lower = 0;
-        while (size > 0) {
-                if (addr + *p > lasti)
-                        break;
-                addr += *p++;
-                if (*p) 
-                        bounds->ap_lower = addr;
-                line += *p++;
-                --size;
+    bounds->ap_lower = 0;
+    while (size > 0) {
+        if (addr + *p > lasti)
+            break;
+        addr += *p++;
+        if (*p)
+            bounds->ap_lower = addr;
+        line += *p++;
+        --size;
+    }
+
+    if (size > 0) {
+        while (--size >= 0) {
+            addr += *p++;
+            if (*p++)
+                break;
         }
+        bounds->ap_upper = addr;
+    }
+    else {
+        bounds->ap_upper = INT_MAX;
+    }
 
-        if (size > 0) {
-                while (--size >= 0) {
-                        addr += *p++;
-                        if (*p++)
-                                break;
-                }
-                bounds->ap_upper = addr;
-        }
-        else {
-                bounds->ap_upper = INT_MAX;
-        }
-
-        return line;
+    return line;
 }
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 42e447d..5f26a6a 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -23,8 +23,8 @@
    precision for practical use.
 */
 
-#define PREC_REPR	17
-#define PREC_STR	12
+#define PREC_REPR       17
+#define PREC_STR        12
 
 /* elementary operations on complex numbers */
 
@@ -33,414 +33,414 @@
 Py_complex
 c_sum(Py_complex a, Py_complex b)
 {
-	Py_complex r;
-	r.real = a.real + b.real;
-	r.imag = a.imag + b.imag;
-	return r;
+    Py_complex r;
+    r.real = a.real + b.real;
+    r.imag = a.imag + b.imag;
+    return r;
 }
 
 Py_complex
 c_diff(Py_complex a, Py_complex b)
 {
-	Py_complex r;
-	r.real = a.real - b.real;
-	r.imag = a.imag - b.imag;
-	return r;
+    Py_complex r;
+    r.real = a.real - b.real;
+    r.imag = a.imag - b.imag;
+    return r;
 }
 
 Py_complex
 c_neg(Py_complex a)
 {
-	Py_complex r;
-	r.real = -a.real;
-	r.imag = -a.imag;
-	return r;
+    Py_complex r;
+    r.real = -a.real;
+    r.imag = -a.imag;
+    return r;
 }
 
 Py_complex
 c_prod(Py_complex a, Py_complex b)
 {
-	Py_complex r;
-	r.real = a.real*b.real - a.imag*b.imag;
-	r.imag = a.real*b.imag + a.imag*b.real;
-	return r;
+    Py_complex r;
+    r.real = a.real*b.real - a.imag*b.imag;
+    r.imag = a.real*b.imag + a.imag*b.real;
+    return r;
 }
 
 Py_complex
 c_quot(Py_complex a, Py_complex b)
 {
-	/******************************************************************
-	This was the original algorithm.  It's grossly prone to spurious
-	overflow and underflow errors.  It also merrily divides by 0 despite
-	checking for that(!).  The code still serves a doc purpose here, as
-	the algorithm following is a simple by-cases transformation of this
-	one:
+    /******************************************************************
+    This was the original algorithm.  It's grossly prone to spurious
+    overflow and underflow errors.  It also merrily divides by 0 despite
+    checking for that(!).  The code still serves a doc purpose here, as
+    the algorithm following is a simple by-cases transformation of this
+    one:
 
-	Py_complex r;
-	double d = b.real*b.real + b.imag*b.imag;
-	if (d == 0.)
-		errno = EDOM;
-	r.real = (a.real*b.real + a.imag*b.imag)/d;
-	r.imag = (a.imag*b.real - a.real*b.imag)/d;
-	return r;
-	******************************************************************/
+    Py_complex r;
+    double d = b.real*b.real + b.imag*b.imag;
+    if (d == 0.)
+        errno = EDOM;
+    r.real = (a.real*b.real + a.imag*b.imag)/d;
+    r.imag = (a.imag*b.real - a.real*b.imag)/d;
+    return r;
+    ******************************************************************/
 
-	/* This algorithm is better, and is pretty obvious:  first divide the
-	 * numerators and denominator by whichever of {b.real, b.imag} has
-	 * larger magnitude.  The earliest reference I found was to CACM
-	 * Algorithm 116 (Complex Division, Robert L. Smith, Stanford
-	 * University).  As usual, though, we're still ignoring all IEEE
-	 * endcases.
-	 */
-	 Py_complex r;	/* the result */
- 	 const double abs_breal = b.real < 0 ? -b.real : b.real;
-	 const double abs_bimag = b.imag < 0 ? -b.imag : b.imag;
+    /* This algorithm is better, and is pretty obvious:  first divide the
+     * numerators and denominator by whichever of {b.real, b.imag} has
+     * larger magnitude.  The earliest reference I found was to CACM
+     * Algorithm 116 (Complex Division, Robert L. Smith, Stanford
+     * University).  As usual, though, we're still ignoring all IEEE
+     * endcases.
+     */
+     Py_complex r;      /* the result */
+     const double abs_breal = b.real < 0 ? -b.real : b.real;
+     const double abs_bimag = b.imag < 0 ? -b.imag : b.imag;
 
-	 if (abs_breal >= abs_bimag) {
- 		/* divide tops and bottom by b.real */
-	 	if (abs_breal == 0.0) {
-	 		errno = EDOM;
-	 		r.real = r.imag = 0.0;
-	 	}
-	 	else {
-	 		const double ratio = b.imag / b.real;
-	 		const double denom = b.real + b.imag * ratio;
-	 		r.real = (a.real + a.imag * ratio) / denom;
-	 		r.imag = (a.imag - a.real * ratio) / denom;
-	 	}
-	}
-	else {
-		/* divide tops and bottom by b.imag */
-		const double ratio = b.real / b.imag;
-		const double denom = b.real * ratio + b.imag;
-		assert(b.imag != 0.0);
-		r.real = (a.real * ratio + a.imag) / denom;
-		r.imag = (a.imag * ratio - a.real) / denom;
-	}
-	return r;
+     if (abs_breal >= abs_bimag) {
+        /* divide tops and bottom by b.real */
+        if (abs_breal == 0.0) {
+            errno = EDOM;
+            r.real = r.imag = 0.0;
+        }
+        else {
+            const double ratio = b.imag / b.real;
+            const double denom = b.real + b.imag * ratio;
+            r.real = (a.real + a.imag * ratio) / denom;
+            r.imag = (a.imag - a.real * ratio) / denom;
+        }
+    }
+    else {
+        /* divide tops and bottom by b.imag */
+        const double ratio = b.real / b.imag;
+        const double denom = b.real * ratio + b.imag;
+        assert(b.imag != 0.0);
+        r.real = (a.real * ratio + a.imag) / denom;
+        r.imag = (a.imag * ratio - a.real) / denom;
+    }
+    return r;
 }
 
 Py_complex
 c_pow(Py_complex a, Py_complex b)
 {
-	Py_complex r;
-	double vabs,len,at,phase;
-	if (b.real == 0. && b.imag == 0.) {
-		r.real = 1.;
-		r.imag = 0.;
-	}
-	else if (a.real == 0. && a.imag == 0.) {
-		if (b.imag != 0. || b.real < 0.)
-			errno = EDOM;
-		r.real = 0.;
-		r.imag = 0.;
-	}
-	else {
-		vabs = hypot(a.real,a.imag);
-		len = pow(vabs,b.real);
-		at = atan2(a.imag, a.real);
-		phase = at*b.real;
-		if (b.imag != 0.0) {
-			len /= exp(at*b.imag);
-			phase += b.imag*log(vabs);
-		}
-		r.real = len*cos(phase);
-		r.imag = len*sin(phase);
-	}
-	return r;
+    Py_complex r;
+    double vabs,len,at,phase;
+    if (b.real == 0. && b.imag == 0.) {
+        r.real = 1.;
+        r.imag = 0.;
+    }
+    else if (a.real == 0. && a.imag == 0.) {
+        if (b.imag != 0. || b.real < 0.)
+            errno = EDOM;
+        r.real = 0.;
+        r.imag = 0.;
+    }
+    else {
+        vabs = hypot(a.real,a.imag);
+        len = pow(vabs,b.real);
+        at = atan2(a.imag, a.real);
+        phase = at*b.real;
+        if (b.imag != 0.0) {
+            len /= exp(at*b.imag);
+            phase += b.imag*log(vabs);
+        }
+        r.real = len*cos(phase);
+        r.imag = len*sin(phase);
+    }
+    return r;
 }
 
 static Py_complex
 c_powu(Py_complex x, long n)
 {
-	Py_complex r, p;
-	long mask = 1;
-	r = c_1;
-	p = x;
-	while (mask > 0 && n >= mask) {
-		if (n & mask)
-			r = c_prod(r,p);
-		mask <<= 1;
-		p = c_prod(p,p);
-	}
-	return r;
+    Py_complex r, p;
+    long mask = 1;
+    r = c_1;
+    p = x;
+    while (mask > 0 && n >= mask) {
+        if (n & mask)
+            r = c_prod(r,p);
+        mask <<= 1;
+        p = c_prod(p,p);
+    }
+    return r;
 }
 
 static Py_complex
 c_powi(Py_complex x, long n)
 {
-	Py_complex cn;
+    Py_complex cn;
 
-	if (n > 100 || n < -100) {
-		cn.real = (double) n;
-		cn.imag = 0.;
-		return c_pow(x,cn);
-	}
-	else if (n > 0)
-		return c_powu(x,n);
-	else
-		return c_quot(c_1,c_powu(x,-n));
+    if (n > 100 || n < -100) {
+        cn.real = (double) n;
+        cn.imag = 0.;
+        return c_pow(x,cn);
+    }
+    else if (n > 0)
+        return c_powu(x,n);
+    else
+        return c_quot(c_1,c_powu(x,-n));
 
 }
 
 double
 c_abs(Py_complex z)
 {
-	/* sets errno = ERANGE on overflow;  otherwise errno = 0 */
-	double result;
+    /* sets errno = ERANGE on overflow;  otherwise errno = 0 */
+    double result;
 
-	if (!Py_IS_FINITE(z.real) || !Py_IS_FINITE(z.imag)) {
-		/* C99 rules: if either the real or the imaginary part is an
-		   infinity, return infinity, even if the other part is a
-		   NaN. */
-		if (Py_IS_INFINITY(z.real)) {
-			result = fabs(z.real);
-			errno = 0;
-			return result;
-		}
-		if (Py_IS_INFINITY(z.imag)) {
-			result = fabs(z.imag);
-			errno = 0;
-			return result;
-		}
-		/* either the real or imaginary part is a NaN,
-		   and neither is infinite. Result should be NaN. */
-		return Py_NAN;
-	}
-	result = hypot(z.real, z.imag);
-	if (!Py_IS_FINITE(result))
-		errno = ERANGE;
-	else
-		errno = 0;
-	return result;
+    if (!Py_IS_FINITE(z.real) || !Py_IS_FINITE(z.imag)) {
+        /* C99 rules: if either the real or the imaginary part is an
+           infinity, return infinity, even if the other part is a
+           NaN. */
+        if (Py_IS_INFINITY(z.real)) {
+            result = fabs(z.real);
+            errno = 0;
+            return result;
+        }
+        if (Py_IS_INFINITY(z.imag)) {
+            result = fabs(z.imag);
+            errno = 0;
+            return result;
+        }
+        /* either the real or imaginary part is a NaN,
+           and neither is infinite. Result should be NaN. */
+        return Py_NAN;
+    }
+    result = hypot(z.real, z.imag);
+    if (!Py_IS_FINITE(result))
+        errno = ERANGE;
+    else
+        errno = 0;
+    return result;
 }
 
 static PyObject *
 complex_subtype_from_c_complex(PyTypeObject *type, Py_complex cval)
 {
-	PyObject *op;
+    PyObject *op;
 
-	op = type->tp_alloc(type, 0);
-	if (op != NULL)
-		((PyComplexObject *)op)->cval = cval;
-	return op;
+    op = type->tp_alloc(type, 0);
+    if (op != NULL)
+        ((PyComplexObject *)op)->cval = cval;
+    return op;
 }
 
 PyObject *
 PyComplex_FromCComplex(Py_complex cval)
 {
-	register PyComplexObject *op;
+    register PyComplexObject *op;
 
-	/* Inline PyObject_New */
-	op = (PyComplexObject *) PyObject_MALLOC(sizeof(PyComplexObject));
-	if (op == NULL)
-		return PyErr_NoMemory();
-	PyObject_INIT(op, &PyComplex_Type);
-	op->cval = cval;
-	return (PyObject *) op;
+    /* Inline PyObject_New */
+    op = (PyComplexObject *) PyObject_MALLOC(sizeof(PyComplexObject));
+    if (op == NULL)
+        return PyErr_NoMemory();
+    PyObject_INIT(op, &PyComplex_Type);
+    op->cval = cval;
+    return (PyObject *) op;
 }
 
 static PyObject *
 complex_subtype_from_doubles(PyTypeObject *type, double real, double imag)
 {
-	Py_complex c;
-	c.real = real;
-	c.imag = imag;
-	return complex_subtype_from_c_complex(type, c);
+    Py_complex c;
+    c.real = real;
+    c.imag = imag;
+    return complex_subtype_from_c_complex(type, c);
 }
 
 PyObject *
 PyComplex_FromDoubles(double real, double imag)
 {
-	Py_complex c;
-	c.real = real;
-	c.imag = imag;
-	return PyComplex_FromCComplex(c);
+    Py_complex c;
+    c.real = real;
+    c.imag = imag;
+    return PyComplex_FromCComplex(c);
 }
 
 double
 PyComplex_RealAsDouble(PyObject *op)
 {
-	if (PyComplex_Check(op)) {
-		return ((PyComplexObject *)op)->cval.real;
-	}
-	else {
-		return PyFloat_AsDouble(op);
-	}
+    if (PyComplex_Check(op)) {
+        return ((PyComplexObject *)op)->cval.real;
+    }
+    else {
+        return PyFloat_AsDouble(op);
+    }
 }
 
 double
 PyComplex_ImagAsDouble(PyObject *op)
 {
-	if (PyComplex_Check(op)) {
-		return ((PyComplexObject *)op)->cval.imag;
-	}
-	else {
-		return 0.0;
-	}
+    if (PyComplex_Check(op)) {
+        return ((PyComplexObject *)op)->cval.imag;
+    }
+    else {
+        return 0.0;
+    }
 }
 
 static PyObject *
 try_complex_special_method(PyObject *op) {
-	PyObject *f;
-	static PyObject *complexstr;
+    PyObject *f;
+    static PyObject *complexstr;
 
-	if (complexstr == NULL) {
-		complexstr = PyString_InternFromString("__complex__");
-		if (complexstr == NULL)
-			return NULL;
-	}
-	if (PyInstance_Check(op)) {
-		f = PyObject_GetAttr(op, complexstr);
-		if (f == NULL) {
-			if (PyErr_ExceptionMatches(PyExc_AttributeError))
-				PyErr_Clear();
-			else
-				return NULL;
-		}
-	}
-	else {
-		f = _PyObject_LookupSpecial(op, "__complex__", &complexstr);
-		if (f == NULL && PyErr_Occurred())
-			return NULL;
-	}
-	if (f != NULL) {
-		PyObject *res = PyObject_CallFunctionObjArgs(f, NULL);
-		Py_DECREF(f);
-		return res;
-	}
-	return NULL;
+    if (complexstr == NULL) {
+        complexstr = PyString_InternFromString("__complex__");
+        if (complexstr == NULL)
+            return NULL;
+    }
+    if (PyInstance_Check(op)) {
+        f = PyObject_GetAttr(op, complexstr);
+        if (f == NULL) {
+            if (PyErr_ExceptionMatches(PyExc_AttributeError))
+                PyErr_Clear();
+            else
+                return NULL;
+        }
+    }
+    else {
+        f = _PyObject_LookupSpecial(op, "__complex__", &complexstr);
+        if (f == NULL && PyErr_Occurred())
+            return NULL;
+    }
+    if (f != NULL) {
+        PyObject *res = PyObject_CallFunctionObjArgs(f, NULL);
+        Py_DECREF(f);
+        return res;
+    }
+    return NULL;
 }
 
 Py_complex
 PyComplex_AsCComplex(PyObject *op)
 {
-	Py_complex cv;
-	PyObject *newop = NULL;
+    Py_complex cv;
+    PyObject *newop = NULL;
 
-	assert(op);
-	/* If op is already of type PyComplex_Type, return its value */
-	if (PyComplex_Check(op)) {
-		return ((PyComplexObject *)op)->cval;
-	}
-	/* If not, use op's __complex__  method, if it exists */
+    assert(op);
+    /* If op is already of type PyComplex_Type, return its value */
+    if (PyComplex_Check(op)) {
+        return ((PyComplexObject *)op)->cval;
+    }
+    /* If not, use op's __complex__  method, if it exists */
 
-	/* return -1 on failure */
-	cv.real = -1.;
-	cv.imag = 0.;
+    /* return -1 on failure */
+    cv.real = -1.;
+    cv.imag = 0.;
 
-	newop = try_complex_special_method(op);
-	
-	if (newop) {
-		if (!PyComplex_Check(newop)) {
-			PyErr_SetString(PyExc_TypeError,
-				"__complex__ should return a complex object");
-			Py_DECREF(newop);
-			return cv;
-		}
-		cv = ((PyComplexObject *)newop)->cval;
-		Py_DECREF(newop);
-		return cv;
-	}
-	else if (PyErr_Occurred()) {
-		return cv;
-	}
-	/* If neither of the above works, interpret op as a float giving the
-	   real part of the result, and fill in the imaginary part as 0. */
-	else {
-		/* PyFloat_AsDouble will return -1 on failure */
-		cv.real = PyFloat_AsDouble(op);
-		return cv;
-	}
+    newop = try_complex_special_method(op);
+
+    if (newop) {
+        if (!PyComplex_Check(newop)) {
+            PyErr_SetString(PyExc_TypeError,
+                "__complex__ should return a complex object");
+            Py_DECREF(newop);
+            return cv;
+        }
+        cv = ((PyComplexObject *)newop)->cval;
+        Py_DECREF(newop);
+        return cv;
+    }
+    else if (PyErr_Occurred()) {
+        return cv;
+    }
+    /* If neither of the above works, interpret op as a float giving the
+       real part of the result, and fill in the imaginary part as 0. */
+    else {
+        /* PyFloat_AsDouble will return -1 on failure */
+        cv.real = PyFloat_AsDouble(op);
+        return cv;
+    }
 }
 
 static void
 complex_dealloc(PyObject *op)
 {
-	op->ob_type->tp_free(op);
+    op->ob_type->tp_free(op);
 }
 
 
 static PyObject *
 complex_format(PyComplexObject *v, int precision, char format_code)
 {
-	PyObject *result = NULL;
-	Py_ssize_t len;
+    PyObject *result = NULL;
+    Py_ssize_t len;
 
-	/* If these are non-NULL, they'll need to be freed. */
-	char *pre = NULL;
-	char *im = NULL;
-	char *buf = NULL;
+    /* If these are non-NULL, they'll need to be freed. */
+    char *pre = NULL;
+    char *im = NULL;
+    char *buf = NULL;
 
-	/* These do not need to be freed. re is either an alias
-	   for pre or a pointer to a constant.  lead and tail
-	   are pointers to constants. */
-	char *re = NULL;
-	char *lead = "";
-	char *tail = "";
+    /* These do not need to be freed. re is either an alias
+       for pre or a pointer to a constant.  lead and tail
+       are pointers to constants. */
+    char *re = NULL;
+    char *lead = "";
+    char *tail = "";
 
-	if (v->cval.real == 0. && copysign(1.0, v->cval.real)==1.0) {
-		re = "";
-		im = PyOS_double_to_string(v->cval.imag, format_code,
-					   precision, 0, NULL);
-		if (!im) {
-			PyErr_NoMemory();
-			goto done;
-		}
-	} else {
-		/* Format imaginary part with sign, real part without */
-		pre = PyOS_double_to_string(v->cval.real, format_code,
-					    precision, 0, NULL);
-		if (!pre) {
-			PyErr_NoMemory();
-			goto done;
-		}
-		re = pre;
+    if (v->cval.real == 0. && copysign(1.0, v->cval.real)==1.0) {
+        re = "";
+        im = PyOS_double_to_string(v->cval.imag, format_code,
+                                   precision, 0, NULL);
+        if (!im) {
+            PyErr_NoMemory();
+            goto done;
+        }
+    } else {
+        /* Format imaginary part with sign, real part without */
+        pre = PyOS_double_to_string(v->cval.real, format_code,
+                                    precision, 0, NULL);
+        if (!pre) {
+            PyErr_NoMemory();
+            goto done;
+        }
+        re = pre;
 
-		im = PyOS_double_to_string(v->cval.imag, format_code,
-					   precision, Py_DTSF_SIGN, NULL);
-		if (!im) {
-			PyErr_NoMemory();
-			goto done;
-		}
-		lead = "(";
-		tail = ")";
-	}
-	/* Alloc the final buffer. Add one for the "j" in the format string,
-	   and one for the trailing zero. */
-	len = strlen(lead) + strlen(re) + strlen(im) + strlen(tail) + 2;
-	buf = PyMem_Malloc(len);
-	if (!buf) {
-		PyErr_NoMemory();
-		goto done;
-	}
-	PyOS_snprintf(buf, len, "%s%s%sj%s", lead, re, im, tail);
-	result = PyString_FromString(buf);
+        im = PyOS_double_to_string(v->cval.imag, format_code,
+                                   precision, Py_DTSF_SIGN, NULL);
+        if (!im) {
+            PyErr_NoMemory();
+            goto done;
+        }
+        lead = "(";
+        tail = ")";
+    }
+    /* Alloc the final buffer. Add one for the "j" in the format string,
+       and one for the trailing zero. */
+    len = strlen(lead) + strlen(re) + strlen(im) + strlen(tail) + 2;
+    buf = PyMem_Malloc(len);
+    if (!buf) {
+        PyErr_NoMemory();
+        goto done;
+    }
+    PyOS_snprintf(buf, len, "%s%s%sj%s", lead, re, im, tail);
+    result = PyString_FromString(buf);
   done:
-	PyMem_Free(im);
-	PyMem_Free(pre);
-	PyMem_Free(buf);
+    PyMem_Free(im);
+    PyMem_Free(pre);
+    PyMem_Free(buf);
 
-	return result;
+    return result;
 }
 
 static int
 complex_print(PyComplexObject *v, FILE *fp, int flags)
 {
-	PyObject *formatv;
-	char *buf;
-        if (flags & Py_PRINT_RAW)
-            formatv = complex_format(v, PyFloat_STR_PRECISION, 'g');
-        else
-            formatv = complex_format(v, 0, 'r');
-	if (formatv == NULL)
-		return -1;
-	buf = PyString_AS_STRING(formatv);
-	Py_BEGIN_ALLOW_THREADS
-	fputs(buf, fp);
-	Py_END_ALLOW_THREADS
-	Py_DECREF(formatv);
-	return 0;
+    PyObject *formatv;
+    char *buf;
+    if (flags & Py_PRINT_RAW)
+        formatv = complex_format(v, PyFloat_STR_PRECISION, 'g');
+    else
+        formatv = complex_format(v, 0, 'r');
+    if (formatv == NULL)
+        return -1;
+    buf = PyString_AS_STRING(formatv);
+    Py_BEGIN_ALLOW_THREADS
+    fputs(buf, fp);
+    Py_END_ALLOW_THREADS
+    Py_DECREF(formatv);
+    return 0;
 }
 
 static PyObject *
@@ -458,31 +458,31 @@
 static long
 complex_hash(PyComplexObject *v)
 {
-	long hashreal, hashimag, combined;
-	hashreal = _Py_HashDouble(v->cval.real);
-	if (hashreal == -1)
-		return -1;
-	hashimag = _Py_HashDouble(v->cval.imag);
-	if (hashimag == -1)
-		return -1;
-	/* Note:  if the imaginary part is 0, hashimag is 0 now,
-	 * so the following returns hashreal unchanged.  This is
-	 * important because numbers of different types that
-	 * compare equal must have the same hash value, so that
-	 * hash(x + 0*j) must equal hash(x).
-	 */
-	combined = hashreal + 1000003 * hashimag;
-	if (combined == -1)
-		combined = -2;
-	return combined;
+    long hashreal, hashimag, combined;
+    hashreal = _Py_HashDouble(v->cval.real);
+    if (hashreal == -1)
+        return -1;
+    hashimag = _Py_HashDouble(v->cval.imag);
+    if (hashimag == -1)
+        return -1;
+    /* Note:  if the imaginary part is 0, hashimag is 0 now,
+     * so the following returns hashreal unchanged.  This is
+     * important because numbers of different types that
+     * compare equal must have the same hash value, so that
+     * hash(x + 0*j) must equal hash(x).
+     */
+    combined = hashreal + 1000003 * hashimag;
+    if (combined == -1)
+        combined = -2;
+    return combined;
 }
 
 /* This macro may return! */
 #define TO_COMPLEX(obj, c) \
-	if (PyComplex_Check(obj)) \
-		c = ((PyComplexObject *)(obj))->cval; \
-	else if (to_complex(&(obj), &(c)) < 0) \
-		return (obj)
+    if (PyComplex_Check(obj)) \
+        c = ((PyComplexObject *)(obj))->cval; \
+    else if (to_complex(&(obj), &(c)) < 0) \
+        return (obj)
 
 static int
 to_complex(PyObject **pobj, Py_complex *pc)
@@ -491,368 +491,368 @@
 
     pc->real = pc->imag = 0.0;
     if (PyInt_Check(obj)) {
-        pc->real = PyInt_AS_LONG(obj);
-        return 0;
+    pc->real = PyInt_AS_LONG(obj);
+    return 0;
     }
     if (PyLong_Check(obj)) {
-        pc->real = PyLong_AsDouble(obj);
-        if (pc->real == -1.0 && PyErr_Occurred()) {
-            *pobj = NULL;
-            return -1;
-        }
-        return 0;
+    pc->real = PyLong_AsDouble(obj);
+    if (pc->real == -1.0 && PyErr_Occurred()) {
+        *pobj = NULL;
+        return -1;
+    }
+    return 0;
     }
     if (PyFloat_Check(obj)) {
-        pc->real = PyFloat_AsDouble(obj);
-        return 0;
+    pc->real = PyFloat_AsDouble(obj);
+    return 0;
     }
     Py_INCREF(Py_NotImplemented);
     *pobj = Py_NotImplemented;
     return -1;
 }
-		
+
 
 static PyObject *
 complex_add(PyObject *v, PyObject *w)
 {
-	Py_complex result;
-	Py_complex a, b;
-	TO_COMPLEX(v, a);
-	TO_COMPLEX(w, b);
-	PyFPE_START_PROTECT("complex_add", return 0)
-	result = c_sum(a, b);
-	PyFPE_END_PROTECT(result)
-	return PyComplex_FromCComplex(result);
+    Py_complex result;
+    Py_complex a, b;
+    TO_COMPLEX(v, a);
+    TO_COMPLEX(w, b);
+    PyFPE_START_PROTECT("complex_add", return 0)
+    result = c_sum(a, b);
+    PyFPE_END_PROTECT(result)
+    return PyComplex_FromCComplex(result);
 }
 
 static PyObject *
 complex_sub(PyObject *v, PyObject *w)
 {
-        Py_complex result;
-	Py_complex a, b;
-	TO_COMPLEX(v, a);
-	TO_COMPLEX(w, b);;
-	PyFPE_START_PROTECT("complex_sub", return 0)
-	result = c_diff(a, b);
-	PyFPE_END_PROTECT(result)
-	return PyComplex_FromCComplex(result);
+    Py_complex result;
+    Py_complex a, b;
+    TO_COMPLEX(v, a);
+    TO_COMPLEX(w, b);;
+    PyFPE_START_PROTECT("complex_sub", return 0)
+    result = c_diff(a, b);
+    PyFPE_END_PROTECT(result)
+    return PyComplex_FromCComplex(result);
 }
 
 static PyObject *
 complex_mul(PyObject *v, PyObject *w)
 {
-	Py_complex result;
-	Py_complex a, b;
-	TO_COMPLEX(v, a);
-	TO_COMPLEX(w, b);
-	PyFPE_START_PROTECT("complex_mul", return 0)
-	result = c_prod(a, b);
-	PyFPE_END_PROTECT(result)
-	return PyComplex_FromCComplex(result);
+    Py_complex result;
+    Py_complex a, b;
+    TO_COMPLEX(v, a);
+    TO_COMPLEX(w, b);
+    PyFPE_START_PROTECT("complex_mul", return 0)
+    result = c_prod(a, b);
+    PyFPE_END_PROTECT(result)
+    return PyComplex_FromCComplex(result);
 }
 
 static PyObject *
 complex_div(PyObject *v, PyObject *w)
 {
-	Py_complex quot;
-	Py_complex a, b;
-	TO_COMPLEX(v, a);
-	TO_COMPLEX(w, b);
-	PyFPE_START_PROTECT("complex_div", return 0)
-	errno = 0;
-	quot = c_quot(a, b);
-	PyFPE_END_PROTECT(quot)
-	if (errno == EDOM) {
-		PyErr_SetString(PyExc_ZeroDivisionError, "complex division by zero");
-		return NULL;
-	}
-	return PyComplex_FromCComplex(quot);
+    Py_complex quot;
+    Py_complex a, b;
+    TO_COMPLEX(v, a);
+    TO_COMPLEX(w, b);
+    PyFPE_START_PROTECT("complex_div", return 0)
+    errno = 0;
+    quot = c_quot(a, b);
+    PyFPE_END_PROTECT(quot)
+    if (errno == EDOM) {
+        PyErr_SetString(PyExc_ZeroDivisionError, "complex division by zero");
+        return NULL;
+    }
+    return PyComplex_FromCComplex(quot);
 }
 
 static PyObject *
 complex_classic_div(PyObject *v, PyObject *w)
 {
-	Py_complex quot;
-	Py_complex a, b;
-	TO_COMPLEX(v, a);
-	TO_COMPLEX(w, b);
-	if (Py_DivisionWarningFlag >= 2 &&
-	    PyErr_Warn(PyExc_DeprecationWarning,
-		       "classic complex division") < 0)
-		return NULL;
+    Py_complex quot;
+    Py_complex a, b;
+    TO_COMPLEX(v, a);
+    TO_COMPLEX(w, b);
+    if (Py_DivisionWarningFlag >= 2 &&
+        PyErr_Warn(PyExc_DeprecationWarning,
+                   "classic complex division") < 0)
+        return NULL;
 
-	PyFPE_START_PROTECT("complex_classic_div", return 0)
-	errno = 0;
-	quot = c_quot(a, b);
-	PyFPE_END_PROTECT(quot)
-	if (errno == EDOM) {
-		PyErr_SetString(PyExc_ZeroDivisionError, "complex division by zero");
-		return NULL;
-	}
-	return PyComplex_FromCComplex(quot);
+    PyFPE_START_PROTECT("complex_classic_div", return 0)
+    errno = 0;
+    quot = c_quot(a, b);
+    PyFPE_END_PROTECT(quot)
+    if (errno == EDOM) {
+        PyErr_SetString(PyExc_ZeroDivisionError, "complex division by zero");
+        return NULL;
+    }
+    return PyComplex_FromCComplex(quot);
 }
 
 static PyObject *
 complex_remainder(PyObject *v, PyObject *w)
 {
-	Py_complex div, mod;
-	Py_complex a, b;
-	TO_COMPLEX(v, a);
-	TO_COMPLEX(w, b);
-	if (PyErr_Warn(PyExc_DeprecationWarning,
-		       "complex divmod(), // and % are deprecated") < 0)
-		return NULL;
+    Py_complex div, mod;
+    Py_complex a, b;
+    TO_COMPLEX(v, a);
+    TO_COMPLEX(w, b);
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                   "complex divmod(), // and % are deprecated") < 0)
+        return NULL;
 
-	errno = 0;
-	div = c_quot(a, b); /* The raw divisor value. */
-	if (errno == EDOM) {
-		PyErr_SetString(PyExc_ZeroDivisionError, "complex remainder");
-		return NULL;
-	}
-	div.real = floor(div.real); /* Use the floor of the real part. */
-	div.imag = 0.0;
-	mod = c_diff(a, c_prod(b, div));
+    errno = 0;
+    div = c_quot(a, b); /* The raw divisor value. */
+    if (errno == EDOM) {
+        PyErr_SetString(PyExc_ZeroDivisionError, "complex remainder");
+        return NULL;
+    }
+    div.real = floor(div.real); /* Use the floor of the real part. */
+    div.imag = 0.0;
+    mod = c_diff(a, c_prod(b, div));
 
-	return PyComplex_FromCComplex(mod);
+    return PyComplex_FromCComplex(mod);
 }
 
 
 static PyObject *
 complex_divmod(PyObject *v, PyObject *w)
 {
-	Py_complex div, mod;
-	PyObject *d, *m, *z;
-	Py_complex a, b;
-	TO_COMPLEX(v, a);
-	TO_COMPLEX(w, b);
-	if (PyErr_Warn(PyExc_DeprecationWarning,
-		       "complex divmod(), // and % are deprecated") < 0)
-		return NULL;
+    Py_complex div, mod;
+    PyObject *d, *m, *z;
+    Py_complex a, b;
+    TO_COMPLEX(v, a);
+    TO_COMPLEX(w, b);
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                   "complex divmod(), // and % are deprecated") < 0)
+        return NULL;
 
-	errno = 0;
-	div = c_quot(a, b); /* The raw divisor value. */
-	if (errno == EDOM) {
-		PyErr_SetString(PyExc_ZeroDivisionError, "complex divmod()");
-		return NULL;
-	}
-	div.real = floor(div.real); /* Use the floor of the real part. */
-	div.imag = 0.0;
-	mod = c_diff(a, c_prod(b, div));
-	d = PyComplex_FromCComplex(div);
-	m = PyComplex_FromCComplex(mod);
-	z = PyTuple_Pack(2, d, m);
-	Py_XDECREF(d);
-	Py_XDECREF(m);
-	return z;
+    errno = 0;
+    div = c_quot(a, b); /* The raw divisor value. */
+    if (errno == EDOM) {
+        PyErr_SetString(PyExc_ZeroDivisionError, "complex divmod()");
+        return NULL;
+    }
+    div.real = floor(div.real); /* Use the floor of the real part. */
+    div.imag = 0.0;
+    mod = c_diff(a, c_prod(b, div));
+    d = PyComplex_FromCComplex(div);
+    m = PyComplex_FromCComplex(mod);
+    z = PyTuple_Pack(2, d, m);
+    Py_XDECREF(d);
+    Py_XDECREF(m);
+    return z;
 }
 
 static PyObject *
 complex_pow(PyObject *v, PyObject *w, PyObject *z)
 {
-	Py_complex p;
-	Py_complex exponent;
-	long int_exponent;
-	Py_complex a, b;
-	TO_COMPLEX(v, a);
-	TO_COMPLEX(w, b);
-	if (z!=Py_None) {
-		PyErr_SetString(PyExc_ValueError, "complex modulo");
-		return NULL;
-	}
-	PyFPE_START_PROTECT("complex_pow", return 0)
-	errno = 0;
-	exponent = b;
-	int_exponent = (long)exponent.real;
-	if (exponent.imag == 0. && exponent.real == int_exponent)
-		p = c_powi(a,int_exponent);
-	else
-		p = c_pow(a,exponent);
+    Py_complex p;
+    Py_complex exponent;
+    long int_exponent;
+    Py_complex a, b;
+    TO_COMPLEX(v, a);
+    TO_COMPLEX(w, b);
+    if (z!=Py_None) {
+        PyErr_SetString(PyExc_ValueError, "complex modulo");
+        return NULL;
+    }
+    PyFPE_START_PROTECT("complex_pow", return 0)
+    errno = 0;
+    exponent = b;
+    int_exponent = (long)exponent.real;
+    if (exponent.imag == 0. && exponent.real == int_exponent)
+        p = c_powi(a,int_exponent);
+    else
+        p = c_pow(a,exponent);
 
-	PyFPE_END_PROTECT(p)
-	Py_ADJUST_ERANGE2(p.real, p.imag);
-	if (errno == EDOM) {
-		PyErr_SetString(PyExc_ZeroDivisionError,
-				"0.0 to a negative or complex power");
-		return NULL;
-	}
-	else if (errno == ERANGE) {
-		PyErr_SetString(PyExc_OverflowError,
-				"complex exponentiation");
-		return NULL;
-	}
-	return PyComplex_FromCComplex(p);
+    PyFPE_END_PROTECT(p)
+    Py_ADJUST_ERANGE2(p.real, p.imag);
+    if (errno == EDOM) {
+        PyErr_SetString(PyExc_ZeroDivisionError,
+                        "0.0 to a negative or complex power");
+        return NULL;
+    }
+    else if (errno == ERANGE) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "complex exponentiation");
+        return NULL;
+    }
+    return PyComplex_FromCComplex(p);
 }
 
 static PyObject *
 complex_int_div(PyObject *v, PyObject *w)
 {
-	PyObject *t, *r;
-	Py_complex a, b;
-	TO_COMPLEX(v, a);
-	TO_COMPLEX(w, b);
-	if (PyErr_Warn(PyExc_DeprecationWarning,
-		       "complex divmod(), // and % are deprecated") < 0)
-		return NULL;
+    PyObject *t, *r;
+    Py_complex a, b;
+    TO_COMPLEX(v, a);
+    TO_COMPLEX(w, b);
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                   "complex divmod(), // and % are deprecated") < 0)
+        return NULL;
 
-	t = complex_divmod(v, w);
-	if (t != NULL) {
-		r = PyTuple_GET_ITEM(t, 0);
-		Py_INCREF(r);
-		Py_DECREF(t);
-		return r;
-	}
-	return NULL;
+    t = complex_divmod(v, w);
+    if (t != NULL) {
+        r = PyTuple_GET_ITEM(t, 0);
+        Py_INCREF(r);
+        Py_DECREF(t);
+        return r;
+    }
+    return NULL;
 }
 
 static PyObject *
 complex_neg(PyComplexObject *v)
 {
-	Py_complex neg;
-	neg.real = -v->cval.real;
-	neg.imag = -v->cval.imag;
-	return PyComplex_FromCComplex(neg);
+    Py_complex neg;
+    neg.real = -v->cval.real;
+    neg.imag = -v->cval.imag;
+    return PyComplex_FromCComplex(neg);
 }
 
 static PyObject *
 complex_pos(PyComplexObject *v)
 {
-	if (PyComplex_CheckExact(v)) {
-		Py_INCREF(v);
-		return (PyObject *)v;
-	}
-	else
-		return PyComplex_FromCComplex(v->cval);
+    if (PyComplex_CheckExact(v)) {
+        Py_INCREF(v);
+        return (PyObject *)v;
+    }
+    else
+        return PyComplex_FromCComplex(v->cval);
 }
 
 static PyObject *
 complex_abs(PyComplexObject *v)
 {
-	double result;
+    double result;
 
-	PyFPE_START_PROTECT("complex_abs", return 0)
-	result = c_abs(v->cval);
-	PyFPE_END_PROTECT(result)
+    PyFPE_START_PROTECT("complex_abs", return 0)
+    result = c_abs(v->cval);
+    PyFPE_END_PROTECT(result)
 
-	if (errno == ERANGE) {
-		PyErr_SetString(PyExc_OverflowError,
-				"absolute value too large");
-		return NULL;
-	}
-	return PyFloat_FromDouble(result);
+    if (errno == ERANGE) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "absolute value too large");
+        return NULL;
+    }
+    return PyFloat_FromDouble(result);
 }
 
 static int
 complex_nonzero(PyComplexObject *v)
 {
-	return v->cval.real != 0.0 || v->cval.imag != 0.0;
+    return v->cval.real != 0.0 || v->cval.imag != 0.0;
 }
 
 static int
 complex_coerce(PyObject **pv, PyObject **pw)
 {
-	Py_complex cval;
-	cval.imag = 0.;
-	if (PyInt_Check(*pw)) {
-		cval.real = (double)PyInt_AsLong(*pw);
-		*pw = PyComplex_FromCComplex(cval);
-		Py_INCREF(*pv);
-		return 0;
-	}
-	else if (PyLong_Check(*pw)) {
-		cval.real = PyLong_AsDouble(*pw);
-		if (cval.real == -1.0 && PyErr_Occurred())
-			return -1;
-		*pw = PyComplex_FromCComplex(cval);
-		Py_INCREF(*pv);
-		return 0;
-	}
-	else if (PyFloat_Check(*pw)) {
-		cval.real = PyFloat_AsDouble(*pw);
-		*pw = PyComplex_FromCComplex(cval);
-		Py_INCREF(*pv);
-		return 0;
-	}
-	else if (PyComplex_Check(*pw)) {
-		Py_INCREF(*pv);
-		Py_INCREF(*pw);
-		return 0;
-	}
-	return 1; /* Can't do it */
+    Py_complex cval;
+    cval.imag = 0.;
+    if (PyInt_Check(*pw)) {
+        cval.real = (double)PyInt_AsLong(*pw);
+        *pw = PyComplex_FromCComplex(cval);
+        Py_INCREF(*pv);
+        return 0;
+    }
+    else if (PyLong_Check(*pw)) {
+        cval.real = PyLong_AsDouble(*pw);
+        if (cval.real == -1.0 && PyErr_Occurred())
+            return -1;
+        *pw = PyComplex_FromCComplex(cval);
+        Py_INCREF(*pv);
+        return 0;
+    }
+    else if (PyFloat_Check(*pw)) {
+        cval.real = PyFloat_AsDouble(*pw);
+        *pw = PyComplex_FromCComplex(cval);
+        Py_INCREF(*pv);
+        return 0;
+    }
+    else if (PyComplex_Check(*pw)) {
+        Py_INCREF(*pv);
+        Py_INCREF(*pw);
+        return 0;
+    }
+    return 1; /* Can't do it */
 }
 
 static PyObject *
 complex_richcompare(PyObject *v, PyObject *w, int op)
 {
-	int c;
-	Py_complex i, j;
-	PyObject *res;
+    int c;
+    Py_complex i, j;
+    PyObject *res;
 
-	c = PyNumber_CoerceEx(&v, &w);
-	if (c < 0)
-		return NULL;
-	if (c > 0) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	/* Make sure both arguments are complex. */
-	if (!(PyComplex_Check(v) && PyComplex_Check(w))) {
-		Py_DECREF(v);
-		Py_DECREF(w);
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
+    c = PyNumber_CoerceEx(&v, &w);
+    if (c < 0)
+        return NULL;
+    if (c > 0) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    /* Make sure both arguments are complex. */
+    if (!(PyComplex_Check(v) && PyComplex_Check(w))) {
+        Py_DECREF(v);
+        Py_DECREF(w);
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 
-	i = ((PyComplexObject *)v)->cval;
-	j = ((PyComplexObject *)w)->cval;
-	Py_DECREF(v);
-	Py_DECREF(w);
+    i = ((PyComplexObject *)v)->cval;
+    j = ((PyComplexObject *)w)->cval;
+    Py_DECREF(v);
+    Py_DECREF(w);
 
-	if (op != Py_EQ && op != Py_NE) {
-		PyErr_SetString(PyExc_TypeError,
-			"no ordering relation is defined for complex numbers");
-		return NULL;
-	}
+    if (op != Py_EQ && op != Py_NE) {
+        PyErr_SetString(PyExc_TypeError,
+            "no ordering relation is defined for complex numbers");
+        return NULL;
+    }
 
-	if ((i.real == j.real && i.imag == j.imag) == (op == Py_EQ))
-		res = Py_True;
-	else
-		res = Py_False;
+    if ((i.real == j.real && i.imag == j.imag) == (op == Py_EQ))
+        res = Py_True;
+    else
+        res = Py_False;
 
-	Py_INCREF(res);
-	return res;
+    Py_INCREF(res);
+    return res;
 }
 
 static PyObject *
 complex_int(PyObject *v)
 {
-	PyErr_SetString(PyExc_TypeError,
-		   "can't convert complex to int");
-	return NULL;
+    PyErr_SetString(PyExc_TypeError,
+               "can't convert complex to int");
+    return NULL;
 }
 
 static PyObject *
 complex_long(PyObject *v)
 {
-	PyErr_SetString(PyExc_TypeError,
-		   "can't convert complex to long");
-	return NULL;
+    PyErr_SetString(PyExc_TypeError,
+               "can't convert complex to long");
+    return NULL;
 }
 
 static PyObject *
 complex_float(PyObject *v)
 {
-	PyErr_SetString(PyExc_TypeError,
-		   "can't convert complex to float");
-	return NULL;
+    PyErr_SetString(PyExc_TypeError,
+               "can't convert complex to float");
+    return NULL;
 }
 
 static PyObject *
 complex_conjugate(PyObject *self)
 {
-	Py_complex c;
-	c = ((PyComplexObject *)self)->cval;
-	c.imag = -c.imag;
-	return PyComplex_FromCComplex(c);
+    Py_complex c;
+    c = ((PyComplexObject *)self)->cval;
+    c.imag = -c.imag;
+    return PyComplex_FromCComplex(c);
 }
 
 PyDoc_STRVAR(complex_conjugate_doc,
@@ -863,8 +863,8 @@
 static PyObject *
 complex_getnewargs(PyComplexObject *v)
 {
-	Py_complex c = v->cval;
-	return Py_BuildValue("(dd)", c.real, c.imag);
+    Py_complex c = v->cval;
+    return Py_BuildValue("(dd)", c.real, c.imag);
 }
 
 PyDoc_STRVAR(complex__format__doc,
@@ -878,25 +878,25 @@
     PyObject *format_spec;
 
     if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
-        return NULL;
+    return NULL;
     if (PyBytes_Check(format_spec))
-        return _PyComplex_FormatAdvanced(self,
-                                         PyBytes_AS_STRING(format_spec),
-                                         PyBytes_GET_SIZE(format_spec));
+    return _PyComplex_FormatAdvanced(self,
+                                     PyBytes_AS_STRING(format_spec),
+                                     PyBytes_GET_SIZE(format_spec));
     if (PyUnicode_Check(format_spec)) {
-        /* Convert format_spec to a str */
-        PyObject *result;
-        PyObject *str_spec = PyObject_Str(format_spec);
+    /* Convert format_spec to a str */
+    PyObject *result;
+    PyObject *str_spec = PyObject_Str(format_spec);
 
-        if (str_spec == NULL)
-            return NULL;
+    if (str_spec == NULL)
+        return NULL;
 
-        result = _PyComplex_FormatAdvanced(self,
-                                           PyBytes_AS_STRING(str_spec),
-                                           PyBytes_GET_SIZE(str_spec));
+    result = _PyComplex_FormatAdvanced(self,
+                                       PyBytes_AS_STRING(str_spec),
+                                       PyBytes_GET_SIZE(str_spec));
 
-        Py_DECREF(str_spec);
-        return result;
+    Py_DECREF(str_spec);
+    return result;
     }
     PyErr_SetString(PyExc_TypeError, "__format__ requires str or unicode");
     return NULL;
@@ -906,10 +906,10 @@
 static PyObject *
 complex_is_finite(PyObject *self)
 {
-	Py_complex c;
-	c = ((PyComplexObject *)self)->cval;
-	return PyBool_FromLong((long)(Py_IS_FINITE(c.real) &&
-				      Py_IS_FINITE(c.imag)));
+    Py_complex c;
+    c = ((PyComplexObject *)self)->cval;
+    return PyBool_FromLong((long)(Py_IS_FINITE(c.real) &&
+                                  Py_IS_FINITE(c.imag)));
 }
 
 PyDoc_STRVAR(complex_is_finite_doc,
@@ -919,318 +919,318 @@
 #endif
 
 static PyMethodDef complex_methods[] = {
-	{"conjugate",	(PyCFunction)complex_conjugate,	METH_NOARGS,
-	 complex_conjugate_doc},
+    {"conjugate",       (PyCFunction)complex_conjugate, METH_NOARGS,
+     complex_conjugate_doc},
 #if 0
-	{"is_finite",	(PyCFunction)complex_is_finite,	METH_NOARGS,
-	 complex_is_finite_doc},
+    {"is_finite",       (PyCFunction)complex_is_finite, METH_NOARGS,
+     complex_is_finite_doc},
 #endif
-	{"__getnewargs__",	(PyCFunction)complex_getnewargs,	METH_NOARGS},
-	{"__format__",          (PyCFunction)complex__format__,
-                                           METH_VARARGS, complex__format__doc},
-	{NULL,		NULL}		/* sentinel */
+    {"__getnewargs__",          (PyCFunction)complex_getnewargs,        METH_NOARGS},
+    {"__format__",          (PyCFunction)complex__format__,
+                                       METH_VARARGS, complex__format__doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyMemberDef complex_members[] = {
-	{"real", T_DOUBLE, offsetof(PyComplexObject, cval.real), READONLY,
-	 "the real part of a complex number"},
-	{"imag", T_DOUBLE, offsetof(PyComplexObject, cval.imag), READONLY,
-	 "the imaginary part of a complex number"},
-	{0},
+    {"real", T_DOUBLE, offsetof(PyComplexObject, cval.real), READONLY,
+     "the real part of a complex number"},
+    {"imag", T_DOUBLE, offsetof(PyComplexObject, cval.imag), READONLY,
+     "the imaginary part of a complex number"},
+    {0},
 };
 
 static PyObject *
 complex_subtype_from_string(PyTypeObject *type, PyObject *v)
 {
-	const char *s, *start;
-	char *end;
-	double x=0.0, y=0.0, z;
-	int got_bracket=0;
+    const char *s, *start;
+    char *end;
+    double x=0.0, y=0.0, z;
+    int got_bracket=0;
 #ifdef Py_USING_UNICODE
-	char *s_buffer = NULL;
+    char *s_buffer = NULL;
 #endif
-	Py_ssize_t len;
+    Py_ssize_t len;
 
-	if (PyString_Check(v)) {
-		s = PyString_AS_STRING(v);
-		len = PyString_GET_SIZE(v);
-	}
+    if (PyString_Check(v)) {
+        s = PyString_AS_STRING(v);
+        len = PyString_GET_SIZE(v);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(v)) {
-		s_buffer = (char *)PyMem_MALLOC(PyUnicode_GET_SIZE(v)+1);
-		if (s_buffer == NULL)
-			return PyErr_NoMemory();
-		if (PyUnicode_EncodeDecimal(PyUnicode_AS_UNICODE(v),
-					    PyUnicode_GET_SIZE(v),
-					    s_buffer,
-					    NULL))
-			goto error;
-		s = s_buffer;
-		len = strlen(s);
-	}
+    else if (PyUnicode_Check(v)) {
+        s_buffer = (char *)PyMem_MALLOC(PyUnicode_GET_SIZE(v)+1);
+        if (s_buffer == NULL)
+            return PyErr_NoMemory();
+        if (PyUnicode_EncodeDecimal(PyUnicode_AS_UNICODE(v),
+                                    PyUnicode_GET_SIZE(v),
+                                    s_buffer,
+                                    NULL))
+            goto error;
+        s = s_buffer;
+        len = strlen(s);
+    }
 #endif
-	else if (PyObject_AsCharBuffer(v, &s, &len)) {
-		PyErr_SetString(PyExc_TypeError,
-				"complex() arg is not a string");
-		return NULL;
-	}
+    else if (PyObject_AsCharBuffer(v, &s, &len)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "complex() arg is not a string");
+        return NULL;
+    }
 
-	/* position on first nonblank */
-	start = s;
-	while (Py_ISSPACE(*s))
-		s++;
-	if (*s == '(') {
-		/* Skip over possible bracket from repr(). */
-		got_bracket = 1;
-		s++;
-		while (Py_ISSPACE(*s))
-			s++;
-	}
+    /* position on first nonblank */
+    start = s;
+    while (Py_ISSPACE(*s))
+        s++;
+    if (*s == '(') {
+        /* Skip over possible bracket from repr(). */
+        got_bracket = 1;
+        s++;
+        while (Py_ISSPACE(*s))
+            s++;
+    }
 
-	/* a valid complex string usually takes one of the three forms:
+    /* a valid complex string usually takes one of the three forms:
 
-	     <float>                  - real part only
-	     <float>j                 - imaginary part only
-	     <float><signed-float>j   - real and imaginary parts
+         <float>                  - real part only
+         <float>j                 - imaginary part only
+         <float><signed-float>j   - real and imaginary parts
 
-	   where <float> represents any numeric string that's accepted by the
-	   float constructor (including 'nan', 'inf', 'infinity', etc.), and
-	   <signed-float> is any string of the form <float> whose first
-	   character is '+' or '-'.
+       where <float> represents any numeric string that's accepted by the
+       float constructor (including 'nan', 'inf', 'infinity', etc.), and
+       <signed-float> is any string of the form <float> whose first
+       character is '+' or '-'.
 
-	   For backwards compatibility, the extra forms
+       For backwards compatibility, the extra forms
 
-	     <float><sign>j
-	     <sign>j
-	     j
+         <float><sign>j
+         <sign>j
+         j
 
-	   are also accepted, though support for these forms may be removed from
-	   a future version of Python.
-	*/
+       are also accepted, though support for these forms may be removed from
+       a future version of Python.
+    */
 
-	/* first look for forms starting with <float> */
-	z = PyOS_string_to_double(s, &end, NULL);
-	if (z == -1.0 && PyErr_Occurred()) {
-		if (PyErr_ExceptionMatches(PyExc_ValueError))
-			PyErr_Clear();
-		else
-			goto error;
-	}
-	if (end != s) {
-		/* all 4 forms starting with <float> land here */
-		s = end;
-		if (*s == '+' || *s == '-') {
-			/* <float><signed-float>j | <float><sign>j */
-			x = z;
-			y = PyOS_string_to_double(s, &end, NULL);
-			if (y == -1.0 && PyErr_Occurred()) {
-				if (PyErr_ExceptionMatches(PyExc_ValueError))
-					PyErr_Clear();
-				else
-					goto error;
-			}
-			if (end != s)
-				/* <float><signed-float>j */
-				s = end;
-			else {
-				/* <float><sign>j */
-				y = *s == '+' ? 1.0 : -1.0;
-				s++;
-			}
-			if (!(*s == 'j' || *s == 'J'))
-				goto parse_error;
-			s++;
-		}
-		else if (*s == 'j' || *s == 'J') {
-			/* <float>j */
-			s++;
-			y = z;
-		}
-		else
-			/* <float> */
-			x = z;
-	}
-	else {
-		/* not starting with <float>; must be <sign>j or j */
-		if (*s == '+' || *s == '-') {
-			/* <sign>j */
-			y = *s == '+' ? 1.0 : -1.0;
-			s++;
-		}
-		else
-			/* j */
-			y = 1.0;
-		if (!(*s == 'j' || *s == 'J'))
-			goto parse_error;
-		s++;
-	}
+    /* first look for forms starting with <float> */
+    z = PyOS_string_to_double(s, &end, NULL);
+    if (z == -1.0 && PyErr_Occurred()) {
+        if (PyErr_ExceptionMatches(PyExc_ValueError))
+            PyErr_Clear();
+        else
+            goto error;
+    }
+    if (end != s) {
+        /* all 4 forms starting with <float> land here */
+        s = end;
+        if (*s == '+' || *s == '-') {
+            /* <float><signed-float>j | <float><sign>j */
+            x = z;
+            y = PyOS_string_to_double(s, &end, NULL);
+            if (y == -1.0 && PyErr_Occurred()) {
+                if (PyErr_ExceptionMatches(PyExc_ValueError))
+                    PyErr_Clear();
+                else
+                    goto error;
+            }
+            if (end != s)
+                /* <float><signed-float>j */
+                s = end;
+            else {
+                /* <float><sign>j */
+                y = *s == '+' ? 1.0 : -1.0;
+                s++;
+            }
+            if (!(*s == 'j' || *s == 'J'))
+                goto parse_error;
+            s++;
+        }
+        else if (*s == 'j' || *s == 'J') {
+            /* <float>j */
+            s++;
+            y = z;
+        }
+        else
+            /* <float> */
+            x = z;
+    }
+    else {
+        /* not starting with <float>; must be <sign>j or j */
+        if (*s == '+' || *s == '-') {
+            /* <sign>j */
+            y = *s == '+' ? 1.0 : -1.0;
+            s++;
+        }
+        else
+            /* j */
+            y = 1.0;
+        if (!(*s == 'j' || *s == 'J'))
+            goto parse_error;
+        s++;
+    }
 
-	/* trailing whitespace and closing bracket */
-	while (Py_ISSPACE(*s))
-		s++;
-	if (got_bracket) {
-		/* if there was an opening parenthesis, then the corresponding
-		   closing parenthesis should be right here */
-		if (*s != ')')
-			goto parse_error;
-		s++;
-		while (Py_ISSPACE(*s))
-			s++;
-	}
+    /* trailing whitespace and closing bracket */
+    while (Py_ISSPACE(*s))
+        s++;
+    if (got_bracket) {
+        /* if there was an opening parenthesis, then the corresponding
+           closing parenthesis should be right here */
+        if (*s != ')')
+            goto parse_error;
+        s++;
+        while (Py_ISSPACE(*s))
+            s++;
+    }
 
-	/* we should now be at the end of the string */
-	if (s-start != len)
-		goto parse_error;
+    /* we should now be at the end of the string */
+    if (s-start != len)
+        goto parse_error;
 
 
 #ifdef Py_USING_UNICODE
-	if (s_buffer)
-		PyMem_FREE(s_buffer);
+    if (s_buffer)
+        PyMem_FREE(s_buffer);
 #endif
-	return complex_subtype_from_doubles(type, x, y);
+    return complex_subtype_from_doubles(type, x, y);
 
   parse_error:
-	PyErr_SetString(PyExc_ValueError,
-			"complex() arg is a malformed string");
+    PyErr_SetString(PyExc_ValueError,
+                    "complex() arg is a malformed string");
   error:
 #ifdef Py_USING_UNICODE
-	if (s_buffer)
-		PyMem_FREE(s_buffer);
+    if (s_buffer)
+        PyMem_FREE(s_buffer);
 #endif
-	return NULL;
+    return NULL;
 }
 
 static PyObject *
 complex_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *r, *i, *tmp;
-	PyNumberMethods *nbr, *nbi = NULL;
-	Py_complex cr, ci;
-	int own_r = 0;
-	int cr_is_complex = 0;
-	int ci_is_complex = 0;
-	static char *kwlist[] = {"real", "imag", 0};
+    PyObject *r, *i, *tmp;
+    PyNumberMethods *nbr, *nbi = NULL;
+    Py_complex cr, ci;
+    int own_r = 0;
+    int cr_is_complex = 0;
+    int ci_is_complex = 0;
+    static char *kwlist[] = {"real", "imag", 0};
 
-	r = Py_False;
-	i = NULL;
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:complex", kwlist,
-					 &r, &i))
-		return NULL;
+    r = Py_False;
+    i = NULL;
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:complex", kwlist,
+                                     &r, &i))
+        return NULL;
 
-	/* Special-case for a single argument when type(arg) is complex. */
-	if (PyComplex_CheckExact(r) && i == NULL &&
-	    type == &PyComplex_Type) {
-		/* Note that we can't know whether it's safe to return
-		   a complex *subclass* instance as-is, hence the restriction
-		   to exact complexes here.  If either the input or the
-		   output is a complex subclass, it will be handled below 
-		   as a non-orthogonal vector.  */
-		Py_INCREF(r);
-		return r;
-	}
-	if (PyString_Check(r) || PyUnicode_Check(r)) {
-		if (i != NULL) {
-			PyErr_SetString(PyExc_TypeError,
-					"complex() can't take second arg"
-					" if first is a string");
-			return NULL;
-		}
-		return complex_subtype_from_string(type, r);
-	}
-	if (i != NULL && (PyString_Check(i) || PyUnicode_Check(i))) {
-		PyErr_SetString(PyExc_TypeError,
-				"complex() second arg can't be a string");
-		return NULL;
-	}
+    /* Special-case for a single argument when type(arg) is complex. */
+    if (PyComplex_CheckExact(r) && i == NULL &&
+        type == &PyComplex_Type) {
+        /* Note that we can't know whether it's safe to return
+           a complex *subclass* instance as-is, hence the restriction
+           to exact complexes here.  If either the input or the
+           output is a complex subclass, it will be handled below
+           as a non-orthogonal vector.  */
+        Py_INCREF(r);
+        return r;
+    }
+    if (PyString_Check(r) || PyUnicode_Check(r)) {
+        if (i != NULL) {
+            PyErr_SetString(PyExc_TypeError,
+                            "complex() can't take second arg"
+                            " if first is a string");
+            return NULL;
+        }
+        return complex_subtype_from_string(type, r);
+    }
+    if (i != NULL && (PyString_Check(i) || PyUnicode_Check(i))) {
+        PyErr_SetString(PyExc_TypeError,
+                        "complex() second arg can't be a string");
+        return NULL;
+    }
 
-	tmp = try_complex_special_method(r);
-	if (tmp) {
-		r = tmp;
-		own_r = 1;
-	}
-	else if (PyErr_Occurred()) {
-		return NULL;
-	}
+    tmp = try_complex_special_method(r);
+    if (tmp) {
+        r = tmp;
+        own_r = 1;
+    }
+    else if (PyErr_Occurred()) {
+        return NULL;
+    }
 
-	nbr = r->ob_type->tp_as_number;
-	if (i != NULL)
-		nbi = i->ob_type->tp_as_number;
-	if (nbr == NULL || nbr->nb_float == NULL ||
-	    ((i != NULL) && (nbi == NULL || nbi->nb_float == NULL))) {
-		PyErr_SetString(PyExc_TypeError,
-			   "complex() argument must be a string or a number");
-		if (own_r) {
-			Py_DECREF(r);
-		}
-		return NULL;
-	}
+    nbr = r->ob_type->tp_as_number;
+    if (i != NULL)
+        nbi = i->ob_type->tp_as_number;
+    if (nbr == NULL || nbr->nb_float == NULL ||
+        ((i != NULL) && (nbi == NULL || nbi->nb_float == NULL))) {
+        PyErr_SetString(PyExc_TypeError,
+                   "complex() argument must be a string or a number");
+        if (own_r) {
+            Py_DECREF(r);
+        }
+        return NULL;
+    }
 
-	/* If we get this far, then the "real" and "imag" parts should
-	   both be treated as numbers, and the constructor should return a
-	   complex number equal to (real + imag*1j).
+    /* If we get this far, then the "real" and "imag" parts should
+       both be treated as numbers, and the constructor should return a
+       complex number equal to (real + imag*1j).
 
- 	   Note that we do NOT assume the input to already be in canonical
-	   form; the "real" and "imag" parts might themselves be complex
-	   numbers, which slightly complicates the code below. */
-	if (PyComplex_Check(r)) {
-		/* Note that if r is of a complex subtype, we're only
-		   retaining its real & imag parts here, and the return
-		   value is (properly) of the builtin complex type. */
-		cr = ((PyComplexObject*)r)->cval;
-		cr_is_complex = 1;
-		if (own_r) {
-			Py_DECREF(r);
-		}
-	}
-	else {
-		/* The "real" part really is entirely real, and contributes
-		   nothing in the imaginary direction.  
-		   Just treat it as a double. */
-		tmp = PyNumber_Float(r);
-		if (own_r) {
-			/* r was a newly created complex number, rather
-			   than the original "real" argument. */
-			Py_DECREF(r);
-		}
-		if (tmp == NULL)
-			return NULL;
-		if (!PyFloat_Check(tmp)) {
-			PyErr_SetString(PyExc_TypeError,
-					"float(r) didn't return a float");
-			Py_DECREF(tmp);
-			return NULL;
-		}
-		cr.real = PyFloat_AsDouble(tmp);
-		cr.imag = 0.0; /* Shut up compiler warning */
-		Py_DECREF(tmp);
-	}
-	if (i == NULL) {
-		ci.real = 0.0;
-	}
-	else if (PyComplex_Check(i)) {
-		ci = ((PyComplexObject*)i)->cval;
-		ci_is_complex = 1;
-	} else {
-		/* The "imag" part really is entirely imaginary, and
-		   contributes nothing in the real direction.
-		   Just treat it as a double. */
-		tmp = (*nbi->nb_float)(i);
-		if (tmp == NULL)
-			return NULL;
-		ci.real = PyFloat_AsDouble(tmp);
-		Py_DECREF(tmp);
-	}
-	/*  If the input was in canonical form, then the "real" and "imag"
-	    parts are real numbers, so that ci.imag and cr.imag are zero.
-	    We need this correction in case they were not real numbers. */
+       Note that we do NOT assume the input to already be in canonical
+       form; the "real" and "imag" parts might themselves be complex
+       numbers, which slightly complicates the code below. */
+    if (PyComplex_Check(r)) {
+        /* Note that if r is of a complex subtype, we're only
+           retaining its real & imag parts here, and the return
+           value is (properly) of the builtin complex type. */
+        cr = ((PyComplexObject*)r)->cval;
+        cr_is_complex = 1;
+        if (own_r) {
+            Py_DECREF(r);
+        }
+    }
+    else {
+        /* The "real" part really is entirely real, and contributes
+           nothing in the imaginary direction.
+           Just treat it as a double. */
+        tmp = PyNumber_Float(r);
+        if (own_r) {
+            /* r was a newly created complex number, rather
+               than the original "real" argument. */
+            Py_DECREF(r);
+        }
+        if (tmp == NULL)
+            return NULL;
+        if (!PyFloat_Check(tmp)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "float(r) didn't return a float");
+            Py_DECREF(tmp);
+            return NULL;
+        }
+        cr.real = PyFloat_AsDouble(tmp);
+        cr.imag = 0.0; /* Shut up compiler warning */
+        Py_DECREF(tmp);
+    }
+    if (i == NULL) {
+        ci.real = 0.0;
+    }
+    else if (PyComplex_Check(i)) {
+        ci = ((PyComplexObject*)i)->cval;
+        ci_is_complex = 1;
+    } else {
+        /* The "imag" part really is entirely imaginary, and
+           contributes nothing in the real direction.
+           Just treat it as a double. */
+        tmp = (*nbi->nb_float)(i);
+        if (tmp == NULL)
+            return NULL;
+        ci.real = PyFloat_AsDouble(tmp);
+        Py_DECREF(tmp);
+    }
+    /*  If the input was in canonical form, then the "real" and "imag"
+        parts are real numbers, so that ci.imag and cr.imag are zero.
+        We need this correction in case they were not real numbers. */
 
-	if (ci_is_complex) {
-		cr.real -= ci.imag;
-	}
-	if (cr_is_complex) {
-		ci.real += cr.imag;
-	}
-	return complex_subtype_from_doubles(type, cr.real, ci.real);
+    if (ci_is_complex) {
+        cr.real -= ci.imag;
+    }
+    if (cr_is_complex) {
+        ci.real += cr.imag;
+    }
+    return complex_subtype_from_doubles(type, cr.real, ci.real);
 }
 
 PyDoc_STRVAR(complex_doc,
@@ -1240,87 +1240,87 @@
 "This is equivalent to (real + imag*1j) where imag defaults to 0.");
 
 static PyNumberMethods complex_as_number = {
-	(binaryfunc)complex_add, 		/* nb_add */
-	(binaryfunc)complex_sub, 		/* nb_subtract */
-	(binaryfunc)complex_mul, 		/* nb_multiply */
-	(binaryfunc)complex_classic_div,	/* nb_divide */
-	(binaryfunc)complex_remainder,		/* nb_remainder */
-	(binaryfunc)complex_divmod,		/* nb_divmod */
-	(ternaryfunc)complex_pow,		/* nb_power */
-	(unaryfunc)complex_neg,			/* nb_negative */
-	(unaryfunc)complex_pos,			/* nb_positive */
-	(unaryfunc)complex_abs,			/* nb_absolute */
-	(inquiry)complex_nonzero,		/* nb_nonzero */
-	0,					/* nb_invert */
-	0,					/* nb_lshift */
-	0,					/* nb_rshift */
-	0,					/* nb_and */
-	0,					/* nb_xor */
-	0,					/* nb_or */
-	complex_coerce,				/* nb_coerce */
-	complex_int,				/* nb_int */
-	complex_long,				/* nb_long */
-	complex_float,				/* nb_float */
-	0,					/* nb_oct */
-	0,					/* nb_hex */
-	0,					/* nb_inplace_add */
-	0,					/* nb_inplace_subtract */
-	0,					/* nb_inplace_multiply*/
-	0,					/* nb_inplace_divide */
-	0,					/* nb_inplace_remainder */
-	0, 					/* nb_inplace_power */
-	0,					/* nb_inplace_lshift */
-	0,					/* nb_inplace_rshift */
-	0,					/* nb_inplace_and */
-	0,					/* nb_inplace_xor */
-	0,					/* nb_inplace_or */
-	(binaryfunc)complex_int_div,		/* nb_floor_divide */
-	(binaryfunc)complex_div,		/* nb_true_divide */
-	0,					/* nb_inplace_floor_divide */
-	0,					/* nb_inplace_true_divide */
+    (binaryfunc)complex_add,                    /* nb_add */
+    (binaryfunc)complex_sub,                    /* nb_subtract */
+    (binaryfunc)complex_mul,                    /* nb_multiply */
+    (binaryfunc)complex_classic_div,            /* nb_divide */
+    (binaryfunc)complex_remainder,              /* nb_remainder */
+    (binaryfunc)complex_divmod,                 /* nb_divmod */
+    (ternaryfunc)complex_pow,                   /* nb_power */
+    (unaryfunc)complex_neg,                     /* nb_negative */
+    (unaryfunc)complex_pos,                     /* nb_positive */
+    (unaryfunc)complex_abs,                     /* nb_absolute */
+    (inquiry)complex_nonzero,                   /* nb_nonzero */
+    0,                                          /* nb_invert */
+    0,                                          /* nb_lshift */
+    0,                                          /* nb_rshift */
+    0,                                          /* nb_and */
+    0,                                          /* nb_xor */
+    0,                                          /* nb_or */
+    complex_coerce,                             /* nb_coerce */
+    complex_int,                                /* nb_int */
+    complex_long,                               /* nb_long */
+    complex_float,                              /* nb_float */
+    0,                                          /* nb_oct */
+    0,                                          /* nb_hex */
+    0,                                          /* nb_inplace_add */
+    0,                                          /* nb_inplace_subtract */
+    0,                                          /* nb_inplace_multiply*/
+    0,                                          /* nb_inplace_divide */
+    0,                                          /* nb_inplace_remainder */
+    0,                                          /* nb_inplace_power */
+    0,                                          /* nb_inplace_lshift */
+    0,                                          /* nb_inplace_rshift */
+    0,                                          /* nb_inplace_and */
+    0,                                          /* nb_inplace_xor */
+    0,                                          /* nb_inplace_or */
+    (binaryfunc)complex_int_div,                /* nb_floor_divide */
+    (binaryfunc)complex_div,                    /* nb_true_divide */
+    0,                                          /* nb_inplace_floor_divide */
+    0,                                          /* nb_inplace_true_divide */
 };
 
 PyTypeObject PyComplex_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"complex",
-	sizeof(PyComplexObject),
-	0,
-	complex_dealloc,			/* tp_dealloc */
-	(printfunc)complex_print,		/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)complex_repr,			/* tp_repr */
-	&complex_as_number,    			/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	(hashfunc)complex_hash, 		/* tp_hash */
-	0,					/* tp_call */
-	(reprfunc)complex_str,			/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
-		Py_TPFLAGS_BASETYPE,		/* tp_flags */
-	complex_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	complex_richcompare,			/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	complex_methods,			/* tp_methods */
-	complex_members,			/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	complex_new,				/* tp_new */
-	PyObject_Del,           		/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "complex",
+    sizeof(PyComplexObject),
+    0,
+    complex_dealloc,                            /* tp_dealloc */
+    (printfunc)complex_print,                   /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)complex_repr,                     /* tp_repr */
+    &complex_as_number,                         /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)complex_hash,                     /* tp_hash */
+    0,                                          /* tp_call */
+    (reprfunc)complex_str,                      /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
+        Py_TPFLAGS_BASETYPE,                    /* tp_flags */
+    complex_doc,                                /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    complex_richcompare,                        /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    complex_methods,                            /* tp_methods */
+    complex_members,                            /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    complex_new,                                /* tp_new */
+    PyObject_Del,                               /* tp_free */
 };
 
 #endif
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 168ba74..0b83233 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -6,645 +6,645 @@
 static void
 descr_dealloc(PyDescrObject *descr)
 {
-	_PyObject_GC_UNTRACK(descr);
-	Py_XDECREF(descr->d_type);
-	Py_XDECREF(descr->d_name);
-	PyObject_GC_Del(descr);
+    _PyObject_GC_UNTRACK(descr);
+    Py_XDECREF(descr->d_type);
+    Py_XDECREF(descr->d_name);
+    PyObject_GC_Del(descr);
 }
 
 static char *
 descr_name(PyDescrObject *descr)
 {
-	if (descr->d_name != NULL && PyString_Check(descr->d_name))
-		return PyString_AS_STRING(descr->d_name);
-	else
-		return "?";
+    if (descr->d_name != NULL && PyString_Check(descr->d_name))
+        return PyString_AS_STRING(descr->d_name);
+    else
+        return "?";
 }
 
 static PyObject *
 descr_repr(PyDescrObject *descr, char *format)
 {
-	return PyString_FromFormat(format, descr_name(descr),
-				   descr->d_type->tp_name);
+    return PyString_FromFormat(format, descr_name(descr),
+                               descr->d_type->tp_name);
 }
 
 static PyObject *
 method_repr(PyMethodDescrObject *descr)
 {
-	return descr_repr((PyDescrObject *)descr, 
-			  "<method '%s' of '%s' objects>");
+    return descr_repr((PyDescrObject *)descr,
+                      "<method '%s' of '%s' objects>");
 }
 
 static PyObject *
 member_repr(PyMemberDescrObject *descr)
 {
-	return descr_repr((PyDescrObject *)descr, 
-			  "<member '%s' of '%s' objects>");
+    return descr_repr((PyDescrObject *)descr,
+                      "<member '%s' of '%s' objects>");
 }
 
 static PyObject *
 getset_repr(PyGetSetDescrObject *descr)
 {
-	return descr_repr((PyDescrObject *)descr, 
-			  "<attribute '%s' of '%s' objects>");
+    return descr_repr((PyDescrObject *)descr,
+                      "<attribute '%s' of '%s' objects>");
 }
 
 static PyObject *
 wrapperdescr_repr(PyWrapperDescrObject *descr)
 {
-	return descr_repr((PyDescrObject *)descr, 
-			  "<slot wrapper '%s' of '%s' objects>");
+    return descr_repr((PyDescrObject *)descr,
+                      "<slot wrapper '%s' of '%s' objects>");
 }
 
 static int
 descr_check(PyDescrObject *descr, PyObject *obj, PyObject **pres)
 {
-	if (obj == NULL) {
-		Py_INCREF(descr);
-		*pres = (PyObject *)descr;
-		return 1;
-	}
-	if (!PyObject_TypeCheck(obj, descr->d_type)) {
-		PyErr_Format(PyExc_TypeError,
-			     "descriptor '%s' for '%s' objects "
-			     "doesn't apply to '%s' object",
-			     descr_name((PyDescrObject *)descr),
-			     descr->d_type->tp_name,
-			     obj->ob_type->tp_name);
-		*pres = NULL;
-		return 1;
-	}
-	return 0;
+    if (obj == NULL) {
+        Py_INCREF(descr);
+        *pres = (PyObject *)descr;
+        return 1;
+    }
+    if (!PyObject_TypeCheck(obj, descr->d_type)) {
+        PyErr_Format(PyExc_TypeError,
+                     "descriptor '%s' for '%s' objects "
+                     "doesn't apply to '%s' object",
+                     descr_name((PyDescrObject *)descr),
+                     descr->d_type->tp_name,
+                     obj->ob_type->tp_name);
+        *pres = NULL;
+        return 1;
+    }
+    return 0;
 }
 
 static PyObject *
 classmethod_get(PyMethodDescrObject *descr, PyObject *obj, PyObject *type)
 {
-	/* Ensure a valid type.  Class methods ignore obj. */
-	if (type == NULL) {
-		if (obj != NULL)
-			type = (PyObject *)obj->ob_type;
-		else {
-			/* Wot - no type?! */
-			PyErr_Format(PyExc_TypeError,
-				     "descriptor '%s' for type '%s' "
-				     "needs either an object or a type",
-				     descr_name((PyDescrObject *)descr),
-				     descr->d_type->tp_name);
-			return NULL;
-		}
-	}
-	if (!PyType_Check(type)) {
-		PyErr_Format(PyExc_TypeError,
-			     "descriptor '%s' for type '%s' "
-			     "needs a type, not a '%s' as arg 2",
-			     descr_name((PyDescrObject *)descr),
-			     descr->d_type->tp_name,
-			     type->ob_type->tp_name);
-		return NULL;
-	}
-	if (!PyType_IsSubtype((PyTypeObject *)type, descr->d_type)) {
-		PyErr_Format(PyExc_TypeError,
-			     "descriptor '%s' for type '%s' "
-			     "doesn't apply to type '%s'",
-			     descr_name((PyDescrObject *)descr),
-			     descr->d_type->tp_name,
-			     ((PyTypeObject *)type)->tp_name);
-		return NULL;
-	}
-	return PyCFunction_New(descr->d_method, type);
+    /* Ensure a valid type.  Class methods ignore obj. */
+    if (type == NULL) {
+        if (obj != NULL)
+            type = (PyObject *)obj->ob_type;
+        else {
+            /* Wot - no type?! */
+            PyErr_Format(PyExc_TypeError,
+                         "descriptor '%s' for type '%s' "
+                         "needs either an object or a type",
+                         descr_name((PyDescrObject *)descr),
+                         descr->d_type->tp_name);
+            return NULL;
+        }
+    }
+    if (!PyType_Check(type)) {
+        PyErr_Format(PyExc_TypeError,
+                     "descriptor '%s' for type '%s' "
+                     "needs a type, not a '%s' as arg 2",
+                     descr_name((PyDescrObject *)descr),
+                     descr->d_type->tp_name,
+                     type->ob_type->tp_name);
+        return NULL;
+    }
+    if (!PyType_IsSubtype((PyTypeObject *)type, descr->d_type)) {
+        PyErr_Format(PyExc_TypeError,
+                     "descriptor '%s' for type '%s' "
+                     "doesn't apply to type '%s'",
+                     descr_name((PyDescrObject *)descr),
+                     descr->d_type->tp_name,
+                     ((PyTypeObject *)type)->tp_name);
+        return NULL;
+    }
+    return PyCFunction_New(descr->d_method, type);
 }
 
 static PyObject *
 method_get(PyMethodDescrObject *descr, PyObject *obj, PyObject *type)
 {
-	PyObject *res;
+    PyObject *res;
 
-	if (descr_check((PyDescrObject *)descr, obj, &res))
-		return res;
-	return PyCFunction_New(descr->d_method, obj);
+    if (descr_check((PyDescrObject *)descr, obj, &res))
+        return res;
+    return PyCFunction_New(descr->d_method, obj);
 }
 
 static PyObject *
 member_get(PyMemberDescrObject *descr, PyObject *obj, PyObject *type)
 {
-	PyObject *res;
+    PyObject *res;
 
-	if (descr_check((PyDescrObject *)descr, obj, &res))
-		return res;
-	return PyMember_GetOne((char *)obj, descr->d_member);
+    if (descr_check((PyDescrObject *)descr, obj, &res))
+        return res;
+    return PyMember_GetOne((char *)obj, descr->d_member);
 }
 
 static PyObject *
 getset_get(PyGetSetDescrObject *descr, PyObject *obj, PyObject *type)
 {
-	PyObject *res;
+    PyObject *res;
 
-	if (descr_check((PyDescrObject *)descr, obj, &res))
-		return res;
-	if (descr->d_getset->get != NULL)
-		return descr->d_getset->get(obj, descr->d_getset->closure);
-	PyErr_Format(PyExc_AttributeError,
-		     "attribute '%.300s' of '%.100s' objects is not readable",
-		     descr_name((PyDescrObject *)descr),
-		     descr->d_type->tp_name);
-	return NULL;
+    if (descr_check((PyDescrObject *)descr, obj, &res))
+        return res;
+    if (descr->d_getset->get != NULL)
+        return descr->d_getset->get(obj, descr->d_getset->closure);
+    PyErr_Format(PyExc_AttributeError,
+                 "attribute '%.300s' of '%.100s' objects is not readable",
+                 descr_name((PyDescrObject *)descr),
+                 descr->d_type->tp_name);
+    return NULL;
 }
 
 static PyObject *
 wrapperdescr_get(PyWrapperDescrObject *descr, PyObject *obj, PyObject *type)
 {
-	PyObject *res;
+    PyObject *res;
 
-	if (descr_check((PyDescrObject *)descr, obj, &res))
-		return res;
-	return PyWrapper_New((PyObject *)descr, obj);
+    if (descr_check((PyDescrObject *)descr, obj, &res))
+        return res;
+    return PyWrapper_New((PyObject *)descr, obj);
 }
 
 static int
 descr_setcheck(PyDescrObject *descr, PyObject *obj, PyObject *value,
-	       int *pres)
+               int *pres)
 {
-	assert(obj != NULL);
-	if (!PyObject_TypeCheck(obj, descr->d_type)) {
-		PyErr_Format(PyExc_TypeError,
-			     "descriptor '%.200s' for '%.100s' objects "
-			     "doesn't apply to '%.100s' object",
-			     descr_name(descr),
-			     descr->d_type->tp_name,
-			     obj->ob_type->tp_name);
-		*pres = -1;
-		return 1;
-	}
-	return 0;
+    assert(obj != NULL);
+    if (!PyObject_TypeCheck(obj, descr->d_type)) {
+        PyErr_Format(PyExc_TypeError,
+                     "descriptor '%.200s' for '%.100s' objects "
+                     "doesn't apply to '%.100s' object",
+                     descr_name(descr),
+                     descr->d_type->tp_name,
+                     obj->ob_type->tp_name);
+        *pres = -1;
+        return 1;
+    }
+    return 0;
 }
 
 static int
 member_set(PyMemberDescrObject *descr, PyObject *obj, PyObject *value)
 {
-	int res;
+    int res;
 
-	if (descr_setcheck((PyDescrObject *)descr, obj, value, &res))
-		return res;
-	return PyMember_SetOne((char *)obj, descr->d_member, value);
+    if (descr_setcheck((PyDescrObject *)descr, obj, value, &res))
+        return res;
+    return PyMember_SetOne((char *)obj, descr->d_member, value);
 }
 
 static int
 getset_set(PyGetSetDescrObject *descr, PyObject *obj, PyObject *value)
 {
-	int res;
+    int res;
 
-	if (descr_setcheck((PyDescrObject *)descr, obj, value, &res))
-		return res;
-	if (descr->d_getset->set != NULL)
-		return descr->d_getset->set(obj, value,
-					    descr->d_getset->closure);
-	PyErr_Format(PyExc_AttributeError,
-		     "attribute '%.300s' of '%.100s' objects is not writable",
-		     descr_name((PyDescrObject *)descr),
-		     descr->d_type->tp_name);
-	return -1;
+    if (descr_setcheck((PyDescrObject *)descr, obj, value, &res))
+        return res;
+    if (descr->d_getset->set != NULL)
+        return descr->d_getset->set(obj, value,
+                                    descr->d_getset->closure);
+    PyErr_Format(PyExc_AttributeError,
+                 "attribute '%.300s' of '%.100s' objects is not writable",
+                 descr_name((PyDescrObject *)descr),
+                 descr->d_type->tp_name);
+    return -1;
 }
 
 static PyObject *
 methoddescr_call(PyMethodDescrObject *descr, PyObject *args, PyObject *kwds)
 {
-	Py_ssize_t argc;
-	PyObject *self, *func, *result;
+    Py_ssize_t argc;
+    PyObject *self, *func, *result;
 
-	/* Make sure that the first argument is acceptable as 'self' */
-	assert(PyTuple_Check(args));
-	argc = PyTuple_GET_SIZE(args);
-	if (argc < 1) {
-		PyErr_Format(PyExc_TypeError,
-			     "descriptor '%.300s' of '%.100s' "
-			     "object needs an argument",
-			     descr_name((PyDescrObject *)descr),
-			     descr->d_type->tp_name);
-		return NULL;
-	}
-	self = PyTuple_GET_ITEM(args, 0);
-	if (!PyObject_IsInstance(self, (PyObject *)(descr->d_type))) {
-		PyErr_Format(PyExc_TypeError,
-			     "descriptor '%.200s' "
-			     "requires a '%.100s' object "
-			     "but received a '%.100s'",
-			     descr_name((PyDescrObject *)descr),
-			     descr->d_type->tp_name,
-			     self->ob_type->tp_name);
-		return NULL;
-	}
+    /* Make sure that the first argument is acceptable as 'self' */
+    assert(PyTuple_Check(args));
+    argc = PyTuple_GET_SIZE(args);
+    if (argc < 1) {
+        PyErr_Format(PyExc_TypeError,
+                     "descriptor '%.300s' of '%.100s' "
+                     "object needs an argument",
+                     descr_name((PyDescrObject *)descr),
+                     descr->d_type->tp_name);
+        return NULL;
+    }
+    self = PyTuple_GET_ITEM(args, 0);
+    if (!PyObject_IsInstance(self, (PyObject *)(descr->d_type))) {
+        PyErr_Format(PyExc_TypeError,
+                     "descriptor '%.200s' "
+                     "requires a '%.100s' object "
+                     "but received a '%.100s'",
+                     descr_name((PyDescrObject *)descr),
+                     descr->d_type->tp_name,
+                     self->ob_type->tp_name);
+        return NULL;
+    }
 
-	func = PyCFunction_New(descr->d_method, self);
-	if (func == NULL)
-		return NULL;
-	args = PyTuple_GetSlice(args, 1, argc);
-	if (args == NULL) {
-		Py_DECREF(func);
-		return NULL;
-	}
-	result = PyEval_CallObjectWithKeywords(func, args, kwds);
-	Py_DECREF(args);
-	Py_DECREF(func);
-	return result;
+    func = PyCFunction_New(descr->d_method, self);
+    if (func == NULL)
+        return NULL;
+    args = PyTuple_GetSlice(args, 1, argc);
+    if (args == NULL) {
+        Py_DECREF(func);
+        return NULL;
+    }
+    result = PyEval_CallObjectWithKeywords(func, args, kwds);
+    Py_DECREF(args);
+    Py_DECREF(func);
+    return result;
 }
 
 static PyObject *
 classmethoddescr_call(PyMethodDescrObject *descr, PyObject *args,
-		      PyObject *kwds)
+                      PyObject *kwds)
 {
-	PyObject *func, *result;
+    PyObject *func, *result;
 
-	func = PyCFunction_New(descr->d_method, (PyObject *)descr->d_type);
-	if (func == NULL)
-		return NULL;
+    func = PyCFunction_New(descr->d_method, (PyObject *)descr->d_type);
+    if (func == NULL)
+        return NULL;
 
-	result = PyEval_CallObjectWithKeywords(func, args, kwds);
-	Py_DECREF(func);
-	return result;
+    result = PyEval_CallObjectWithKeywords(func, args, kwds);
+    Py_DECREF(func);
+    return result;
 }
 
 static PyObject *
 wrapperdescr_call(PyWrapperDescrObject *descr, PyObject *args, PyObject *kwds)
 {
-	Py_ssize_t argc;
-	PyObject *self, *func, *result;
+    Py_ssize_t argc;
+    PyObject *self, *func, *result;
 
-	/* Make sure that the first argument is acceptable as 'self' */
-	assert(PyTuple_Check(args));
-	argc = PyTuple_GET_SIZE(args);
-	if (argc < 1) {
-		PyErr_Format(PyExc_TypeError,
-			     "descriptor '%.300s' of '%.100s' "
-			     "object needs an argument",
-			     descr_name((PyDescrObject *)descr),
-			     descr->d_type->tp_name);
-		return NULL;
-	}
-	self = PyTuple_GET_ITEM(args, 0);
-	if (!PyObject_IsInstance(self, (PyObject *)(descr->d_type))) {
-		PyErr_Format(PyExc_TypeError,
-			     "descriptor '%.200s' "
-			     "requires a '%.100s' object "
-			     "but received a '%.100s'",
-			     descr_name((PyDescrObject *)descr),
-			     descr->d_type->tp_name,
-			     self->ob_type->tp_name);
-		return NULL;
-	}
+    /* Make sure that the first argument is acceptable as 'self' */
+    assert(PyTuple_Check(args));
+    argc = PyTuple_GET_SIZE(args);
+    if (argc < 1) {
+        PyErr_Format(PyExc_TypeError,
+                     "descriptor '%.300s' of '%.100s' "
+                     "object needs an argument",
+                     descr_name((PyDescrObject *)descr),
+                     descr->d_type->tp_name);
+        return NULL;
+    }
+    self = PyTuple_GET_ITEM(args, 0);
+    if (!PyObject_IsInstance(self, (PyObject *)(descr->d_type))) {
+        PyErr_Format(PyExc_TypeError,
+                     "descriptor '%.200s' "
+                     "requires a '%.100s' object "
+                     "but received a '%.100s'",
+                     descr_name((PyDescrObject *)descr),
+                     descr->d_type->tp_name,
+                     self->ob_type->tp_name);
+        return NULL;
+    }
 
-	func = PyWrapper_New((PyObject *)descr, self);
-	if (func == NULL)
-		return NULL;
-	args = PyTuple_GetSlice(args, 1, argc);
-	if (args == NULL) {
-		Py_DECREF(func);
-		return NULL;
-	}
-	result = PyEval_CallObjectWithKeywords(func, args, kwds);
-	Py_DECREF(args);
-	Py_DECREF(func);
-	return result;
+    func = PyWrapper_New((PyObject *)descr, self);
+    if (func == NULL)
+        return NULL;
+    args = PyTuple_GetSlice(args, 1, argc);
+    if (args == NULL) {
+        Py_DECREF(func);
+        return NULL;
+    }
+    result = PyEval_CallObjectWithKeywords(func, args, kwds);
+    Py_DECREF(args);
+    Py_DECREF(func);
+    return result;
 }
 
 static PyObject *
 method_get_doc(PyMethodDescrObject *descr, void *closure)
 {
-	if (descr->d_method->ml_doc == NULL) {
-		Py_INCREF(Py_None);
-		return Py_None;
-	}
-	return PyString_FromString(descr->d_method->ml_doc);
+    if (descr->d_method->ml_doc == NULL) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return PyString_FromString(descr->d_method->ml_doc);
 }
 
 static PyMemberDef descr_members[] = {
-	{"__objclass__", T_OBJECT, offsetof(PyDescrObject, d_type), READONLY},
-	{"__name__", T_OBJECT, offsetof(PyDescrObject, d_name), READONLY},
-	{0}
+    {"__objclass__", T_OBJECT, offsetof(PyDescrObject, d_type), READONLY},
+    {"__name__", T_OBJECT, offsetof(PyDescrObject, d_name), READONLY},
+    {0}
 };
 
 static PyGetSetDef method_getset[] = {
-	{"__doc__", (getter)method_get_doc},
-	{0}
+    {"__doc__", (getter)method_get_doc},
+    {0}
 };
 
 static PyObject *
 member_get_doc(PyMemberDescrObject *descr, void *closure)
 {
-	if (descr->d_member->doc == NULL) {
-		Py_INCREF(Py_None);
-		return Py_None;
-	}
-	return PyString_FromString(descr->d_member->doc);
+    if (descr->d_member->doc == NULL) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return PyString_FromString(descr->d_member->doc);
 }
 
 static PyGetSetDef member_getset[] = {
-	{"__doc__", (getter)member_get_doc},
-	{0}
+    {"__doc__", (getter)member_get_doc},
+    {0}
 };
 
 static PyObject *
 getset_get_doc(PyGetSetDescrObject *descr, void *closure)
 {
-	if (descr->d_getset->doc == NULL) {
-		Py_INCREF(Py_None);
-		return Py_None;
-	}
-	return PyString_FromString(descr->d_getset->doc);
+    if (descr->d_getset->doc == NULL) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return PyString_FromString(descr->d_getset->doc);
 }
 
 static PyGetSetDef getset_getset[] = {
-	{"__doc__", (getter)getset_get_doc},
-	{0}
+    {"__doc__", (getter)getset_get_doc},
+    {0}
 };
 
 static PyObject *
 wrapperdescr_get_doc(PyWrapperDescrObject *descr, void *closure)
 {
-	if (descr->d_base->doc == NULL) {
-		Py_INCREF(Py_None);
-		return Py_None;
-	}
-	return PyString_FromString(descr->d_base->doc);
+    if (descr->d_base->doc == NULL) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return PyString_FromString(descr->d_base->doc);
 }
 
 static PyGetSetDef wrapperdescr_getset[] = {
-	{"__doc__", (getter)wrapperdescr_get_doc},
-	{0}
+    {"__doc__", (getter)wrapperdescr_get_doc},
+    {0}
 };
 
 static int
 descr_traverse(PyObject *self, visitproc visit, void *arg)
 {
-	PyDescrObject *descr = (PyDescrObject *)self;
-	Py_VISIT(descr->d_type);
-	return 0;
+    PyDescrObject *descr = (PyDescrObject *)self;
+    Py_VISIT(descr->d_type);
+    return 0;
 }
 
 static PyTypeObject PyMethodDescr_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"method_descriptor",
-	sizeof(PyMethodDescrObject),
-	0,
-	(destructor)descr_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)method_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	(ternaryfunc)methoddescr_call,		/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
-	0,					/* tp_doc */
-	descr_traverse,				/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	descr_members,				/* tp_members */
-	method_getset,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	(descrgetfunc)method_get,		/* tp_descr_get */
-	0,					/* tp_descr_set */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "method_descriptor",
+    sizeof(PyMethodDescrObject),
+    0,
+    (destructor)descr_dealloc,                  /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)method_repr,                      /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    (ternaryfunc)methoddescr_call,              /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+    0,                                          /* tp_doc */
+    descr_traverse,                             /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    descr_members,                              /* tp_members */
+    method_getset,                              /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    (descrgetfunc)method_get,                   /* tp_descr_get */
+    0,                                          /* tp_descr_set */
 };
 
 /* This is for METH_CLASS in C, not for "f = classmethod(f)" in Python! */
 static PyTypeObject PyClassMethodDescr_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"classmethod_descriptor",
-	sizeof(PyMethodDescrObject),
-	0,
-	(destructor)descr_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)method_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	(ternaryfunc)classmethoddescr_call,	/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
-	0,					/* tp_doc */
-	descr_traverse,				/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	descr_members,				/* tp_members */
-	method_getset,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	(descrgetfunc)classmethod_get,		/* tp_descr_get */
-	0,					/* tp_descr_set */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "classmethod_descriptor",
+    sizeof(PyMethodDescrObject),
+    0,
+    (destructor)descr_dealloc,                  /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)method_repr,                      /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    (ternaryfunc)classmethoddescr_call,         /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+    0,                                          /* tp_doc */
+    descr_traverse,                             /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    descr_members,                              /* tp_members */
+    method_getset,                              /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    (descrgetfunc)classmethod_get,              /* tp_descr_get */
+    0,                                          /* tp_descr_set */
 };
 
 PyTypeObject PyMemberDescr_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"member_descriptor",
-	sizeof(PyMemberDescrObject),
-	0,
-	(destructor)descr_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)member_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
-	0,					/* tp_doc */
-	descr_traverse,				/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	descr_members,				/* tp_members */
-	member_getset,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	(descrgetfunc)member_get,		/* tp_descr_get */
-	(descrsetfunc)member_set,		/* tp_descr_set */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "member_descriptor",
+    sizeof(PyMemberDescrObject),
+    0,
+    (destructor)descr_dealloc,                  /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)member_repr,                      /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+    0,                                          /* tp_doc */
+    descr_traverse,                             /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    descr_members,                              /* tp_members */
+    member_getset,                              /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    (descrgetfunc)member_get,                   /* tp_descr_get */
+    (descrsetfunc)member_set,                   /* tp_descr_set */
 };
 
 PyTypeObject PyGetSetDescr_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"getset_descriptor",
-	sizeof(PyGetSetDescrObject),
-	0,
-	(destructor)descr_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)getset_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
-	0,					/* tp_doc */
-	descr_traverse,				/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	descr_members,				/* tp_members */
-	getset_getset,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	(descrgetfunc)getset_get,		/* tp_descr_get */
-	(descrsetfunc)getset_set,		/* tp_descr_set */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "getset_descriptor",
+    sizeof(PyGetSetDescrObject),
+    0,
+    (destructor)descr_dealloc,                  /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)getset_repr,                      /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+    0,                                          /* tp_doc */
+    descr_traverse,                             /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    descr_members,                              /* tp_members */
+    getset_getset,                              /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    (descrgetfunc)getset_get,                   /* tp_descr_get */
+    (descrsetfunc)getset_set,                   /* tp_descr_set */
 };
 
 PyTypeObject PyWrapperDescr_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"wrapper_descriptor",
-	sizeof(PyWrapperDescrObject),
-	0,
-	(destructor)descr_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)wrapperdescr_repr,		/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	(ternaryfunc)wrapperdescr_call,		/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
-	0,					/* tp_doc */
-	descr_traverse,				/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	descr_members,				/* tp_members */
-	wrapperdescr_getset,			/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	(descrgetfunc)wrapperdescr_get,		/* tp_descr_get */
-	0,					/* tp_descr_set */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "wrapper_descriptor",
+    sizeof(PyWrapperDescrObject),
+    0,
+    (destructor)descr_dealloc,                  /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)wrapperdescr_repr,                /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    (ternaryfunc)wrapperdescr_call,             /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+    0,                                          /* tp_doc */
+    descr_traverse,                             /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    descr_members,                              /* tp_members */
+    wrapperdescr_getset,                        /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    (descrgetfunc)wrapperdescr_get,             /* tp_descr_get */
+    0,                                          /* tp_descr_set */
 };
 
 static PyDescrObject *
 descr_new(PyTypeObject *descrtype, PyTypeObject *type, const char *name)
 {
-	PyDescrObject *descr;
+    PyDescrObject *descr;
 
-	descr = (PyDescrObject *)PyType_GenericAlloc(descrtype, 0);
-	if (descr != NULL) {
-		Py_XINCREF(type);
-		descr->d_type = type;
-		descr->d_name = PyString_InternFromString(name);
-		if (descr->d_name == NULL) {
-			Py_DECREF(descr);
-			descr = NULL;
-		}
-	}
-	return descr;
+    descr = (PyDescrObject *)PyType_GenericAlloc(descrtype, 0);
+    if (descr != NULL) {
+        Py_XINCREF(type);
+        descr->d_type = type;
+        descr->d_name = PyString_InternFromString(name);
+        if (descr->d_name == NULL) {
+            Py_DECREF(descr);
+            descr = NULL;
+        }
+    }
+    return descr;
 }
 
 PyObject *
 PyDescr_NewMethod(PyTypeObject *type, PyMethodDef *method)
 {
-	PyMethodDescrObject *descr;
+    PyMethodDescrObject *descr;
 
-	descr = (PyMethodDescrObject *)descr_new(&PyMethodDescr_Type,
-						 type, method->ml_name);
-	if (descr != NULL)
-		descr->d_method = method;
-	return (PyObject *)descr;
+    descr = (PyMethodDescrObject *)descr_new(&PyMethodDescr_Type,
+                                             type, method->ml_name);
+    if (descr != NULL)
+        descr->d_method = method;
+    return (PyObject *)descr;
 }
 
 PyObject *
 PyDescr_NewClassMethod(PyTypeObject *type, PyMethodDef *method)
 {
-	PyMethodDescrObject *descr;
+    PyMethodDescrObject *descr;
 
-	descr = (PyMethodDescrObject *)descr_new(&PyClassMethodDescr_Type,
-						 type, method->ml_name);
-	if (descr != NULL)
-		descr->d_method = method;
-	return (PyObject *)descr;
+    descr = (PyMethodDescrObject *)descr_new(&PyClassMethodDescr_Type,
+                                             type, method->ml_name);
+    if (descr != NULL)
+        descr->d_method = method;
+    return (PyObject *)descr;
 }
 
 PyObject *
 PyDescr_NewMember(PyTypeObject *type, PyMemberDef *member)
 {
-	PyMemberDescrObject *descr;
+    PyMemberDescrObject *descr;
 
-	descr = (PyMemberDescrObject *)descr_new(&PyMemberDescr_Type,
-						 type, member->name);
-	if (descr != NULL)
-		descr->d_member = member;
-	return (PyObject *)descr;
+    descr = (PyMemberDescrObject *)descr_new(&PyMemberDescr_Type,
+                                             type, member->name);
+    if (descr != NULL)
+        descr->d_member = member;
+    return (PyObject *)descr;
 }
 
 PyObject *
 PyDescr_NewGetSet(PyTypeObject *type, PyGetSetDef *getset)
 {
-	PyGetSetDescrObject *descr;
+    PyGetSetDescrObject *descr;
 
-	descr = (PyGetSetDescrObject *)descr_new(&PyGetSetDescr_Type,
-						 type, getset->name);
-	if (descr != NULL)
-		descr->d_getset = getset;
-	return (PyObject *)descr;
+    descr = (PyGetSetDescrObject *)descr_new(&PyGetSetDescr_Type,
+                                             type, getset->name);
+    if (descr != NULL)
+        descr->d_getset = getset;
+    return (PyObject *)descr;
 }
 
 PyObject *
 PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *base, void *wrapped)
 {
-	PyWrapperDescrObject *descr;
+    PyWrapperDescrObject *descr;
 
-	descr = (PyWrapperDescrObject *)descr_new(&PyWrapperDescr_Type,
-						 type, base->name);
-	if (descr != NULL) {
-		descr->d_base = base;
-		descr->d_wrapped = wrapped;
-	}
-	return (PyObject *)descr;
+    descr = (PyWrapperDescrObject *)descr_new(&PyWrapperDescr_Type,
+                                             type, base->name);
+    if (descr != NULL) {
+        descr->d_base = base;
+        descr->d_wrapped = wrapped;
+    }
+    return (PyObject *)descr;
 }
 
 
@@ -654,221 +654,221 @@
    bit of a pain */
 
 typedef struct {
-	PyObject_HEAD
-	PyObject *dict;
+    PyObject_HEAD
+    PyObject *dict;
 } proxyobject;
 
 static Py_ssize_t
 proxy_len(proxyobject *pp)
 {
-	return PyObject_Size(pp->dict);
+    return PyObject_Size(pp->dict);
 }
 
 static PyObject *
 proxy_getitem(proxyobject *pp, PyObject *key)
 {
-	return PyObject_GetItem(pp->dict, key);
+    return PyObject_GetItem(pp->dict, key);
 }
 
 static PyMappingMethods proxy_as_mapping = {
-	(lenfunc)proxy_len,			/* mp_length */
-	(binaryfunc)proxy_getitem,		/* mp_subscript */
-	0,					/* mp_ass_subscript */
+    (lenfunc)proxy_len,                         /* mp_length */
+    (binaryfunc)proxy_getitem,                  /* mp_subscript */
+    0,                                          /* mp_ass_subscript */
 };
 
 static int
 proxy_contains(proxyobject *pp, PyObject *key)
 {
-	return PyDict_Contains(pp->dict, key);
+    return PyDict_Contains(pp->dict, key);
 }
 
 static PySequenceMethods proxy_as_sequence = {
-	0,					/* sq_length */
-	0,					/* sq_concat */
-	0,					/* sq_repeat */
-	0,					/* sq_item */
-	0,					/* sq_slice */
-	0,					/* sq_ass_item */
-	0,					/* sq_ass_slice */
-	(objobjproc)proxy_contains,		/* sq_contains */
-	0,					/* sq_inplace_concat */
-	0,					/* sq_inplace_repeat */
+    0,                                          /* sq_length */
+    0,                                          /* sq_concat */
+    0,                                          /* sq_repeat */
+    0,                                          /* sq_item */
+    0,                                          /* sq_slice */
+    0,                                          /* sq_ass_item */
+    0,                                          /* sq_ass_slice */
+    (objobjproc)proxy_contains,                 /* sq_contains */
+    0,                                          /* sq_inplace_concat */
+    0,                                          /* sq_inplace_repeat */
 };
 
 static PyObject *
 proxy_has_key(proxyobject *pp, PyObject *key)
 {
-	int res = PyDict_Contains(pp->dict, key);
-	if (res < 0)
-		return NULL;
-	return PyBool_FromLong(res);
+    int res = PyDict_Contains(pp->dict, key);
+    if (res < 0)
+        return NULL;
+    return PyBool_FromLong(res);
 }
 
 static PyObject *
 proxy_get(proxyobject *pp, PyObject *args)
 {
-	PyObject *key, *def = Py_None;
+    PyObject *key, *def = Py_None;
 
-	if (!PyArg_UnpackTuple(args, "get", 1, 2, &key, &def))
-		return NULL;
-	return PyObject_CallMethod(pp->dict, "get", "(OO)", key, def);
+    if (!PyArg_UnpackTuple(args, "get", 1, 2, &key, &def))
+        return NULL;
+    return PyObject_CallMethod(pp->dict, "get", "(OO)", key, def);
 }
 
 static PyObject *
 proxy_keys(proxyobject *pp)
 {
-	return PyMapping_Keys(pp->dict);
+    return PyMapping_Keys(pp->dict);
 }
 
 static PyObject *
 proxy_values(proxyobject *pp)
 {
-	return PyMapping_Values(pp->dict);
+    return PyMapping_Values(pp->dict);
 }
 
 static PyObject *
 proxy_items(proxyobject *pp)
 {
-	return PyMapping_Items(pp->dict);
+    return PyMapping_Items(pp->dict);
 }
 
 static PyObject *
 proxy_iterkeys(proxyobject *pp)
 {
-	return PyObject_CallMethod(pp->dict, "iterkeys", NULL);
+    return PyObject_CallMethod(pp->dict, "iterkeys", NULL);
 }
 
 static PyObject *
 proxy_itervalues(proxyobject *pp)
 {
-	return PyObject_CallMethod(pp->dict, "itervalues", NULL);
+    return PyObject_CallMethod(pp->dict, "itervalues", NULL);
 }
 
 static PyObject *
 proxy_iteritems(proxyobject *pp)
 {
-	return PyObject_CallMethod(pp->dict, "iteritems", NULL);
+    return PyObject_CallMethod(pp->dict, "iteritems", NULL);
 }
 static PyObject *
 proxy_copy(proxyobject *pp)
 {
-	return PyObject_CallMethod(pp->dict, "copy", NULL);
+    return PyObject_CallMethod(pp->dict, "copy", NULL);
 }
 
 static PyMethodDef proxy_methods[] = {
-	{"has_key",   (PyCFunction)proxy_has_key,    METH_O,
-	 PyDoc_STR("D.has_key(k) -> True if D has a key k, else False")},
-	{"get",       (PyCFunction)proxy_get,        METH_VARARGS,
-	 PyDoc_STR("D.get(k[,d]) -> D[k] if D.has_key(k), else d."
-	 				"  d defaults to None.")},
-	{"keys",      (PyCFunction)proxy_keys,       METH_NOARGS,
-	 PyDoc_STR("D.keys() -> list of D's keys")},
-	{"values",    (PyCFunction)proxy_values,     METH_NOARGS,
-	 PyDoc_STR("D.values() -> list of D's values")},
-	{"items",     (PyCFunction)proxy_items,      METH_NOARGS,
-	 PyDoc_STR("D.items() -> list of D's (key, value) pairs, as 2-tuples")},
-	{"iterkeys",  (PyCFunction)proxy_iterkeys,   METH_NOARGS,
-	 PyDoc_STR("D.iterkeys() -> an iterator over the keys of D")},
-	{"itervalues",(PyCFunction)proxy_itervalues, METH_NOARGS,
-	 PyDoc_STR("D.itervalues() -> an iterator over the values of D")},
-	{"iteritems", (PyCFunction)proxy_iteritems,  METH_NOARGS,
-	 PyDoc_STR("D.iteritems() ->"
-	 	   " an iterator over the (key, value) items of D")},
-	{"copy",      (PyCFunction)proxy_copy,       METH_NOARGS,
-	 PyDoc_STR("D.copy() -> a shallow copy of D")},
-	{0}
+    {"has_key",   (PyCFunction)proxy_has_key,    METH_O,
+     PyDoc_STR("D.has_key(k) -> True if D has a key k, else False")},
+    {"get",       (PyCFunction)proxy_get,        METH_VARARGS,
+     PyDoc_STR("D.get(k[,d]) -> D[k] if D.has_key(k), else d."
+                                    "  d defaults to None.")},
+    {"keys",      (PyCFunction)proxy_keys,       METH_NOARGS,
+     PyDoc_STR("D.keys() -> list of D's keys")},
+    {"values",    (PyCFunction)proxy_values,     METH_NOARGS,
+     PyDoc_STR("D.values() -> list of D's values")},
+    {"items",     (PyCFunction)proxy_items,      METH_NOARGS,
+     PyDoc_STR("D.items() -> list of D's (key, value) pairs, as 2-tuples")},
+    {"iterkeys",  (PyCFunction)proxy_iterkeys,   METH_NOARGS,
+     PyDoc_STR("D.iterkeys() -> an iterator over the keys of D")},
+    {"itervalues",(PyCFunction)proxy_itervalues, METH_NOARGS,
+     PyDoc_STR("D.itervalues() -> an iterator over the values of D")},
+    {"iteritems", (PyCFunction)proxy_iteritems,  METH_NOARGS,
+     PyDoc_STR("D.iteritems() ->"
+               " an iterator over the (key, value) items of D")},
+    {"copy",      (PyCFunction)proxy_copy,       METH_NOARGS,
+     PyDoc_STR("D.copy() -> a shallow copy of D")},
+    {0}
 };
 
 static void
 proxy_dealloc(proxyobject *pp)
 {
-	_PyObject_GC_UNTRACK(pp);
-	Py_DECREF(pp->dict);
-	PyObject_GC_Del(pp);
+    _PyObject_GC_UNTRACK(pp);
+    Py_DECREF(pp->dict);
+    PyObject_GC_Del(pp);
 }
 
 static PyObject *
 proxy_getiter(proxyobject *pp)
 {
-	return PyObject_GetIter(pp->dict);
+    return PyObject_GetIter(pp->dict);
 }
 
 static PyObject *
 proxy_str(proxyobject *pp)
 {
-	return PyObject_Str(pp->dict);
+    return PyObject_Str(pp->dict);
 }
 
 static int
 proxy_traverse(PyObject *self, visitproc visit, void *arg)
 {
-	proxyobject *pp = (proxyobject *)self;
-	Py_VISIT(pp->dict);
-	return 0;
+    proxyobject *pp = (proxyobject *)self;
+    Py_VISIT(pp->dict);
+    return 0;
 }
 
 static int
 proxy_compare(proxyobject *v, PyObject *w)
 {
-	return PyObject_Compare(v->dict, w);
+    return PyObject_Compare(v->dict, w);
 }
 
 static PyObject *
 proxy_richcompare(proxyobject *v, PyObject *w, int op)
 {
-	return PyObject_RichCompare(v->dict, w, op);
+    return PyObject_RichCompare(v->dict, w, op);
 }
 
 PyTypeObject PyDictProxy_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"dictproxy",				/* tp_name */
-	sizeof(proxyobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)proxy_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)proxy_compare,			/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	&proxy_as_sequence,			/* tp_as_sequence */
-	&proxy_as_mapping,			/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	(reprfunc)proxy_str,			/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
- 	0,					/* tp_doc */
-	proxy_traverse,				/* tp_traverse */
- 	0,					/* tp_clear */
-	(richcmpfunc)proxy_richcompare,		/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	(getiterfunc)proxy_getiter,		/* tp_iter */
-	0,					/* tp_iternext */
-	proxy_methods,				/* tp_methods */
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "dictproxy",                                /* tp_name */
+    sizeof(proxyobject),                        /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)proxy_dealloc,                  /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)proxy_compare,                     /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    &proxy_as_sequence,                         /* tp_as_sequence */
+    &proxy_as_mapping,                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    (reprfunc)proxy_str,                        /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+    0,                                          /* tp_doc */
+    proxy_traverse,                             /* tp_traverse */
+    0,                                          /* tp_clear */
+    (richcmpfunc)proxy_richcompare,             /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    (getiterfunc)proxy_getiter,                 /* tp_iter */
+    0,                                          /* tp_iternext */
+    proxy_methods,                              /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
 };
 
 PyObject *
 PyDictProxy_New(PyObject *dict)
 {
-	proxyobject *pp;
+    proxyobject *pp;
 
-	pp = PyObject_GC_New(proxyobject, &PyDictProxy_Type);
-	if (pp != NULL) {
-		Py_INCREF(dict);
-		pp->dict = dict;
-		_PyObject_GC_TRACK(pp);
-	}
-	return (PyObject *)pp;
+    pp = PyObject_GC_New(proxyobject, &PyDictProxy_Type);
+    if (pp != NULL) {
+        Py_INCREF(dict);
+        pp->dict = dict;
+        _PyObject_GC_TRACK(pp);
+    }
+    return (PyObject *)pp;
 }
 
 
@@ -878,185 +878,185 @@
    bit of a pain */
 
 typedef struct {
-	PyObject_HEAD
-	PyWrapperDescrObject *descr;
-	PyObject *self;
+    PyObject_HEAD
+    PyWrapperDescrObject *descr;
+    PyObject *self;
 } wrapperobject;
 
 static void
 wrapper_dealloc(wrapperobject *wp)
 {
-	PyObject_GC_UnTrack(wp);
-	Py_TRASHCAN_SAFE_BEGIN(wp)
-	Py_XDECREF(wp->descr);
-	Py_XDECREF(wp->self);
-	PyObject_GC_Del(wp);
-	Py_TRASHCAN_SAFE_END(wp)
+    PyObject_GC_UnTrack(wp);
+    Py_TRASHCAN_SAFE_BEGIN(wp)
+    Py_XDECREF(wp->descr);
+    Py_XDECREF(wp->self);
+    PyObject_GC_Del(wp);
+    Py_TRASHCAN_SAFE_END(wp)
 }
 
 static int
 wrapper_compare(wrapperobject *a, wrapperobject *b)
 {
-	if (a->descr == b->descr)
-		return PyObject_Compare(a->self, b->self);
-	else
-		return (a->descr < b->descr) ? -1 : 1;
+    if (a->descr == b->descr)
+        return PyObject_Compare(a->self, b->self);
+    else
+        return (a->descr < b->descr) ? -1 : 1;
 }
 
 static long
 wrapper_hash(wrapperobject *wp)
 {
-	int x, y;
-	x = _Py_HashPointer(wp->descr);
-	if (x == -1)
-		return -1;
-	y = PyObject_Hash(wp->self);
-	if (y == -1)
-		return -1;
-	x = x ^ y;
-	if (x == -1)
-		x = -2;
-	return x;
+    int x, y;
+    x = _Py_HashPointer(wp->descr);
+    if (x == -1)
+        return -1;
+    y = PyObject_Hash(wp->self);
+    if (y == -1)
+        return -1;
+    x = x ^ y;
+    if (x == -1)
+        x = -2;
+    return x;
 }
 
 static PyObject *
 wrapper_repr(wrapperobject *wp)
 {
-	return PyString_FromFormat("<method-wrapper '%s' of %s object at %p>",
-				   wp->descr->d_base->name,
-				   wp->self->ob_type->tp_name,
-				   wp->self);
+    return PyString_FromFormat("<method-wrapper '%s' of %s object at %p>",
+                               wp->descr->d_base->name,
+                               wp->self->ob_type->tp_name,
+                               wp->self);
 }
 
 static PyMemberDef wrapper_members[] = {
-	{"__self__", T_OBJECT, offsetof(wrapperobject, self), READONLY},
-	{0}
+    {"__self__", T_OBJECT, offsetof(wrapperobject, self), READONLY},
+    {0}
 };
 
 static PyObject *
 wrapper_objclass(wrapperobject *wp)
 {
-	PyObject *c = (PyObject *)wp->descr->d_type;
+    PyObject *c = (PyObject *)wp->descr->d_type;
 
-	Py_INCREF(c);
-	return c;
+    Py_INCREF(c);
+    return c;
 }
 
 static PyObject *
 wrapper_name(wrapperobject *wp)
 {
-	char *s = wp->descr->d_base->name;
+    char *s = wp->descr->d_base->name;
 
-	return PyString_FromString(s);
+    return PyString_FromString(s);
 }
 
 static PyObject *
 wrapper_doc(wrapperobject *wp)
 {
-	char *s = wp->descr->d_base->doc;
+    char *s = wp->descr->d_base->doc;
 
-	if (s == NULL) {
-		Py_INCREF(Py_None);
-		return Py_None;
-	}
-	else {
-		return PyString_FromString(s);
-	}
+    if (s == NULL) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    else {
+        return PyString_FromString(s);
+    }
 }
 
 static PyGetSetDef wrapper_getsets[] = {
-	{"__objclass__", (getter)wrapper_objclass},
-	{"__name__", (getter)wrapper_name},
-	{"__doc__", (getter)wrapper_doc},
-	{0}
+    {"__objclass__", (getter)wrapper_objclass},
+    {"__name__", (getter)wrapper_name},
+    {"__doc__", (getter)wrapper_doc},
+    {0}
 };
 
 static PyObject *
 wrapper_call(wrapperobject *wp, PyObject *args, PyObject *kwds)
 {
-	wrapperfunc wrapper = wp->descr->d_base->wrapper;
-	PyObject *self = wp->self;
+    wrapperfunc wrapper = wp->descr->d_base->wrapper;
+    PyObject *self = wp->self;
 
-	if (wp->descr->d_base->flags & PyWrapperFlag_KEYWORDS) {
-		wrapperfunc_kwds wk = (wrapperfunc_kwds)wrapper;
-		return (*wk)(self, args, wp->descr->d_wrapped, kwds);
-	}
+    if (wp->descr->d_base->flags & PyWrapperFlag_KEYWORDS) {
+        wrapperfunc_kwds wk = (wrapperfunc_kwds)wrapper;
+        return (*wk)(self, args, wp->descr->d_wrapped, kwds);
+    }
 
-	if (kwds != NULL && (!PyDict_Check(kwds) || PyDict_Size(kwds) != 0)) {
-		PyErr_Format(PyExc_TypeError,
-			     "wrapper %s doesn't take keyword arguments",
-			     wp->descr->d_base->name);
-		return NULL;
-	}
-	return (*wrapper)(self, args, wp->descr->d_wrapped);
+    if (kwds != NULL && (!PyDict_Check(kwds) || PyDict_Size(kwds) != 0)) {
+        PyErr_Format(PyExc_TypeError,
+                     "wrapper %s doesn't take keyword arguments",
+                     wp->descr->d_base->name);
+        return NULL;
+    }
+    return (*wrapper)(self, args, wp->descr->d_wrapped);
 }
 
 static int
 wrapper_traverse(PyObject *self, visitproc visit, void *arg)
 {
-	wrapperobject *wp = (wrapperobject *)self;
-	Py_VISIT(wp->descr);
-	Py_VISIT(wp->self);
-	return 0;
+    wrapperobject *wp = (wrapperobject *)self;
+    Py_VISIT(wp->descr);
+    Py_VISIT(wp->self);
+    return 0;
 }
 
 static PyTypeObject wrappertype = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"method-wrapper",			/* tp_name */
-	sizeof(wrapperobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)wrapper_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)wrapper_compare,		/* tp_compare */
-	(reprfunc)wrapper_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,		       			/* tp_as_mapping */
-	(hashfunc)wrapper_hash,			/* tp_hash */
-	(ternaryfunc)wrapper_call,		/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
- 	0,					/* tp_doc */
-	wrapper_traverse,			/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	wrapper_members,			/* tp_members */
-	wrapper_getsets,			/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "method-wrapper",                           /* tp_name */
+    sizeof(wrapperobject),                      /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)wrapper_dealloc,                /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)wrapper_compare,                   /* tp_compare */
+    (reprfunc)wrapper_repr,                     /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)wrapper_hash,                     /* tp_hash */
+    (ternaryfunc)wrapper_call,                  /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+    0,                                          /* tp_doc */
+    wrapper_traverse,                           /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    wrapper_members,                            /* tp_members */
+    wrapper_getsets,                            /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
 };
 
 PyObject *
 PyWrapper_New(PyObject *d, PyObject *self)
 {
-	wrapperobject *wp;
-	PyWrapperDescrObject *descr;
+    wrapperobject *wp;
+    PyWrapperDescrObject *descr;
 
-	assert(PyObject_TypeCheck(d, &PyWrapperDescr_Type));
-	descr = (PyWrapperDescrObject *)d;
-	assert(PyObject_IsInstance(self, (PyObject *)(descr->d_type)));
+    assert(PyObject_TypeCheck(d, &PyWrapperDescr_Type));
+    descr = (PyWrapperDescrObject *)d;
+    assert(PyObject_IsInstance(self, (PyObject *)(descr->d_type)));
 
-	wp = PyObject_GC_New(wrapperobject, &wrappertype);
-	if (wp != NULL) {
-		Py_INCREF(descr);
-		wp->descr = descr;
-		Py_INCREF(self);
-		wp->self = self;
-		_PyObject_GC_TRACK(wp);
-	}
-	return (PyObject *)wp;
+    wp = PyObject_GC_New(wrapperobject, &wrappertype);
+    if (wp != NULL) {
+        Py_INCREF(descr);
+        wp->descr = descr;
+        Py_INCREF(self);
+        wp->self = self;
+        _PyObject_GC_TRACK(wp);
+    }
+    return (PyObject *)wp;
 }
 
 
@@ -1065,247 +1065,247 @@
 /*
     class property(object):
 
-        def __init__(self, fget=None, fset=None, fdel=None, doc=None):
-            if doc is None and fget is not None and hasattr(fget, "__doc__"):
-                doc = fget.__doc__
-            self.__get = fget
-            self.__set = fset
-            self.__del = fdel
-            self.__doc__ = doc
+    def __init__(self, fget=None, fset=None, fdel=None, doc=None):
+        if doc is None and fget is not None and hasattr(fget, "__doc__"):
+        doc = fget.__doc__
+        self.__get = fget
+        self.__set = fset
+        self.__del = fdel
+        self.__doc__ = doc
 
-        def __get__(self, inst, type=None):
-            if inst is None:
-                return self
-            if self.__get is None:
-                raise AttributeError, "unreadable attribute"
-            return self.__get(inst)
+    def __get__(self, inst, type=None):
+        if inst is None:
+        return self
+        if self.__get is None:
+        raise AttributeError, "unreadable attribute"
+        return self.__get(inst)
 
-        def __set__(self, inst, value):
-            if self.__set is None:
-                raise AttributeError, "can't set attribute"
-            return self.__set(inst, value)
+    def __set__(self, inst, value):
+        if self.__set is None:
+        raise AttributeError, "can't set attribute"
+        return self.__set(inst, value)
 
-        def __delete__(self, inst):
-            if self.__del is None:
-                raise AttributeError, "can't delete attribute"
-            return self.__del(inst)
+    def __delete__(self, inst):
+        if self.__del is None:
+        raise AttributeError, "can't delete attribute"
+        return self.__del(inst)
 
 */
 
 typedef struct {
-	PyObject_HEAD
-	PyObject *prop_get;
-	PyObject *prop_set;
-	PyObject *prop_del;
-	PyObject *prop_doc;
-	int getter_doc;
+    PyObject_HEAD
+    PyObject *prop_get;
+    PyObject *prop_set;
+    PyObject *prop_del;
+    PyObject *prop_doc;
+    int getter_doc;
 } propertyobject;
 
 static PyObject * property_copy(PyObject *, PyObject *, PyObject *,
-				  PyObject *, PyObject *);
+                                  PyObject *, PyObject *);
 
 static PyMemberDef property_members[] = {
-	{"fget", T_OBJECT, offsetof(propertyobject, prop_get), READONLY},
-	{"fset", T_OBJECT, offsetof(propertyobject, prop_set), READONLY},
-	{"fdel", T_OBJECT, offsetof(propertyobject, prop_del), READONLY},
-	{"__doc__",  T_OBJECT, offsetof(propertyobject, prop_doc), READONLY},
-	{0}
+    {"fget", T_OBJECT, offsetof(propertyobject, prop_get), READONLY},
+    {"fset", T_OBJECT, offsetof(propertyobject, prop_set), READONLY},
+    {"fdel", T_OBJECT, offsetof(propertyobject, prop_del), READONLY},
+    {"__doc__",  T_OBJECT, offsetof(propertyobject, prop_doc), READONLY},
+    {0}
 };
 
 
 PyDoc_STRVAR(getter_doc,
-	     "Descriptor to change the getter on a property.");
+             "Descriptor to change the getter on a property.");
 
 static PyObject *
 property_getter(PyObject *self, PyObject *getter)
 {
-	return property_copy(self, getter, NULL, NULL, NULL);
+    return property_copy(self, getter, NULL, NULL, NULL);
 }
 
 
 PyDoc_STRVAR(setter_doc,
-	     "Descriptor to change the setter on a property.");
+             "Descriptor to change the setter on a property.");
 
 static PyObject *
 property_setter(PyObject *self, PyObject *setter)
 {
-	return property_copy(self, NULL, setter, NULL, NULL);
+    return property_copy(self, NULL, setter, NULL, NULL);
 }
 
 
 PyDoc_STRVAR(deleter_doc,
-	     "Descriptor to change the deleter on a property.");
+             "Descriptor to change the deleter on a property.");
 
 static PyObject *
 property_deleter(PyObject *self, PyObject *deleter)
 {
-	return property_copy(self, NULL, NULL, deleter, NULL);
+    return property_copy(self, NULL, NULL, deleter, NULL);
 }
 
 
 static PyMethodDef property_methods[] = {
-	{"getter", property_getter, METH_O, getter_doc},
-	{"setter", property_setter, METH_O, setter_doc},
-	{"deleter", property_deleter, METH_O, deleter_doc},
-	{0}
+    {"getter", property_getter, METH_O, getter_doc},
+    {"setter", property_setter, METH_O, setter_doc},
+    {"deleter", property_deleter, METH_O, deleter_doc},
+    {0}
 };
 
 
 static void
 property_dealloc(PyObject *self)
 {
-	propertyobject *gs = (propertyobject *)self;
+    propertyobject *gs = (propertyobject *)self;
 
-	_PyObject_GC_UNTRACK(self);
-	Py_XDECREF(gs->prop_get);
-	Py_XDECREF(gs->prop_set);
-	Py_XDECREF(gs->prop_del);
-	Py_XDECREF(gs->prop_doc);
-	self->ob_type->tp_free(self);
+    _PyObject_GC_UNTRACK(self);
+    Py_XDECREF(gs->prop_get);
+    Py_XDECREF(gs->prop_set);
+    Py_XDECREF(gs->prop_del);
+    Py_XDECREF(gs->prop_doc);
+    self->ob_type->tp_free(self);
 }
 
 static PyObject *
 property_descr_get(PyObject *self, PyObject *obj, PyObject *type)
 {
-	propertyobject *gs = (propertyobject *)self;
+    propertyobject *gs = (propertyobject *)self;
 
-	if (obj == NULL || obj == Py_None) {
-		Py_INCREF(self);
-		return self;
-	}
-	if (gs->prop_get == NULL) {
-		PyErr_SetString(PyExc_AttributeError, "unreadable attribute");
-		return NULL;
-	}
-	return PyObject_CallFunction(gs->prop_get, "(O)", obj);
+    if (obj == NULL || obj == Py_None) {
+        Py_INCREF(self);
+        return self;
+    }
+    if (gs->prop_get == NULL) {
+        PyErr_SetString(PyExc_AttributeError, "unreadable attribute");
+        return NULL;
+    }
+    return PyObject_CallFunction(gs->prop_get, "(O)", obj);
 }
 
 static int
 property_descr_set(PyObject *self, PyObject *obj, PyObject *value)
 {
-	propertyobject *gs = (propertyobject *)self;
-	PyObject *func, *res;
+    propertyobject *gs = (propertyobject *)self;
+    PyObject *func, *res;
 
-	if (value == NULL)
-		func = gs->prop_del;
-	else
-		func = gs->prop_set;
-	if (func == NULL) {
-		PyErr_SetString(PyExc_AttributeError,
-				value == NULL ?
-				"can't delete attribute" :
-				"can't set attribute");
-		return -1;
-	}
-	if (value == NULL)
-		res = PyObject_CallFunction(func, "(O)", obj);
-	else
-		res = PyObject_CallFunction(func, "(OO)", obj, value);
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+    if (value == NULL)
+        func = gs->prop_del;
+    else
+        func = gs->prop_set;
+    if (func == NULL) {
+        PyErr_SetString(PyExc_AttributeError,
+                        value == NULL ?
+                        "can't delete attribute" :
+                "can't set attribute");
+        return -1;
+    }
+    if (value == NULL)
+        res = PyObject_CallFunction(func, "(O)", obj);
+    else
+        res = PyObject_CallFunction(func, "(OO)", obj, value);
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 static PyObject *
 property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *del,
-		PyObject *doc)
+                PyObject *doc)
 {
-	propertyobject *pold = (propertyobject *)old;
-	PyObject *new, *type;
+    propertyobject *pold = (propertyobject *)old;
+    PyObject *new, *type;
 
-	type = PyObject_Type(old);
-	if (type == NULL)
-		return NULL;
+    type = PyObject_Type(old);
+    if (type == NULL)
+        return NULL;
 
-	if (get == NULL || get == Py_None) {
-		Py_XDECREF(get);
-		get = pold->prop_get ? pold->prop_get : Py_None;
-	}
-	if (set == NULL || set == Py_None) {
-		Py_XDECREF(set);
-		set = pold->prop_set ? pold->prop_set : Py_None;
-	}
-	if (del == NULL || del == Py_None) {
-		Py_XDECREF(del);
-		del = pold->prop_del ? pold->prop_del : Py_None;
-	}
-	if (doc == NULL || doc == Py_None) {
-		Py_XDECREF(doc);
-		if (pold->getter_doc && get != Py_None) {
-			/* make _init use __doc__ from getter */
-			doc = Py_None;
-		}
-		else {
-			doc = pold->prop_doc ? pold->prop_doc : Py_None;
-		}
-	}
+    if (get == NULL || get == Py_None) {
+        Py_XDECREF(get);
+        get = pold->prop_get ? pold->prop_get : Py_None;
+    }
+    if (set == NULL || set == Py_None) {
+        Py_XDECREF(set);
+        set = pold->prop_set ? pold->prop_set : Py_None;
+    }
+    if (del == NULL || del == Py_None) {
+        Py_XDECREF(del);
+        del = pold->prop_del ? pold->prop_del : Py_None;
+    }
+    if (doc == NULL || doc == Py_None) {
+        Py_XDECREF(doc);
+        if (pold->getter_doc && get != Py_None) {
+            /* make _init use __doc__ from getter */
+            doc = Py_None;
+        }
+        else {
+            doc = pold->prop_doc ? pold->prop_doc : Py_None;
+        }
+    }
 
-	new =  PyObject_CallFunction(type, "OOOO", get, set, del, doc);
-	Py_DECREF(type);
-	if (new == NULL)
-		return NULL;
-	return new;
+    new =  PyObject_CallFunction(type, "OOOO", get, set, del, doc);
+    Py_DECREF(type);
+    if (new == NULL)
+        return NULL;
+    return new;
 }
 
 static int
 property_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	PyObject *get = NULL, *set = NULL, *del = NULL, *doc = NULL;
-	static char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
-	propertyobject *prop = (propertyobject *)self;
-	
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOOO:property",
-					 kwlist, &get, &set, &del, &doc))
-		return -1;
+    PyObject *get = NULL, *set = NULL, *del = NULL, *doc = NULL;
+    static char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
+    propertyobject *prop = (propertyobject *)self;
 
-	if (get == Py_None)
-		get = NULL;
-	if (set == Py_None)
-		set = NULL;
-	if (del == Py_None)
-		del = NULL;
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOOO:property",
+                                     kwlist, &get, &set, &del, &doc))
+        return -1;
 
-	Py_XINCREF(get);
-	Py_XINCREF(set);
-	Py_XINCREF(del);
-	Py_XINCREF(doc);
+    if (get == Py_None)
+        get = NULL;
+    if (set == Py_None)
+        set = NULL;
+    if (del == Py_None)
+        del = NULL;
 
-	prop->prop_get = get;
-	prop->prop_set = set;
-	prop->prop_del = del;
-	prop->prop_doc = doc;
-	prop->getter_doc = 0;
+    Py_XINCREF(get);
+    Py_XINCREF(set);
+    Py_XINCREF(del);
+    Py_XINCREF(doc);
 
-	/* if no docstring given and the getter has one, use that one */
-	if ((doc == NULL || doc == Py_None) && get != NULL) {
-		PyObject *get_doc = PyObject_GetAttrString(get, "__doc__");
-		if (get_doc) {
-			if (Py_TYPE(self) == &PyProperty_Type) {
-				Py_XDECREF(prop->prop_doc);
-				prop->prop_doc = get_doc;
-			}
-			else {
-				/* If this is a property subclass, put __doc__
-				in dict of the subclass instance instead,
-				otherwise it gets shadowed by __doc__ in the
-				class's dict. */
-				int err = PyObject_SetAttrString(self, "__doc__", get_doc);
-				Py_DECREF(get_doc);
-				if (err < 0)
-					return -1;
-			}
-			prop->getter_doc = 1;
-		}
-		else if (PyErr_ExceptionMatches(PyExc_Exception)) {
-			PyErr_Clear();
-		}
-		else {
-			return -1;
-		}
-	}
+    prop->prop_get = get;
+    prop->prop_set = set;
+    prop->prop_del = del;
+    prop->prop_doc = doc;
+    prop->getter_doc = 0;
 
-	return 0;
+    /* if no docstring given and the getter has one, use that one */
+    if ((doc == NULL || doc == Py_None) && get != NULL) {
+        PyObject *get_doc = PyObject_GetAttrString(get, "__doc__");
+        if (get_doc) {
+            if (Py_TYPE(self) == &PyProperty_Type) {
+                Py_XDECREF(prop->prop_doc);
+                prop->prop_doc = get_doc;
+            }
+            else {
+                /* If this is a property subclass, put __doc__
+                in dict of the subclass instance instead,
+                otherwise it gets shadowed by __doc__ in the
+                class's dict. */
+                int err = PyObject_SetAttrString(self, "__doc__", get_doc);
+                Py_DECREF(get_doc);
+                if (err < 0)
+                    return -1;
+            }
+            prop->getter_doc = 1;
+        }
+        else if (PyErr_ExceptionMatches(PyExc_Exception)) {
+            PyErr_Clear();
+        }
+        else {
+            return -1;
+        }
+    }
+
+    return 0;
 }
 
 PyDoc_STRVAR(property_doc,
@@ -1333,54 +1333,54 @@
 static int
 property_traverse(PyObject *self, visitproc visit, void *arg)
 {
-	propertyobject *pp = (propertyobject *)self;
-	Py_VISIT(pp->prop_get);
-	Py_VISIT(pp->prop_set);
-	Py_VISIT(pp->prop_del);
-	Py_VISIT(pp->prop_doc);
-	return 0;
+    propertyobject *pp = (propertyobject *)self;
+    Py_VISIT(pp->prop_get);
+    Py_VISIT(pp->prop_set);
+    Py_VISIT(pp->prop_del);
+    Py_VISIT(pp->prop_doc);
+    return 0;
 }
 
 PyTypeObject PyProperty_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"property",				/* tp_name */
-	sizeof(propertyobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	property_dealloc,	 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,		       			/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_BASETYPE,		/* tp_flags */
- 	property_doc,				/* tp_doc */
-	property_traverse,			/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	property_methods,			/* tp_methods */
-	property_members,			/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	property_descr_get,			/* tp_descr_get */
-	property_descr_set,			/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	property_init,				/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	PyType_GenericNew,			/* tp_new */
-	PyObject_GC_Del,               		/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "property",                                 /* tp_name */
+    sizeof(propertyobject),                     /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    property_dealloc,                           /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_BASETYPE,                    /* tp_flags */
+    property_doc,                               /* tp_doc */
+    property_traverse,                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    property_methods,                           /* tp_methods */
+    property_members,                           /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    property_descr_get,                         /* tp_descr_get */
+    property_descr_set,                         /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    property_init,                              /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    PyType_GenericNew,                          /* tp_new */
+    PyObject_GC_Del,                            /* tp_free */
 };
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 2ab1520..def3da9 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -16,12 +16,12 @@
 static void
 set_key_error(PyObject *arg)
 {
-	PyObject *tup;
-	tup = PyTuple_Pack(1, arg);
-	if (!tup)
-		return; /* caller will expect error to be set anyway */
-	PyErr_SetObject(PyExc_KeyError, tup);
-	Py_DECREF(tup);
+    PyObject *tup;
+    tup = PyTuple_Pack(1, arg);
+    if (!tup)
+        return; /* caller will expect error to be set anyway */
+    PyErr_SetObject(PyExc_KeyError, tup);
+    Py_DECREF(tup);
 }
 
 /* Define this out if you don't want conversion statistics on exit. */
@@ -141,7 +141,7 @@
 PyObject *
 _PyDict_Dummy(void)
 {
-	return dummy;
+    return dummy;
 }
 #endif
 
@@ -156,9 +156,9 @@
 static void
 show_counts(void)
 {
-	fprintf(stderr, "created %ld string dicts\n", created);
-	fprintf(stderr, "converted %ld to normal dicts\n", converted);
-	fprintf(stderr, "%.2f%% conversion rate\n", (100.0*converted)/created);
+    fprintf(stderr, "created %ld string dicts\n", created);
+    fprintf(stderr, "converted %ld to normal dicts\n", converted);
+    fprintf(stderr, "%.2f%% conversion rate\n", (100.0*converted)/created);
 }
 #endif
 
@@ -171,12 +171,12 @@
 static void
 show_alloc(void)
 {
-	fprintf(stderr, "Dict allocations: %" PY_FORMAT_SIZE_T "d\n",
-		count_alloc);
-	fprintf(stderr, "Dict reuse through freelist: %" PY_FORMAT_SIZE_T
-		"d\n", count_reuse);
-	fprintf(stderr, "%.2f%% reuse rate\n\n",
-		(100.0*count_reuse/(count_alloc+count_reuse)));
+    fprintf(stderr, "Dict allocations: %" PY_FORMAT_SIZE_T "d\n",
+        count_alloc);
+    fprintf(stderr, "Dict reuse through freelist: %" PY_FORMAT_SIZE_T
+        "d\n", count_reuse);
+    fprintf(stderr, "%.2f%% reuse rate\n\n",
+        (100.0*count_reuse/(count_alloc+count_reuse)));
 }
 #endif
 
@@ -188,12 +188,12 @@
 static void
 show_track(void)
 {
-	fprintf(stderr, "Dicts created: %" PY_FORMAT_SIZE_T "d\n",
-		count_tracked + count_untracked);
-	fprintf(stderr, "Dicts tracked by the GC: %" PY_FORMAT_SIZE_T
-		"d\n", count_tracked);
-	fprintf(stderr, "%.2f%% dict tracking rate\n\n",
-		(100.0*count_tracked/(count_untracked+count_tracked)));
+    fprintf(stderr, "Dicts created: %" PY_FORMAT_SIZE_T "d\n",
+        count_tracked + count_untracked);
+    fprintf(stderr, "Dicts tracked by the GC: %" PY_FORMAT_SIZE_T
+        "d\n", count_tracked);
+    fprintf(stderr, "%.2f%% dict tracking rate\n\n",
+        (100.0*count_tracked/(count_untracked+count_tracked)));
 }
 #endif
 
@@ -207,15 +207,15 @@
    an excellent reason not to).
 */
 
-#define INIT_NONZERO_DICT_SLOTS(mp) do {				\
-	(mp)->ma_table = (mp)->ma_smalltable;				\
-	(mp)->ma_mask = PyDict_MINSIZE - 1;				\
+#define INIT_NONZERO_DICT_SLOTS(mp) do {                                \
+    (mp)->ma_table = (mp)->ma_smalltable;                               \
+    (mp)->ma_mask = PyDict_MINSIZE - 1;                                 \
     } while(0)
 
-#define EMPTY_TO_MINSIZE(mp) do {					\
-	memset((mp)->ma_smalltable, 0, sizeof((mp)->ma_smalltable));	\
-	(mp)->ma_used = (mp)->ma_fill = 0;				\
-	INIT_NONZERO_DICT_SLOTS(mp);					\
+#define EMPTY_TO_MINSIZE(mp) do {                                       \
+    memset((mp)->ma_smalltable, 0, sizeof((mp)->ma_smalltable));        \
+    (mp)->ma_used = (mp)->ma_fill = 0;                                  \
+    INIT_NONZERO_DICT_SLOTS(mp);                                        \
     } while(0)
 
 /* Dictionary reuse scheme to save calls to malloc, free, and memset */
@@ -228,68 +228,68 @@
 void
 PyDict_Fini(void)
 {
-	PyDictObject *op;
+    PyDictObject *op;
 
-	while (numfree) {
-		op = free_list[--numfree];
-		assert(PyDict_CheckExact(op));
-		PyObject_GC_Del(op);
-	}
+    while (numfree) {
+        op = free_list[--numfree];
+        assert(PyDict_CheckExact(op));
+        PyObject_GC_Del(op);
+    }
 }
 
 PyObject *
 PyDict_New(void)
 {
-	register PyDictObject *mp;
-	if (dummy == NULL) { /* Auto-initialize dummy */
-		dummy = PyString_FromString("<dummy key>");
-		if (dummy == NULL)
-			return NULL;
+    register PyDictObject *mp;
+    if (dummy == NULL) { /* Auto-initialize dummy */
+        dummy = PyString_FromString("<dummy key>");
+        if (dummy == NULL)
+            return NULL;
 #ifdef SHOW_CONVERSION_COUNTS
-		Py_AtExit(show_counts);
+        Py_AtExit(show_counts);
 #endif
 #ifdef SHOW_ALLOC_COUNT
-		Py_AtExit(show_alloc);
+        Py_AtExit(show_alloc);
 #endif
 #ifdef SHOW_TRACK_COUNT
-		Py_AtExit(show_track);
+        Py_AtExit(show_track);
 #endif
-	}
-	if (numfree) {
-		mp = free_list[--numfree];
-		assert (mp != NULL);
-		assert (Py_TYPE(mp) == &PyDict_Type);
-		_Py_NewReference((PyObject *)mp);
-		if (mp->ma_fill) {
-			EMPTY_TO_MINSIZE(mp);
-		} else {
-			/* At least set ma_table and ma_mask; these are wrong
-			   if an empty but presized dict is added to freelist */
-			INIT_NONZERO_DICT_SLOTS(mp);
-		}
-		assert (mp->ma_used == 0);
-		assert (mp->ma_table == mp->ma_smalltable);
-		assert (mp->ma_mask == PyDict_MINSIZE - 1);
+    }
+    if (numfree) {
+        mp = free_list[--numfree];
+        assert (mp != NULL);
+        assert (Py_TYPE(mp) == &PyDict_Type);
+        _Py_NewReference((PyObject *)mp);
+        if (mp->ma_fill) {
+            EMPTY_TO_MINSIZE(mp);
+        } else {
+            /* At least set ma_table and ma_mask; these are wrong
+               if an empty but presized dict is added to freelist */
+            INIT_NONZERO_DICT_SLOTS(mp);
+        }
+        assert (mp->ma_used == 0);
+        assert (mp->ma_table == mp->ma_smalltable);
+        assert (mp->ma_mask == PyDict_MINSIZE - 1);
 #ifdef SHOW_ALLOC_COUNT
-		count_reuse++;
+        count_reuse++;
 #endif
-	} else {
-		mp = PyObject_GC_New(PyDictObject, &PyDict_Type);
-		if (mp == NULL)
-			return NULL;
-		EMPTY_TO_MINSIZE(mp);
+    } else {
+        mp = PyObject_GC_New(PyDictObject, &PyDict_Type);
+        if (mp == NULL)
+            return NULL;
+        EMPTY_TO_MINSIZE(mp);
 #ifdef SHOW_ALLOC_COUNT
-		count_alloc++;
+        count_alloc++;
 #endif
-	}
-	mp->ma_lookup = lookdict_string;
+    }
+    mp->ma_lookup = lookdict_string;
 #ifdef SHOW_TRACK_COUNT
-	count_untracked++;
+    count_untracked++;
 #endif
 #ifdef SHOW_CONVERSION_COUNTS
-	++created;
+    ++created;
 #endif
-	return (PyObject *)mp;
+    return (PyObject *)mp;
 }
 
 /*
@@ -319,80 +319,80 @@
 static PyDictEntry *
 lookdict(PyDictObject *mp, PyObject *key, register long hash)
 {
-	register size_t i;
-	register size_t perturb;
-	register PyDictEntry *freeslot;
-	register size_t mask = (size_t)mp->ma_mask;
-	PyDictEntry *ep0 = mp->ma_table;
-	register PyDictEntry *ep;
-	register int cmp;
-	PyObject *startkey;
+    register size_t i;
+    register size_t perturb;
+    register PyDictEntry *freeslot;
+    register size_t mask = (size_t)mp->ma_mask;
+    PyDictEntry *ep0 = mp->ma_table;
+    register PyDictEntry *ep;
+    register int cmp;
+    PyObject *startkey;
 
-	i = (size_t)hash & mask;
-	ep = &ep0[i];
-	if (ep->me_key == NULL || ep->me_key == key)
-		return ep;
+    i = (size_t)hash & mask;
+    ep = &ep0[i];
+    if (ep->me_key == NULL || ep->me_key == key)
+        return ep;
 
-	if (ep->me_key == dummy)
-		freeslot = ep;
-	else {
-		if (ep->me_hash == hash) {
-			startkey = ep->me_key;
-			Py_INCREF(startkey);
-			cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
-			Py_DECREF(startkey);
-			if (cmp < 0)
-				return NULL;
-			if (ep0 == mp->ma_table && ep->me_key == startkey) {
-				if (cmp > 0)
-					return ep;
-			}
-			else {
-				/* The compare did major nasty stuff to the
-				 * dict:  start over.
-				 * XXX A clever adversary could prevent this
-				 * XXX from terminating.
- 				 */
- 				return lookdict(mp, key, hash);
- 			}
-		}
-		freeslot = NULL;
-	}
+    if (ep->me_key == dummy)
+        freeslot = ep;
+    else {
+        if (ep->me_hash == hash) {
+            startkey = ep->me_key;
+            Py_INCREF(startkey);
+            cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
+            Py_DECREF(startkey);
+            if (cmp < 0)
+                return NULL;
+            if (ep0 == mp->ma_table && ep->me_key == startkey) {
+                if (cmp > 0)
+                    return ep;
+            }
+            else {
+                /* The compare did major nasty stuff to the
+                 * dict:  start over.
+                 * XXX A clever adversary could prevent this
+                 * XXX from terminating.
+                 */
+                return lookdict(mp, key, hash);
+            }
+        }
+        freeslot = NULL;
+    }
 
-	/* In the loop, me_key == dummy is by far (factor of 100s) the
-	   least likely outcome, so test for that last. */
-	for (perturb = hash; ; perturb >>= PERTURB_SHIFT) {
-		i = (i << 2) + i + perturb + 1;
-		ep = &ep0[i & mask];
-		if (ep->me_key == NULL)
-			return freeslot == NULL ? ep : freeslot;
-		if (ep->me_key == key)
-			return ep;
-		if (ep->me_hash == hash && ep->me_key != dummy) {
-			startkey = ep->me_key;
-			Py_INCREF(startkey);
-			cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
-			Py_DECREF(startkey);
-			if (cmp < 0)
-				return NULL;
-			if (ep0 == mp->ma_table && ep->me_key == startkey) {
-				if (cmp > 0)
-					return ep;
-			}
-			else {
-				/* The compare did major nasty stuff to the
-				 * dict:  start over.
-				 * XXX A clever adversary could prevent this
-				 * XXX from terminating.
- 				 */
- 				return lookdict(mp, key, hash);
- 			}
-		}
-		else if (ep->me_key == dummy && freeslot == NULL)
-			freeslot = ep;
-	}
-	assert(0);	/* NOT REACHED */
-	return 0;
+    /* In the loop, me_key == dummy is by far (factor of 100s) the
+       least likely outcome, so test for that last. */
+    for (perturb = hash; ; perturb >>= PERTURB_SHIFT) {
+        i = (i << 2) + i + perturb + 1;
+        ep = &ep0[i & mask];
+        if (ep->me_key == NULL)
+            return freeslot == NULL ? ep : freeslot;
+        if (ep->me_key == key)
+            return ep;
+        if (ep->me_hash == hash && ep->me_key != dummy) {
+            startkey = ep->me_key;
+            Py_INCREF(startkey);
+            cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
+            Py_DECREF(startkey);
+            if (cmp < 0)
+                return NULL;
+            if (ep0 == mp->ma_table && ep->me_key == startkey) {
+                if (cmp > 0)
+                    return ep;
+            }
+            else {
+                /* The compare did major nasty stuff to the
+                 * dict:  start over.
+                 * XXX A clever adversary could prevent this
+                 * XXX from terminating.
+                 */
+                return lookdict(mp, key, hash);
+            }
+        }
+        else if (ep->me_key == dummy && freeslot == NULL)
+            freeslot = ep;
+    }
+    assert(0);          /* NOT REACHED */
+    return 0;
 }
 
 /*
@@ -407,99 +407,99 @@
 static PyDictEntry *
 lookdict_string(PyDictObject *mp, PyObject *key, register long hash)
 {
-	register size_t i;
-	register size_t perturb;
-	register PyDictEntry *freeslot;
-	register size_t mask = (size_t)mp->ma_mask;
-	PyDictEntry *ep0 = mp->ma_table;
-	register PyDictEntry *ep;
+    register size_t i;
+    register size_t perturb;
+    register PyDictEntry *freeslot;
+    register size_t mask = (size_t)mp->ma_mask;
+    PyDictEntry *ep0 = mp->ma_table;
+    register PyDictEntry *ep;
 
-	/* Make sure this function doesn't have to handle non-string keys,
-	   including subclasses of str; e.g., one reason to subclass
-	   strings is to override __eq__, and for speed we don't cater to
-	   that here. */
-	if (!PyString_CheckExact(key)) {
+    /* Make sure this function doesn't have to handle non-string keys,
+       including subclasses of str; e.g., one reason to subclass
+       strings is to override __eq__, and for speed we don't cater to
+       that here. */
+    if (!PyString_CheckExact(key)) {
 #ifdef SHOW_CONVERSION_COUNTS
-		++converted;
+        ++converted;
 #endif
-		mp->ma_lookup = lookdict;
-		return lookdict(mp, key, hash);
-	}
-	i = hash & mask;
-	ep = &ep0[i];
-	if (ep->me_key == NULL || ep->me_key == key)
-		return ep;
-	if (ep->me_key == dummy)
-		freeslot = ep;
-	else {
-		if (ep->me_hash == hash && _PyString_Eq(ep->me_key, key))
-			return ep;
-		freeslot = NULL;
-	}
+        mp->ma_lookup = lookdict;
+        return lookdict(mp, key, hash);
+    }
+    i = hash & mask;
+    ep = &ep0[i];
+    if (ep->me_key == NULL || ep->me_key == key)
+        return ep;
+    if (ep->me_key == dummy)
+        freeslot = ep;
+    else {
+        if (ep->me_hash == hash && _PyString_Eq(ep->me_key, key))
+            return ep;
+        freeslot = NULL;
+    }
 
-	/* In the loop, me_key == dummy is by far (factor of 100s) the
-	   least likely outcome, so test for that last. */
-	for (perturb = hash; ; perturb >>= PERTURB_SHIFT) {
-		i = (i << 2) + i + perturb + 1;
-		ep = &ep0[i & mask];
-		if (ep->me_key == NULL)
-			return freeslot == NULL ? ep : freeslot;
-		if (ep->me_key == key
-		    || (ep->me_hash == hash
-		        && ep->me_key != dummy
-			&& _PyString_Eq(ep->me_key, key)))
-			return ep;
-		if (ep->me_key == dummy && freeslot == NULL)
-			freeslot = ep;
-	}
-	assert(0);	/* NOT REACHED */
-	return 0;
+    /* In the loop, me_key == dummy is by far (factor of 100s) the
+       least likely outcome, so test for that last. */
+    for (perturb = hash; ; perturb >>= PERTURB_SHIFT) {
+        i = (i << 2) + i + perturb + 1;
+        ep = &ep0[i & mask];
+        if (ep->me_key == NULL)
+            return freeslot == NULL ? ep : freeslot;
+        if (ep->me_key == key
+            || (ep->me_hash == hash
+            && ep->me_key != dummy
+            && _PyString_Eq(ep->me_key, key)))
+            return ep;
+        if (ep->me_key == dummy && freeslot == NULL)
+            freeslot = ep;
+    }
+    assert(0);          /* NOT REACHED */
+    return 0;
 }
 
 #ifdef SHOW_TRACK_COUNT
 #define INCREASE_TRACK_COUNT \
-	(count_tracked++, count_untracked--);
+    (count_tracked++, count_untracked--);
 #define DECREASE_TRACK_COUNT \
-	(count_tracked--, count_untracked++);
+    (count_tracked--, count_untracked++);
 #else
 #define INCREASE_TRACK_COUNT
 #define DECREASE_TRACK_COUNT
 #endif
 
 #define MAINTAIN_TRACKING(mp, key, value) \
-	do { \
-		if (!_PyObject_GC_IS_TRACKED(mp)) { \
-			if (_PyObject_GC_MAY_BE_TRACKED(key) || \
-				_PyObject_GC_MAY_BE_TRACKED(value)) { \
-				_PyObject_GC_TRACK(mp); \
-				INCREASE_TRACK_COUNT \
-			} \
-		} \
-	} while(0)
+    do { \
+        if (!_PyObject_GC_IS_TRACKED(mp)) { \
+            if (_PyObject_GC_MAY_BE_TRACKED(key) || \
+                _PyObject_GC_MAY_BE_TRACKED(value)) { \
+                _PyObject_GC_TRACK(mp); \
+                INCREASE_TRACK_COUNT \
+            } \
+        } \
+    } while(0)
 
 void
 _PyDict_MaybeUntrack(PyObject *op)
 {
-	PyDictObject *mp;
-	PyObject *value;
-	Py_ssize_t mask, i;
-	PyDictEntry *ep;
+    PyDictObject *mp;
+    PyObject *value;
+    Py_ssize_t mask, i;
+    PyDictEntry *ep;
 
-	if (!PyDict_CheckExact(op) || !_PyObject_GC_IS_TRACKED(op))
-		return;
-	
-	mp = (PyDictObject *) op;
-	ep = mp->ma_table;
-	mask = mp->ma_mask;
-	for (i = 0; i <= mask; i++) {
-		if ((value = ep[i].me_value) == NULL)
-			continue;
-		if (_PyObject_GC_MAY_BE_TRACKED(value) ||
-			_PyObject_GC_MAY_BE_TRACKED(ep[i].me_key))
-			return;
-	}
-	DECREASE_TRACK_COUNT
-	_PyObject_GC_UNTRACK(op);
+    if (!PyDict_CheckExact(op) || !_PyObject_GC_IS_TRACKED(op))
+        return;
+
+    mp = (PyDictObject *) op;
+    ep = mp->ma_table;
+    mask = mp->ma_mask;
+    for (i = 0; i <= mask; i++) {
+        if ((value = ep[i].me_value) == NULL)
+            continue;
+        if (_PyObject_GC_MAY_BE_TRACKED(value) ||
+            _PyObject_GC_MAY_BE_TRACKED(ep[i].me_key))
+            return;
+    }
+    DECREASE_TRACK_COUNT
+    _PyObject_GC_UNTRACK(op);
 }
 
 
@@ -512,37 +512,37 @@
 static int
 insertdict(register PyDictObject *mp, PyObject *key, long hash, PyObject *value)
 {
-	PyObject *old_value;
-	register PyDictEntry *ep;
-	typedef PyDictEntry *(*lookupfunc)(PyDictObject *, PyObject *, long);
+    PyObject *old_value;
+    register PyDictEntry *ep;
+    typedef PyDictEntry *(*lookupfunc)(PyDictObject *, PyObject *, long);
 
-	assert(mp->ma_lookup != NULL);
-	ep = mp->ma_lookup(mp, key, hash);
-	if (ep == NULL) {
-		Py_DECREF(key);
-		Py_DECREF(value);
-		return -1;
-	}
-	MAINTAIN_TRACKING(mp, key, value);
-	if (ep->me_value != NULL) {
-		old_value = ep->me_value;
-		ep->me_value = value;
-		Py_DECREF(old_value); /* which **CAN** re-enter */
-		Py_DECREF(key);
-	}
-	else {
-		if (ep->me_key == NULL)
-			mp->ma_fill++;
-		else {
-			assert(ep->me_key == dummy);
-			Py_DECREF(dummy);
-		}
-		ep->me_key = key;
-		ep->me_hash = (Py_ssize_t)hash;
-		ep->me_value = value;
-		mp->ma_used++;
-	}
-	return 0;
+    assert(mp->ma_lookup != NULL);
+    ep = mp->ma_lookup(mp, key, hash);
+    if (ep == NULL) {
+        Py_DECREF(key);
+        Py_DECREF(value);
+        return -1;
+    }
+    MAINTAIN_TRACKING(mp, key, value);
+    if (ep->me_value != NULL) {
+        old_value = ep->me_value;
+        ep->me_value = value;
+        Py_DECREF(old_value); /* which **CAN** re-enter */
+        Py_DECREF(key);
+    }
+    else {
+        if (ep->me_key == NULL)
+            mp->ma_fill++;
+        else {
+            assert(ep->me_key == dummy);
+            Py_DECREF(dummy);
+        }
+        ep->me_key = key;
+        ep->me_hash = (Py_ssize_t)hash;
+        ep->me_value = value;
+        mp->ma_used++;
+    }
+    return 0;
 }
 
 /*
@@ -555,27 +555,27 @@
 */
 static void
 insertdict_clean(register PyDictObject *mp, PyObject *key, long hash,
-		 PyObject *value)
+                 PyObject *value)
 {
-	register size_t i;
-	register size_t perturb;
-	register size_t mask = (size_t)mp->ma_mask;
-	PyDictEntry *ep0 = mp->ma_table;
-	register PyDictEntry *ep;
+    register size_t i;
+    register size_t perturb;
+    register size_t mask = (size_t)mp->ma_mask;
+    PyDictEntry *ep0 = mp->ma_table;
+    register PyDictEntry *ep;
 
-	MAINTAIN_TRACKING(mp, key, value);
-	i = hash & mask;
-	ep = &ep0[i];
-	for (perturb = hash; ep->me_key != NULL; perturb >>= PERTURB_SHIFT) {
-		i = (i << 2) + i + perturb + 1;
-		ep = &ep0[i & mask];
-	}
-	assert(ep->me_value == NULL);
-	mp->ma_fill++;
-	ep->me_key = key;
-	ep->me_hash = (Py_ssize_t)hash;
-	ep->me_value = value;
-	mp->ma_used++;
+    MAINTAIN_TRACKING(mp, key, value);
+    i = hash & mask;
+    ep = &ep0[i];
+    for (perturb = hash; ep->me_key != NULL; perturb >>= PERTURB_SHIFT) {
+        i = (i << 2) + i + perturb + 1;
+        ep = &ep0[i & mask];
+    }
+    assert(ep->me_value == NULL);
+    mp->ma_fill++;
+    ep->me_key = key;
+    ep->me_hash = (Py_ssize_t)hash;
+    ep->me_value = value;
+    mp->ma_used++;
 }
 
 /*
@@ -586,84 +586,84 @@
 static int
 dictresize(PyDictObject *mp, Py_ssize_t minused)
 {
-	Py_ssize_t newsize;
-	PyDictEntry *oldtable, *newtable, *ep;
-	Py_ssize_t i;
-	int is_oldtable_malloced;
-	PyDictEntry small_copy[PyDict_MINSIZE];
+    Py_ssize_t newsize;
+    PyDictEntry *oldtable, *newtable, *ep;
+    Py_ssize_t i;
+    int is_oldtable_malloced;
+    PyDictEntry small_copy[PyDict_MINSIZE];
 
-	assert(minused >= 0);
+    assert(minused >= 0);
 
-	/* Find the smallest table size > minused. */
-	for (newsize = PyDict_MINSIZE;
-	     newsize <= minused && newsize > 0;
-	     newsize <<= 1)
-		;
-	if (newsize <= 0) {
-		PyErr_NoMemory();
-		return -1;
-	}
+    /* Find the smallest table size > minused. */
+    for (newsize = PyDict_MINSIZE;
+         newsize <= minused && newsize > 0;
+         newsize <<= 1)
+        ;
+    if (newsize <= 0) {
+        PyErr_NoMemory();
+        return -1;
+    }
 
-	/* Get space for a new table. */
-	oldtable = mp->ma_table;
-	assert(oldtable != NULL);
-	is_oldtable_malloced = oldtable != mp->ma_smalltable;
+    /* Get space for a new table. */
+    oldtable = mp->ma_table;
+    assert(oldtable != NULL);
+    is_oldtable_malloced = oldtable != mp->ma_smalltable;
 
-	if (newsize == PyDict_MINSIZE) {
-		/* A large table is shrinking, or we can't get any smaller. */
-		newtable = mp->ma_smalltable;
-		if (newtable == oldtable) {
-			if (mp->ma_fill == mp->ma_used) {
-				/* No dummies, so no point doing anything. */
-				return 0;
-			}
-			/* We're not going to resize it, but rebuild the
-			   table anyway to purge old dummy entries.
-			   Subtle:  This is *necessary* if fill==size,
-			   as lookdict needs at least one virgin slot to
-			   terminate failing searches.  If fill < size, it's
-			   merely desirable, as dummies slow searches. */
-			assert(mp->ma_fill > mp->ma_used);
-			memcpy(small_copy, oldtable, sizeof(small_copy));
-			oldtable = small_copy;
-		}
-	}
-	else {
-		newtable = PyMem_NEW(PyDictEntry, newsize);
-		if (newtable == NULL) {
-			PyErr_NoMemory();
-			return -1;
-		}
-	}
+    if (newsize == PyDict_MINSIZE) {
+        /* A large table is shrinking, or we can't get any smaller. */
+        newtable = mp->ma_smalltable;
+        if (newtable == oldtable) {
+            if (mp->ma_fill == mp->ma_used) {
+                /* No dummies, so no point doing anything. */
+                return 0;
+            }
+            /* We're not going to resize it, but rebuild the
+               table anyway to purge old dummy entries.
+               Subtle:  This is *necessary* if fill==size,
+               as lookdict needs at least one virgin slot to
+               terminate failing searches.  If fill < size, it's
+               merely desirable, as dummies slow searches. */
+            assert(mp->ma_fill > mp->ma_used);
+            memcpy(small_copy, oldtable, sizeof(small_copy));
+            oldtable = small_copy;
+        }
+    }
+    else {
+        newtable = PyMem_NEW(PyDictEntry, newsize);
+        if (newtable == NULL) {
+            PyErr_NoMemory();
+            return -1;
+        }
+    }
 
-	/* Make the dict empty, using the new table. */
-	assert(newtable != oldtable);
-	mp->ma_table = newtable;
-	mp->ma_mask = newsize - 1;
-	memset(newtable, 0, sizeof(PyDictEntry) * newsize);
-	mp->ma_used = 0;
-	i = mp->ma_fill;
-	mp->ma_fill = 0;
+    /* Make the dict empty, using the new table. */
+    assert(newtable != oldtable);
+    mp->ma_table = newtable;
+    mp->ma_mask = newsize - 1;
+    memset(newtable, 0, sizeof(PyDictEntry) * newsize);
+    mp->ma_used = 0;
+    i = mp->ma_fill;
+    mp->ma_fill = 0;
 
-	/* Copy the data over; this is refcount-neutral for active entries;
-	   dummy entries aren't copied over, of course */
-	for (ep = oldtable; i > 0; ep++) {
-		if (ep->me_value != NULL) {	/* active entry */
-			--i;
-			insertdict_clean(mp, ep->me_key, (long)ep->me_hash,
-					 ep->me_value);
-		}
-		else if (ep->me_key != NULL) {	/* dummy entry */
-			--i;
-			assert(ep->me_key == dummy);
-			Py_DECREF(ep->me_key);
-		}
-		/* else key == value == NULL:  nothing to do */
-	}
+    /* Copy the data over; this is refcount-neutral for active entries;
+       dummy entries aren't copied over, of course */
+    for (ep = oldtable; i > 0; ep++) {
+        if (ep->me_value != NULL) {             /* active entry */
+            --i;
+            insertdict_clean(mp, ep->me_key, (long)ep->me_hash,
+                             ep->me_value);
+        }
+        else if (ep->me_key != NULL) {          /* dummy entry */
+            --i;
+            assert(ep->me_key == dummy);
+            Py_DECREF(ep->me_key);
+        }
+        /* else key == value == NULL:  nothing to do */
+    }
 
-	if (is_oldtable_malloced)
-		PyMem_DEL(oldtable);
-	return 0;
+    if (is_oldtable_malloced)
+        PyMem_DEL(oldtable);
+    return 0;
 }
 
 /* Create a new dictionary pre-sized to hold an estimated number of elements.
@@ -674,13 +674,13 @@
 PyObject *
 _PyDict_NewPresized(Py_ssize_t minused)
 {
-	PyObject *op = PyDict_New();
+    PyObject *op = PyDict_New();
 
-	if (minused>5 && op != NULL && dictresize((PyDictObject *)op, minused) == -1) {
-		Py_DECREF(op);
-		return NULL;
-	}
-	return op;
+    if (minused>5 && op != NULL && dictresize((PyDictObject *)op, minused) == -1) {
+        Py_DECREF(op);
+        return NULL;
+    }
+    return op;
 }
 
 /* Note that, for historical reasons, PyDict_GetItem() suppresses all errors
@@ -696,46 +696,46 @@
 PyObject *
 PyDict_GetItem(PyObject *op, PyObject *key)
 {
-	long hash;
-	PyDictObject *mp = (PyDictObject *)op;
-	PyDictEntry *ep;
-	PyThreadState *tstate;
-	if (!PyDict_Check(op))
-		return NULL;
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1)
-	{
-		hash = PyObject_Hash(key);
-		if (hash == -1) {
-			PyErr_Clear();
-			return NULL;
-		}
-	}
+    long hash;
+    PyDictObject *mp = (PyDictObject *)op;
+    PyDictEntry *ep;
+    PyThreadState *tstate;
+    if (!PyDict_Check(op))
+        return NULL;
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1)
+    {
+        hash = PyObject_Hash(key);
+        if (hash == -1) {
+            PyErr_Clear();
+            return NULL;
+        }
+    }
 
-	/* We can arrive here with a NULL tstate during initialization: try
-	   running "python -Wi" for an example related to string interning.
-	   Let's just hope that no exception occurs then...  This must be
-	   _PyThreadState_Current and not PyThreadState_GET() because in debug
-	   mode, the latter complains if tstate is NULL. */
-	tstate = _PyThreadState_Current;
-	if (tstate != NULL && tstate->curexc_type != NULL) {
-		/* preserve the existing exception */
-		PyObject *err_type, *err_value, *err_tb;
-		PyErr_Fetch(&err_type, &err_value, &err_tb);
-		ep = (mp->ma_lookup)(mp, key, hash);
-		/* ignore errors */
-		PyErr_Restore(err_type, err_value, err_tb);
-		if (ep == NULL)
-			return NULL;
-	}
-	else {
-		ep = (mp->ma_lookup)(mp, key, hash);
-		if (ep == NULL) {
-			PyErr_Clear();
-			return NULL;
-		}
-	}
-	return ep->me_value;
+    /* We can arrive here with a NULL tstate during initialization: try
+       running "python -Wi" for an example related to string interning.
+       Let's just hope that no exception occurs then...  This must be
+       _PyThreadState_Current and not PyThreadState_GET() because in debug
+       mode, the latter complains if tstate is NULL. */
+    tstate = _PyThreadState_Current;
+    if (tstate != NULL && tstate->curexc_type != NULL) {
+        /* preserve the existing exception */
+        PyObject *err_type, *err_value, *err_tb;
+        PyErr_Fetch(&err_type, &err_value, &err_tb);
+        ep = (mp->ma_lookup)(mp, key, hash);
+        /* ignore errors */
+        PyErr_Restore(err_type, err_value, err_tb);
+        if (ep == NULL)
+            return NULL;
+    }
+    else {
+        ep = (mp->ma_lookup)(mp, key, hash);
+        if (ep == NULL) {
+            PyErr_Clear();
+            return NULL;
+        }
+    }
+    return ep->me_value;
 }
 
 /* CAUTION: PyDict_SetItem() must guarantee that it won't resize the
@@ -747,157 +747,157 @@
 int
 PyDict_SetItem(register PyObject *op, PyObject *key, PyObject *value)
 {
-	register PyDictObject *mp;
-	register long hash;
-	register Py_ssize_t n_used;
+    register PyDictObject *mp;
+    register long hash;
+    register Py_ssize_t n_used;
 
-	if (!PyDict_Check(op)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	assert(key);
-	assert(value);
-	mp = (PyDictObject *)op;
-	if (PyString_CheckExact(key)) {
-		hash = ((PyStringObject *)key)->ob_shash;
-		if (hash == -1)
-			hash = PyObject_Hash(key);
-	}
-	else {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return -1;
-	}
-	assert(mp->ma_fill <= mp->ma_mask);  /* at least one empty slot */
-	n_used = mp->ma_used;
-	Py_INCREF(value);
-	Py_INCREF(key);
-	if (insertdict(mp, key, hash, value) != 0)
-		return -1;
-	/* If we added a key, we can safely resize.  Otherwise just return!
-	 * If fill >= 2/3 size, adjust size.  Normally, this doubles or
-	 * quaduples the size, but it's also possible for the dict to shrink
-	 * (if ma_fill is much larger than ma_used, meaning a lot of dict
-	 * keys have been * deleted).
-	 *
-	 * Quadrupling the size improves average dictionary sparseness
-	 * (reducing collisions) at the cost of some memory and iteration
-	 * speed (which loops over every possible entry).  It also halves
-	 * the number of expensive resize operations in a growing dictionary.
-	 *
-	 * Very large dictionaries (over 50K items) use doubling instead.
-	 * This may help applications with severe memory constraints.
-	 */
-	if (!(mp->ma_used > n_used && mp->ma_fill*3 >= (mp->ma_mask+1)*2))
-		return 0;
-	return dictresize(mp, (mp->ma_used > 50000 ? 2 : 4) * mp->ma_used);
+    if (!PyDict_Check(op)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    assert(key);
+    assert(value);
+    mp = (PyDictObject *)op;
+    if (PyString_CheckExact(key)) {
+        hash = ((PyStringObject *)key)->ob_shash;
+        if (hash == -1)
+            hash = PyObject_Hash(key);
+    }
+    else {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return -1;
+    }
+    assert(mp->ma_fill <= mp->ma_mask);  /* at least one empty slot */
+    n_used = mp->ma_used;
+    Py_INCREF(value);
+    Py_INCREF(key);
+    if (insertdict(mp, key, hash, value) != 0)
+        return -1;
+    /* If we added a key, we can safely resize.  Otherwise just return!
+     * If fill >= 2/3 size, adjust size.  Normally, this doubles or
+     * quaduples the size, but it's also possible for the dict to shrink
+     * (if ma_fill is much larger than ma_used, meaning a lot of dict
+     * keys have been * deleted).
+     *
+     * Quadrupling the size improves average dictionary sparseness
+     * (reducing collisions) at the cost of some memory and iteration
+     * speed (which loops over every possible entry).  It also halves
+     * the number of expensive resize operations in a growing dictionary.
+     *
+     * Very large dictionaries (over 50K items) use doubling instead.
+     * This may help applications with severe memory constraints.
+     */
+    if (!(mp->ma_used > n_used && mp->ma_fill*3 >= (mp->ma_mask+1)*2))
+        return 0;
+    return dictresize(mp, (mp->ma_used > 50000 ? 2 : 4) * mp->ma_used);
 }
 
 int
 PyDict_DelItem(PyObject *op, PyObject *key)
 {
-	register PyDictObject *mp;
-	register long hash;
-	register PyDictEntry *ep;
-	PyObject *old_value, *old_key;
+    register PyDictObject *mp;
+    register long hash;
+    register PyDictEntry *ep;
+    PyObject *old_value, *old_key;
 
-	if (!PyDict_Check(op)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	assert(key);
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return -1;
-	}
-	mp = (PyDictObject *)op;
-	ep = (mp->ma_lookup)(mp, key, hash);
-	if (ep == NULL)
-		return -1;
-	if (ep->me_value == NULL) {
-		set_key_error(key);
-		return -1;
-	}
-	old_key = ep->me_key;
-	Py_INCREF(dummy);
-	ep->me_key = dummy;
-	old_value = ep->me_value;
-	ep->me_value = NULL;
-	mp->ma_used--;
-	Py_DECREF(old_value);
-	Py_DECREF(old_key);
-	return 0;
+    if (!PyDict_Check(op)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    assert(key);
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return -1;
+    }
+    mp = (PyDictObject *)op;
+    ep = (mp->ma_lookup)(mp, key, hash);
+    if (ep == NULL)
+        return -1;
+    if (ep->me_value == NULL) {
+        set_key_error(key);
+        return -1;
+    }
+    old_key = ep->me_key;
+    Py_INCREF(dummy);
+    ep->me_key = dummy;
+    old_value = ep->me_value;
+    ep->me_value = NULL;
+    mp->ma_used--;
+    Py_DECREF(old_value);
+    Py_DECREF(old_key);
+    return 0;
 }
 
 void
 PyDict_Clear(PyObject *op)
 {
-	PyDictObject *mp;
-	PyDictEntry *ep, *table;
-	int table_is_malloced;
-	Py_ssize_t fill;
-	PyDictEntry small_copy[PyDict_MINSIZE];
+    PyDictObject *mp;
+    PyDictEntry *ep, *table;
+    int table_is_malloced;
+    Py_ssize_t fill;
+    PyDictEntry small_copy[PyDict_MINSIZE];
 #ifdef Py_DEBUG
-	Py_ssize_t i, n;
+    Py_ssize_t i, n;
 #endif
 
-	if (!PyDict_Check(op))
-		return;
-	mp = (PyDictObject *)op;
+    if (!PyDict_Check(op))
+        return;
+    mp = (PyDictObject *)op;
 #ifdef Py_DEBUG
-	n = mp->ma_mask + 1;
-	i = 0;
+    n = mp->ma_mask + 1;
+    i = 0;
 #endif
 
-	table = mp->ma_table;
-	assert(table != NULL);
-	table_is_malloced = table != mp->ma_smalltable;
+    table = mp->ma_table;
+    assert(table != NULL);
+    table_is_malloced = table != mp->ma_smalltable;
 
-	/* This is delicate.  During the process of clearing the dict,
-	 * decrefs can cause the dict to mutate.  To avoid fatal confusion
-	 * (voice of experience), we have to make the dict empty before
-	 * clearing the slots, and never refer to anything via mp->xxx while
-	 * clearing.
-	 */
-	fill = mp->ma_fill;
-	if (table_is_malloced)
-		EMPTY_TO_MINSIZE(mp);
+    /* This is delicate.  During the process of clearing the dict,
+     * decrefs can cause the dict to mutate.  To avoid fatal confusion
+     * (voice of experience), we have to make the dict empty before
+     * clearing the slots, and never refer to anything via mp->xxx while
+     * clearing.
+     */
+    fill = mp->ma_fill;
+    if (table_is_malloced)
+        EMPTY_TO_MINSIZE(mp);
 
-	else if (fill > 0) {
-		/* It's a small table with something that needs to be cleared.
-		 * Afraid the only safe way is to copy the dict entries into
-		 * another small table first.
-		 */
-		memcpy(small_copy, table, sizeof(small_copy));
-		table = small_copy;
-		EMPTY_TO_MINSIZE(mp);
-	}
-	/* else it's a small table that's already empty */
+    else if (fill > 0) {
+        /* It's a small table with something that needs to be cleared.
+         * Afraid the only safe way is to copy the dict entries into
+         * another small table first.
+         */
+        memcpy(small_copy, table, sizeof(small_copy));
+        table = small_copy;
+        EMPTY_TO_MINSIZE(mp);
+    }
+    /* else it's a small table that's already empty */
 
-	/* Now we can finally clear things.  If C had refcounts, we could
-	 * assert that the refcount on table is 1 now, i.e. that this function
-	 * has unique access to it, so decref side-effects can't alter it.
-	 */
-	for (ep = table; fill > 0; ++ep) {
+    /* Now we can finally clear things.  If C had refcounts, we could
+     * assert that the refcount on table is 1 now, i.e. that this function
+     * has unique access to it, so decref side-effects can't alter it.
+     */
+    for (ep = table; fill > 0; ++ep) {
 #ifdef Py_DEBUG
-		assert(i < n);
-		++i;
+        assert(i < n);
+        ++i;
 #endif
-		if (ep->me_key) {
-			--fill;
-			Py_DECREF(ep->me_key);
-			Py_XDECREF(ep->me_value);
-		}
+        if (ep->me_key) {
+            --fill;
+            Py_DECREF(ep->me_key);
+            Py_XDECREF(ep->me_value);
+        }
 #ifdef Py_DEBUG
-		else
-			assert(ep->me_value == NULL);
+        else
+            assert(ep->me_value == NULL);
 #endif
-	}
+    }
 
-	if (table_is_malloced)
-		PyMem_DEL(table);
+    if (table_is_malloced)
+        PyMem_DEL(table);
 }
 
 /*
@@ -918,55 +918,55 @@
 int
 PyDict_Next(PyObject *op, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue)
 {
-	register Py_ssize_t i;
-	register Py_ssize_t mask;
-	register PyDictEntry *ep;
+    register Py_ssize_t i;
+    register Py_ssize_t mask;
+    register PyDictEntry *ep;
 
-	if (!PyDict_Check(op))
-		return 0;
-	i = *ppos;
-	if (i < 0)
-		return 0;
-	ep = ((PyDictObject *)op)->ma_table;
-	mask = ((PyDictObject *)op)->ma_mask;
-	while (i <= mask && ep[i].me_value == NULL)
-		i++;
-	*ppos = i+1;
-	if (i > mask)
-		return 0;
-	if (pkey)
-		*pkey = ep[i].me_key;
-	if (pvalue)
-		*pvalue = ep[i].me_value;
-	return 1;
+    if (!PyDict_Check(op))
+        return 0;
+    i = *ppos;
+    if (i < 0)
+        return 0;
+    ep = ((PyDictObject *)op)->ma_table;
+    mask = ((PyDictObject *)op)->ma_mask;
+    while (i <= mask && ep[i].me_value == NULL)
+        i++;
+    *ppos = i+1;
+    if (i > mask)
+        return 0;
+    if (pkey)
+        *pkey = ep[i].me_key;
+    if (pvalue)
+        *pvalue = ep[i].me_value;
+    return 1;
 }
 
 /* Internal version of PyDict_Next that returns a hash value in addition to the key and value.*/
 int
 _PyDict_Next(PyObject *op, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue, long *phash)
 {
-	register Py_ssize_t i;
-	register Py_ssize_t mask;
-	register PyDictEntry *ep;
+    register Py_ssize_t i;
+    register Py_ssize_t mask;
+    register PyDictEntry *ep;
 
-	if (!PyDict_Check(op))
-		return 0;
-	i = *ppos;
-	if (i < 0)
-		return 0;
-	ep = ((PyDictObject *)op)->ma_table;
-	mask = ((PyDictObject *)op)->ma_mask;
-	while (i <= mask && ep[i].me_value == NULL)
-		i++;
-	*ppos = i+1;
-	if (i > mask)
-		return 0;
-        *phash = (long)(ep[i].me_hash);
-	if (pkey)
-		*pkey = ep[i].me_key;
-	if (pvalue)
-		*pvalue = ep[i].me_value;
-	return 1;
+    if (!PyDict_Check(op))
+        return 0;
+    i = *ppos;
+    if (i < 0)
+        return 0;
+    ep = ((PyDictObject *)op)->ma_table;
+    mask = ((PyDictObject *)op)->ma_mask;
+    while (i <= mask && ep[i].me_value == NULL)
+        i++;
+    *ppos = i+1;
+    if (i > mask)
+        return 0;
+    *phash = (long)(ep[i].me_hash);
+    if (pkey)
+        *pkey = ep[i].me_key;
+    if (pvalue)
+        *pvalue = ep[i].me_value;
+    return 1;
 }
 
 /* Methods */
@@ -974,456 +974,456 @@
 static void
 dict_dealloc(register PyDictObject *mp)
 {
-	register PyDictEntry *ep;
-	Py_ssize_t fill = mp->ma_fill;
- 	PyObject_GC_UnTrack(mp);
-	Py_TRASHCAN_SAFE_BEGIN(mp)
-	for (ep = mp->ma_table; fill > 0; ep++) {
-		if (ep->me_key) {
-			--fill;
-			Py_DECREF(ep->me_key);
-			Py_XDECREF(ep->me_value);
-		}
-	}
-	if (mp->ma_table != mp->ma_smalltable)
-		PyMem_DEL(mp->ma_table);
-	if (numfree < PyDict_MAXFREELIST && Py_TYPE(mp) == &PyDict_Type)
-		free_list[numfree++] = mp;
-	else
-		Py_TYPE(mp)->tp_free((PyObject *)mp);
-	Py_TRASHCAN_SAFE_END(mp)
+    register PyDictEntry *ep;
+    Py_ssize_t fill = mp->ma_fill;
+    PyObject_GC_UnTrack(mp);
+    Py_TRASHCAN_SAFE_BEGIN(mp)
+    for (ep = mp->ma_table; fill > 0; ep++) {
+        if (ep->me_key) {
+            --fill;
+            Py_DECREF(ep->me_key);
+            Py_XDECREF(ep->me_value);
+        }
+    }
+    if (mp->ma_table != mp->ma_smalltable)
+        PyMem_DEL(mp->ma_table);
+    if (numfree < PyDict_MAXFREELIST && Py_TYPE(mp) == &PyDict_Type)
+        free_list[numfree++] = mp;
+    else
+        Py_TYPE(mp)->tp_free((PyObject *)mp);
+    Py_TRASHCAN_SAFE_END(mp)
 }
 
 static int
 dict_print(register PyDictObject *mp, register FILE *fp, register int flags)
 {
-	register Py_ssize_t i;
-	register Py_ssize_t any;
-	int status;
+    register Py_ssize_t i;
+    register Py_ssize_t any;
+    int status;
 
-	status = Py_ReprEnter((PyObject*)mp);
-	if (status != 0) {
-		if (status < 0)
-			return status;
-		Py_BEGIN_ALLOW_THREADS
-		fprintf(fp, "{...}");
-		Py_END_ALLOW_THREADS
-		return 0;
-	}
+    status = Py_ReprEnter((PyObject*)mp);
+    if (status != 0) {
+        if (status < 0)
+            return status;
+        Py_BEGIN_ALLOW_THREADS
+        fprintf(fp, "{...}");
+        Py_END_ALLOW_THREADS
+        return 0;
+    }
 
-	Py_BEGIN_ALLOW_THREADS
-	fprintf(fp, "{");
-	Py_END_ALLOW_THREADS
-	any = 0;
-	for (i = 0; i <= mp->ma_mask; i++) {
-		PyDictEntry *ep = mp->ma_table + i;
-		PyObject *pvalue = ep->me_value;
-		if (pvalue != NULL) {
-			/* Prevent PyObject_Repr from deleting value during
-			   key format */
-			Py_INCREF(pvalue);
-			if (any++ > 0) {
-				Py_BEGIN_ALLOW_THREADS
-				fprintf(fp, ", ");
-				Py_END_ALLOW_THREADS
-			}
-			if (PyObject_Print((PyObject *)ep->me_key, fp, 0)!=0) {
-				Py_DECREF(pvalue);
-				Py_ReprLeave((PyObject*)mp);
-				return -1;
-			}
-			Py_BEGIN_ALLOW_THREADS
-			fprintf(fp, ": ");
-			Py_END_ALLOW_THREADS
-			if (PyObject_Print(pvalue, fp, 0) != 0) {
-				Py_DECREF(pvalue);
-				Py_ReprLeave((PyObject*)mp);
-				return -1;
-			}
-			Py_DECREF(pvalue);
-		}
-	}
-	Py_BEGIN_ALLOW_THREADS
-	fprintf(fp, "}");
-	Py_END_ALLOW_THREADS
-	Py_ReprLeave((PyObject*)mp);
-	return 0;
+    Py_BEGIN_ALLOW_THREADS
+    fprintf(fp, "{");
+    Py_END_ALLOW_THREADS
+    any = 0;
+    for (i = 0; i <= mp->ma_mask; i++) {
+        PyDictEntry *ep = mp->ma_table + i;
+        PyObject *pvalue = ep->me_value;
+        if (pvalue != NULL) {
+            /* Prevent PyObject_Repr from deleting value during
+               key format */
+            Py_INCREF(pvalue);
+            if (any++ > 0) {
+                Py_BEGIN_ALLOW_THREADS
+                fprintf(fp, ", ");
+                Py_END_ALLOW_THREADS
+            }
+            if (PyObject_Print((PyObject *)ep->me_key, fp, 0)!=0) {
+                Py_DECREF(pvalue);
+                Py_ReprLeave((PyObject*)mp);
+                return -1;
+            }
+            Py_BEGIN_ALLOW_THREADS
+            fprintf(fp, ": ");
+            Py_END_ALLOW_THREADS
+            if (PyObject_Print(pvalue, fp, 0) != 0) {
+                Py_DECREF(pvalue);
+                Py_ReprLeave((PyObject*)mp);
+                return -1;
+            }
+            Py_DECREF(pvalue);
+        }
+    }
+    Py_BEGIN_ALLOW_THREADS
+    fprintf(fp, "}");
+    Py_END_ALLOW_THREADS
+    Py_ReprLeave((PyObject*)mp);
+    return 0;
 }
 
 static PyObject *
 dict_repr(PyDictObject *mp)
 {
-	Py_ssize_t i;
-	PyObject *s, *temp, *colon = NULL;
-	PyObject *pieces = NULL, *result = NULL;
-	PyObject *key, *value;
+    Py_ssize_t i;
+    PyObject *s, *temp, *colon = NULL;
+    PyObject *pieces = NULL, *result = NULL;
+    PyObject *key, *value;
 
-	i = Py_ReprEnter((PyObject *)mp);
-	if (i != 0) {
-		return i > 0 ? PyString_FromString("{...}") : NULL;
-	}
+    i = Py_ReprEnter((PyObject *)mp);
+    if (i != 0) {
+        return i > 0 ? PyString_FromString("{...}") : NULL;
+    }
 
-	if (mp->ma_used == 0) {
-		result = PyString_FromString("{}");
-		goto Done;
-	}
+    if (mp->ma_used == 0) {
+        result = PyString_FromString("{}");
+        goto Done;
+    }
 
-	pieces = PyList_New(0);
-	if (pieces == NULL)
-		goto Done;
+    pieces = PyList_New(0);
+    if (pieces == NULL)
+        goto Done;
 
-	colon = PyString_FromString(": ");
-	if (colon == NULL)
-		goto Done;
+    colon = PyString_FromString(": ");
+    if (colon == NULL)
+        goto Done;
 
-	/* Do repr() on each key+value pair, and insert ": " between them.
-	   Note that repr may mutate the dict. */
-	i = 0;
-	while (PyDict_Next((PyObject *)mp, &i, &key, &value)) {
-		int status;
-		/* Prevent repr from deleting value during key format. */
-		Py_INCREF(value);
-		s = PyObject_Repr(key);
-		PyString_Concat(&s, colon);
-		PyString_ConcatAndDel(&s, PyObject_Repr(value));
-		Py_DECREF(value);
-		if (s == NULL)
-			goto Done;
-		status = PyList_Append(pieces, s);
-		Py_DECREF(s);  /* append created a new ref */
-		if (status < 0)
-			goto Done;
-	}
+    /* Do repr() on each key+value pair, and insert ": " between them.
+       Note that repr may mutate the dict. */
+    i = 0;
+    while (PyDict_Next((PyObject *)mp, &i, &key, &value)) {
+        int status;
+        /* Prevent repr from deleting value during key format. */
+        Py_INCREF(value);
+        s = PyObject_Repr(key);
+        PyString_Concat(&s, colon);
+        PyString_ConcatAndDel(&s, PyObject_Repr(value));
+        Py_DECREF(value);
+        if (s == NULL)
+            goto Done;
+        status = PyList_Append(pieces, s);
+        Py_DECREF(s);  /* append created a new ref */
+        if (status < 0)
+            goto Done;
+    }
 
-	/* Add "{}" decorations to the first and last items. */
-	assert(PyList_GET_SIZE(pieces) > 0);
-	s = PyString_FromString("{");
-	if (s == NULL)
-		goto Done;
-	temp = PyList_GET_ITEM(pieces, 0);
-	PyString_ConcatAndDel(&s, temp);
-	PyList_SET_ITEM(pieces, 0, s);
-	if (s == NULL)
-		goto Done;
+    /* Add "{}" decorations to the first and last items. */
+    assert(PyList_GET_SIZE(pieces) > 0);
+    s = PyString_FromString("{");
+    if (s == NULL)
+        goto Done;
+    temp = PyList_GET_ITEM(pieces, 0);
+    PyString_ConcatAndDel(&s, temp);
+    PyList_SET_ITEM(pieces, 0, s);
+    if (s == NULL)
+        goto Done;
 
-	s = PyString_FromString("}");
-	if (s == NULL)
-		goto Done;
-	temp = PyList_GET_ITEM(pieces, PyList_GET_SIZE(pieces) - 1);
-	PyString_ConcatAndDel(&temp, s);
-	PyList_SET_ITEM(pieces, PyList_GET_SIZE(pieces) - 1, temp);
-	if (temp == NULL)
-		goto Done;
+    s = PyString_FromString("}");
+    if (s == NULL)
+        goto Done;
+    temp = PyList_GET_ITEM(pieces, PyList_GET_SIZE(pieces) - 1);
+    PyString_ConcatAndDel(&temp, s);
+    PyList_SET_ITEM(pieces, PyList_GET_SIZE(pieces) - 1, temp);
+    if (temp == NULL)
+        goto Done;
 
-	/* Paste them all together with ", " between. */
-	s = PyString_FromString(", ");
-	if (s == NULL)
-		goto Done;
-	result = _PyString_Join(s, pieces);
-	Py_DECREF(s);
+    /* Paste them all together with ", " between. */
+    s = PyString_FromString(", ");
+    if (s == NULL)
+        goto Done;
+    result = _PyString_Join(s, pieces);
+    Py_DECREF(s);
 
 Done:
-	Py_XDECREF(pieces);
-	Py_XDECREF(colon);
-	Py_ReprLeave((PyObject *)mp);
-	return result;
+    Py_XDECREF(pieces);
+    Py_XDECREF(colon);
+    Py_ReprLeave((PyObject *)mp);
+    return result;
 }
 
 static Py_ssize_t
 dict_length(PyDictObject *mp)
 {
-	return mp->ma_used;
+    return mp->ma_used;
 }
 
 static PyObject *
 dict_subscript(PyDictObject *mp, register PyObject *key)
 {
-	PyObject *v;
-	long hash;
-	PyDictEntry *ep;
-	assert(mp->ma_table != NULL);
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return NULL;
-	}
-	ep = (mp->ma_lookup)(mp, key, hash);
-	if (ep == NULL)
-		return NULL;
-	v = ep->me_value;
-	if (v == NULL) {
-		if (!PyDict_CheckExact(mp)) {
-			/* Look up __missing__ method if we're a subclass. */
-		    	PyObject *missing, *res;
-			static PyObject *missing_str = NULL;
-			missing = _PyObject_LookupSpecial((PyObject *)mp,
-							  "__missing__",
-							  &missing_str);
-			if (missing != NULL) {
-				res = PyObject_CallFunctionObjArgs(missing,
-								   key, NULL);
-				Py_DECREF(missing);
-				return res;
-			}
-			else if (PyErr_Occurred())
-				return NULL;
-		}
-		set_key_error(key);
-		return NULL;
-	}
-	else
-		Py_INCREF(v);
-	return v;
+    PyObject *v;
+    long hash;
+    PyDictEntry *ep;
+    assert(mp->ma_table != NULL);
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return NULL;
+    }
+    ep = (mp->ma_lookup)(mp, key, hash);
+    if (ep == NULL)
+        return NULL;
+    v = ep->me_value;
+    if (v == NULL) {
+        if (!PyDict_CheckExact(mp)) {
+            /* Look up __missing__ method if we're a subclass. */
+            PyObject *missing, *res;
+            static PyObject *missing_str = NULL;
+            missing = _PyObject_LookupSpecial((PyObject *)mp,
+                                              "__missing__",
+                                              &missing_str);
+            if (missing != NULL) {
+                res = PyObject_CallFunctionObjArgs(missing,
+                                                   key, NULL);
+                Py_DECREF(missing);
+                return res;
+            }
+            else if (PyErr_Occurred())
+                return NULL;
+        }
+        set_key_error(key);
+        return NULL;
+    }
+    else
+        Py_INCREF(v);
+    return v;
 }
 
 static int
 dict_ass_sub(PyDictObject *mp, PyObject *v, PyObject *w)
 {
-	if (w == NULL)
-		return PyDict_DelItem((PyObject *)mp, v);
-	else
-		return PyDict_SetItem((PyObject *)mp, v, w);
+    if (w == NULL)
+        return PyDict_DelItem((PyObject *)mp, v);
+    else
+        return PyDict_SetItem((PyObject *)mp, v, w);
 }
 
 static PyMappingMethods dict_as_mapping = {
-	(lenfunc)dict_length, /*mp_length*/
-	(binaryfunc)dict_subscript, /*mp_subscript*/
-	(objobjargproc)dict_ass_sub, /*mp_ass_subscript*/
+    (lenfunc)dict_length, /*mp_length*/
+    (binaryfunc)dict_subscript, /*mp_subscript*/
+    (objobjargproc)dict_ass_sub, /*mp_ass_subscript*/
 };
 
 static PyObject *
 dict_keys(register PyDictObject *mp)
 {
-	register PyObject *v;
-	register Py_ssize_t i, j;
-	PyDictEntry *ep;
-	Py_ssize_t mask, n;
+    register PyObject *v;
+    register Py_ssize_t i, j;
+    PyDictEntry *ep;
+    Py_ssize_t mask, n;
 
   again:
-	n = mp->ma_used;
-	v = PyList_New(n);
-	if (v == NULL)
-		return NULL;
-	if (n != mp->ma_used) {
-		/* Durnit.  The allocations caused the dict to resize.
-		 * Just start over, this shouldn't normally happen.
-		 */
-		Py_DECREF(v);
-		goto again;
-	}
-	ep = mp->ma_table;
-	mask = mp->ma_mask;
-	for (i = 0, j = 0; i <= mask; i++) {
-		if (ep[i].me_value != NULL) {
-			PyObject *key = ep[i].me_key;
-			Py_INCREF(key);
-			PyList_SET_ITEM(v, j, key);
-			j++;
-		}
-	}
-	assert(j == n);
-	return v;
+    n = mp->ma_used;
+    v = PyList_New(n);
+    if (v == NULL)
+        return NULL;
+    if (n != mp->ma_used) {
+        /* Durnit.  The allocations caused the dict to resize.
+         * Just start over, this shouldn't normally happen.
+         */
+        Py_DECREF(v);
+        goto again;
+    }
+    ep = mp->ma_table;
+    mask = mp->ma_mask;
+    for (i = 0, j = 0; i <= mask; i++) {
+        if (ep[i].me_value != NULL) {
+            PyObject *key = ep[i].me_key;
+            Py_INCREF(key);
+            PyList_SET_ITEM(v, j, key);
+            j++;
+        }
+    }
+    assert(j == n);
+    return v;
 }
 
 static PyObject *
 dict_values(register PyDictObject *mp)
 {
-	register PyObject *v;
-	register Py_ssize_t i, j;
-	PyDictEntry *ep;
-	Py_ssize_t mask, n;
+    register PyObject *v;
+    register Py_ssize_t i, j;
+    PyDictEntry *ep;
+    Py_ssize_t mask, n;
 
   again:
-	n = mp->ma_used;
-	v = PyList_New(n);
-	if (v == NULL)
-		return NULL;
-	if (n != mp->ma_used) {
-		/* Durnit.  The allocations caused the dict to resize.
-		 * Just start over, this shouldn't normally happen.
-		 */
-		Py_DECREF(v);
-		goto again;
-	}
-	ep = mp->ma_table;
-	mask = mp->ma_mask;
-	for (i = 0, j = 0; i <= mask; i++) {
-		if (ep[i].me_value != NULL) {
-			PyObject *value = ep[i].me_value;
-			Py_INCREF(value);
-			PyList_SET_ITEM(v, j, value);
-			j++;
-		}
-	}
-	assert(j == n);
-	return v;
+    n = mp->ma_used;
+    v = PyList_New(n);
+    if (v == NULL)
+        return NULL;
+    if (n != mp->ma_used) {
+        /* Durnit.  The allocations caused the dict to resize.
+         * Just start over, this shouldn't normally happen.
+         */
+        Py_DECREF(v);
+        goto again;
+    }
+    ep = mp->ma_table;
+    mask = mp->ma_mask;
+    for (i = 0, j = 0; i <= mask; i++) {
+        if (ep[i].me_value != NULL) {
+            PyObject *value = ep[i].me_value;
+            Py_INCREF(value);
+            PyList_SET_ITEM(v, j, value);
+            j++;
+        }
+    }
+    assert(j == n);
+    return v;
 }
 
 static PyObject *
 dict_items(register PyDictObject *mp)
 {
-	register PyObject *v;
-	register Py_ssize_t i, j, n;
-	Py_ssize_t mask;
-	PyObject *item, *key, *value;
-	PyDictEntry *ep;
+    register PyObject *v;
+    register Py_ssize_t i, j, n;
+    Py_ssize_t mask;
+    PyObject *item, *key, *value;
+    PyDictEntry *ep;
 
-	/* Preallocate the list of tuples, to avoid allocations during
-	 * the loop over the items, which could trigger GC, which
-	 * could resize the dict. :-(
-	 */
+    /* Preallocate the list of tuples, to avoid allocations during
+     * the loop over the items, which could trigger GC, which
+     * could resize the dict. :-(
+     */
   again:
-	n = mp->ma_used;
-	v = PyList_New(n);
-	if (v == NULL)
-		return NULL;
-	for (i = 0; i < n; i++) {
-		item = PyTuple_New(2);
-		if (item == NULL) {
-			Py_DECREF(v);
-			return NULL;
-		}
-		PyList_SET_ITEM(v, i, item);
-	}
-	if (n != mp->ma_used) {
-		/* Durnit.  The allocations caused the dict to resize.
-		 * Just start over, this shouldn't normally happen.
-		 */
-		Py_DECREF(v);
-		goto again;
-	}
-	/* Nothing we do below makes any function calls. */
-	ep = mp->ma_table;
-	mask = mp->ma_mask;
-	for (i = 0, j = 0; i <= mask; i++) {
-		if ((value=ep[i].me_value) != NULL) {
-			key = ep[i].me_key;
-			item = PyList_GET_ITEM(v, j);
-			Py_INCREF(key);
-			PyTuple_SET_ITEM(item, 0, key);
-			Py_INCREF(value);
-			PyTuple_SET_ITEM(item, 1, value);
-			j++;
-		}
-	}
-	assert(j == n);
-	return v;
+    n = mp->ma_used;
+    v = PyList_New(n);
+    if (v == NULL)
+        return NULL;
+    for (i = 0; i < n; i++) {
+        item = PyTuple_New(2);
+        if (item == NULL) {
+            Py_DECREF(v);
+            return NULL;
+        }
+        PyList_SET_ITEM(v, i, item);
+    }
+    if (n != mp->ma_used) {
+        /* Durnit.  The allocations caused the dict to resize.
+         * Just start over, this shouldn't normally happen.
+         */
+        Py_DECREF(v);
+        goto again;
+    }
+    /* Nothing we do below makes any function calls. */
+    ep = mp->ma_table;
+    mask = mp->ma_mask;
+    for (i = 0, j = 0; i <= mask; i++) {
+        if ((value=ep[i].me_value) != NULL) {
+            key = ep[i].me_key;
+            item = PyList_GET_ITEM(v, j);
+            Py_INCREF(key);
+            PyTuple_SET_ITEM(item, 0, key);
+            Py_INCREF(value);
+            PyTuple_SET_ITEM(item, 1, value);
+            j++;
+        }
+    }
+    assert(j == n);
+    return v;
 }
 
 static PyObject *
 dict_fromkeys(PyObject *cls, PyObject *args)
 {
-	PyObject *seq;
-	PyObject *value = Py_None;
-	PyObject *it;	/* iter(seq) */
-	PyObject *key;
-	PyObject *d;
-	int status;
+    PyObject *seq;
+    PyObject *value = Py_None;
+    PyObject *it;       /* iter(seq) */
+    PyObject *key;
+    PyObject *d;
+    int status;
 
-	if (!PyArg_UnpackTuple(args, "fromkeys", 1, 2, &seq, &value))
-		return NULL;
+    if (!PyArg_UnpackTuple(args, "fromkeys", 1, 2, &seq, &value))
+        return NULL;
 
-	d = PyObject_CallObject(cls, NULL);
-	if (d == NULL)
-		return NULL;
+    d = PyObject_CallObject(cls, NULL);
+    if (d == NULL)
+        return NULL;
 
-	if (PyDict_CheckExact(d) && PyDict_CheckExact(seq)) {
-		PyDictObject *mp = (PyDictObject *)d;
-		PyObject *oldvalue;
-		Py_ssize_t pos = 0;
-		PyObject *key;
-		long hash;
+    if (PyDict_CheckExact(d) && PyDict_CheckExact(seq)) {
+        PyDictObject *mp = (PyDictObject *)d;
+        PyObject *oldvalue;
+        Py_ssize_t pos = 0;
+        PyObject *key;
+        long hash;
 
-		if (dictresize(mp, Py_SIZE(seq)))
-			return NULL;
+        if (dictresize(mp, Py_SIZE(seq)))
+            return NULL;
 
-		while (_PyDict_Next(seq, &pos, &key, &oldvalue, &hash)) {
-			Py_INCREF(key);
-			Py_INCREF(value);
-			if (insertdict(mp, key, hash, value))
-				return NULL;
-		}
-		return d;
-	}
+        while (_PyDict_Next(seq, &pos, &key, &oldvalue, &hash)) {
+            Py_INCREF(key);
+            Py_INCREF(value);
+            if (insertdict(mp, key, hash, value))
+                return NULL;
+        }
+        return d;
+    }
 
-	if (PyDict_CheckExact(d) && PyAnySet_CheckExact(seq)) {
-		PyDictObject *mp = (PyDictObject *)d;
-		Py_ssize_t pos = 0;
-		PyObject *key;
-		long hash;
+    if (PyDict_CheckExact(d) && PyAnySet_CheckExact(seq)) {
+        PyDictObject *mp = (PyDictObject *)d;
+        Py_ssize_t pos = 0;
+        PyObject *key;
+        long hash;
 
-		if (dictresize(mp, PySet_GET_SIZE(seq)))
-			return NULL;
+        if (dictresize(mp, PySet_GET_SIZE(seq)))
+            return NULL;
 
-		while (_PySet_NextEntry(seq, &pos, &key, &hash)) {
-			Py_INCREF(key);
-			Py_INCREF(value);
-			if (insertdict(mp, key, hash, value))
-				return NULL;
-		}
-		return d;
-	}
+        while (_PySet_NextEntry(seq, &pos, &key, &hash)) {
+            Py_INCREF(key);
+            Py_INCREF(value);
+            if (insertdict(mp, key, hash, value))
+                return NULL;
+        }
+        return d;
+    }
 
-	it = PyObject_GetIter(seq);
-	if (it == NULL){
-		Py_DECREF(d);
-		return NULL;
-	}
+    it = PyObject_GetIter(seq);
+    if (it == NULL){
+        Py_DECREF(d);
+        return NULL;
+    }
 
-	if (PyDict_CheckExact(d)) {
-		while ((key = PyIter_Next(it)) != NULL) {
-			status = PyDict_SetItem(d, key, value);
-			Py_DECREF(key);
-			if (status < 0)
-				goto Fail;
-		}
-	} else {
-		while ((key = PyIter_Next(it)) != NULL) {
-			status = PyObject_SetItem(d, key, value);
-			Py_DECREF(key);
-			if (status < 0)
-				goto Fail;
-		}
-	}
+    if (PyDict_CheckExact(d)) {
+        while ((key = PyIter_Next(it)) != NULL) {
+            status = PyDict_SetItem(d, key, value);
+            Py_DECREF(key);
+            if (status < 0)
+                goto Fail;
+        }
+    } else {
+        while ((key = PyIter_Next(it)) != NULL) {
+            status = PyObject_SetItem(d, key, value);
+            Py_DECREF(key);
+            if (status < 0)
+                goto Fail;
+        }
+    }
 
-	if (PyErr_Occurred())
-		goto Fail;
-	Py_DECREF(it);
-	return d;
+    if (PyErr_Occurred())
+        goto Fail;
+    Py_DECREF(it);
+    return d;
 
 Fail:
-	Py_DECREF(it);
-	Py_DECREF(d);
-	return NULL;
+    Py_DECREF(it);
+    Py_DECREF(d);
+    return NULL;
 }
 
 static int
 dict_update_common(PyObject *self, PyObject *args, PyObject *kwds, char *methname)
 {
-	PyObject *arg = NULL;
-	int result = 0;
+    PyObject *arg = NULL;
+    int result = 0;
 
-	if (!PyArg_UnpackTuple(args, methname, 0, 1, &arg))
-		result = -1;
+    if (!PyArg_UnpackTuple(args, methname, 0, 1, &arg))
+        result = -1;
 
-	else if (arg != NULL) {
-		if (PyObject_HasAttrString(arg, "keys"))
-			result = PyDict_Merge(self, arg, 1);
-		else
-			result = PyDict_MergeFromSeq2(self, arg, 1);
-	}
-	if (result == 0 && kwds != NULL)
-		result = PyDict_Merge(self, kwds, 1);
-	return result;
+    else if (arg != NULL) {
+        if (PyObject_HasAttrString(arg, "keys"))
+            result = PyDict_Merge(self, arg, 1);
+        else
+            result = PyDict_MergeFromSeq2(self, arg, 1);
+    }
+    if (result == 0 && kwds != NULL)
+        result = PyDict_Merge(self, kwds, 1);
+    return result;
 }
 
 static PyObject *
 dict_update(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	if (dict_update_common(self, args, kwds, "update") != -1)
-		Py_RETURN_NONE;
-	return NULL;
+    if (dict_update_common(self, args, kwds, "update") != -1)
+        Py_RETURN_NONE;
+    return NULL;
 }
 
 /* Update unconditionally replaces existing items.
@@ -1439,238 +1439,238 @@
 int
 PyDict_MergeFromSeq2(PyObject *d, PyObject *seq2, int override)
 {
-	PyObject *it;	/* iter(seq2) */
-	Py_ssize_t i;	/* index into seq2 of current element */
-	PyObject *item;	/* seq2[i] */
-	PyObject *fast;	/* item as a 2-tuple or 2-list */
+    PyObject *it;       /* iter(seq2) */
+    Py_ssize_t i;       /* index into seq2 of current element */
+    PyObject *item;     /* seq2[i] */
+    PyObject *fast;     /* item as a 2-tuple or 2-list */
 
-	assert(d != NULL);
-	assert(PyDict_Check(d));
-	assert(seq2 != NULL);
+    assert(d != NULL);
+    assert(PyDict_Check(d));
+    assert(seq2 != NULL);
 
-	it = PyObject_GetIter(seq2);
-	if (it == NULL)
-		return -1;
+    it = PyObject_GetIter(seq2);
+    if (it == NULL)
+        return -1;
 
-	for (i = 0; ; ++i) {
-		PyObject *key, *value;
-		Py_ssize_t n;
+    for (i = 0; ; ++i) {
+        PyObject *key, *value;
+        Py_ssize_t n;
 
-		fast = NULL;
-		item = PyIter_Next(it);
-		if (item == NULL) {
-			if (PyErr_Occurred())
-				goto Fail;
-			break;
-		}
+        fast = NULL;
+        item = PyIter_Next(it);
+        if (item == NULL) {
+            if (PyErr_Occurred())
+                goto Fail;
+            break;
+        }
 
-		/* Convert item to sequence, and verify length 2. */
-		fast = PySequence_Fast(item, "");
-		if (fast == NULL) {
-			if (PyErr_ExceptionMatches(PyExc_TypeError))
-				PyErr_Format(PyExc_TypeError,
-					"cannot convert dictionary update "
-					"sequence element #%zd to a sequence",
-					i);
-			goto Fail;
-		}
-		n = PySequence_Fast_GET_SIZE(fast);
-		if (n != 2) {
-			PyErr_Format(PyExc_ValueError,
-				     "dictionary update sequence element #%zd "
-				     "has length %zd; 2 is required",
-				     i, n);
-			goto Fail;
-		}
+        /* Convert item to sequence, and verify length 2. */
+        fast = PySequence_Fast(item, "");
+        if (fast == NULL) {
+            if (PyErr_ExceptionMatches(PyExc_TypeError))
+                PyErr_Format(PyExc_TypeError,
+                    "cannot convert dictionary update "
+                    "sequence element #%zd to a sequence",
+                    i);
+            goto Fail;
+        }
+        n = PySequence_Fast_GET_SIZE(fast);
+        if (n != 2) {
+            PyErr_Format(PyExc_ValueError,
+                         "dictionary update sequence element #%zd "
+                         "has length %zd; 2 is required",
+                         i, n);
+            goto Fail;
+        }
 
-		/* Update/merge with this (key, value) pair. */
-		key = PySequence_Fast_GET_ITEM(fast, 0);
-		value = PySequence_Fast_GET_ITEM(fast, 1);
-		if (override || PyDict_GetItem(d, key) == NULL) {
-			int status = PyDict_SetItem(d, key, value);
-			if (status < 0)
-				goto Fail;
-		}
-		Py_DECREF(fast);
-		Py_DECREF(item);
-	}
+        /* Update/merge with this (key, value) pair. */
+        key = PySequence_Fast_GET_ITEM(fast, 0);
+        value = PySequence_Fast_GET_ITEM(fast, 1);
+        if (override || PyDict_GetItem(d, key) == NULL) {
+            int status = PyDict_SetItem(d, key, value);
+            if (status < 0)
+                goto Fail;
+        }
+        Py_DECREF(fast);
+        Py_DECREF(item);
+    }
 
-	i = 0;
-	goto Return;
+    i = 0;
+    goto Return;
 Fail:
-	Py_XDECREF(item);
-	Py_XDECREF(fast);
-	i = -1;
+    Py_XDECREF(item);
+    Py_XDECREF(fast);
+    i = -1;
 Return:
-	Py_DECREF(it);
-	return Py_SAFE_DOWNCAST(i, Py_ssize_t, int);
+    Py_DECREF(it);
+    return Py_SAFE_DOWNCAST(i, Py_ssize_t, int);
 }
 
 int
 PyDict_Update(PyObject *a, PyObject *b)
 {
-	return PyDict_Merge(a, b, 1);
+    return PyDict_Merge(a, b, 1);
 }
 
 int
 PyDict_Merge(PyObject *a, PyObject *b, int override)
 {
-	register PyDictObject *mp, *other;
-	register Py_ssize_t i;
-	PyDictEntry *entry;
+    register PyDictObject *mp, *other;
+    register Py_ssize_t i;
+    PyDictEntry *entry;
 
-	/* We accept for the argument either a concrete dictionary object,
-	 * or an abstract "mapping" object.  For the former, we can do
-	 * things quite efficiently.  For the latter, we only require that
-	 * PyMapping_Keys() and PyObject_GetItem() be supported.
-	 */
-	if (a == NULL || !PyDict_Check(a) || b == NULL) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	mp = (PyDictObject*)a;
-	if (PyDict_Check(b)) {
-		other = (PyDictObject*)b;
-		if (other == mp || other->ma_used == 0)
-			/* a.update(a) or a.update({}); nothing to do */
-			return 0;
-		if (mp->ma_used == 0)
-			/* Since the target dict is empty, PyDict_GetItem()
-			 * always returns NULL.  Setting override to 1
-			 * skips the unnecessary test.
-			 */
-			override = 1;
-		/* Do one big resize at the start, rather than
-		 * incrementally resizing as we insert new items.  Expect
-		 * that there will be no (or few) overlapping keys.
-		 */
-		if ((mp->ma_fill + other->ma_used)*3 >= (mp->ma_mask+1)*2) {
-		   if (dictresize(mp, (mp->ma_used + other->ma_used)*2) != 0)
-			   return -1;
-		}
-		for (i = 0; i <= other->ma_mask; i++) {
-			entry = &other->ma_table[i];
-			if (entry->me_value != NULL &&
-			    (override ||
-			     PyDict_GetItem(a, entry->me_key) == NULL)) {
-				Py_INCREF(entry->me_key);
-				Py_INCREF(entry->me_value);
-				if (insertdict(mp, entry->me_key,
-					       (long)entry->me_hash,
-					       entry->me_value) != 0)
-					return -1;
-			}
-		}
-	}
-	else {
-		/* Do it the generic, slower way */
-		PyObject *keys = PyMapping_Keys(b);
-		PyObject *iter;
-		PyObject *key, *value;
-		int status;
+    /* We accept for the argument either a concrete dictionary object,
+     * or an abstract "mapping" object.  For the former, we can do
+     * things quite efficiently.  For the latter, we only require that
+     * PyMapping_Keys() and PyObject_GetItem() be supported.
+     */
+    if (a == NULL || !PyDict_Check(a) || b == NULL) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    mp = (PyDictObject*)a;
+    if (PyDict_Check(b)) {
+        other = (PyDictObject*)b;
+        if (other == mp || other->ma_used == 0)
+            /* a.update(a) or a.update({}); nothing to do */
+            return 0;
+        if (mp->ma_used == 0)
+            /* Since the target dict is empty, PyDict_GetItem()
+             * always returns NULL.  Setting override to 1
+             * skips the unnecessary test.
+             */
+            override = 1;
+        /* Do one big resize at the start, rather than
+         * incrementally resizing as we insert new items.  Expect
+         * that there will be no (or few) overlapping keys.
+         */
+        if ((mp->ma_fill + other->ma_used)*3 >= (mp->ma_mask+1)*2) {
+           if (dictresize(mp, (mp->ma_used + other->ma_used)*2) != 0)
+               return -1;
+        }
+        for (i = 0; i <= other->ma_mask; i++) {
+            entry = &other->ma_table[i];
+            if (entry->me_value != NULL &&
+                (override ||
+                 PyDict_GetItem(a, entry->me_key) == NULL)) {
+                Py_INCREF(entry->me_key);
+                Py_INCREF(entry->me_value);
+                if (insertdict(mp, entry->me_key,
+                               (long)entry->me_hash,
+                               entry->me_value) != 0)
+                    return -1;
+            }
+        }
+    }
+    else {
+        /* Do it the generic, slower way */
+        PyObject *keys = PyMapping_Keys(b);
+        PyObject *iter;
+        PyObject *key, *value;
+        int status;
 
-		if (keys == NULL)
-			/* Docstring says this is equivalent to E.keys() so
-			 * if E doesn't have a .keys() method we want
-			 * AttributeError to percolate up.  Might as well
-			 * do the same for any other error.
-			 */
-			return -1;
+        if (keys == NULL)
+            /* Docstring says this is equivalent to E.keys() so
+             * if E doesn't have a .keys() method we want
+             * AttributeError to percolate up.  Might as well
+             * do the same for any other error.
+             */
+            return -1;
 
-		iter = PyObject_GetIter(keys);
-		Py_DECREF(keys);
-		if (iter == NULL)
-			return -1;
+        iter = PyObject_GetIter(keys);
+        Py_DECREF(keys);
+        if (iter == NULL)
+            return -1;
 
-		for (key = PyIter_Next(iter); key; key = PyIter_Next(iter)) {
-			if (!override && PyDict_GetItem(a, key) != NULL) {
-				Py_DECREF(key);
-				continue;
-			}
-			value = PyObject_GetItem(b, key);
-			if (value == NULL) {
-				Py_DECREF(iter);
-				Py_DECREF(key);
-				return -1;
-			}
-			status = PyDict_SetItem(a, key, value);
-			Py_DECREF(key);
-			Py_DECREF(value);
-			if (status < 0) {
-				Py_DECREF(iter);
-				return -1;
-			}
-		}
-		Py_DECREF(iter);
-		if (PyErr_Occurred())
-			/* Iterator completed, via error */
-			return -1;
-	}
-	return 0;
+        for (key = PyIter_Next(iter); key; key = PyIter_Next(iter)) {
+            if (!override && PyDict_GetItem(a, key) != NULL) {
+                Py_DECREF(key);
+                continue;
+            }
+            value = PyObject_GetItem(b, key);
+            if (value == NULL) {
+                Py_DECREF(iter);
+                Py_DECREF(key);
+                return -1;
+            }
+            status = PyDict_SetItem(a, key, value);
+            Py_DECREF(key);
+            Py_DECREF(value);
+            if (status < 0) {
+                Py_DECREF(iter);
+                return -1;
+            }
+        }
+        Py_DECREF(iter);
+        if (PyErr_Occurred())
+            /* Iterator completed, via error */
+            return -1;
+    }
+    return 0;
 }
 
 static PyObject *
 dict_copy(register PyDictObject *mp)
 {
-	return PyDict_Copy((PyObject*)mp);
+    return PyDict_Copy((PyObject*)mp);
 }
 
 PyObject *
 PyDict_Copy(PyObject *o)
 {
-	PyObject *copy;
+    PyObject *copy;
 
-	if (o == NULL || !PyDict_Check(o)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	copy = PyDict_New();
-	if (copy == NULL)
-		return NULL;
-	if (PyDict_Merge(copy, o, 1) == 0)
-		return copy;
-	Py_DECREF(copy);
-	return NULL;
+    if (o == NULL || !PyDict_Check(o)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    copy = PyDict_New();
+    if (copy == NULL)
+        return NULL;
+    if (PyDict_Merge(copy, o, 1) == 0)
+        return copy;
+    Py_DECREF(copy);
+    return NULL;
 }
 
 Py_ssize_t
 PyDict_Size(PyObject *mp)
 {
-	if (mp == NULL || !PyDict_Check(mp)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return ((PyDictObject *)mp)->ma_used;
+    if (mp == NULL || !PyDict_Check(mp)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return ((PyDictObject *)mp)->ma_used;
 }
 
 PyObject *
 PyDict_Keys(PyObject *mp)
 {
-	if (mp == NULL || !PyDict_Check(mp)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return dict_keys((PyDictObject *)mp);
+    if (mp == NULL || !PyDict_Check(mp)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return dict_keys((PyDictObject *)mp);
 }
 
 PyObject *
 PyDict_Values(PyObject *mp)
 {
-	if (mp == NULL || !PyDict_Check(mp)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return dict_values((PyDictObject *)mp);
+    if (mp == NULL || !PyDict_Check(mp)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return dict_values((PyDictObject *)mp);
 }
 
 PyObject *
 PyDict_Items(PyObject *mp)
 {
-	if (mp == NULL || !PyDict_Check(mp)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return dict_items((PyDictObject *)mp);
+    if (mp == NULL || !PyDict_Check(mp)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return dict_items((PyDictObject *)mp);
 }
 
 /* Subroutine which returns the smallest key in a for which b's value
@@ -1684,123 +1684,123 @@
 static PyObject *
 characterize(PyDictObject *a, PyDictObject *b, PyObject **pval)
 {
-	PyObject *akey = NULL; /* smallest key in a s.t. a[akey] != b[akey] */
-	PyObject *aval = NULL; /* a[akey] */
-	Py_ssize_t i;
-	int cmp;
+    PyObject *akey = NULL; /* smallest key in a s.t. a[akey] != b[akey] */
+    PyObject *aval = NULL; /* a[akey] */
+    Py_ssize_t i;
+    int cmp;
 
-	for (i = 0; i <= a->ma_mask; i++) {
-		PyObject *thiskey, *thisaval, *thisbval;
-		if (a->ma_table[i].me_value == NULL)
-			continue;
-		thiskey = a->ma_table[i].me_key;
-		Py_INCREF(thiskey);  /* keep alive across compares */
-		if (akey != NULL) {
-			cmp = PyObject_RichCompareBool(akey, thiskey, Py_LT);
-			if (cmp < 0) {
-				Py_DECREF(thiskey);
-				goto Fail;
-			}
-			if (cmp > 0 ||
-			    i > a->ma_mask ||
-			    a->ma_table[i].me_value == NULL)
-			{
-				/* Not the *smallest* a key; or maybe it is
-				 * but the compare shrunk the dict so we can't
-				 * find its associated value anymore; or
-				 * maybe it is but the compare deleted the
-				 * a[thiskey] entry.
-				 */
-				Py_DECREF(thiskey);
-				continue;
-			}
-		}
+    for (i = 0; i <= a->ma_mask; i++) {
+        PyObject *thiskey, *thisaval, *thisbval;
+        if (a->ma_table[i].me_value == NULL)
+            continue;
+        thiskey = a->ma_table[i].me_key;
+        Py_INCREF(thiskey);  /* keep alive across compares */
+        if (akey != NULL) {
+            cmp = PyObject_RichCompareBool(akey, thiskey, Py_LT);
+            if (cmp < 0) {
+                Py_DECREF(thiskey);
+                goto Fail;
+            }
+            if (cmp > 0 ||
+                i > a->ma_mask ||
+                a->ma_table[i].me_value == NULL)
+            {
+                /* Not the *smallest* a key; or maybe it is
+                 * but the compare shrunk the dict so we can't
+                 * find its associated value anymore; or
+                 * maybe it is but the compare deleted the
+                 * a[thiskey] entry.
+                 */
+                Py_DECREF(thiskey);
+                continue;
+            }
+        }
 
-		/* Compare a[thiskey] to b[thiskey]; cmp <- true iff equal. */
-		thisaval = a->ma_table[i].me_value;
-		assert(thisaval);
-		Py_INCREF(thisaval);   /* keep alive */
-		thisbval = PyDict_GetItem((PyObject *)b, thiskey);
-		if (thisbval == NULL)
-			cmp = 0;
-		else {
-			/* both dicts have thiskey:  same values? */
-			cmp = PyObject_RichCompareBool(
-						thisaval, thisbval, Py_EQ);
-			if (cmp < 0) {
-		    		Py_DECREF(thiskey);
-		    		Py_DECREF(thisaval);
-		    		goto Fail;
-			}
-		}
-		if (cmp == 0) {
-			/* New winner. */
-			Py_XDECREF(akey);
-			Py_XDECREF(aval);
-			akey = thiskey;
-			aval = thisaval;
-		}
-		else {
-			Py_DECREF(thiskey);
-			Py_DECREF(thisaval);
-		}
-	}
-	*pval = aval;
-	return akey;
+        /* Compare a[thiskey] to b[thiskey]; cmp <- true iff equal. */
+        thisaval = a->ma_table[i].me_value;
+        assert(thisaval);
+        Py_INCREF(thisaval);   /* keep alive */
+        thisbval = PyDict_GetItem((PyObject *)b, thiskey);
+        if (thisbval == NULL)
+            cmp = 0;
+        else {
+            /* both dicts have thiskey:  same values? */
+            cmp = PyObject_RichCompareBool(
+                                    thisaval, thisbval, Py_EQ);
+            if (cmp < 0) {
+                Py_DECREF(thiskey);
+                Py_DECREF(thisaval);
+                goto Fail;
+            }
+        }
+        if (cmp == 0) {
+            /* New winner. */
+            Py_XDECREF(akey);
+            Py_XDECREF(aval);
+            akey = thiskey;
+            aval = thisaval;
+        }
+        else {
+            Py_DECREF(thiskey);
+            Py_DECREF(thisaval);
+        }
+    }
+    *pval = aval;
+    return akey;
 
 Fail:
-	Py_XDECREF(akey);
-	Py_XDECREF(aval);
-	*pval = NULL;
-	return NULL;
+    Py_XDECREF(akey);
+    Py_XDECREF(aval);
+    *pval = NULL;
+    return NULL;
 }
 
 static int
 dict_compare(PyDictObject *a, PyDictObject *b)
 {
-	PyObject *adiff, *bdiff, *aval, *bval;
-	int res;
+    PyObject *adiff, *bdiff, *aval, *bval;
+    int res;
 
-	/* Compare lengths first */
-	if (a->ma_used < b->ma_used)
-		return -1;	/* a is shorter */
-	else if (a->ma_used > b->ma_used)
-		return 1;	/* b is shorter */
+    /* Compare lengths first */
+    if (a->ma_used < b->ma_used)
+        return -1;              /* a is shorter */
+    else if (a->ma_used > b->ma_used)
+        return 1;               /* b is shorter */
 
-	/* Same length -- check all keys */
-	bdiff = bval = NULL;
-	adiff = characterize(a, b, &aval);
-	if (adiff == NULL) {
-		assert(!aval);
-		/* Either an error, or a is a subset with the same length so
-		 * must be equal.
-		 */
-		res = PyErr_Occurred() ? -1 : 0;
-		goto Finished;
-	}
-	bdiff = characterize(b, a, &bval);
-	if (bdiff == NULL && PyErr_Occurred()) {
-		assert(!bval);
-		res = -1;
-		goto Finished;
-	}
-	res = 0;
-	if (bdiff) {
-		/* bdiff == NULL "should be" impossible now, but perhaps
-		 * the last comparison done by the characterize() on a had
-		 * the side effect of making the dicts equal!
-		 */
-		res = PyObject_Compare(adiff, bdiff);
-	}
-	if (res == 0 && bval != NULL)
-		res = PyObject_Compare(aval, bval);
+    /* Same length -- check all keys */
+    bdiff = bval = NULL;
+    adiff = characterize(a, b, &aval);
+    if (adiff == NULL) {
+        assert(!aval);
+        /* Either an error, or a is a subset with the same length so
+         * must be equal.
+         */
+        res = PyErr_Occurred() ? -1 : 0;
+        goto Finished;
+    }
+    bdiff = characterize(b, a, &bval);
+    if (bdiff == NULL && PyErr_Occurred()) {
+        assert(!bval);
+        res = -1;
+        goto Finished;
+    }
+    res = 0;
+    if (bdiff) {
+        /* bdiff == NULL "should be" impossible now, but perhaps
+         * the last comparison done by the characterize() on a had
+         * the side effect of making the dicts equal!
+         */
+        res = PyObject_Compare(adiff, bdiff);
+    }
+    if (res == 0 && bval != NULL)
+        res = PyObject_Compare(aval, bval);
 
 Finished:
-	Py_XDECREF(adiff);
-	Py_XDECREF(bdiff);
-	Py_XDECREF(aval);
-	Py_XDECREF(bval);
-	return res;
+    Py_XDECREF(adiff);
+    Py_XDECREF(bdiff);
+    Py_XDECREF(aval);
+    Py_XDECREF(bval);
+    return res;
 }
 
 /* Return 1 if dicts equal, 0 if not, -1 if error.
@@ -1810,284 +1810,284 @@
 static int
 dict_equal(PyDictObject *a, PyDictObject *b)
 {
-	Py_ssize_t i;
+    Py_ssize_t i;
 
-	if (a->ma_used != b->ma_used)
-		/* can't be equal if # of entries differ */
-		return 0;
+    if (a->ma_used != b->ma_used)
+        /* can't be equal if # of entries differ */
+        return 0;
 
-	/* Same # of entries -- check all of 'em.  Exit early on any diff. */
-	for (i = 0; i <= a->ma_mask; i++) {
-		PyObject *aval = a->ma_table[i].me_value;
-		if (aval != NULL) {
-			int cmp;
-			PyObject *bval;
-			PyObject *key = a->ma_table[i].me_key;
-			/* temporarily bump aval's refcount to ensure it stays
-			   alive until we're done with it */
-			Py_INCREF(aval);
-			/* ditto for key */
-			Py_INCREF(key);
-			bval = PyDict_GetItem((PyObject *)b, key);
-			Py_DECREF(key);
-			if (bval == NULL) {
-				Py_DECREF(aval);
-				return 0;
-			}
-			cmp = PyObject_RichCompareBool(aval, bval, Py_EQ);
-			Py_DECREF(aval);
-			if (cmp <= 0)  /* error or not equal */
-				return cmp;
- 		}
-	}
-	return 1;
+    /* Same # of entries -- check all of 'em.  Exit early on any diff. */
+    for (i = 0; i <= a->ma_mask; i++) {
+        PyObject *aval = a->ma_table[i].me_value;
+        if (aval != NULL) {
+            int cmp;
+            PyObject *bval;
+            PyObject *key = a->ma_table[i].me_key;
+            /* temporarily bump aval's refcount to ensure it stays
+               alive until we're done with it */
+            Py_INCREF(aval);
+            /* ditto for key */
+            Py_INCREF(key);
+            bval = PyDict_GetItem((PyObject *)b, key);
+            Py_DECREF(key);
+            if (bval == NULL) {
+                Py_DECREF(aval);
+                return 0;
+            }
+            cmp = PyObject_RichCompareBool(aval, bval, Py_EQ);
+            Py_DECREF(aval);
+            if (cmp <= 0)  /* error or not equal */
+                return cmp;
+        }
+    }
+    return 1;
  }
 
 static PyObject *
 dict_richcompare(PyObject *v, PyObject *w, int op)
 {
-	int cmp;
-	PyObject *res;
+    int cmp;
+    PyObject *res;
 
-	if (!PyDict_Check(v) || !PyDict_Check(w)) {
-		res = Py_NotImplemented;
-	}
-	else if (op == Py_EQ || op == Py_NE) {
-		cmp = dict_equal((PyDictObject *)v, (PyDictObject *)w);
-		if (cmp < 0)
-			return NULL;
-		res = (cmp == (op == Py_EQ)) ? Py_True : Py_False;
-	}
-	else {
-		/* Py3K warning if comparison isn't == or !=  */
-		if (PyErr_WarnPy3k("dict inequality comparisons not supported "
-				   "in 3.x", 1) < 0) {
-			return NULL;
-		}
-		res = Py_NotImplemented;
-	}
-	Py_INCREF(res);
-	return res;
+    if (!PyDict_Check(v) || !PyDict_Check(w)) {
+        res = Py_NotImplemented;
+    }
+    else if (op == Py_EQ || op == Py_NE) {
+        cmp = dict_equal((PyDictObject *)v, (PyDictObject *)w);
+        if (cmp < 0)
+            return NULL;
+        res = (cmp == (op == Py_EQ)) ? Py_True : Py_False;
+    }
+    else {
+        /* Py3K warning if comparison isn't == or !=  */
+        if (PyErr_WarnPy3k("dict inequality comparisons not supported "
+                           "in 3.x", 1) < 0) {
+            return NULL;
+        }
+        res = Py_NotImplemented;
+    }
+    Py_INCREF(res);
+    return res;
  }
 
 static PyObject *
 dict_contains(register PyDictObject *mp, PyObject *key)
 {
-	long hash;
-	PyDictEntry *ep;
+    long hash;
+    PyDictEntry *ep;
 
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return NULL;
-	}
-	ep = (mp->ma_lookup)(mp, key, hash);
-	if (ep == NULL)
-		return NULL;
-	return PyBool_FromLong(ep->me_value != NULL);
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return NULL;
+    }
+    ep = (mp->ma_lookup)(mp, key, hash);
+    if (ep == NULL)
+        return NULL;
+    return PyBool_FromLong(ep->me_value != NULL);
 }
 
 static PyObject *
 dict_has_key(register PyDictObject *mp, PyObject *key)
 {
-	if (PyErr_WarnPy3k("dict.has_key() not supported in 3.x; "
-			   "use the in operator", 1) < 0)
-		return NULL;
-	return dict_contains(mp, key);
+    if (PyErr_WarnPy3k("dict.has_key() not supported in 3.x; "
+                       "use the in operator", 1) < 0)
+        return NULL;
+    return dict_contains(mp, key);
 }
 
 static PyObject *
 dict_get(register PyDictObject *mp, PyObject *args)
 {
-	PyObject *key;
-	PyObject *failobj = Py_None;
-	PyObject *val = NULL;
-	long hash;
-	PyDictEntry *ep;
+    PyObject *key;
+    PyObject *failobj = Py_None;
+    PyObject *val = NULL;
+    long hash;
+    PyDictEntry *ep;
 
-	if (!PyArg_UnpackTuple(args, "get", 1, 2, &key, &failobj))
-		return NULL;
+    if (!PyArg_UnpackTuple(args, "get", 1, 2, &key, &failobj))
+        return NULL;
 
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return NULL;
-	}
-	ep = (mp->ma_lookup)(mp, key, hash);
-	if (ep == NULL)
-		return NULL;
-	val = ep->me_value;
-	if (val == NULL)
-		val = failobj;
-	Py_INCREF(val);
-	return val;
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return NULL;
+    }
+    ep = (mp->ma_lookup)(mp, key, hash);
+    if (ep == NULL)
+        return NULL;
+    val = ep->me_value;
+    if (val == NULL)
+        val = failobj;
+    Py_INCREF(val);
+    return val;
 }
 
 
 static PyObject *
 dict_setdefault(register PyDictObject *mp, PyObject *args)
 {
-	PyObject *key;
-	PyObject *failobj = Py_None;
-	PyObject *val = NULL;
-	long hash;
-	PyDictEntry *ep;
+    PyObject *key;
+    PyObject *failobj = Py_None;
+    PyObject *val = NULL;
+    long hash;
+    PyDictEntry *ep;
 
-	if (!PyArg_UnpackTuple(args, "setdefault", 1, 2, &key, &failobj))
-		return NULL;
+    if (!PyArg_UnpackTuple(args, "setdefault", 1, 2, &key, &failobj))
+        return NULL;
 
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return NULL;
-	}
-	ep = (mp->ma_lookup)(mp, key, hash);
-	if (ep == NULL)
-		return NULL;
-	val = ep->me_value;
-	if (val == NULL) {
-		val = failobj;
-		if (PyDict_SetItem((PyObject*)mp, key, failobj))
-			val = NULL;
-	}
-	Py_XINCREF(val);
-	return val;
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return NULL;
+    }
+    ep = (mp->ma_lookup)(mp, key, hash);
+    if (ep == NULL)
+        return NULL;
+    val = ep->me_value;
+    if (val == NULL) {
+        val = failobj;
+        if (PyDict_SetItem((PyObject*)mp, key, failobj))
+            val = NULL;
+    }
+    Py_XINCREF(val);
+    return val;
 }
 
 
 static PyObject *
 dict_clear(register PyDictObject *mp)
 {
-	PyDict_Clear((PyObject *)mp);
-	Py_RETURN_NONE;
+    PyDict_Clear((PyObject *)mp);
+    Py_RETURN_NONE;
 }
 
 static PyObject *
 dict_pop(PyDictObject *mp, PyObject *args)
 {
-	long hash;
-	PyDictEntry *ep;
-	PyObject *old_value, *old_key;
-	PyObject *key, *deflt = NULL;
+    long hash;
+    PyDictEntry *ep;
+    PyObject *old_value, *old_key;
+    PyObject *key, *deflt = NULL;
 
-	if(!PyArg_UnpackTuple(args, "pop", 1, 2, &key, &deflt))
-		return NULL;
-	if (mp->ma_used == 0) {
-		if (deflt) {
-			Py_INCREF(deflt);
-			return deflt;
-		}
-		PyErr_SetString(PyExc_KeyError,
-				"pop(): dictionary is empty");
-		return NULL;
-	}
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return NULL;
-	}
-	ep = (mp->ma_lookup)(mp, key, hash);
-	if (ep == NULL)
-		return NULL;
-	if (ep->me_value == NULL) {
-		if (deflt) {
-			Py_INCREF(deflt);
-			return deflt;
-		}
-		set_key_error(key);
-		return NULL;
-	}
-	old_key = ep->me_key;
-	Py_INCREF(dummy);
-	ep->me_key = dummy;
-	old_value = ep->me_value;
-	ep->me_value = NULL;
-	mp->ma_used--;
-	Py_DECREF(old_key);
-	return old_value;
+    if(!PyArg_UnpackTuple(args, "pop", 1, 2, &key, &deflt))
+        return NULL;
+    if (mp->ma_used == 0) {
+        if (deflt) {
+            Py_INCREF(deflt);
+            return deflt;
+        }
+        PyErr_SetString(PyExc_KeyError,
+                        "pop(): dictionary is empty");
+        return NULL;
+    }
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return NULL;
+    }
+    ep = (mp->ma_lookup)(mp, key, hash);
+    if (ep == NULL)
+        return NULL;
+    if (ep->me_value == NULL) {
+        if (deflt) {
+            Py_INCREF(deflt);
+            return deflt;
+        }
+        set_key_error(key);
+        return NULL;
+    }
+    old_key = ep->me_key;
+    Py_INCREF(dummy);
+    ep->me_key = dummy;
+    old_value = ep->me_value;
+    ep->me_value = NULL;
+    mp->ma_used--;
+    Py_DECREF(old_key);
+    return old_value;
 }
 
 static PyObject *
 dict_popitem(PyDictObject *mp)
 {
-	Py_ssize_t i = 0;
-	PyDictEntry *ep;
-	PyObject *res;
+    Py_ssize_t i = 0;
+    PyDictEntry *ep;
+    PyObject *res;
 
-	/* Allocate the result tuple before checking the size.  Believe it
-	 * or not, this allocation could trigger a garbage collection which
-	 * could empty the dict, so if we checked the size first and that
-	 * happened, the result would be an infinite loop (searching for an
-	 * entry that no longer exists).  Note that the usual popitem()
-	 * idiom is "while d: k, v = d.popitem()". so needing to throw the
-	 * tuple away if the dict *is* empty isn't a significant
-	 * inefficiency -- possible, but unlikely in practice.
-	 */
-	res = PyTuple_New(2);
-	if (res == NULL)
-		return NULL;
-	if (mp->ma_used == 0) {
-		Py_DECREF(res);
-		PyErr_SetString(PyExc_KeyError,
-				"popitem(): dictionary is empty");
-		return NULL;
-	}
-	/* Set ep to "the first" dict entry with a value.  We abuse the hash
-	 * field of slot 0 to hold a search finger:
-	 * If slot 0 has a value, use slot 0.
-	 * Else slot 0 is being used to hold a search finger,
-	 * and we use its hash value as the first index to look.
-	 */
-	ep = &mp->ma_table[0];
-	if (ep->me_value == NULL) {
-		i = ep->me_hash;
-		/* The hash field may be a real hash value, or it may be a
-		 * legit search finger, or it may be a once-legit search
-		 * finger that's out of bounds now because it wrapped around
-		 * or the table shrunk -- simply make sure it's in bounds now.
-		 */
-		if (i > mp->ma_mask || i < 1)
-			i = 1;	/* skip slot 0 */
-		while ((ep = &mp->ma_table[i])->me_value == NULL) {
-			i++;
-			if (i > mp->ma_mask)
-				i = 1;
-		}
-	}
-	PyTuple_SET_ITEM(res, 0, ep->me_key);
-	PyTuple_SET_ITEM(res, 1, ep->me_value);
-	Py_INCREF(dummy);
-	ep->me_key = dummy;
-	ep->me_value = NULL;
-	mp->ma_used--;
-	assert(mp->ma_table[0].me_value == NULL);
-	mp->ma_table[0].me_hash = i + 1;  /* next place to start */
-	return res;
+    /* Allocate the result tuple before checking the size.  Believe it
+     * or not, this allocation could trigger a garbage collection which
+     * could empty the dict, so if we checked the size first and that
+     * happened, the result would be an infinite loop (searching for an
+     * entry that no longer exists).  Note that the usual popitem()
+     * idiom is "while d: k, v = d.popitem()". so needing to throw the
+     * tuple away if the dict *is* empty isn't a significant
+     * inefficiency -- possible, but unlikely in practice.
+     */
+    res = PyTuple_New(2);
+    if (res == NULL)
+        return NULL;
+    if (mp->ma_used == 0) {
+        Py_DECREF(res);
+        PyErr_SetString(PyExc_KeyError,
+                        "popitem(): dictionary is empty");
+        return NULL;
+    }
+    /* Set ep to "the first" dict entry with a value.  We abuse the hash
+     * field of slot 0 to hold a search finger:
+     * If slot 0 has a value, use slot 0.
+     * Else slot 0 is being used to hold a search finger,
+     * and we use its hash value as the first index to look.
+     */
+    ep = &mp->ma_table[0];
+    if (ep->me_value == NULL) {
+        i = ep->me_hash;
+        /* The hash field may be a real hash value, or it may be a
+         * legit search finger, or it may be a once-legit search
+         * finger that's out of bounds now because it wrapped around
+         * or the table shrunk -- simply make sure it's in bounds now.
+         */
+        if (i > mp->ma_mask || i < 1)
+            i = 1;              /* skip slot 0 */
+        while ((ep = &mp->ma_table[i])->me_value == NULL) {
+            i++;
+            if (i > mp->ma_mask)
+                i = 1;
+        }
+    }
+    PyTuple_SET_ITEM(res, 0, ep->me_key);
+    PyTuple_SET_ITEM(res, 1, ep->me_value);
+    Py_INCREF(dummy);
+    ep->me_key = dummy;
+    ep->me_value = NULL;
+    mp->ma_used--;
+    assert(mp->ma_table[0].me_value == NULL);
+    mp->ma_table[0].me_hash = i + 1;  /* next place to start */
+    return res;
 }
 
 static int
 dict_traverse(PyObject *op, visitproc visit, void *arg)
 {
-	Py_ssize_t i = 0;
-	PyObject *pk;
-	PyObject *pv;
+    Py_ssize_t i = 0;
+    PyObject *pk;
+    PyObject *pv;
 
-	while (PyDict_Next(op, &i, &pk, &pv)) {
-		Py_VISIT(pk);
-		Py_VISIT(pv);
-	}
-	return 0;
+    while (PyDict_Next(op, &i, &pk, &pv)) {
+        Py_VISIT(pk);
+        Py_VISIT(pv);
+    }
+    return 0;
 }
 
 static int
 dict_tp_clear(PyObject *op)
 {
-	PyDict_Clear(op);
-	return 0;
+    PyDict_Clear(op);
+    return 0;
 }
 
 
@@ -2099,30 +2099,30 @@
 static PyObject *
 dict_iterkeys(PyDictObject *dict)
 {
-	return dictiter_new(dict, &PyDictIterKey_Type);
+    return dictiter_new(dict, &PyDictIterKey_Type);
 }
 
 static PyObject *
 dict_itervalues(PyDictObject *dict)
 {
-	return dictiter_new(dict, &PyDictIterValue_Type);
+    return dictiter_new(dict, &PyDictIterValue_Type);
 }
 
 static PyObject *
 dict_iteritems(PyDictObject *dict)
 {
-	return dictiter_new(dict, &PyDictIterItem_Type);
+    return dictiter_new(dict, &PyDictIterItem_Type);
 }
 
 static PyObject *
 dict_sizeof(PyDictObject *mp)
 {
-	Py_ssize_t res;
+    Py_ssize_t res;
 
-	res = sizeof(PyDictObject);
-	if (mp->ma_table != mp->ma_smalltable)
-		res = res + (mp->ma_mask + 1) * sizeof(PyDictEntry);
-	return PyInt_FromSsize_t(res);
+    res = sizeof(PyDictObject);
+    if (mp->ma_table != mp->ma_smalltable)
+        res = res + (mp->ma_mask + 1) * sizeof(PyDictEntry);
+    return PyInt_FromSsize_t(res);
 }
 
 PyDoc_STRVAR(has_key__doc__,
@@ -2190,140 +2190,140 @@
 static PyObject *dictvalues_new(PyObject *);
 
 PyDoc_STRVAR(viewkeys__doc__,
-	     "D.viewkeys() -> a set-like object providing a view on D's keys");
+             "D.viewkeys() -> a set-like object providing a view on D's keys");
 PyDoc_STRVAR(viewitems__doc__,
-	     "D.viewitems() -> a set-like object providing a view on D's items");
+             "D.viewitems() -> a set-like object providing a view on D's items");
 PyDoc_STRVAR(viewvalues__doc__,
-	     "D.viewvalues() -> an object providing a view on D's values");
+             "D.viewvalues() -> an object providing a view on D's values");
 
 static PyMethodDef mapp_methods[] = {
-	{"__contains__",(PyCFunction)dict_contains,	METH_O | METH_COEXIST,
-	 contains__doc__},
-	{"__getitem__", (PyCFunction)dict_subscript,	METH_O | METH_COEXIST,
-	 getitem__doc__},
-	{"__sizeof__",	(PyCFunction)dict_sizeof,	METH_NOARGS,
-	 sizeof__doc__},
-	{"has_key",	(PyCFunction)dict_has_key,      METH_O,
-	 has_key__doc__},
-	{"get",         (PyCFunction)dict_get,          METH_VARARGS,
-	 get__doc__},
-	{"setdefault",  (PyCFunction)dict_setdefault,   METH_VARARGS,
-	 setdefault_doc__},
-	{"pop",         (PyCFunction)dict_pop,          METH_VARARGS,
-	 pop__doc__},
-	{"popitem",	(PyCFunction)dict_popitem,	METH_NOARGS,
-	 popitem__doc__},
-	{"keys",	(PyCFunction)dict_keys,		METH_NOARGS,
-	keys__doc__},
-	{"items",	(PyCFunction)dict_items,	METH_NOARGS,
-	 items__doc__},
-	{"values",	(PyCFunction)dict_values,	METH_NOARGS,
-	 values__doc__},
-	{"viewkeys",	(PyCFunction)dictkeys_new,	METH_NOARGS,
-	 viewkeys__doc__},
-	{"viewitems",	(PyCFunction)dictitems_new,	METH_NOARGS,
-	 viewitems__doc__},
-	{"viewvalues",	(PyCFunction)dictvalues_new,	METH_NOARGS,
-	 viewvalues__doc__},
-	{"update",	(PyCFunction)dict_update,	METH_VARARGS | METH_KEYWORDS,
-	 update__doc__},
-	{"fromkeys",	(PyCFunction)dict_fromkeys,	METH_VARARGS | METH_CLASS,
-	 fromkeys__doc__},
-	{"clear",	(PyCFunction)dict_clear,	METH_NOARGS,
-	 clear__doc__},
-	{"copy",	(PyCFunction)dict_copy,		METH_NOARGS,
-	 copy__doc__},
-	{"iterkeys",	(PyCFunction)dict_iterkeys,	METH_NOARGS,
-	 iterkeys__doc__},
-	{"itervalues",	(PyCFunction)dict_itervalues,	METH_NOARGS,
-	 itervalues__doc__},
-	{"iteritems",	(PyCFunction)dict_iteritems,	METH_NOARGS,
-	 iteritems__doc__},
-	{NULL,		NULL}	/* sentinel */
+    {"__contains__",(PyCFunction)dict_contains,         METH_O | METH_COEXIST,
+     contains__doc__},
+    {"__getitem__", (PyCFunction)dict_subscript,        METH_O | METH_COEXIST,
+     getitem__doc__},
+    {"__sizeof__",      (PyCFunction)dict_sizeof,       METH_NOARGS,
+     sizeof__doc__},
+    {"has_key",         (PyCFunction)dict_has_key,      METH_O,
+     has_key__doc__},
+    {"get",         (PyCFunction)dict_get,          METH_VARARGS,
+     get__doc__},
+    {"setdefault",  (PyCFunction)dict_setdefault,   METH_VARARGS,
+     setdefault_doc__},
+    {"pop",         (PyCFunction)dict_pop,          METH_VARARGS,
+     pop__doc__},
+    {"popitem",         (PyCFunction)dict_popitem,      METH_NOARGS,
+     popitem__doc__},
+    {"keys",            (PyCFunction)dict_keys,         METH_NOARGS,
+    keys__doc__},
+    {"items",           (PyCFunction)dict_items,        METH_NOARGS,
+     items__doc__},
+    {"values",          (PyCFunction)dict_values,       METH_NOARGS,
+     values__doc__},
+    {"viewkeys",        (PyCFunction)dictkeys_new,      METH_NOARGS,
+     viewkeys__doc__},
+    {"viewitems",       (PyCFunction)dictitems_new,     METH_NOARGS,
+     viewitems__doc__},
+    {"viewvalues",      (PyCFunction)dictvalues_new,    METH_NOARGS,
+     viewvalues__doc__},
+    {"update",          (PyCFunction)dict_update,       METH_VARARGS | METH_KEYWORDS,
+     update__doc__},
+    {"fromkeys",        (PyCFunction)dict_fromkeys,     METH_VARARGS | METH_CLASS,
+     fromkeys__doc__},
+    {"clear",           (PyCFunction)dict_clear,        METH_NOARGS,
+     clear__doc__},
+    {"copy",            (PyCFunction)dict_copy,         METH_NOARGS,
+     copy__doc__},
+    {"iterkeys",        (PyCFunction)dict_iterkeys,     METH_NOARGS,
+     iterkeys__doc__},
+    {"itervalues",      (PyCFunction)dict_itervalues,   METH_NOARGS,
+     itervalues__doc__},
+    {"iteritems",       (PyCFunction)dict_iteritems,    METH_NOARGS,
+     iteritems__doc__},
+    {NULL,              NULL}   /* sentinel */
 };
 
 /* Return 1 if `key` is in dict `op`, 0 if not, and -1 on error. */
 int
 PyDict_Contains(PyObject *op, PyObject *key)
 {
-	long hash;
-	PyDictObject *mp = (PyDictObject *)op;
-	PyDictEntry *ep;
+    long hash;
+    PyDictObject *mp = (PyDictObject *)op;
+    PyDictEntry *ep;
 
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return -1;
-	}
-	ep = (mp->ma_lookup)(mp, key, hash);
-	return ep == NULL ? -1 : (ep->me_value != NULL);
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return -1;
+    }
+    ep = (mp->ma_lookup)(mp, key, hash);
+    return ep == NULL ? -1 : (ep->me_value != NULL);
 }
 
 /* Internal version of PyDict_Contains used when the hash value is already known */
 int
 _PyDict_Contains(PyObject *op, PyObject *key, long hash)
 {
-	PyDictObject *mp = (PyDictObject *)op;
-	PyDictEntry *ep;
+    PyDictObject *mp = (PyDictObject *)op;
+    PyDictEntry *ep;
 
-	ep = (mp->ma_lookup)(mp, key, hash);
-	return ep == NULL ? -1 : (ep->me_value != NULL);
+    ep = (mp->ma_lookup)(mp, key, hash);
+    return ep == NULL ? -1 : (ep->me_value != NULL);
 }
 
 /* Hack to implement "key in dict" */
 static PySequenceMethods dict_as_sequence = {
-	0,			/* sq_length */
-	0,			/* sq_concat */
-	0,			/* sq_repeat */
-	0,			/* sq_item */
-	0,			/* sq_slice */
-	0,			/* sq_ass_item */
-	0,			/* sq_ass_slice */
-	PyDict_Contains,	/* sq_contains */
-	0,			/* sq_inplace_concat */
-	0,			/* sq_inplace_repeat */
+    0,                          /* sq_length */
+    0,                          /* sq_concat */
+    0,                          /* sq_repeat */
+    0,                          /* sq_item */
+    0,                          /* sq_slice */
+    0,                          /* sq_ass_item */
+    0,                          /* sq_ass_slice */
+    PyDict_Contains,            /* sq_contains */
+    0,                          /* sq_inplace_concat */
+    0,                          /* sq_inplace_repeat */
 };
 
 static PyObject *
 dict_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *self;
+    PyObject *self;
 
-	assert(type != NULL && type->tp_alloc != NULL);
-	self = type->tp_alloc(type, 0);
-	if (self != NULL) {
-		PyDictObject *d = (PyDictObject *)self;
-		/* It's guaranteed that tp->alloc zeroed out the struct. */
-		assert(d->ma_table == NULL && d->ma_fill == 0 && d->ma_used == 0);
-		INIT_NONZERO_DICT_SLOTS(d);
-		d->ma_lookup = lookdict_string;
-		/* The object has been implicitely tracked by tp_alloc */
-		if (type == &PyDict_Type)
-			_PyObject_GC_UNTRACK(d);
+    assert(type != NULL && type->tp_alloc != NULL);
+    self = type->tp_alloc(type, 0);
+    if (self != NULL) {
+        PyDictObject *d = (PyDictObject *)self;
+        /* It's guaranteed that tp->alloc zeroed out the struct. */
+        assert(d->ma_table == NULL && d->ma_fill == 0 && d->ma_used == 0);
+        INIT_NONZERO_DICT_SLOTS(d);
+        d->ma_lookup = lookdict_string;
+        /* The object has been implicitely tracked by tp_alloc */
+        if (type == &PyDict_Type)
+            _PyObject_GC_UNTRACK(d);
 #ifdef SHOW_CONVERSION_COUNTS
-		++created;
+        ++created;
 #endif
 #ifdef SHOW_TRACK_COUNT
-		if (_PyObject_GC_IS_TRACKED(d))
-			count_tracked++;
-		else
-			count_untracked++;
+        if (_PyObject_GC_IS_TRACKED(d))
+            count_tracked++;
+        else
+            count_untracked++;
 #endif
-	}
-	return self;
+    }
+    return self;
 }
 
 static int
 dict_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	return dict_update_common(self, args, kwds, "dict");
+    return dict_update_common(self, args, kwds, "dict");
 }
 
 static PyObject *
 dict_iter(PyDictObject *dict)
 {
-	return dictiter_new(dict, &PyDictIterKey_Type);
+    return dictiter_new(dict, &PyDictIterKey_Type);
 }
 
 PyDoc_STRVAR(dictionary_doc,
@@ -2338,46 +2338,46 @@
 "    in the keyword argument list.  For example:  dict(one=1, two=2)");
 
 PyTypeObject PyDict_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"dict",
-	sizeof(PyDictObject),
-	0,
-	(destructor)dict_dealloc,		/* tp_dealloc */
-	(printfunc)dict_print,			/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)dict_compare,			/* tp_compare */
-	(reprfunc)dict_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	&dict_as_sequence,			/* tp_as_sequence */
-	&dict_as_mapping,			/* tp_as_mapping */
-	(hashfunc)PyObject_HashNotImplemented,	/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_BASETYPE | Py_TPFLAGS_DICT_SUBCLASS,	/* tp_flags */
-	dictionary_doc,				/* tp_doc */
-	dict_traverse,				/* tp_traverse */
-	dict_tp_clear,				/* tp_clear */
-	dict_richcompare,			/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	(getiterfunc)dict_iter,			/* tp_iter */
-	0,					/* tp_iternext */
-	mapp_methods,				/* tp_methods */
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	dict_init,				/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	dict_new,				/* tp_new */
-	PyObject_GC_Del,        		/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "dict",
+    sizeof(PyDictObject),
+    0,
+    (destructor)dict_dealloc,                   /* tp_dealloc */
+    (printfunc)dict_print,                      /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)dict_compare,                      /* tp_compare */
+    (reprfunc)dict_repr,                        /* tp_repr */
+    0,                                          /* tp_as_number */
+    &dict_as_sequence,                          /* tp_as_sequence */
+    &dict_as_mapping,                           /* tp_as_mapping */
+    (hashfunc)PyObject_HashNotImplemented,      /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_BASETYPE | Py_TPFLAGS_DICT_SUBCLASS,         /* tp_flags */
+    dictionary_doc,                             /* tp_doc */
+    dict_traverse,                              /* tp_traverse */
+    dict_tp_clear,                              /* tp_clear */
+    dict_richcompare,                           /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    (getiterfunc)dict_iter,                     /* tp_iter */
+    0,                                          /* tp_iternext */
+    mapp_methods,                               /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    dict_init,                                  /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    dict_new,                                   /* tp_new */
+    PyObject_GC_Del,                            /* tp_free */
 };
 
 /* For backward compatibility with old dictionary interface */
@@ -2385,338 +2385,338 @@
 PyObject *
 PyDict_GetItemString(PyObject *v, const char *key)
 {
-	PyObject *kv, *rv;
-	kv = PyString_FromString(key);
-	if (kv == NULL)
-		return NULL;
-	rv = PyDict_GetItem(v, kv);
-	Py_DECREF(kv);
-	return rv;
+    PyObject *kv, *rv;
+    kv = PyString_FromString(key);
+    if (kv == NULL)
+        return NULL;
+    rv = PyDict_GetItem(v, kv);
+    Py_DECREF(kv);
+    return rv;
 }
 
 int
 PyDict_SetItemString(PyObject *v, const char *key, PyObject *item)
 {
-	PyObject *kv;
-	int err;
-	kv = PyString_FromString(key);
-	if (kv == NULL)
-		return -1;
-	PyString_InternInPlace(&kv); /* XXX Should we really? */
-	err = PyDict_SetItem(v, kv, item);
-	Py_DECREF(kv);
-	return err;
+    PyObject *kv;
+    int err;
+    kv = PyString_FromString(key);
+    if (kv == NULL)
+        return -1;
+    PyString_InternInPlace(&kv); /* XXX Should we really? */
+    err = PyDict_SetItem(v, kv, item);
+    Py_DECREF(kv);
+    return err;
 }
 
 int
 PyDict_DelItemString(PyObject *v, const char *key)
 {
-	PyObject *kv;
-	int err;
-	kv = PyString_FromString(key);
-	if (kv == NULL)
-		return -1;
-	err = PyDict_DelItem(v, kv);
-	Py_DECREF(kv);
-	return err;
+    PyObject *kv;
+    int err;
+    kv = PyString_FromString(key);
+    if (kv == NULL)
+        return -1;
+    err = PyDict_DelItem(v, kv);
+    Py_DECREF(kv);
+    return err;
 }
 
 /* Dictionary iterator types */
 
 typedef struct {
-	PyObject_HEAD
-	PyDictObject *di_dict; /* Set to NULL when iterator is exhausted */
-	Py_ssize_t di_used;
-	Py_ssize_t di_pos;
-	PyObject* di_result; /* reusable result tuple for iteritems */
-	Py_ssize_t len;
+    PyObject_HEAD
+    PyDictObject *di_dict; /* Set to NULL when iterator is exhausted */
+    Py_ssize_t di_used;
+    Py_ssize_t di_pos;
+    PyObject* di_result; /* reusable result tuple for iteritems */
+    Py_ssize_t len;
 } dictiterobject;
 
 static PyObject *
 dictiter_new(PyDictObject *dict, PyTypeObject *itertype)
 {
-	dictiterobject *di;
-	di = PyObject_GC_New(dictiterobject, itertype);
-	if (di == NULL)
-		return NULL;
-	Py_INCREF(dict);
-	di->di_dict = dict;
-	di->di_used = dict->ma_used;
-	di->di_pos = 0;
-	di->len = dict->ma_used;
-	if (itertype == &PyDictIterItem_Type) {
-		di->di_result = PyTuple_Pack(2, Py_None, Py_None);
-		if (di->di_result == NULL) {
-			Py_DECREF(di);
-			return NULL;
-		}
-	}
-	else
-		di->di_result = NULL;
-	_PyObject_GC_TRACK(di);
-	return (PyObject *)di;
+    dictiterobject *di;
+    di = PyObject_GC_New(dictiterobject, itertype);
+    if (di == NULL)
+        return NULL;
+    Py_INCREF(dict);
+    di->di_dict = dict;
+    di->di_used = dict->ma_used;
+    di->di_pos = 0;
+    di->len = dict->ma_used;
+    if (itertype == &PyDictIterItem_Type) {
+        di->di_result = PyTuple_Pack(2, Py_None, Py_None);
+        if (di->di_result == NULL) {
+            Py_DECREF(di);
+            return NULL;
+        }
+    }
+    else
+        di->di_result = NULL;
+    _PyObject_GC_TRACK(di);
+    return (PyObject *)di;
 }
 
 static void
 dictiter_dealloc(dictiterobject *di)
 {
-	Py_XDECREF(di->di_dict);
-	Py_XDECREF(di->di_result);
-	PyObject_GC_Del(di);
+    Py_XDECREF(di->di_dict);
+    Py_XDECREF(di->di_result);
+    PyObject_GC_Del(di);
 }
 
 static int
 dictiter_traverse(dictiterobject *di, visitproc visit, void *arg)
 {
-	Py_VISIT(di->di_dict);
-	Py_VISIT(di->di_result);
-	return 0;
+    Py_VISIT(di->di_dict);
+    Py_VISIT(di->di_result);
+    return 0;
 }
 
 static PyObject *
 dictiter_len(dictiterobject *di)
 {
-	Py_ssize_t len = 0;
-	if (di->di_dict != NULL && di->di_used == di->di_dict->ma_used)
-		len = di->len;
-	return PyInt_FromSize_t(len);
+    Py_ssize_t len = 0;
+    if (di->di_dict != NULL && di->di_used == di->di_dict->ma_used)
+        len = di->len;
+    return PyInt_FromSize_t(len);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
 
 static PyMethodDef dictiter_methods[] = {
-	{"__length_hint__", (PyCFunction)dictiter_len, METH_NOARGS, length_hint_doc},
- 	{NULL,		NULL}		/* sentinel */
+    {"__length_hint__", (PyCFunction)dictiter_len, METH_NOARGS, length_hint_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyObject *dictiter_iternextkey(dictiterobject *di)
 {
-	PyObject *key;
-	register Py_ssize_t i, mask;
-	register PyDictEntry *ep;
-	PyDictObject *d = di->di_dict;
+    PyObject *key;
+    register Py_ssize_t i, mask;
+    register PyDictEntry *ep;
+    PyDictObject *d = di->di_dict;
 
-	if (d == NULL)
-		return NULL;
-	assert (PyDict_Check(d));
+    if (d == NULL)
+        return NULL;
+    assert (PyDict_Check(d));
 
-	if (di->di_used != d->ma_used) {
-		PyErr_SetString(PyExc_RuntimeError,
-				"dictionary changed size during iteration");
-		di->di_used = -1; /* Make this state sticky */
-		return NULL;
-	}
+    if (di->di_used != d->ma_used) {
+        PyErr_SetString(PyExc_RuntimeError,
+                        "dictionary changed size during iteration");
+        di->di_used = -1; /* Make this state sticky */
+        return NULL;
+    }
 
-	i = di->di_pos;
-	if (i < 0)
-		goto fail;
-	ep = d->ma_table;
-	mask = d->ma_mask;
-	while (i <= mask && ep[i].me_value == NULL)
-		i++;
-	di->di_pos = i+1;
-	if (i > mask)
-		goto fail;
-	di->len--;
-	key = ep[i].me_key;
-	Py_INCREF(key);
-	return key;
+    i = di->di_pos;
+    if (i < 0)
+        goto fail;
+    ep = d->ma_table;
+    mask = d->ma_mask;
+    while (i <= mask && ep[i].me_value == NULL)
+        i++;
+    di->di_pos = i+1;
+    if (i > mask)
+        goto fail;
+    di->len--;
+    key = ep[i].me_key;
+    Py_INCREF(key);
+    return key;
 
 fail:
-	Py_DECREF(d);
-	di->di_dict = NULL;
-	return NULL;
+    Py_DECREF(d);
+    di->di_dict = NULL;
+    return NULL;
 }
 
 PyTypeObject PyDictIterKey_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"dictionary-keyiterator",		/* tp_name */
-	sizeof(dictiterobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)dictiter_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)dictiter_traverse,	/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)dictiter_iternextkey,	/* tp_iternext */
-	dictiter_methods,			/* tp_methods */
-	0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "dictionary-keyiterator",                   /* tp_name */
+    sizeof(dictiterobject),                     /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)dictiter_dealloc,               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)dictiter_traverse,            /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)dictiter_iternextkey,         /* tp_iternext */
+    dictiter_methods,                           /* tp_methods */
+    0,
 };
 
 static PyObject *dictiter_iternextvalue(dictiterobject *di)
 {
-	PyObject *value;
-	register Py_ssize_t i, mask;
-	register PyDictEntry *ep;
-	PyDictObject *d = di->di_dict;
+    PyObject *value;
+    register Py_ssize_t i, mask;
+    register PyDictEntry *ep;
+    PyDictObject *d = di->di_dict;
 
-	if (d == NULL)
-		return NULL;
-	assert (PyDict_Check(d));
+    if (d == NULL)
+        return NULL;
+    assert (PyDict_Check(d));
 
-	if (di->di_used != d->ma_used) {
-		PyErr_SetString(PyExc_RuntimeError,
-				"dictionary changed size during iteration");
-		di->di_used = -1; /* Make this state sticky */
-		return NULL;
-	}
+    if (di->di_used != d->ma_used) {
+        PyErr_SetString(PyExc_RuntimeError,
+                        "dictionary changed size during iteration");
+        di->di_used = -1; /* Make this state sticky */
+        return NULL;
+    }
 
-	i = di->di_pos;
-	mask = d->ma_mask;
-	if (i < 0 || i > mask)
-		goto fail;
-	ep = d->ma_table;
-	while ((value=ep[i].me_value) == NULL) {
-		i++;
-		if (i > mask)
-			goto fail;
-	}
-	di->di_pos = i+1;
-	di->len--;
-	Py_INCREF(value);
-	return value;
+    i = di->di_pos;
+    mask = d->ma_mask;
+    if (i < 0 || i > mask)
+        goto fail;
+    ep = d->ma_table;
+    while ((value=ep[i].me_value) == NULL) {
+        i++;
+        if (i > mask)
+            goto fail;
+    }
+    di->di_pos = i+1;
+    di->len--;
+    Py_INCREF(value);
+    return value;
 
 fail:
-	Py_DECREF(d);
-	di->di_dict = NULL;
-	return NULL;
+    Py_DECREF(d);
+    di->di_dict = NULL;
+    return NULL;
 }
 
 PyTypeObject PyDictIterValue_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"dictionary-valueiterator",		/* tp_name */
-	sizeof(dictiterobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)dictiter_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)dictiter_traverse,	/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)dictiter_iternextvalue,	/* tp_iternext */
-	dictiter_methods,			/* tp_methods */
-	0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "dictionary-valueiterator",                 /* tp_name */
+    sizeof(dictiterobject),                     /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)dictiter_dealloc,               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)dictiter_traverse,            /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)dictiter_iternextvalue,       /* tp_iternext */
+    dictiter_methods,                           /* tp_methods */
+    0,
 };
 
 static PyObject *dictiter_iternextitem(dictiterobject *di)
 {
-	PyObject *key, *value, *result = di->di_result;
-	register Py_ssize_t i, mask;
-	register PyDictEntry *ep;
-	PyDictObject *d = di->di_dict;
+    PyObject *key, *value, *result = di->di_result;
+    register Py_ssize_t i, mask;
+    register PyDictEntry *ep;
+    PyDictObject *d = di->di_dict;
 
-	if (d == NULL)
-		return NULL;
-	assert (PyDict_Check(d));
+    if (d == NULL)
+        return NULL;
+    assert (PyDict_Check(d));
 
-	if (di->di_used != d->ma_used) {
-		PyErr_SetString(PyExc_RuntimeError,
-				"dictionary changed size during iteration");
-		di->di_used = -1; /* Make this state sticky */
-		return NULL;
-	}
+    if (di->di_used != d->ma_used) {
+        PyErr_SetString(PyExc_RuntimeError,
+                        "dictionary changed size during iteration");
+        di->di_used = -1; /* Make this state sticky */
+        return NULL;
+    }
 
-	i = di->di_pos;
-	if (i < 0)
-		goto fail;
-	ep = d->ma_table;
-	mask = d->ma_mask;
-	while (i <= mask && ep[i].me_value == NULL)
-		i++;
-	di->di_pos = i+1;
-	if (i > mask)
-		goto fail;
+    i = di->di_pos;
+    if (i < 0)
+        goto fail;
+    ep = d->ma_table;
+    mask = d->ma_mask;
+    while (i <= mask && ep[i].me_value == NULL)
+        i++;
+    di->di_pos = i+1;
+    if (i > mask)
+        goto fail;
 
-	if (result->ob_refcnt == 1) {
-		Py_INCREF(result);
-		Py_DECREF(PyTuple_GET_ITEM(result, 0));
-		Py_DECREF(PyTuple_GET_ITEM(result, 1));
-	} else {
-		result = PyTuple_New(2);
-		if (result == NULL)
-			return NULL;
-	}
-	di->len--;
-	key = ep[i].me_key;
-	value = ep[i].me_value;
-	Py_INCREF(key);
-	Py_INCREF(value);
-	PyTuple_SET_ITEM(result, 0, key);
-	PyTuple_SET_ITEM(result, 1, value);
-	return result;
+    if (result->ob_refcnt == 1) {
+        Py_INCREF(result);
+        Py_DECREF(PyTuple_GET_ITEM(result, 0));
+        Py_DECREF(PyTuple_GET_ITEM(result, 1));
+    } else {
+        result = PyTuple_New(2);
+        if (result == NULL)
+            return NULL;
+    }
+    di->len--;
+    key = ep[i].me_key;
+    value = ep[i].me_value;
+    Py_INCREF(key);
+    Py_INCREF(value);
+    PyTuple_SET_ITEM(result, 0, key);
+    PyTuple_SET_ITEM(result, 1, value);
+    return result;
 
 fail:
-	Py_DECREF(d);
-	di->di_dict = NULL;
-	return NULL;
+    Py_DECREF(d);
+    di->di_dict = NULL;
+    return NULL;
 }
 
 PyTypeObject PyDictIterItem_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"dictionary-itemiterator",		/* tp_name */
-	sizeof(dictiterobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)dictiter_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)dictiter_traverse,	/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)dictiter_iternextitem,	/* tp_iternext */
-	dictiter_methods,			/* tp_methods */
-	0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "dictionary-itemiterator",                  /* tp_name */
+    sizeof(dictiterobject),                     /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)dictiter_dealloc,               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)dictiter_traverse,            /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)dictiter_iternextitem,        /* tp_iternext */
+    dictiter_methods,                           /* tp_methods */
+    0,
 };
 
 /***********************************************/
@@ -2726,56 +2726,56 @@
 /* The instance lay-out is the same for all three; but the type differs. */
 
 typedef struct {
-	PyObject_HEAD
-	PyDictObject *dv_dict;
+    PyObject_HEAD
+    PyDictObject *dv_dict;
 } dictviewobject;
 
 
 static void
 dictview_dealloc(dictviewobject *dv)
 {
-	Py_XDECREF(dv->dv_dict);
-	PyObject_GC_Del(dv);
+    Py_XDECREF(dv->dv_dict);
+    PyObject_GC_Del(dv);
 }
 
 static int
 dictview_traverse(dictviewobject *dv, visitproc visit, void *arg)
 {
-	Py_VISIT(dv->dv_dict);
-	return 0;
+    Py_VISIT(dv->dv_dict);
+    return 0;
 }
 
 static Py_ssize_t
 dictview_len(dictviewobject *dv)
 {
-	Py_ssize_t len = 0;
-	if (dv->dv_dict != NULL)
-		len = dv->dv_dict->ma_used;
-	return len;
+    Py_ssize_t len = 0;
+    if (dv->dv_dict != NULL)
+        len = dv->dv_dict->ma_used;
+    return len;
 }
 
 static PyObject *
 dictview_new(PyObject *dict, PyTypeObject *type)
 {
-	dictviewobject *dv;
-	if (dict == NULL) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	if (!PyDict_Check(dict)) {
-		/* XXX Get rid of this restriction later */
-		PyErr_Format(PyExc_TypeError,
-			     "%s() requires a dict argument, not '%s'",
-			     type->tp_name, dict->ob_type->tp_name);
-		return NULL;
-	}
-	dv = PyObject_GC_New(dictviewobject, type);
-	if (dv == NULL)
-		return NULL;
-	Py_INCREF(dict);
-	dv->dv_dict = (PyDictObject *)dict;
-	_PyObject_GC_TRACK(dv);
-	return (PyObject *)dv;
+    dictviewobject *dv;
+    if (dict == NULL) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    if (!PyDict_Check(dict)) {
+        /* XXX Get rid of this restriction later */
+        PyErr_Format(PyExc_TypeError,
+                     "%s() requires a dict argument, not '%s'",
+                     type->tp_name, dict->ob_type->tp_name);
+        return NULL;
+    }
+    dv = PyObject_GC_New(dictviewobject, type);
+    if (dv == NULL)
+        return NULL;
+    Py_INCREF(dict);
+    dv->dv_dict = (PyDictObject *)dict;
+    _PyObject_GC_TRACK(dv);
+    return (PyObject *)dv;
 }
 
 /* TODO(guido): The views objects are not complete:
@@ -2791,106 +2791,106 @@
 static int
 all_contained_in(PyObject *self, PyObject *other)
 {
-	PyObject *iter = PyObject_GetIter(self);
-	int ok = 1;
+    PyObject *iter = PyObject_GetIter(self);
+    int ok = 1;
 
-	if (iter == NULL)
-		return -1;
-	for (;;) {
-		PyObject *next = PyIter_Next(iter);
-		if (next == NULL) {
-			if (PyErr_Occurred())
-				ok = -1;
-			break;
-		}
-		ok = PySequence_Contains(other, next);
-		Py_DECREF(next);
-		if (ok <= 0)
-			break;
-	}
-	Py_DECREF(iter);
-	return ok;
+    if (iter == NULL)
+        return -1;
+    for (;;) {
+        PyObject *next = PyIter_Next(iter);
+        if (next == NULL) {
+            if (PyErr_Occurred())
+                ok = -1;
+            break;
+        }
+        ok = PySequence_Contains(other, next);
+        Py_DECREF(next);
+        if (ok <= 0)
+            break;
+    }
+    Py_DECREF(iter);
+    return ok;
 }
 
 static PyObject *
 dictview_richcompare(PyObject *self, PyObject *other, int op)
 {
-	Py_ssize_t len_self, len_other;
-	int ok;
-	PyObject *result;
+    Py_ssize_t len_self, len_other;
+    int ok;
+    PyObject *result;
 
-	assert(self != NULL);
-	assert(PyDictViewSet_Check(self));
-	assert(other != NULL);
+    assert(self != NULL);
+    assert(PyDictViewSet_Check(self));
+    assert(other != NULL);
 
-	if (!PyAnySet_Check(other) && !PyDictViewSet_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
+    if (!PyAnySet_Check(other) && !PyDictViewSet_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 
-	len_self = PyObject_Size(self);
-	if (len_self < 0)
-		return NULL;
-	len_other = PyObject_Size(other);
-	if (len_other < 0)
-		return NULL;
+    len_self = PyObject_Size(self);
+    if (len_self < 0)
+        return NULL;
+    len_other = PyObject_Size(other);
+    if (len_other < 0)
+        return NULL;
 
-	ok = 0;
-	switch(op) {
+    ok = 0;
+    switch(op) {
 
-	case Py_NE:
-	case Py_EQ:
-		if (len_self == len_other)
-			ok = all_contained_in(self, other);
-		if (op == Py_NE && ok >= 0)
-			ok = !ok;
-		break;
+    case Py_NE:
+    case Py_EQ:
+        if (len_self == len_other)
+            ok = all_contained_in(self, other);
+        if (op == Py_NE && ok >= 0)
+            ok = !ok;
+        break;
 
-	case Py_LT:
-		if (len_self < len_other)
-			ok = all_contained_in(self, other);
-		break;
+    case Py_LT:
+        if (len_self < len_other)
+            ok = all_contained_in(self, other);
+        break;
 
-	  case Py_LE:
-		  if (len_self <= len_other)
-			  ok = all_contained_in(self, other);
-		  break;
+      case Py_LE:
+          if (len_self <= len_other)
+              ok = all_contained_in(self, other);
+          break;
 
-	case Py_GT:
-		if (len_self > len_other)
-			ok = all_contained_in(other, self);
-		break;
+    case Py_GT:
+        if (len_self > len_other)
+            ok = all_contained_in(other, self);
+        break;
 
-	case Py_GE:
-		if (len_self >= len_other)
-			ok = all_contained_in(other, self);
-		break;
+    case Py_GE:
+        if (len_self >= len_other)
+            ok = all_contained_in(other, self);
+        break;
 
-	}
-	if (ok < 0)
-		return NULL;
-	result = ok ? Py_True : Py_False;
-	Py_INCREF(result);
-	return result;
+    }
+    if (ok < 0)
+        return NULL;
+    result = ok ? Py_True : Py_False;
+    Py_INCREF(result);
+    return result;
 }
 
 static PyObject *
 dictview_repr(dictviewobject *dv)
 {
-	PyObject *seq;
-	PyObject *seq_str;
-	PyObject *result;
-	
-	seq = PySequence_List((PyObject *)dv);
-	if (seq == NULL)
-		return NULL;
+    PyObject *seq;
+    PyObject *seq_str;
+    PyObject *result;
 
-	seq_str = PyObject_Repr(seq);
-	result = PyString_FromFormat("%s(%s)", Py_TYPE(dv)->tp_name,
-				     PyString_AS_STRING(seq_str));
-	Py_DECREF(seq_str);
-	Py_DECREF(seq);
-	return result;
+    seq = PySequence_List((PyObject *)dv);
+    if (seq == NULL)
+        return NULL;
+
+    seq_str = PyObject_Repr(seq);
+    result = PyString_FromFormat("%s(%s)", Py_TYPE(dv)->tp_name,
+                                 PyString_AS_STRING(seq_str));
+    Py_DECREF(seq_str);
+    Py_DECREF(seq);
+    return result;
 }
 
 /*** dict_keys ***/
@@ -2898,166 +2898,166 @@
 static PyObject *
 dictkeys_iter(dictviewobject *dv)
 {
-	if (dv->dv_dict == NULL) {
-		Py_RETURN_NONE;
-	}
-	return dictiter_new(dv->dv_dict, &PyDictIterKey_Type);
+    if (dv->dv_dict == NULL) {
+        Py_RETURN_NONE;
+    }
+    return dictiter_new(dv->dv_dict, &PyDictIterKey_Type);
 }
 
 static int
 dictkeys_contains(dictviewobject *dv, PyObject *obj)
 {
-	if (dv->dv_dict == NULL)
-		return 0;
-	return PyDict_Contains((PyObject *)dv->dv_dict, obj);
+    if (dv->dv_dict == NULL)
+        return 0;
+    return PyDict_Contains((PyObject *)dv->dv_dict, obj);
 }
 
 static PySequenceMethods dictkeys_as_sequence = {
-	(lenfunc)dictview_len,		/* sq_length */
-	0,				/* sq_concat */
-	0,				/* sq_repeat */
-	0,				/* sq_item */
-	0,				/* sq_slice */
-	0,				/* sq_ass_item */
-	0,				/* sq_ass_slice */
-	(objobjproc)dictkeys_contains,	/* sq_contains */
+    (lenfunc)dictview_len,              /* sq_length */
+    0,                                  /* sq_concat */
+    0,                                  /* sq_repeat */
+    0,                                  /* sq_item */
+    0,                                  /* sq_slice */
+    0,                                  /* sq_ass_item */
+    0,                                  /* sq_ass_slice */
+    (objobjproc)dictkeys_contains,      /* sq_contains */
 };
 
 static PyObject*
 dictviews_sub(PyObject* self, PyObject *other)
 {
-	PyObject *result = PySet_New(self);
-	PyObject *tmp;
-	if (result == NULL)
-		return NULL;
+    PyObject *result = PySet_New(self);
+    PyObject *tmp;
+    if (result == NULL)
+        return NULL;
 
-	tmp = PyObject_CallMethod(result, "difference_update", "O", other);
-	if (tmp == NULL) {
-		Py_DECREF(result);
-		return NULL;
-	}
+    tmp = PyObject_CallMethod(result, "difference_update", "O", other);
+    if (tmp == NULL) {
+        Py_DECREF(result);
+        return NULL;
+    }
 
-	Py_DECREF(tmp);
-	return result;
+    Py_DECREF(tmp);
+    return result;
 }
 
 static PyObject*
 dictviews_and(PyObject* self, PyObject *other)
 {
-	PyObject *result = PySet_New(self);
-	PyObject *tmp;
-	if (result == NULL)
-		return NULL;
+    PyObject *result = PySet_New(self);
+    PyObject *tmp;
+    if (result == NULL)
+        return NULL;
 
-	tmp = PyObject_CallMethod(result, "intersection_update", "O", other);
-	if (tmp == NULL) {
-		Py_DECREF(result);
-		return NULL;
-	}
+    tmp = PyObject_CallMethod(result, "intersection_update", "O", other);
+    if (tmp == NULL) {
+        Py_DECREF(result);
+        return NULL;
+    }
 
-	Py_DECREF(tmp);
-	return result;
+    Py_DECREF(tmp);
+    return result;
 }
 
 static PyObject*
 dictviews_or(PyObject* self, PyObject *other)
 {
-	PyObject *result = PySet_New(self);
-	PyObject *tmp;
-	if (result == NULL)
-		return NULL;
+    PyObject *result = PySet_New(self);
+    PyObject *tmp;
+    if (result == NULL)
+        return NULL;
 
-	tmp = PyObject_CallMethod(result, "update", "O", other);
-	if (tmp == NULL) {
-		Py_DECREF(result);
-		return NULL;
-	}
+    tmp = PyObject_CallMethod(result, "update", "O", other);
+    if (tmp == NULL) {
+        Py_DECREF(result);
+        return NULL;
+    }
 
-	Py_DECREF(tmp);
-	return result;
+    Py_DECREF(tmp);
+    return result;
 }
 
 static PyObject*
 dictviews_xor(PyObject* self, PyObject *other)
 {
-	PyObject *result = PySet_New(self);
-	PyObject *tmp;
-	if (result == NULL)
-		return NULL;
+    PyObject *result = PySet_New(self);
+    PyObject *tmp;
+    if (result == NULL)
+        return NULL;
 
-	tmp = PyObject_CallMethod(result, "symmetric_difference_update", "O",
-				  other);
-	if (tmp == NULL) {
-		Py_DECREF(result);
-		return NULL;
-	}
+    tmp = PyObject_CallMethod(result, "symmetric_difference_update", "O",
+                              other);
+    if (tmp == NULL) {
+        Py_DECREF(result);
+        return NULL;
+    }
 
-	Py_DECREF(tmp);
-	return result;
+    Py_DECREF(tmp);
+    return result;
 }
 
 static PyNumberMethods dictviews_as_number = {
-	0,				/*nb_add*/
-	(binaryfunc)dictviews_sub,	/*nb_subtract*/
-	0,				/*nb_multiply*/
-	0,				/*nb_divide*/
-	0,				/*nb_remainder*/
-	0,				/*nb_divmod*/
-	0,				/*nb_power*/
-	0,				/*nb_negative*/
-	0,				/*nb_positive*/
-	0,				/*nb_absolute*/
-	0,				/*nb_nonzero*/
-	0,				/*nb_invert*/
-	0,				/*nb_lshift*/
-	0,				/*nb_rshift*/
-	(binaryfunc)dictviews_and,	/*nb_and*/
-	(binaryfunc)dictviews_xor,	/*nb_xor*/
-	(binaryfunc)dictviews_or,	/*nb_or*/
+    0,                                  /*nb_add*/
+    (binaryfunc)dictviews_sub,          /*nb_subtract*/
+    0,                                  /*nb_multiply*/
+    0,                                  /*nb_divide*/
+    0,                                  /*nb_remainder*/
+    0,                                  /*nb_divmod*/
+    0,                                  /*nb_power*/
+    0,                                  /*nb_negative*/
+    0,                                  /*nb_positive*/
+    0,                                  /*nb_absolute*/
+    0,                                  /*nb_nonzero*/
+    0,                                  /*nb_invert*/
+    0,                                  /*nb_lshift*/
+    0,                                  /*nb_rshift*/
+    (binaryfunc)dictviews_and,          /*nb_and*/
+    (binaryfunc)dictviews_xor,          /*nb_xor*/
+    (binaryfunc)dictviews_or,           /*nb_or*/
 };
 
 static PyMethodDef dictkeys_methods[] = {
- 	{NULL,		NULL}		/* sentinel */
+    {NULL,              NULL}           /* sentinel */
 };
 
 PyTypeObject PyDictKeys_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"dict_keys",				/* tp_name */
-	sizeof(dictviewobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)dictview_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_reserved */
-	(reprfunc)dictview_repr,		/* tp_repr */
-	&dictviews_as_number,			/* tp_as_number */
-	&dictkeys_as_sequence,			/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_CHECKTYPES,		/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)dictview_traverse,	/* tp_traverse */
- 	0,					/* tp_clear */
-	dictview_richcompare,			/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	(getiterfunc)dictkeys_iter,		/* tp_iter */
-	0,					/* tp_iternext */
-	dictkeys_methods,			/* tp_methods */
-	0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "dict_keys",                                /* tp_name */
+    sizeof(dictviewobject),                     /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)dictview_dealloc,               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_reserved */
+    (reprfunc)dictview_repr,                    /* tp_repr */
+    &dictviews_as_number,                       /* tp_as_number */
+    &dictkeys_as_sequence,                      /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_CHECKTYPES,                  /* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)dictview_traverse,            /* tp_traverse */
+    0,                                          /* tp_clear */
+    dictview_richcompare,                       /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    (getiterfunc)dictkeys_iter,                 /* tp_iter */
+    0,                                          /* tp_iternext */
+    dictkeys_methods,                           /* tp_methods */
+    0,
 };
 
 static PyObject *
 dictkeys_new(PyObject *dict)
 {
-	return dictview_new(dict, &PyDictKeys_Type);
+    return dictview_new(dict, &PyDictKeys_Type);
 }
 
 /*** dict_items ***/
@@ -3065,84 +3065,84 @@
 static PyObject *
 dictitems_iter(dictviewobject *dv)
 {
-	if (dv->dv_dict == NULL) {
-		Py_RETURN_NONE;
-	}
-	return dictiter_new(dv->dv_dict, &PyDictIterItem_Type);
+    if (dv->dv_dict == NULL) {
+        Py_RETURN_NONE;
+    }
+    return dictiter_new(dv->dv_dict, &PyDictIterItem_Type);
 }
 
 static int
 dictitems_contains(dictviewobject *dv, PyObject *obj)
 {
-	PyObject *key, *value, *found;
-	if (dv->dv_dict == NULL)
-		return 0;
-	if (!PyTuple_Check(obj) || PyTuple_GET_SIZE(obj) != 2)
-		return 0;
-	key = PyTuple_GET_ITEM(obj, 0);
-	value = PyTuple_GET_ITEM(obj, 1);
-	found = PyDict_GetItem((PyObject *)dv->dv_dict, key);
-	if (found == NULL) {
-		if (PyErr_Occurred())
-			return -1;
-		return 0;
-	}
-	return PyObject_RichCompareBool(value, found, Py_EQ);
+    PyObject *key, *value, *found;
+    if (dv->dv_dict == NULL)
+        return 0;
+    if (!PyTuple_Check(obj) || PyTuple_GET_SIZE(obj) != 2)
+        return 0;
+    key = PyTuple_GET_ITEM(obj, 0);
+    value = PyTuple_GET_ITEM(obj, 1);
+    found = PyDict_GetItem((PyObject *)dv->dv_dict, key);
+    if (found == NULL) {
+        if (PyErr_Occurred())
+            return -1;
+        return 0;
+    }
+    return PyObject_RichCompareBool(value, found, Py_EQ);
 }
 
 static PySequenceMethods dictitems_as_sequence = {
-	(lenfunc)dictview_len,		/* sq_length */
-	0,				/* sq_concat */
-	0,				/* sq_repeat */
-	0,				/* sq_item */
-	0,				/* sq_slice */
-	0,				/* sq_ass_item */
-	0,				/* sq_ass_slice */
-	(objobjproc)dictitems_contains,	/* sq_contains */
+    (lenfunc)dictview_len,              /* sq_length */
+    0,                                  /* sq_concat */
+    0,                                  /* sq_repeat */
+    0,                                  /* sq_item */
+    0,                                  /* sq_slice */
+    0,                                  /* sq_ass_item */
+    0,                                  /* sq_ass_slice */
+    (objobjproc)dictitems_contains,     /* sq_contains */
 };
 
 static PyMethodDef dictitems_methods[] = {
- 	{NULL,		NULL}		/* sentinel */
+    {NULL,              NULL}           /* sentinel */
 };
 
 PyTypeObject PyDictItems_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"dict_items",				/* tp_name */
-	sizeof(dictviewobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)dictview_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_reserved */
-	(reprfunc)dictview_repr,		/* tp_repr */
-	&dictviews_as_number,			/* tp_as_number */
-	&dictitems_as_sequence,			/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_CHECKTYPES,		/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)dictview_traverse,	/* tp_traverse */
- 	0,					/* tp_clear */
-	dictview_richcompare,			/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	(getiterfunc)dictitems_iter,		/* tp_iter */
-	0,					/* tp_iternext */
-	dictitems_methods,			/* tp_methods */
-	0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "dict_items",                               /* tp_name */
+    sizeof(dictviewobject),                     /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)dictview_dealloc,               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_reserved */
+    (reprfunc)dictview_repr,                    /* tp_repr */
+    &dictviews_as_number,                       /* tp_as_number */
+    &dictitems_as_sequence,                     /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_CHECKTYPES,                  /* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)dictview_traverse,            /* tp_traverse */
+    0,                                          /* tp_clear */
+    dictview_richcompare,                       /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    (getiterfunc)dictitems_iter,                /* tp_iter */
+    0,                                          /* tp_iternext */
+    dictitems_methods,                          /* tp_methods */
+    0,
 };
 
 static PyObject *
 dictitems_new(PyObject *dict)
 {
-	return dictview_new(dict, &PyDictItems_Type);
+    return dictview_new(dict, &PyDictItems_Type);
 }
 
 /*** dict_values ***/
@@ -3150,62 +3150,62 @@
 static PyObject *
 dictvalues_iter(dictviewobject *dv)
 {
-	if (dv->dv_dict == NULL) {
-		Py_RETURN_NONE;
-	}
-	return dictiter_new(dv->dv_dict, &PyDictIterValue_Type);
+    if (dv->dv_dict == NULL) {
+        Py_RETURN_NONE;
+    }
+    return dictiter_new(dv->dv_dict, &PyDictIterValue_Type);
 }
 
 static PySequenceMethods dictvalues_as_sequence = {
-	(lenfunc)dictview_len,		/* sq_length */
-	0,				/* sq_concat */
-	0,				/* sq_repeat */
-	0,				/* sq_item */
-	0,				/* sq_slice */
-	0,				/* sq_ass_item */
-	0,				/* sq_ass_slice */
-	(objobjproc)0,			/* sq_contains */
+    (lenfunc)dictview_len,              /* sq_length */
+    0,                                  /* sq_concat */
+    0,                                  /* sq_repeat */
+    0,                                  /* sq_item */
+    0,                                  /* sq_slice */
+    0,                                  /* sq_ass_item */
+    0,                                  /* sq_ass_slice */
+    (objobjproc)0,                      /* sq_contains */
 };
 
 static PyMethodDef dictvalues_methods[] = {
- 	{NULL,		NULL}		/* sentinel */
+    {NULL,              NULL}           /* sentinel */
 };
 
 PyTypeObject PyDictValues_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"dict_values",				/* tp_name */
-	sizeof(dictviewobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)dictview_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_reserved */
-	(reprfunc)dictview_repr,		/* tp_repr */
-	0,					/* tp_as_number */
-	&dictvalues_as_sequence,		/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)dictview_traverse,	/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	(getiterfunc)dictvalues_iter,		/* tp_iter */
-	0,					/* tp_iternext */
-	dictvalues_methods,			/* tp_methods */
-	0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "dict_values",                              /* tp_name */
+    sizeof(dictviewobject),                     /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)dictview_dealloc,               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_reserved */
+    (reprfunc)dictview_repr,                    /* tp_repr */
+    0,                                          /* tp_as_number */
+    &dictvalues_as_sequence,                    /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)dictview_traverse,            /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    (getiterfunc)dictvalues_iter,               /* tp_iter */
+    0,                                          /* tp_iternext */
+    dictvalues_methods,                         /* tp_methods */
+    0,
 };
 
 static PyObject *
 dictvalues_new(PyObject *dict)
 {
-	return dictview_new(dict, &PyDictValues_Type);
+    return dictview_new(dict, &PyDictValues_Type);
 }
diff --git a/Objects/enumobject.c b/Objects/enumobject.c
index 2c1c3f8..a83fc7c 100644
--- a/Objects/enumobject.c
+++ b/Objects/enumobject.c
@@ -3,159 +3,159 @@
 #include "Python.h"
 
 typedef struct {
-	PyObject_HEAD
-	Py_ssize_t en_index;	   /* current index of enumeration */
-	PyObject* en_sit;          /* secondary iterator of enumeration */
-	PyObject* en_result;	   /* result tuple  */
-	PyObject* en_longindex;	   /* index for sequences >= PY_SSIZE_T_MAX */
+    PyObject_HEAD
+    Py_ssize_t en_index;           /* current index of enumeration */
+    PyObject* en_sit;          /* secondary iterator of enumeration */
+    PyObject* en_result;           /* result tuple  */
+    PyObject* en_longindex;        /* index for sequences >= PY_SSIZE_T_MAX */
 } enumobject;
 
 static PyObject *
 enum_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	enumobject *en;
-	PyObject *seq = NULL;
-	PyObject *start = NULL;
-	static char *kwlist[] = {"sequence", "start", 0};
+    enumobject *en;
+    PyObject *seq = NULL;
+    PyObject *start = NULL;
+    static char *kwlist[] = {"sequence", "start", 0};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:enumerate", kwlist,
-					 &seq, &start))
-		return NULL;
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:enumerate", kwlist,
+                                     &seq, &start))
+        return NULL;
 
-	en = (enumobject *)type->tp_alloc(type, 0);
-	if (en == NULL)
-		return NULL;
-	if (start != NULL) {
-		start = PyNumber_Index(start);
-		if (start == NULL) {
-			Py_DECREF(en);
-			return NULL;
-		}
-		assert(PyInt_Check(start) || PyLong_Check(start));
-		en->en_index = PyInt_AsSsize_t(start);
-		if (en->en_index == -1 && PyErr_Occurred()) {
-			PyErr_Clear();
-			en->en_index = PY_SSIZE_T_MAX;
-			en->en_longindex = start;
-		} else {
-			en->en_longindex = NULL;
-			Py_DECREF(start);
-		}
-	} else {
-		en->en_index = 0;
-		en->en_longindex = NULL;
-	}
-	en->en_sit = PyObject_GetIter(seq);
-	if (en->en_sit == NULL) {
-		Py_DECREF(en);
-		return NULL;
-	}
-	en->en_result = PyTuple_Pack(2, Py_None, Py_None);
-	if (en->en_result == NULL) {
-		Py_DECREF(en);
-		return NULL;
-	}
-	return (PyObject *)en;
+    en = (enumobject *)type->tp_alloc(type, 0);
+    if (en == NULL)
+        return NULL;
+    if (start != NULL) {
+        start = PyNumber_Index(start);
+        if (start == NULL) {
+            Py_DECREF(en);
+            return NULL;
+        }
+        assert(PyInt_Check(start) || PyLong_Check(start));
+        en->en_index = PyInt_AsSsize_t(start);
+        if (en->en_index == -1 && PyErr_Occurred()) {
+            PyErr_Clear();
+            en->en_index = PY_SSIZE_T_MAX;
+            en->en_longindex = start;
+        } else {
+            en->en_longindex = NULL;
+            Py_DECREF(start);
+        }
+    } else {
+        en->en_index = 0;
+        en->en_longindex = NULL;
+    }
+    en->en_sit = PyObject_GetIter(seq);
+    if (en->en_sit == NULL) {
+        Py_DECREF(en);
+        return NULL;
+    }
+    en->en_result = PyTuple_Pack(2, Py_None, Py_None);
+    if (en->en_result == NULL) {
+        Py_DECREF(en);
+        return NULL;
+    }
+    return (PyObject *)en;
 }
 
 static void
 enum_dealloc(enumobject *en)
 {
-	PyObject_GC_UnTrack(en);
-	Py_XDECREF(en->en_sit);
-	Py_XDECREF(en->en_result);
-	Py_XDECREF(en->en_longindex);
-	Py_TYPE(en)->tp_free(en);
+    PyObject_GC_UnTrack(en);
+    Py_XDECREF(en->en_sit);
+    Py_XDECREF(en->en_result);
+    Py_XDECREF(en->en_longindex);
+    Py_TYPE(en)->tp_free(en);
 }
 
 static int
 enum_traverse(enumobject *en, visitproc visit, void *arg)
 {
-	Py_VISIT(en->en_sit);
-	Py_VISIT(en->en_result);
-	Py_VISIT(en->en_longindex);
-	return 0;
+    Py_VISIT(en->en_sit);
+    Py_VISIT(en->en_result);
+    Py_VISIT(en->en_longindex);
+    return 0;
 }
 
 static PyObject *
 enum_next_long(enumobject *en, PyObject* next_item)
 {
-	static PyObject *one = NULL;
-	PyObject *result = en->en_result;
-	PyObject *next_index;
-	PyObject *stepped_up;
+    static PyObject *one = NULL;
+    PyObject *result = en->en_result;
+    PyObject *next_index;
+    PyObject *stepped_up;
 
-	if (en->en_longindex == NULL) {
-		en->en_longindex = PyInt_FromSsize_t(PY_SSIZE_T_MAX);
-		if (en->en_longindex == NULL)
-			return NULL;
-	}
-	if (one == NULL) {
-		one = PyInt_FromLong(1);
-		if (one == NULL)
-			return NULL;
-	}
-	next_index = en->en_longindex;
-	assert(next_index != NULL);
-	stepped_up = PyNumber_Add(next_index, one);
-	if (stepped_up == NULL)
-		return NULL;
-	en->en_longindex = stepped_up;
+    if (en->en_longindex == NULL) {
+        en->en_longindex = PyInt_FromSsize_t(PY_SSIZE_T_MAX);
+        if (en->en_longindex == NULL)
+            return NULL;
+    }
+    if (one == NULL) {
+        one = PyInt_FromLong(1);
+        if (one == NULL)
+            return NULL;
+    }
+    next_index = en->en_longindex;
+    assert(next_index != NULL);
+    stepped_up = PyNumber_Add(next_index, one);
+    if (stepped_up == NULL)
+        return NULL;
+    en->en_longindex = stepped_up;
 
-	if (result->ob_refcnt == 1) {
-		Py_INCREF(result);
-		Py_DECREF(PyTuple_GET_ITEM(result, 0));
-		Py_DECREF(PyTuple_GET_ITEM(result, 1));
-	} else {
-		result = PyTuple_New(2);
-		if (result == NULL) {
-			Py_DECREF(next_index);
-			Py_DECREF(next_item);
-			return NULL;
-		}
-	}
-	PyTuple_SET_ITEM(result, 0, next_index);
-	PyTuple_SET_ITEM(result, 1, next_item);
-	return result;
+    if (result->ob_refcnt == 1) {
+        Py_INCREF(result);
+        Py_DECREF(PyTuple_GET_ITEM(result, 0));
+        Py_DECREF(PyTuple_GET_ITEM(result, 1));
+    } else {
+        result = PyTuple_New(2);
+        if (result == NULL) {
+            Py_DECREF(next_index);
+            Py_DECREF(next_item);
+            return NULL;
+        }
+    }
+    PyTuple_SET_ITEM(result, 0, next_index);
+    PyTuple_SET_ITEM(result, 1, next_item);
+    return result;
 }
 
 static PyObject *
 enum_next(enumobject *en)
 {
-	PyObject *next_index;
-	PyObject *next_item;
-	PyObject *result = en->en_result;
-	PyObject *it = en->en_sit;
+    PyObject *next_index;
+    PyObject *next_item;
+    PyObject *result = en->en_result;
+    PyObject *it = en->en_sit;
 
-	next_item = (*Py_TYPE(it)->tp_iternext)(it);
-	if (next_item == NULL)
-		return NULL;
+    next_item = (*Py_TYPE(it)->tp_iternext)(it);
+    if (next_item == NULL)
+        return NULL;
 
-	if (en->en_index == PY_SSIZE_T_MAX)
-		return enum_next_long(en, next_item);
+    if (en->en_index == PY_SSIZE_T_MAX)
+        return enum_next_long(en, next_item);
 
-	next_index = PyInt_FromSsize_t(en->en_index);
-	if (next_index == NULL) {
-		Py_DECREF(next_item);
-		return NULL;
-	}
-	en->en_index++;
+    next_index = PyInt_FromSsize_t(en->en_index);
+    if (next_index == NULL) {
+        Py_DECREF(next_item);
+        return NULL;
+    }
+    en->en_index++;
 
-	if (result->ob_refcnt == 1) {
-		Py_INCREF(result);
-		Py_DECREF(PyTuple_GET_ITEM(result, 0));
-		Py_DECREF(PyTuple_GET_ITEM(result, 1));
-	} else {
-		result = PyTuple_New(2);
-		if (result == NULL) {
-			Py_DECREF(next_index);
-			Py_DECREF(next_item);
-			return NULL;
-		}
-	}
-	PyTuple_SET_ITEM(result, 0, next_index);
-	PyTuple_SET_ITEM(result, 1, next_item);
-	return result;
+    if (result->ob_refcnt == 1) {
+        Py_INCREF(result);
+        Py_DECREF(PyTuple_GET_ITEM(result, 0));
+        Py_DECREF(PyTuple_GET_ITEM(result, 1));
+    } else {
+        result = PyTuple_New(2);
+        if (result == NULL) {
+            Py_DECREF(next_index);
+            Py_DECREF(next_item);
+            return NULL;
+        }
+    }
+    PyTuple_SET_ITEM(result, 0, next_index);
+    PyTuple_SET_ITEM(result, 1, next_item);
+    return result;
 }
 
 PyDoc_STRVAR(enum_doc,
@@ -167,146 +167,146 @@
 "for obtaining an indexed list: (0, seq[0]), (1, seq[1]), (2, seq[2]), ...");
 
 PyTypeObject PyEnum_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"enumerate",                    /* tp_name */
-	sizeof(enumobject),             /* tp_basicsize */
-	0,                              /* tp_itemsize */
-	/* methods */
-	(destructor)enum_dealloc,       /* tp_dealloc */
-	0,                              /* tp_print */
-	0,                              /* tp_getattr */
-	0,                              /* tp_setattr */
-	0,                              /* tp_compare */
-	0,                              /* tp_repr */
-	0,                              /* tp_as_number */
-	0,                              /* tp_as_sequence */
-	0,                              /* tp_as_mapping */
-	0,                              /* tp_hash */
-	0,                              /* tp_call */
-	0,                              /* tp_str */
-	PyObject_GenericGetAttr,        /* tp_getattro */
-	0,                              /* tp_setattro */
-	0,                              /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_BASETYPE,    /* tp_flags */
-	enum_doc,                       /* tp_doc */
-	(traverseproc)enum_traverse,    /* tp_traverse */
-	0,                              /* tp_clear */
-	0,                              /* tp_richcompare */
-	0,                              /* tp_weaklistoffset */
-	PyObject_SelfIter,		/* tp_iter */
-	(iternextfunc)enum_next,        /* tp_iternext */
-	0,                              /* tp_methods */
-	0,                              /* tp_members */
-	0,                              /* tp_getset */
-	0,                              /* tp_base */
-	0,                              /* tp_dict */
-	0,                              /* tp_descr_get */
-	0,                              /* tp_descr_set */
-	0,                              /* tp_dictoffset */
-	0,                              /* tp_init */
-	PyType_GenericAlloc,            /* tp_alloc */
-	enum_new,                       /* tp_new */
-	PyObject_GC_Del,                /* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "enumerate",                    /* tp_name */
+    sizeof(enumobject),             /* tp_basicsize */
+    0,                              /* tp_itemsize */
+    /* methods */
+    (destructor)enum_dealloc,       /* tp_dealloc */
+    0,                              /* tp_print */
+    0,                              /* tp_getattr */
+    0,                              /* tp_setattr */
+    0,                              /* tp_compare */
+    0,                              /* tp_repr */
+    0,                              /* tp_as_number */
+    0,                              /* tp_as_sequence */
+    0,                              /* tp_as_mapping */
+    0,                              /* tp_hash */
+    0,                              /* tp_call */
+    0,                              /* tp_str */
+    PyObject_GenericGetAttr,        /* tp_getattro */
+    0,                              /* tp_setattro */
+    0,                              /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_BASETYPE,    /* tp_flags */
+    enum_doc,                       /* tp_doc */
+    (traverseproc)enum_traverse,    /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    PyObject_SelfIter,                  /* tp_iter */
+    (iternextfunc)enum_next,        /* tp_iternext */
+    0,                              /* tp_methods */
+    0,                              /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    PyType_GenericAlloc,            /* tp_alloc */
+    enum_new,                       /* tp_new */
+    PyObject_GC_Del,                /* tp_free */
 };
 
 /* Reversed Object ***************************************************************/
 
 typedef struct {
-	PyObject_HEAD
-	Py_ssize_t      index;
-	PyObject* seq;
+    PyObject_HEAD
+    Py_ssize_t      index;
+    PyObject* seq;
 } reversedobject;
 
 static PyObject *
 reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	Py_ssize_t n;
-	PyObject *seq, *reversed_meth;
-	static PyObject *reversed_cache = NULL;
-	reversedobject *ro;
+    Py_ssize_t n;
+    PyObject *seq, *reversed_meth;
+    static PyObject *reversed_cache = NULL;
+    reversedobject *ro;
 
-	if (type == &PyReversed_Type && !_PyArg_NoKeywords("reversed()", kwds))
-		return NULL;
+    if (type == &PyReversed_Type && !_PyArg_NoKeywords("reversed()", kwds))
+        return NULL;
 
-	if (!PyArg_UnpackTuple(args, "reversed", 1, 1, &seq) )
-		return NULL;
+    if (!PyArg_UnpackTuple(args, "reversed", 1, 1, &seq) )
+        return NULL;
 
-	if (PyInstance_Check(seq)) {
-		reversed_meth = PyObject_GetAttrString(seq, "__reversed__");
-		if (reversed_meth == NULL) {
-			if (PyErr_ExceptionMatches(PyExc_AttributeError))
-				PyErr_Clear();
-			else
-				return NULL;
-		}
-	}
-	else {
-		reversed_meth = _PyObject_LookupSpecial(seq, "__reversed__",
-							&reversed_cache);
-		if (reversed_meth == NULL && PyErr_Occurred())
-			return NULL;
-	}
-	if (reversed_meth != NULL) {
-		PyObject *res = PyObject_CallFunctionObjArgs(reversed_meth, NULL);
-		Py_DECREF(reversed_meth);
-		return res;
-	}
+    if (PyInstance_Check(seq)) {
+        reversed_meth = PyObject_GetAttrString(seq, "__reversed__");
+        if (reversed_meth == NULL) {
+            if (PyErr_ExceptionMatches(PyExc_AttributeError))
+                PyErr_Clear();
+            else
+                return NULL;
+        }
+    }
+    else {
+        reversed_meth = _PyObject_LookupSpecial(seq, "__reversed__",
+                                                &reversed_cache);
+        if (reversed_meth == NULL && PyErr_Occurred())
+            return NULL;
+    }
+    if (reversed_meth != NULL) {
+        PyObject *res = PyObject_CallFunctionObjArgs(reversed_meth, NULL);
+        Py_DECREF(reversed_meth);
+        return res;
+    }
 
-	if (!PySequence_Check(seq)) {
-		PyErr_SetString(PyExc_TypeError,
-				"argument to reversed() must be a sequence");
-		return NULL;
-	}
+    if (!PySequence_Check(seq)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "argument to reversed() must be a sequence");
+        return NULL;
+    }
 
-	n = PySequence_Size(seq);
-	if (n == -1)
-		return NULL;
+    n = PySequence_Size(seq);
+    if (n == -1)
+        return NULL;
 
-	ro = (reversedobject *)type->tp_alloc(type, 0);
-	if (ro == NULL)
-		return NULL;
+    ro = (reversedobject *)type->tp_alloc(type, 0);
+    if (ro == NULL)
+        return NULL;
 
-	ro->index = n-1;
-	Py_INCREF(seq);
-	ro->seq = seq;
-	return (PyObject *)ro;
+    ro->index = n-1;
+    Py_INCREF(seq);
+    ro->seq = seq;
+    return (PyObject *)ro;
 }
 
 static void
 reversed_dealloc(reversedobject *ro)
 {
-	PyObject_GC_UnTrack(ro);
-	Py_XDECREF(ro->seq);
-	Py_TYPE(ro)->tp_free(ro);
+    PyObject_GC_UnTrack(ro);
+    Py_XDECREF(ro->seq);
+    Py_TYPE(ro)->tp_free(ro);
 }
 
 static int
 reversed_traverse(reversedobject *ro, visitproc visit, void *arg)
 {
-	Py_VISIT(ro->seq);
-	return 0;
+    Py_VISIT(ro->seq);
+    return 0;
 }
 
 static PyObject *
 reversed_next(reversedobject *ro)
 {
-	PyObject *item;
-	Py_ssize_t index = ro->index;
+    PyObject *item;
+    Py_ssize_t index = ro->index;
 
-	if (index >= 0) {
-		item = PySequence_GetItem(ro->seq, index);
-		if (item != NULL) {
-			ro->index--;
-			return item;
-		}
-		if (PyErr_ExceptionMatches(PyExc_IndexError) ||
-		    PyErr_ExceptionMatches(PyExc_StopIteration))
-			PyErr_Clear();
-	}
-	ro->index = -1;
-	Py_CLEAR(ro->seq);
-	return NULL;
+    if (index >= 0) {
+        item = PySequence_GetItem(ro->seq, index);
+        if (item != NULL) {
+            ro->index--;
+            return item;
+        }
+        if (PyErr_ExceptionMatches(PyExc_IndexError) ||
+            PyErr_ExceptionMatches(PyExc_StopIteration))
+            PyErr_Clear();
+    }
+    ro->index = -1;
+    Py_CLEAR(ro->seq);
+    return NULL;
 }
 
 PyDoc_STRVAR(reversed_doc,
@@ -317,64 +317,64 @@
 static PyObject *
 reversed_len(reversedobject *ro)
 {
-	Py_ssize_t position, seqsize;
+    Py_ssize_t position, seqsize;
 
-	if (ro->seq == NULL)
-		return PyInt_FromLong(0);
-	seqsize = PySequence_Size(ro->seq);
-	if (seqsize == -1)
-		return NULL;
-	position = ro->index + 1;
-	return PyInt_FromSsize_t((seqsize < position)  ?  0  :  position);
+    if (ro->seq == NULL)
+        return PyInt_FromLong(0);
+    seqsize = PySequence_Size(ro->seq);
+    if (seqsize == -1)
+        return NULL;
+    position = ro->index + 1;
+    return PyInt_FromSsize_t((seqsize < position)  ?  0  :  position);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
 
 static PyMethodDef reversediter_methods[] = {
-	{"__length_hint__", (PyCFunction)reversed_len, METH_NOARGS, length_hint_doc},
- 	{NULL,		NULL}		/* sentinel */
+    {"__length_hint__", (PyCFunction)reversed_len, METH_NOARGS, length_hint_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 PyTypeObject PyReversed_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"reversed",                     /* tp_name */
-	sizeof(reversedobject),         /* tp_basicsize */
-	0,                              /* tp_itemsize */
-	/* methods */
-	(destructor)reversed_dealloc,   /* tp_dealloc */
-	0,                              /* tp_print */
-	0,                              /* tp_getattr */
-	0,                              /* tp_setattr */
-	0,                              /* tp_compare */
-	0,                              /* tp_repr */
-	0,                              /* tp_as_number */
-	0,				/* tp_as_sequence */
-	0,                              /* tp_as_mapping */
-	0,                              /* tp_hash */
-	0,                              /* tp_call */
-	0,                              /* tp_str */
-	PyObject_GenericGetAttr,        /* tp_getattro */
-	0,                              /* tp_setattro */
-	0,                              /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_BASETYPE,    /* tp_flags */
-	reversed_doc,                   /* tp_doc */
-	(traverseproc)reversed_traverse,/* tp_traverse */
-	0,                              /* tp_clear */
-	0,                              /* tp_richcompare */
-	0,                              /* tp_weaklistoffset */
-	PyObject_SelfIter,		/* tp_iter */
-	(iternextfunc)reversed_next,    /* tp_iternext */
-	reversediter_methods,		/* tp_methods */
-	0,                              /* tp_members */
-	0,                              /* tp_getset */
-	0,                              /* tp_base */
-	0,                              /* tp_dict */
-	0,                              /* tp_descr_get */
-	0,                              /* tp_descr_set */
-	0,                              /* tp_dictoffset */
-	0,                              /* tp_init */
-	PyType_GenericAlloc,            /* tp_alloc */
-	reversed_new,                   /* tp_new */
-	PyObject_GC_Del,                /* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "reversed",                     /* tp_name */
+    sizeof(reversedobject),         /* tp_basicsize */
+    0,                              /* tp_itemsize */
+    /* methods */
+    (destructor)reversed_dealloc,   /* tp_dealloc */
+    0,                              /* tp_print */
+    0,                              /* tp_getattr */
+    0,                              /* tp_setattr */
+    0,                              /* tp_compare */
+    0,                              /* tp_repr */
+    0,                              /* tp_as_number */
+    0,                                  /* tp_as_sequence */
+    0,                              /* tp_as_mapping */
+    0,                              /* tp_hash */
+    0,                              /* tp_call */
+    0,                              /* tp_str */
+    PyObject_GenericGetAttr,        /* tp_getattro */
+    0,                              /* tp_setattro */
+    0,                              /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_BASETYPE,    /* tp_flags */
+    reversed_doc,                   /* tp_doc */
+    (traverseproc)reversed_traverse,/* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    PyObject_SelfIter,                  /* tp_iter */
+    (iternextfunc)reversed_next,    /* tp_iternext */
+    reversediter_methods,               /* tp_methods */
+    0,                              /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    PyType_GenericAlloc,            /* tp_alloc */
+    reversed_new,                   /* tp_new */
+    PyObject_GC_Del,                /* tp_free */
 };
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index a961143..2e98283 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -217,7 +217,7 @@
 static PyMethodDef BaseException_methods[] = {
    {"__reduce__", (PyCFunction)BaseException_reduce, METH_NOARGS },
    {"__setstate__", (PyCFunction)BaseException_setstate, METH_O },
-#ifdef Py_USING_UNICODE   
+#ifdef Py_USING_UNICODE
    {"__unicode__", (PyCFunction)BaseException_unicode, METH_NOARGS },
 #endif
    {NULL, NULL, 0, NULL},
@@ -236,7 +236,7 @@
 
 static PyObject *
 BaseException_getslice(PyBaseExceptionObject *self,
-			Py_ssize_t start, Py_ssize_t stop)
+                        Py_ssize_t start, Py_ssize_t stop)
 {
     if (PyErr_WarnPy3k("__getslice__ not supported for exception "
                        "classes in 3.x; use args attribute", 1) < 0)
@@ -316,7 +316,7 @@
 BaseException_get_message(PyBaseExceptionObject *self)
 {
     PyObject *msg;
-    
+
     /* if "message" is in self->dict, accessing a user-set message attribute */
     if (self->dict &&
         (msg = PyDict_GetItemString(self->dict, "message"))) {
@@ -352,7 +352,7 @@
         self->message = NULL;
         return 0;
     }
-    
+
     /* else set it in __dict__, but may need to create the dict first */
     if (self->dict == NULL) {
         self->dict = PyDict_New();
@@ -366,7 +366,7 @@
     {"__dict__", (getter)BaseException_get_dict, (setter)BaseException_set_dict},
     {"args", (getter)BaseException_get_args, (setter)BaseException_set_args},
     {"message", (getter)BaseException_get_message,
-	    (setter)BaseException_set_message},
+            (setter)BaseException_set_message},
     {NULL},
 };
 
@@ -393,7 +393,7 @@
     PyObject_GenericSetAttr,    /*tp_setattro*/
     0,                          /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC |
-    	Py_TPFLAGS_BASE_EXC_SUBCLASS,  /*tp_flags*/
+        Py_TPFLAGS_BASE_EXC_SUBCLASS,  /*tp_flags*/
     PyDoc_STR("Common base class for all exceptions"), /* tp_doc */
     (traverseproc)BaseException_traverse, /* tp_traverse */
     (inquiry)BaseException_clear, /* tp_clear */
@@ -2186,25 +2186,25 @@
 
     PyExc_RecursionErrorInst = BaseException_new(&_PyExc_RuntimeError, NULL, NULL);
     if (!PyExc_RecursionErrorInst)
-	Py_FatalError("Cannot pre-allocate RuntimeError instance for "
-			"recursion errors");
+        Py_FatalError("Cannot pre-allocate RuntimeError instance for "
+                        "recursion errors");
     else {
-	PyBaseExceptionObject *err_inst =
-	    (PyBaseExceptionObject *)PyExc_RecursionErrorInst;
-	PyObject *args_tuple;
-	PyObject *exc_message;
-	exc_message = PyString_FromString("maximum recursion depth exceeded");
-	if (!exc_message)
-	    Py_FatalError("cannot allocate argument for RuntimeError "
-			    "pre-allocation");
-	args_tuple = PyTuple_Pack(1, exc_message);
-	if (!args_tuple)
-	    Py_FatalError("cannot allocate tuple for RuntimeError "
-			    "pre-allocation");
-	Py_DECREF(exc_message);
-	if (BaseException_init(err_inst, args_tuple, NULL))
-	    Py_FatalError("init of pre-allocated RuntimeError failed");
-	Py_DECREF(args_tuple);
+        PyBaseExceptionObject *err_inst =
+            (PyBaseExceptionObject *)PyExc_RecursionErrorInst;
+        PyObject *args_tuple;
+        PyObject *exc_message;
+        exc_message = PyString_FromString("maximum recursion depth exceeded");
+        if (!exc_message)
+            Py_FatalError("cannot allocate argument for RuntimeError "
+                            "pre-allocation");
+        args_tuple = PyTuple_Pack(1, exc_message);
+        if (!args_tuple)
+            Py_FatalError("cannot allocate tuple for RuntimeError "
+                            "pre-allocation");
+        Py_DECREF(exc_message);
+        if (BaseException_init(err_inst, args_tuple, NULL))
+            Py_FatalError("init of pre-allocated RuntimeError failed");
+        Py_DECREF(args_tuple);
     }
 
     Py_DECREF(bltinmod);
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index f479501..6b95a0c 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -37,10 +37,10 @@
 #endif
 
 /* Bits in f_newlinetypes */
-#define NEWLINE_UNKNOWN	0	/* No newline seen, yet */
-#define NEWLINE_CR 1		/* \r newline seen */
-#define NEWLINE_LF 2		/* \n newline seen */
-#define NEWLINE_CRLF 4		/* \r\n newline seen */
+#define NEWLINE_UNKNOWN 0       /* No newline seen, yet */
+#define NEWLINE_CR 1            /* \r newline seen */
+#define NEWLINE_LF 2            /* \n newline seen */
+#define NEWLINE_CRLF 4          /* \r\n newline seen */
 
 /*
  * These macros release the GIL while preventing the f_close() function being
@@ -52,19 +52,19 @@
 
 #define FILE_BEGIN_ALLOW_THREADS(fobj) \
 { \
-	fobj->unlocked_count++; \
-	Py_BEGIN_ALLOW_THREADS
+    fobj->unlocked_count++; \
+    Py_BEGIN_ALLOW_THREADS
 
 #define FILE_END_ALLOW_THREADS(fobj) \
-	Py_END_ALLOW_THREADS \
-	fobj->unlocked_count--; \
-	assert(fobj->unlocked_count >= 0); \
+    Py_END_ALLOW_THREADS \
+    fobj->unlocked_count--; \
+    assert(fobj->unlocked_count >= 0); \
 }
 
 #define FILE_ABORT_ALLOW_THREADS(fobj) \
-	Py_BLOCK_THREADS \
-	fobj->unlocked_count--; \
-	assert(fobj->unlocked_count >= 0);
+    Py_BLOCK_THREADS \
+    fobj->unlocked_count--; \
+    assert(fobj->unlocked_count >= 0);
 
 #ifdef __cplusplus
 extern "C" {
@@ -73,30 +73,30 @@
 FILE *
 PyFile_AsFile(PyObject *f)
 {
-	if (f == NULL || !PyFile_Check(f))
-		return NULL;
-	else
-		return ((PyFileObject *)f)->f_fp;
+    if (f == NULL || !PyFile_Check(f))
+        return NULL;
+    else
+        return ((PyFileObject *)f)->f_fp;
 }
 
 void PyFile_IncUseCount(PyFileObject *fobj)
 {
-	fobj->unlocked_count++;
+    fobj->unlocked_count++;
 }
 
 void PyFile_DecUseCount(PyFileObject *fobj)
 {
-	fobj->unlocked_count--;
-	assert(fobj->unlocked_count >= 0);
+    fobj->unlocked_count--;
+    assert(fobj->unlocked_count >= 0);
 }
 
 PyObject *
 PyFile_Name(PyObject *f)
 {
-	if (f == NULL || !PyFile_Check(f))
-		return NULL;
-	else
-		return ((PyFileObject *)f)->f_name;
+    if (f == NULL || !PyFile_Check(f))
+        return NULL;
+    else
+        return ((PyFileObject *)f)->f_name;
 }
 
 /* This is a safe wrapper around PyObject_Print to print to the FILE
@@ -105,11 +105,11 @@
 static int
 file_PyObject_Print(PyObject *op, PyFileObject *f, int flags)
 {
-	int result;
-	PyFile_IncUseCount(f);
-	result = PyObject_Print(op, f->f_fp, flags);
-	PyFile_DecUseCount(f);
-	return result;
+    int result;
+    PyFile_IncUseCount(f);
+    result = PyObject_Print(op, f->f_fp, flags);
+    PyFile_DecUseCount(f);
+    return result;
 }
 
 /* On Unix, fopen will succeed for directories.
@@ -120,66 +120,66 @@
 dircheck(PyFileObject* f)
 {
 #if defined(HAVE_FSTAT) && defined(S_IFDIR) && defined(EISDIR)
-	struct stat buf;
-	if (f->f_fp == NULL)
-		return f;
-	if (fstat(fileno(f->f_fp), &buf) == 0 &&
-	    S_ISDIR(buf.st_mode)) {
-		char *msg = strerror(EISDIR);
-		PyObject *exc = PyObject_CallFunction(PyExc_IOError, "(isO)",
-						      EISDIR, msg, f->f_name);
-		PyErr_SetObject(PyExc_IOError, exc);
-		Py_XDECREF(exc);
-		return NULL;
-	}
+    struct stat buf;
+    if (f->f_fp == NULL)
+        return f;
+    if (fstat(fileno(f->f_fp), &buf) == 0 &&
+        S_ISDIR(buf.st_mode)) {
+        char *msg = strerror(EISDIR);
+        PyObject *exc = PyObject_CallFunction(PyExc_IOError, "(isO)",
+                                              EISDIR, msg, f->f_name);
+        PyErr_SetObject(PyExc_IOError, exc);
+        Py_XDECREF(exc);
+        return NULL;
+    }
 #endif
-	return f;
+    return f;
 }
 
 
 static PyObject *
 fill_file_fields(PyFileObject *f, FILE *fp, PyObject *name, char *mode,
-		 int (*close)(FILE *))
+                 int (*close)(FILE *))
 {
-	assert(name != NULL);
-	assert(f != NULL);
-	assert(PyFile_Check(f));
-	assert(f->f_fp == NULL);
+    assert(name != NULL);
+    assert(f != NULL);
+    assert(PyFile_Check(f));
+    assert(f->f_fp == NULL);
 
-	Py_DECREF(f->f_name);
-	Py_DECREF(f->f_mode);
-	Py_DECREF(f->f_encoding);
-	Py_DECREF(f->f_errors);
+    Py_DECREF(f->f_name);
+    Py_DECREF(f->f_mode);
+    Py_DECREF(f->f_encoding);
+    Py_DECREF(f->f_errors);
 
-        Py_INCREF(name);
-        f->f_name = name;
+    Py_INCREF(name);
+    f->f_name = name;
 
-	f->f_mode = PyString_FromString(mode);
+    f->f_mode = PyString_FromString(mode);
 
-	f->f_close = close;
-	f->f_softspace = 0;
-	f->f_binary = strchr(mode,'b') != NULL;
-	f->f_buf = NULL;
-	f->f_univ_newline = (strchr(mode, 'U') != NULL);
-	f->f_newlinetypes = NEWLINE_UNKNOWN;
-	f->f_skipnextlf = 0;
-	Py_INCREF(Py_None);
-	f->f_encoding = Py_None;
-	Py_INCREF(Py_None);
-	f->f_errors = Py_None;
-	f->readable = f->writable = 0;
-	if (strchr(mode, 'r') != NULL || f->f_univ_newline)
-		f->readable = 1;
-	if (strchr(mode, 'w') != NULL || strchr(mode, 'a') != NULL)
-		f->writable = 1;
-	if (strchr(mode, '+') != NULL)
-		f->readable = f->writable = 1;
+    f->f_close = close;
+    f->f_softspace = 0;
+    f->f_binary = strchr(mode,'b') != NULL;
+    f->f_buf = NULL;
+    f->f_univ_newline = (strchr(mode, 'U') != NULL);
+    f->f_newlinetypes = NEWLINE_UNKNOWN;
+    f->f_skipnextlf = 0;
+    Py_INCREF(Py_None);
+    f->f_encoding = Py_None;
+    Py_INCREF(Py_None);
+    f->f_errors = Py_None;
+    f->readable = f->writable = 0;
+    if (strchr(mode, 'r') != NULL || f->f_univ_newline)
+        f->readable = 1;
+    if (strchr(mode, 'w') != NULL || strchr(mode, 'a') != NULL)
+        f->writable = 1;
+    if (strchr(mode, '+') != NULL)
+        f->readable = f->writable = 1;
 
-	if (f->f_mode == NULL)
-		return NULL;
-	f->f_fp = fp;
-        f = dircheck(f);
-	return (PyObject *) f;
+    if (f->f_mode == NULL)
+        return NULL;
+    f->f_fp = fp;
+    f = dircheck(f);
+    return (PyObject *) f;
 }
 
 #if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
@@ -192,74 +192,74 @@
  */
 static int _PyVerify_Mode_WINNT(const char *mode)
 {
-	/* See if mode string is valid on Windows to avoid hard assertions */
-	/* remove leading spacese */
-	int singles = 0;
-	int pairs = 0;
-	int encoding = 0;
-	const char *s, *c;
+    /* See if mode string is valid on Windows to avoid hard assertions */
+    /* remove leading spacese */
+    int singles = 0;
+    int pairs = 0;
+    int encoding = 0;
+    const char *s, *c;
 
-	while(*mode == ' ') /* strip initial spaces */
-		++mode;
-	if (!strchr("rwa", *mode)) /* must start with one of these */
-		return 0;
-	while (*++mode) {
-		if (*mode == ' ' || *mode == 'N') /* ignore spaces and N */
-			continue;
-		s = "+TD"; /* each of this can appear only once */
-		c = strchr(s, *mode);
-		if (c) {
-			ptrdiff_t idx = s-c;
-			if (singles & (1<<idx))
-				return 0;
-			singles |= (1<<idx);
-			continue;
-		}
-		s = "btcnSR"; /* only one of each letter in the pairs allowed */
-		c = strchr(s, *mode);
-		if (c) {
-			ptrdiff_t idx = (s-c)/2;
-			if (pairs & (1<<idx))
-				return 0;
-			pairs |= (1<<idx);
-			continue;
-		}
-		if (*mode == ',') {
-			encoding = 1;
-			break;
-		}
-		return 0; /* found an invalid char */
-	}
+    while(*mode == ' ') /* strip initial spaces */
+        ++mode;
+    if (!strchr("rwa", *mode)) /* must start with one of these */
+        return 0;
+    while (*++mode) {
+        if (*mode == ' ' || *mode == 'N') /* ignore spaces and N */
+            continue;
+        s = "+TD"; /* each of this can appear only once */
+        c = strchr(s, *mode);
+        if (c) {
+            ptrdiff_t idx = s-c;
+            if (singles & (1<<idx))
+                return 0;
+            singles |= (1<<idx);
+            continue;
+        }
+        s = "btcnSR"; /* only one of each letter in the pairs allowed */
+        c = strchr(s, *mode);
+        if (c) {
+            ptrdiff_t idx = (s-c)/2;
+            if (pairs & (1<<idx))
+                return 0;
+            pairs |= (1<<idx);
+            continue;
+        }
+        if (*mode == ',') {
+            encoding = 1;
+            break;
+        }
+        return 0; /* found an invalid char */
+    }
 
-	if (encoding) {
-		char *e[] = {"UTF-8", "UTF-16LE", "UNICODE"};
-		while (*mode == ' ')
-			++mode;
-		/* find 'ccs =' */
-		if (strncmp(mode, "ccs", 3))
-			return 0;
-		mode += 3;
-		while (*mode == ' ')
-			++mode;
-		if (*mode != '=')
-			return 0;
-		while (*mode == ' ')
-			++mode;
-		for(encoding = 0; encoding<_countof(e); ++encoding) {
-			size_t l = strlen(e[encoding]);
-			if (!strncmp(mode, e[encoding], l)) {
-				mode += l; /* found a valid encoding */
-				break;
-			}
-		}
-		if (encoding == _countof(e))
-			return 0;
-	}
-	/* skip trailing spaces */
-	while (*mode == ' ')
-		++mode;
+    if (encoding) {
+        char *e[] = {"UTF-8", "UTF-16LE", "UNICODE"};
+        while (*mode == ' ')
+            ++mode;
+        /* find 'ccs =' */
+        if (strncmp(mode, "ccs", 3))
+            return 0;
+        mode += 3;
+        while (*mode == ' ')
+            ++mode;
+        if (*mode != '=')
+            return 0;
+        while (*mode == ' ')
+            ++mode;
+        for(encoding = 0; encoding<_countof(e); ++encoding) {
+            size_t l = strlen(e[encoding]);
+            if (!strncmp(mode, e[encoding], l)) {
+                mode += l; /* found a valid encoding */
+                break;
+            }
+        }
+        if (encoding == _countof(e))
+            return 0;
+    }
+    /* skip trailing spaces */
+    while (*mode == ' ')
+        ++mode;
 
-	return *mode == '\0'; /* must be at the end of the string */
+    return *mode == '\0'; /* must be at the end of the string */
 }
 #endif
 
@@ -272,264 +272,264 @@
 int
 _PyFile_SanitizeMode(char *mode)
 {
-	char *upos;
-	size_t len = strlen(mode);
+    char *upos;
+    size_t len = strlen(mode);
 
-	if (!len) {
-		PyErr_SetString(PyExc_ValueError, "empty mode string");
-		return -1;
-	}
+    if (!len) {
+        PyErr_SetString(PyExc_ValueError, "empty mode string");
+        return -1;
+    }
 
-	upos = strchr(mode, 'U');
-	if (upos) {
-		memmove(upos, upos+1, len-(upos-mode)); /* incl null char */
+    upos = strchr(mode, 'U');
+    if (upos) {
+        memmove(upos, upos+1, len-(upos-mode)); /* incl null char */
 
-		if (mode[0] == 'w' || mode[0] == 'a') {
-			PyErr_Format(PyExc_ValueError, "universal newline "
-			             "mode can only be used with modes "
-				     "starting with 'r'");
-			return -1;
-		}
+        if (mode[0] == 'w' || mode[0] == 'a') {
+            PyErr_Format(PyExc_ValueError, "universal newline "
+                         "mode can only be used with modes "
+                         "starting with 'r'");
+            return -1;
+        }
 
-		if (mode[0] != 'r') {
-			memmove(mode+1, mode, strlen(mode)+1);
-			mode[0] = 'r';
-		}
+        if (mode[0] != 'r') {
+            memmove(mode+1, mode, strlen(mode)+1);
+            mode[0] = 'r';
+        }
 
-		if (!strchr(mode, 'b')) {
-			memmove(mode+2, mode+1, strlen(mode));
-			mode[1] = 'b';
-		}
-	} else if (mode[0] != 'r' && mode[0] != 'w' && mode[0] != 'a') {
-		PyErr_Format(PyExc_ValueError, "mode string must begin with "
-	        	    "one of 'r', 'w', 'a' or 'U', not '%.200s'", mode);
-		return -1;
-	}
+        if (!strchr(mode, 'b')) {
+            memmove(mode+2, mode+1, strlen(mode));
+            mode[1] = 'b';
+        }
+    } else if (mode[0] != 'r' && mode[0] != 'w' && mode[0] != 'a') {
+        PyErr_Format(PyExc_ValueError, "mode string must begin with "
+                    "one of 'r', 'w', 'a' or 'U', not '%.200s'", mode);
+        return -1;
+    }
 #ifdef Py_VERIFY_WINNT
-	/* additional checks on NT with visual studio 2005 and higher */
-	if (!_PyVerify_Mode_WINNT(mode)) {
-		PyErr_Format(PyExc_ValueError, "Invalid mode ('%.50s')", mode);
-		return -1;
-	}
+    /* additional checks on NT with visual studio 2005 and higher */
+    if (!_PyVerify_Mode_WINNT(mode)) {
+        PyErr_Format(PyExc_ValueError, "Invalid mode ('%.50s')", mode);
+        return -1;
+    }
 #endif
-	return 0;
+    return 0;
 }
 
 static PyObject *
 open_the_file(PyFileObject *f, char *name, char *mode)
 {
-	char *newmode;
-	assert(f != NULL);
-	assert(PyFile_Check(f));
+    char *newmode;
+    assert(f != NULL);
+    assert(PyFile_Check(f));
 #ifdef MS_WINDOWS
-	/* windows ignores the passed name in order to support Unicode */
-	assert(f->f_name != NULL);
+    /* windows ignores the passed name in order to support Unicode */
+    assert(f->f_name != NULL);
 #else
-	assert(name != NULL);
+    assert(name != NULL);
 #endif
-	assert(mode != NULL);
-	assert(f->f_fp == NULL);
+    assert(mode != NULL);
+    assert(f->f_fp == NULL);
 
-	/* probably need to replace 'U' by 'rb' */
-	newmode = PyMem_MALLOC(strlen(mode) + 3);
-	if (!newmode) {
-		PyErr_NoMemory();
-		return NULL;
-	}
-	strcpy(newmode, mode);
+    /* probably need to replace 'U' by 'rb' */
+    newmode = PyMem_MALLOC(strlen(mode) + 3);
+    if (!newmode) {
+        PyErr_NoMemory();
+        return NULL;
+    }
+    strcpy(newmode, mode);
 
-	if (_PyFile_SanitizeMode(newmode)) {
-		f = NULL;
-		goto cleanup;
-	}
+    if (_PyFile_SanitizeMode(newmode)) {
+        f = NULL;
+        goto cleanup;
+    }
 
-	/* rexec.py can't stop a user from getting the file() constructor --
-	   all they have to do is get *any* file object f, and then do
-	   type(f).  Here we prevent them from doing damage with it. */
-	if (PyEval_GetRestricted()) {
-		PyErr_SetString(PyExc_IOError,
-		"file() constructor not accessible in restricted mode");
-		f = NULL;
-		goto cleanup;
-	}
-	errno = 0;
+    /* rexec.py can't stop a user from getting the file() constructor --
+       all they have to do is get *any* file object f, and then do
+       type(f).  Here we prevent them from doing damage with it. */
+    if (PyEval_GetRestricted()) {
+        PyErr_SetString(PyExc_IOError,
+        "file() constructor not accessible in restricted mode");
+        f = NULL;
+        goto cleanup;
+    }
+    errno = 0;
 
 #ifdef MS_WINDOWS
-	if (PyUnicode_Check(f->f_name)) {
-		PyObject *wmode;
-		wmode = PyUnicode_DecodeASCII(newmode, strlen(newmode), NULL);
-		if (f->f_name && wmode) {
-			FILE_BEGIN_ALLOW_THREADS(f)
-			/* PyUnicode_AS_UNICODE OK without thread
-			   lock as it is a simple dereference. */
-			f->f_fp = _wfopen(PyUnicode_AS_UNICODE(f->f_name),
-					  PyUnicode_AS_UNICODE(wmode));
-			FILE_END_ALLOW_THREADS(f)
-		}
-		Py_XDECREF(wmode);
-	}
+    if (PyUnicode_Check(f->f_name)) {
+        PyObject *wmode;
+        wmode = PyUnicode_DecodeASCII(newmode, strlen(newmode), NULL);
+        if (f->f_name && wmode) {
+            FILE_BEGIN_ALLOW_THREADS(f)
+            /* PyUnicode_AS_UNICODE OK without thread
+               lock as it is a simple dereference. */
+            f->f_fp = _wfopen(PyUnicode_AS_UNICODE(f->f_name),
+                              PyUnicode_AS_UNICODE(wmode));
+            FILE_END_ALLOW_THREADS(f)
+        }
+        Py_XDECREF(wmode);
+    }
 #endif
-	if (NULL == f->f_fp && NULL != name) {
-		FILE_BEGIN_ALLOW_THREADS(f)
-		f->f_fp = fopen(name, newmode);
-		FILE_END_ALLOW_THREADS(f)
-	}
+    if (NULL == f->f_fp && NULL != name) {
+        FILE_BEGIN_ALLOW_THREADS(f)
+        f->f_fp = fopen(name, newmode);
+        FILE_END_ALLOW_THREADS(f)
+    }
 
-	if (f->f_fp == NULL) {
+    if (f->f_fp == NULL) {
 #if defined  _MSC_VER && (_MSC_VER < 1400 || !defined(__STDC_SECURE_LIB__))
-		/* MSVC 6 (Microsoft) leaves errno at 0 for bad mode strings,
-		 * across all Windows flavors.  When it sets EINVAL varies
-		 * across Windows flavors, the exact conditions aren't
-		 * documented, and the answer lies in the OS's implementation
-		 * of Win32's CreateFile function (whose source is secret).
-		 * Seems the best we can do is map EINVAL to ENOENT.
-		 * Starting with Visual Studio .NET 2005, EINVAL is correctly
-		 * set by our CRT error handler (set in exceptions.c.)
-		 */
-		if (errno == 0)	/* bad mode string */
-			errno = EINVAL;
-		else if (errno == EINVAL) /* unknown, but not a mode string */
-			errno = ENOENT;
+        /* MSVC 6 (Microsoft) leaves errno at 0 for bad mode strings,
+         * across all Windows flavors.  When it sets EINVAL varies
+         * across Windows flavors, the exact conditions aren't
+         * documented, and the answer lies in the OS's implementation
+         * of Win32's CreateFile function (whose source is secret).
+         * Seems the best we can do is map EINVAL to ENOENT.
+         * Starting with Visual Studio .NET 2005, EINVAL is correctly
+         * set by our CRT error handler (set in exceptions.c.)
+         */
+        if (errno == 0)         /* bad mode string */
+            errno = EINVAL;
+        else if (errno == EINVAL) /* unknown, but not a mode string */
+            errno = ENOENT;
 #endif
-                /* EINVAL is returned when an invalid filename or
-                 * an invalid mode is supplied. */
-		if (errno == EINVAL) {
-			PyObject *v;
-			char message[100];
-			PyOS_snprintf(message, 100, 
-			    "invalid mode ('%.50s') or filename", mode);
-			v = Py_BuildValue("(isO)", errno, message, f->f_name);
-			if (v != NULL) {
-				PyErr_SetObject(PyExc_IOError, v);
-				Py_DECREF(v);
-			}
-		}
-		else
-			PyErr_SetFromErrnoWithFilenameObject(PyExc_IOError, f->f_name);
-		f = NULL;
-	}
-	if (f != NULL)
-		f = dircheck(f);
+        /* EINVAL is returned when an invalid filename or
+         * an invalid mode is supplied. */
+        if (errno == EINVAL) {
+            PyObject *v;
+            char message[100];
+            PyOS_snprintf(message, 100,
+                "invalid mode ('%.50s') or filename", mode);
+            v = Py_BuildValue("(isO)", errno, message, f->f_name);
+            if (v != NULL) {
+                PyErr_SetObject(PyExc_IOError, v);
+                Py_DECREF(v);
+            }
+        }
+        else
+            PyErr_SetFromErrnoWithFilenameObject(PyExc_IOError, f->f_name);
+        f = NULL;
+    }
+    if (f != NULL)
+        f = dircheck(f);
 
 cleanup:
-	PyMem_FREE(newmode);
+    PyMem_FREE(newmode);
 
-	return (PyObject *)f;
+    return (PyObject *)f;
 }
 
 static PyObject *
 close_the_file(PyFileObject *f)
 {
-	int sts = 0;
-	int (*local_close)(FILE *);
-	FILE *local_fp = f->f_fp;
-	if (local_fp != NULL) {
-		local_close = f->f_close;
-		if (local_close != NULL && f->unlocked_count > 0) {
-			if (f->ob_refcnt > 0) {
-				PyErr_SetString(PyExc_IOError,
-					"close() called during concurrent "
-					"operation on the same file object.");
-			} else {
-				/* This should not happen unless someone is
-				 * carelessly playing with the PyFileObject
-				 * struct fields and/or its associated FILE
-				 * pointer. */
-				PyErr_SetString(PyExc_SystemError,
-					"PyFileObject locking error in "
-					"destructor (refcnt <= 0 at close).");
-			}
-			return NULL;
-		}
-		/* NULL out the FILE pointer before releasing the GIL, because
-		 * it will not be valid anymore after the close() function is
-		 * called. */
-		f->f_fp = NULL;
-		if (local_close != NULL) {
-			Py_BEGIN_ALLOW_THREADS
-			errno = 0;
-			sts = (*local_close)(local_fp);
-			Py_END_ALLOW_THREADS
-			if (sts == EOF)
-				return PyErr_SetFromErrno(PyExc_IOError);
-			if (sts != 0)
-				return PyInt_FromLong((long)sts);
-		}
-	}
-	Py_RETURN_NONE;
+    int sts = 0;
+    int (*local_close)(FILE *);
+    FILE *local_fp = f->f_fp;
+    if (local_fp != NULL) {
+        local_close = f->f_close;
+        if (local_close != NULL && f->unlocked_count > 0) {
+            if (f->ob_refcnt > 0) {
+                PyErr_SetString(PyExc_IOError,
+                    "close() called during concurrent "
+                    "operation on the same file object.");
+            } else {
+                /* This should not happen unless someone is
+                 * carelessly playing with the PyFileObject
+                 * struct fields and/or its associated FILE
+                 * pointer. */
+                PyErr_SetString(PyExc_SystemError,
+                    "PyFileObject locking error in "
+                    "destructor (refcnt <= 0 at close).");
+            }
+            return NULL;
+        }
+        /* NULL out the FILE pointer before releasing the GIL, because
+         * it will not be valid anymore after the close() function is
+         * called. */
+        f->f_fp = NULL;
+        if (local_close != NULL) {
+            Py_BEGIN_ALLOW_THREADS
+            errno = 0;
+            sts = (*local_close)(local_fp);
+            Py_END_ALLOW_THREADS
+            if (sts == EOF)
+                return PyErr_SetFromErrno(PyExc_IOError);
+            if (sts != 0)
+                return PyInt_FromLong((long)sts);
+        }
+    }
+    Py_RETURN_NONE;
 }
 
 PyObject *
 PyFile_FromFile(FILE *fp, char *name, char *mode, int (*close)(FILE *))
 {
-	PyFileObject *f = (PyFileObject *)PyFile_Type.tp_new(&PyFile_Type,
-							     NULL, NULL);
-	if (f != NULL) {
-		PyObject *o_name = PyString_FromString(name);
-		if (o_name == NULL)
-			return NULL;
-		if (fill_file_fields(f, fp, o_name, mode, close) == NULL) {
-			Py_DECREF(f);
-			f = NULL;
-		}
-                Py_DECREF(o_name);
-	}
-	return (PyObject *) f;
+    PyFileObject *f = (PyFileObject *)PyFile_Type.tp_new(&PyFile_Type,
+                                                         NULL, NULL);
+    if (f != NULL) {
+        PyObject *o_name = PyString_FromString(name);
+        if (o_name == NULL)
+            return NULL;
+        if (fill_file_fields(f, fp, o_name, mode, close) == NULL) {
+            Py_DECREF(f);
+            f = NULL;
+        }
+        Py_DECREF(o_name);
+    }
+    return (PyObject *) f;
 }
 
 PyObject *
 PyFile_FromString(char *name, char *mode)
 {
-	extern int fclose(FILE *);
-	PyFileObject *f;
+    extern int fclose(FILE *);
+    PyFileObject *f;
 
-	f = (PyFileObject *)PyFile_FromFile((FILE *)NULL, name, mode, fclose);
-	if (f != NULL) {
-		if (open_the_file(f, name, mode) == NULL) {
-			Py_DECREF(f);
-			f = NULL;
-		}
-	}
-	return (PyObject *)f;
+    f = (PyFileObject *)PyFile_FromFile((FILE *)NULL, name, mode, fclose);
+    if (f != NULL) {
+        if (open_the_file(f, name, mode) == NULL) {
+            Py_DECREF(f);
+            f = NULL;
+        }
+    }
+    return (PyObject *)f;
 }
 
 void
 PyFile_SetBufSize(PyObject *f, int bufsize)
 {
-	PyFileObject *file = (PyFileObject *)f;
-	if (bufsize >= 0) {
-		int type;
-		switch (bufsize) {
-		case 0:
-			type = _IONBF;
-			break;
+    PyFileObject *file = (PyFileObject *)f;
+    if (bufsize >= 0) {
+        int type;
+        switch (bufsize) {
+        case 0:
+            type = _IONBF;
+            break;
 #ifdef HAVE_SETVBUF
-		case 1:
-			type = _IOLBF;
-			bufsize = BUFSIZ;
-			break;
+        case 1:
+            type = _IOLBF;
+            bufsize = BUFSIZ;
+            break;
 #endif
-		default:
-			type = _IOFBF;
+        default:
+            type = _IOFBF;
 #ifndef HAVE_SETVBUF
-			bufsize = BUFSIZ;
+            bufsize = BUFSIZ;
 #endif
-			break;
-		}
-		fflush(file->f_fp);
-		if (type == _IONBF) {
-			PyMem_Free(file->f_setbuf);
-			file->f_setbuf = NULL;
-		} else {
-			file->f_setbuf = (char *)PyMem_Realloc(file->f_setbuf, 
-                                                                bufsize);
-		}
+            break;
+        }
+        fflush(file->f_fp);
+        if (type == _IONBF) {
+            PyMem_Free(file->f_setbuf);
+            file->f_setbuf = NULL;
+        } else {
+            file->f_setbuf = (char *)PyMem_Realloc(file->f_setbuf,
+                                                    bufsize);
+        }
 #ifdef HAVE_SETVBUF
-		setvbuf(file->f_fp, file->f_setbuf, type, bufsize);
+        setvbuf(file->f_fp, file->f_setbuf, type, bufsize);
 #else /* !HAVE_SETVBUF */
-		setbuf(file->f_fp, file->f_setbuf);
+        setbuf(file->f_fp, file->f_setbuf);
 #endif /* !HAVE_SETVBUF */
-	}
+    }
 }
 
 /* Set the encoding used to output Unicode strings.
@@ -538,48 +538,48 @@
 int
 PyFile_SetEncoding(PyObject *f, const char *enc)
 {
-	return PyFile_SetEncodingAndErrors(f, enc, NULL);
+    return PyFile_SetEncodingAndErrors(f, enc, NULL);
 }
 
 int
 PyFile_SetEncodingAndErrors(PyObject *f, const char *enc, char* errors)
 {
-	PyFileObject *file = (PyFileObject*)f;
-	PyObject *str, *oerrors;
+    PyFileObject *file = (PyFileObject*)f;
+    PyObject *str, *oerrors;
 
-	assert(PyFile_Check(f));
-	str = PyString_FromString(enc);
-	if (!str)
-		return 0;
-	if (errors) {
-		oerrors = PyString_FromString(errors);
-		if (!oerrors) {
-			Py_DECREF(str);
-			return 0;
-		}
-	} else {
-		oerrors = Py_None;
-		Py_INCREF(Py_None);
-	}
-	Py_DECREF(file->f_encoding);
-	file->f_encoding = str;
-	Py_DECREF(file->f_errors);
-	file->f_errors = oerrors;
-	return 1;
+    assert(PyFile_Check(f));
+    str = PyString_FromString(enc);
+    if (!str)
+        return 0;
+    if (errors) {
+        oerrors = PyString_FromString(errors);
+        if (!oerrors) {
+            Py_DECREF(str);
+            return 0;
+        }
+    } else {
+        oerrors = Py_None;
+        Py_INCREF(Py_None);
+    }
+    Py_DECREF(file->f_encoding);
+    file->f_encoding = str;
+    Py_DECREF(file->f_errors);
+    file->f_errors = oerrors;
+    return 1;
 }
 
 static PyObject *
 err_closed(void)
 {
-	PyErr_SetString(PyExc_ValueError, "I/O operation on closed file");
-	return NULL;
+    PyErr_SetString(PyExc_ValueError, "I/O operation on closed file");
+    return NULL;
 }
 
 static PyObject *
 err_mode(char *action)
 {
-        PyErr_Format(PyExc_IOError, "File not open for %s", action);
-        return NULL;
+    PyErr_Format(PyExc_IOError, "File not open for %s", action);
+    return NULL;
 }
 
 /* Refuse regular file I/O if there's data in the iteration-buffer.
@@ -588,9 +588,9 @@
 static PyObject *
 err_iterbuffered(void)
 {
-	PyErr_SetString(PyExc_ValueError,
-		"Mixing iteration and read methods would lose data");
-	return NULL;
+    PyErr_SetString(PyExc_ValueError,
+        "Mixing iteration and read methods would lose data");
+    return NULL;
 }
 
 static void drop_readahead(PyFileObject *);
@@ -600,58 +600,58 @@
 static void
 file_dealloc(PyFileObject *f)
 {
-	PyObject *ret;
-	if (f->weakreflist != NULL)
-		PyObject_ClearWeakRefs((PyObject *) f);
-	ret = close_the_file(f);
-	if (!ret) {
-		PySys_WriteStderr("close failed in file object destructor:\n");
-		PyErr_Print();
-	}
-	else {
-		Py_DECREF(ret);
-	}
-	PyMem_Free(f->f_setbuf);
-	Py_XDECREF(f->f_name);
-	Py_XDECREF(f->f_mode);
-	Py_XDECREF(f->f_encoding);
-	Py_XDECREF(f->f_errors);
-	drop_readahead(f);
-	Py_TYPE(f)->tp_free((PyObject *)f);
+    PyObject *ret;
+    if (f->weakreflist != NULL)
+        PyObject_ClearWeakRefs((PyObject *) f);
+    ret = close_the_file(f);
+    if (!ret) {
+        PySys_WriteStderr("close failed in file object destructor:\n");
+        PyErr_Print();
+    }
+    else {
+        Py_DECREF(ret);
+    }
+    PyMem_Free(f->f_setbuf);
+    Py_XDECREF(f->f_name);
+    Py_XDECREF(f->f_mode);
+    Py_XDECREF(f->f_encoding);
+    Py_XDECREF(f->f_errors);
+    drop_readahead(f);
+    Py_TYPE(f)->tp_free((PyObject *)f);
 }
 
 static PyObject *
 file_repr(PyFileObject *f)
 {
-	if (PyUnicode_Check(f->f_name)) {
+    if (PyUnicode_Check(f->f_name)) {
 #ifdef Py_USING_UNICODE
-		PyObject *ret = NULL;
-		PyObject *name = PyUnicode_AsUnicodeEscapeString(f->f_name);
-		const char *name_str = name ? PyString_AsString(name) : "?";
-		ret = PyString_FromFormat("<%s file u'%s', mode '%s' at %p>",
-				   f->f_fp == NULL ? "closed" : "open",
-				   name_str,
-				   PyString_AsString(f->f_mode),
-				   f);
-		Py_XDECREF(name);
-		return ret;
+        PyObject *ret = NULL;
+        PyObject *name = PyUnicode_AsUnicodeEscapeString(f->f_name);
+        const char *name_str = name ? PyString_AsString(name) : "?";
+        ret = PyString_FromFormat("<%s file u'%s', mode '%s' at %p>",
+                           f->f_fp == NULL ? "closed" : "open",
+                           name_str,
+                           PyString_AsString(f->f_mode),
+                           f);
+        Py_XDECREF(name);
+        return ret;
 #endif
-	} else {
-		return PyString_FromFormat("<%s file '%s', mode '%s' at %p>",
-				   f->f_fp == NULL ? "closed" : "open",
-				   PyString_AsString(f->f_name),
-				   PyString_AsString(f->f_mode),
-				   f);
-	}
+    } else {
+        return PyString_FromFormat("<%s file '%s', mode '%s' at %p>",
+                           f->f_fp == NULL ? "closed" : "open",
+                           PyString_AsString(f->f_name),
+                           PyString_AsString(f->f_mode),
+                           f);
+    }
 }
 
 static PyObject *
 file_close(PyFileObject *f)
 {
-	PyObject *sts = close_the_file(f);
-	PyMem_Free(f->f_setbuf);
-	f->f_setbuf = NULL;
-	return sts;
+    PyObject *sts = close_the_file(f);
+    PyMem_Free(f->f_setbuf);
+    f->f_setbuf = NULL;
+    return sts;
 }
 
 
@@ -673,36 +673,36 @@
 _portable_fseek(FILE *fp, Py_off_t offset, int whence)
 {
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	return fseek(fp, offset, whence);
+    return fseek(fp, offset, whence);
 #elif defined(HAVE_FSEEKO) && SIZEOF_OFF_T >= 8
-	return fseeko(fp, offset, whence);
+    return fseeko(fp, offset, whence);
 #elif defined(HAVE_FSEEK64)
-	return fseek64(fp, offset, whence);
+    return fseek64(fp, offset, whence);
 #elif defined(__BEOS__)
-	return _fseek(fp, offset, whence);
+    return _fseek(fp, offset, whence);
 #elif SIZEOF_FPOS_T >= 8
-	/* lacking a 64-bit capable fseek(), use a 64-bit capable fsetpos()
-	   and fgetpos() to implement fseek()*/
-	fpos_t pos;
-	switch (whence) {
-	case SEEK_END:
+    /* lacking a 64-bit capable fseek(), use a 64-bit capable fsetpos()
+       and fgetpos() to implement fseek()*/
+    fpos_t pos;
+    switch (whence) {
+    case SEEK_END:
 #ifdef MS_WINDOWS
-		fflush(fp);
-		if (_lseeki64(fileno(fp), 0, 2) == -1)
-			return -1;
+        fflush(fp);
+        if (_lseeki64(fileno(fp), 0, 2) == -1)
+            return -1;
 #else
-		if (fseek(fp, 0, SEEK_END) != 0)
-			return -1;
+        if (fseek(fp, 0, SEEK_END) != 0)
+            return -1;
 #endif
-		/* fall through */
-	case SEEK_CUR:
-		if (fgetpos(fp, &pos) != 0)
-			return -1;
-		offset += pos;
-		break;
-	/* case SEEK_SET: break; */
-	}
-	return fsetpos(fp, &offset);
+        /* fall through */
+    case SEEK_CUR:
+        if (fgetpos(fp, &pos) != 0)
+            return -1;
+        offset += pos;
+        break;
+    /* case SEEK_SET: break; */
+    }
+    return fsetpos(fp, &offset);
 #else
 #error "Large file support, but no way to fseek."
 #endif
@@ -716,16 +716,16 @@
 _portable_ftell(FILE* fp)
 {
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	return ftell(fp);
+    return ftell(fp);
 #elif defined(HAVE_FTELLO) && SIZEOF_OFF_T >= 8
-	return ftello(fp);
+    return ftello(fp);
 #elif defined(HAVE_FTELL64)
-	return ftell64(fp);
+    return ftell64(fp);
 #elif SIZEOF_FPOS_T >= 8
-	fpos_t pos;
-	if (fgetpos(fp, &pos) != 0)
-		return -1;
-	return pos;
+    fpos_t pos;
+    if (fgetpos(fp, &pos) != 0)
+        return -1;
+    return pos;
 #else
 #error "Large file support, but no way to ftell."
 #endif
@@ -735,53 +735,53 @@
 static PyObject *
 file_seek(PyFileObject *f, PyObject *args)
 {
-	int whence;
-	int ret;
-	Py_off_t offset;
-	PyObject *offobj, *off_index;
+    int whence;
+    int ret;
+    Py_off_t offset;
+    PyObject *offobj, *off_index;
 
-	if (f->f_fp == NULL)
-		return err_closed();
-	drop_readahead(f);
-	whence = 0;
-	if (!PyArg_ParseTuple(args, "O|i:seek", &offobj, &whence))
-		return NULL;
-	off_index = PyNumber_Index(offobj);
-	if (!off_index) {
-		if (!PyFloat_Check(offobj))
-			return NULL;
-		/* Deprecated in 2.6 */
-		PyErr_Clear();
-		if (PyErr_WarnEx(PyExc_DeprecationWarning,
-				 "integer argument expected, got float",
-				 1) < 0)
-			return NULL;
-		off_index = offobj;
-		Py_INCREF(offobj);
-	}
+    if (f->f_fp == NULL)
+        return err_closed();
+    drop_readahead(f);
+    whence = 0;
+    if (!PyArg_ParseTuple(args, "O|i:seek", &offobj, &whence))
+        return NULL;
+    off_index = PyNumber_Index(offobj);
+    if (!off_index) {
+        if (!PyFloat_Check(offobj))
+            return NULL;
+        /* Deprecated in 2.6 */
+        PyErr_Clear();
+        if (PyErr_WarnEx(PyExc_DeprecationWarning,
+                         "integer argument expected, got float",
+                         1) < 0)
+            return NULL;
+        off_index = offobj;
+        Py_INCREF(offobj);
+    }
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	offset = PyInt_AsLong(off_index);
+    offset = PyInt_AsLong(off_index);
 #else
-	offset = PyLong_Check(off_index) ?
-		PyLong_AsLongLong(off_index) : PyInt_AsLong(off_index);
+    offset = PyLong_Check(off_index) ?
+        PyLong_AsLongLong(off_index) : PyInt_AsLong(off_index);
 #endif
-	Py_DECREF(off_index);
-	if (PyErr_Occurred())
-		return NULL;
+    Py_DECREF(off_index);
+    if (PyErr_Occurred())
+        return NULL;
 
- 	FILE_BEGIN_ALLOW_THREADS(f)
-	errno = 0;
-	ret = _portable_fseek(f->f_fp, offset, whence);
-	FILE_END_ALLOW_THREADS(f)
+    FILE_BEGIN_ALLOW_THREADS(f)
+    errno = 0;
+    ret = _portable_fseek(f->f_fp, offset, whence);
+    FILE_END_ALLOW_THREADS(f)
 
-	if (ret != 0) {
-		PyErr_SetFromErrno(PyExc_IOError);
-		clearerr(f->f_fp);
-		return NULL;
-	}
-	f->f_skipnextlf = 0;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (ret != 0) {
+        PyErr_SetFromErrno(PyExc_IOError);
+        clearerr(f->f_fp);
+        return NULL;
+    }
+    f->f_skipnextlf = 0;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 
@@ -789,186 +789,186 @@
 static PyObject *
 file_truncate(PyFileObject *f, PyObject *args)
 {
-	Py_off_t newsize;
-	PyObject *newsizeobj = NULL;
-	Py_off_t initialpos;
-	int ret;
+    Py_off_t newsize;
+    PyObject *newsizeobj = NULL;
+    Py_off_t initialpos;
+    int ret;
 
-	if (f->f_fp == NULL)
-		return err_closed();
-	if (!f->writable)
-		return err_mode("writing");
-	if (!PyArg_UnpackTuple(args, "truncate", 0, 1, &newsizeobj))
-		return NULL;
+    if (f->f_fp == NULL)
+        return err_closed();
+    if (!f->writable)
+        return err_mode("writing");
+    if (!PyArg_UnpackTuple(args, "truncate", 0, 1, &newsizeobj))
+        return NULL;
 
-	/* Get current file position.  If the file happens to be open for
-	 * update and the last operation was an input operation, C doesn't
-	 * define what the later fflush() will do, but we promise truncate()
-	 * won't change the current position (and fflush() *does* change it
-	 * then at least on Windows).  The easiest thing is to capture
-	 * current pos now and seek back to it at the end.
-	 */
-	FILE_BEGIN_ALLOW_THREADS(f)
-	errno = 0;
-	initialpos = _portable_ftell(f->f_fp);
-	FILE_END_ALLOW_THREADS(f)
-	if (initialpos == -1)
-		goto onioerror;
+    /* Get current file position.  If the file happens to be open for
+     * update and the last operation was an input operation, C doesn't
+     * define what the later fflush() will do, but we promise truncate()
+     * won't change the current position (and fflush() *does* change it
+     * then at least on Windows).  The easiest thing is to capture
+     * current pos now and seek back to it at the end.
+     */
+    FILE_BEGIN_ALLOW_THREADS(f)
+    errno = 0;
+    initialpos = _portable_ftell(f->f_fp);
+    FILE_END_ALLOW_THREADS(f)
+    if (initialpos == -1)
+        goto onioerror;
 
-	/* Set newsize to current postion if newsizeobj NULL, else to the
-	 * specified value.
-	 */
-	if (newsizeobj != NULL) {
+    /* Set newsize to current postion if newsizeobj NULL, else to the
+     * specified value.
+     */
+    if (newsizeobj != NULL) {
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-		newsize = PyInt_AsLong(newsizeobj);
+        newsize = PyInt_AsLong(newsizeobj);
 #else
-		newsize = PyLong_Check(newsizeobj) ?
-				PyLong_AsLongLong(newsizeobj) :
-				PyInt_AsLong(newsizeobj);
+        newsize = PyLong_Check(newsizeobj) ?
+                        PyLong_AsLongLong(newsizeobj) :
+                PyInt_AsLong(newsizeobj);
 #endif
-		if (PyErr_Occurred())
-			return NULL;
-	}
-	else /* default to current position */
-		newsize = initialpos;
+        if (PyErr_Occurred())
+            return NULL;
+    }
+    else /* default to current position */
+        newsize = initialpos;
 
-	/* Flush the stream.  We're mixing stream-level I/O with lower-level
-	 * I/O, and a flush may be necessary to synch both platform views
-	 * of the current file state.
-	 */
-	FILE_BEGIN_ALLOW_THREADS(f)
-	errno = 0;
-	ret = fflush(f->f_fp);
-	FILE_END_ALLOW_THREADS(f)
-	if (ret != 0)
-		goto onioerror;
+    /* Flush the stream.  We're mixing stream-level I/O with lower-level
+     * I/O, and a flush may be necessary to synch both platform views
+     * of the current file state.
+     */
+    FILE_BEGIN_ALLOW_THREADS(f)
+    errno = 0;
+    ret = fflush(f->f_fp);
+    FILE_END_ALLOW_THREADS(f)
+    if (ret != 0)
+        goto onioerror;
 
 #ifdef MS_WINDOWS
-	/* MS _chsize doesn't work if newsize doesn't fit in 32 bits,
-	   so don't even try using it. */
-	{
-		HANDLE hFile;
+    /* MS _chsize doesn't work if newsize doesn't fit in 32 bits,
+       so don't even try using it. */
+    {
+        HANDLE hFile;
 
-		/* Have to move current pos to desired endpoint on Windows. */
-		FILE_BEGIN_ALLOW_THREADS(f)
-		errno = 0;
-		ret = _portable_fseek(f->f_fp, newsize, SEEK_SET) != 0;
-		FILE_END_ALLOW_THREADS(f)
-		if (ret)
-			goto onioerror;
+        /* Have to move current pos to desired endpoint on Windows. */
+        FILE_BEGIN_ALLOW_THREADS(f)
+        errno = 0;
+        ret = _portable_fseek(f->f_fp, newsize, SEEK_SET) != 0;
+        FILE_END_ALLOW_THREADS(f)
+        if (ret)
+            goto onioerror;
 
-		/* Truncate.  Note that this may grow the file! */
-		FILE_BEGIN_ALLOW_THREADS(f)
-		errno = 0;
-		hFile = (HANDLE)_get_osfhandle(fileno(f->f_fp));
-		ret = hFile == (HANDLE)-1;
-		if (ret == 0) {
-			ret = SetEndOfFile(hFile) == 0;
-			if (ret)
-				errno = EACCES;
-		}
-		FILE_END_ALLOW_THREADS(f)
-		if (ret)
-			goto onioerror;
-	}
+        /* Truncate.  Note that this may grow the file! */
+        FILE_BEGIN_ALLOW_THREADS(f)
+        errno = 0;
+        hFile = (HANDLE)_get_osfhandle(fileno(f->f_fp));
+        ret = hFile == (HANDLE)-1;
+        if (ret == 0) {
+            ret = SetEndOfFile(hFile) == 0;
+            if (ret)
+                errno = EACCES;
+        }
+        FILE_END_ALLOW_THREADS(f)
+        if (ret)
+            goto onioerror;
+    }
 #else
-	FILE_BEGIN_ALLOW_THREADS(f)
-	errno = 0;
-	ret = ftruncate(fileno(f->f_fp), newsize);
-	FILE_END_ALLOW_THREADS(f)
-	if (ret != 0)
-		goto onioerror;
+    FILE_BEGIN_ALLOW_THREADS(f)
+    errno = 0;
+    ret = ftruncate(fileno(f->f_fp), newsize);
+    FILE_END_ALLOW_THREADS(f)
+    if (ret != 0)
+        goto onioerror;
 #endif /* !MS_WINDOWS */
 
-	/* Restore original file position. */
-	FILE_BEGIN_ALLOW_THREADS(f)
-	errno = 0;
-	ret = _portable_fseek(f->f_fp, initialpos, SEEK_SET) != 0;
-	FILE_END_ALLOW_THREADS(f)
-	if (ret)
-		goto onioerror;
+    /* Restore original file position. */
+    FILE_BEGIN_ALLOW_THREADS(f)
+    errno = 0;
+    ret = _portable_fseek(f->f_fp, initialpos, SEEK_SET) != 0;
+    FILE_END_ALLOW_THREADS(f)
+    if (ret)
+        goto onioerror;
 
-	Py_INCREF(Py_None);
-	return Py_None;
+    Py_INCREF(Py_None);
+    return Py_None;
 
 onioerror:
-	PyErr_SetFromErrno(PyExc_IOError);
-	clearerr(f->f_fp);
-	return NULL;
+    PyErr_SetFromErrno(PyExc_IOError);
+    clearerr(f->f_fp);
+    return NULL;
 }
 #endif /* HAVE_FTRUNCATE */
 
 static PyObject *
 file_tell(PyFileObject *f)
 {
-	Py_off_t pos;
+    Py_off_t pos;
 
-	if (f->f_fp == NULL)
-		return err_closed();
-	FILE_BEGIN_ALLOW_THREADS(f)
-	errno = 0;
-	pos = _portable_ftell(f->f_fp);
-	FILE_END_ALLOW_THREADS(f)
+    if (f->f_fp == NULL)
+        return err_closed();
+    FILE_BEGIN_ALLOW_THREADS(f)
+    errno = 0;
+    pos = _portable_ftell(f->f_fp);
+    FILE_END_ALLOW_THREADS(f)
 
-	if (pos == -1) {
-		PyErr_SetFromErrno(PyExc_IOError);
-		clearerr(f->f_fp);
-		return NULL;
-	}
-	if (f->f_skipnextlf) {
-		int c;
-		c = GETC(f->f_fp);
-		if (c == '\n') {
-			f->f_newlinetypes |= NEWLINE_CRLF;
-			pos++;
-			f->f_skipnextlf = 0;
-		} else if (c != EOF) ungetc(c, f->f_fp);
-	}
+    if (pos == -1) {
+        PyErr_SetFromErrno(PyExc_IOError);
+        clearerr(f->f_fp);
+        return NULL;
+    }
+    if (f->f_skipnextlf) {
+        int c;
+        c = GETC(f->f_fp);
+        if (c == '\n') {
+            f->f_newlinetypes |= NEWLINE_CRLF;
+            pos++;
+            f->f_skipnextlf = 0;
+        } else if (c != EOF) ungetc(c, f->f_fp);
+    }
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	return PyInt_FromLong(pos);
+    return PyInt_FromLong(pos);
 #else
-	return PyLong_FromLongLong(pos);
+    return PyLong_FromLongLong(pos);
 #endif
 }
 
 static PyObject *
 file_fileno(PyFileObject *f)
 {
-	if (f->f_fp == NULL)
-		return err_closed();
-	return PyInt_FromLong((long) fileno(f->f_fp));
+    if (f->f_fp == NULL)
+        return err_closed();
+    return PyInt_FromLong((long) fileno(f->f_fp));
 }
 
 static PyObject *
 file_flush(PyFileObject *f)
 {
-	int res;
+    int res;
 
-	if (f->f_fp == NULL)
-		return err_closed();
-	FILE_BEGIN_ALLOW_THREADS(f)
-	errno = 0;
-	res = fflush(f->f_fp);
-	FILE_END_ALLOW_THREADS(f)
-	if (res != 0) {
-		PyErr_SetFromErrno(PyExc_IOError);
-		clearerr(f->f_fp);
-		return NULL;
-	}
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (f->f_fp == NULL)
+        return err_closed();
+    FILE_BEGIN_ALLOW_THREADS(f)
+    errno = 0;
+    res = fflush(f->f_fp);
+    FILE_END_ALLOW_THREADS(f)
+    if (res != 0) {
+        PyErr_SetFromErrno(PyExc_IOError);
+        clearerr(f->f_fp);
+        return NULL;
+    }
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 file_isatty(PyFileObject *f)
 {
-	long res;
-	if (f->f_fp == NULL)
-		return err_closed();
-	FILE_BEGIN_ALLOW_THREADS(f)
-	res = isatty((int)fileno(f->f_fp));
-	FILE_END_ALLOW_THREADS(f)
-	return PyBool_FromLong(res);
+    long res;
+    if (f->f_fp == NULL)
+        return err_closed();
+    FILE_BEGIN_ALLOW_THREADS(f)
+    res = isatty((int)fileno(f->f_fp));
+    FILE_END_ALLOW_THREADS(f)
+    return PyBool_FromLong(res);
 }
 
 
@@ -988,39 +988,39 @@
 new_buffersize(PyFileObject *f, size_t currentsize)
 {
 #ifdef HAVE_FSTAT
-	off_t pos, end;
-	struct stat st;
-	if (fstat(fileno(f->f_fp), &st) == 0) {
-		end = st.st_size;
-		/* The following is not a bug: we really need to call lseek()
-		   *and* ftell().  The reason is that some stdio libraries
-		   mistakenly flush their buffer when ftell() is called and
-		   the lseek() call it makes fails, thereby throwing away
-		   data that cannot be recovered in any way.  To avoid this,
-		   we first test lseek(), and only call ftell() if lseek()
-		   works.  We can't use the lseek() value either, because we
-		   need to take the amount of buffered data into account.
-		   (Yet another reason why stdio stinks. :-) */
-		pos = lseek(fileno(f->f_fp), 0L, SEEK_CUR);
-		if (pos >= 0) {
-			pos = ftell(f->f_fp);
-		}
-		if (pos < 0)
-			clearerr(f->f_fp);
-		if (end > pos && pos >= 0)
-			return currentsize + end - pos + 1;
-		/* Add 1 so if the file were to grow we'd notice. */
-	}
+    off_t pos, end;
+    struct stat st;
+    if (fstat(fileno(f->f_fp), &st) == 0) {
+        end = st.st_size;
+        /* The following is not a bug: we really need to call lseek()
+           *and* ftell().  The reason is that some stdio libraries
+           mistakenly flush their buffer when ftell() is called and
+           the lseek() call it makes fails, thereby throwing away
+           data that cannot be recovered in any way.  To avoid this,
+           we first test lseek(), and only call ftell() if lseek()
+           works.  We can't use the lseek() value either, because we
+           need to take the amount of buffered data into account.
+           (Yet another reason why stdio stinks. :-) */
+        pos = lseek(fileno(f->f_fp), 0L, SEEK_CUR);
+        if (pos >= 0) {
+            pos = ftell(f->f_fp);
+        }
+        if (pos < 0)
+            clearerr(f->f_fp);
+        if (end > pos && pos >= 0)
+            return currentsize + end - pos + 1;
+        /* Add 1 so if the file were to grow we'd notice. */
+    }
 #endif
-	if (currentsize > SMALLCHUNK) {
-		/* Keep doubling until we reach BIGCHUNK;
-		   then keep adding BIGCHUNK. */
-		if (currentsize <= BIGCHUNK)
-			return currentsize + currentsize;
-		else
-			return currentsize + BIGCHUNK;
-	}
-	return currentsize + SMALLCHUNK;
+    if (currentsize > SMALLCHUNK) {
+        /* Keep doubling until we reach BIGCHUNK;
+           then keep adding BIGCHUNK. */
+        if (currentsize <= BIGCHUNK)
+            return currentsize + currentsize;
+        else
+            return currentsize + BIGCHUNK;
+    }
+    return currentsize + SMALLCHUNK;
 }
 
 #if defined(EWOULDBLOCK) && defined(EAGAIN) && EWOULDBLOCK != EAGAIN
@@ -1040,114 +1040,114 @@
 static PyObject *
 file_read(PyFileObject *f, PyObject *args)
 {
-	long bytesrequested = -1;
-	size_t bytesread, buffersize, chunksize;
-	PyObject *v;
+    long bytesrequested = -1;
+    size_t bytesread, buffersize, chunksize;
+    PyObject *v;
 
-	if (f->f_fp == NULL)
-		return err_closed();
-	if (!f->readable)
-		return err_mode("reading");
-	/* refuse to mix with f.next() */
-	if (f->f_buf != NULL &&
-	    (f->f_bufend - f->f_bufptr) > 0 &&
-	    f->f_buf[0] != '\0')
-		return err_iterbuffered();
-	if (!PyArg_ParseTuple(args, "|l:read", &bytesrequested))
-		return NULL;
-	if (bytesrequested < 0)
-		buffersize = new_buffersize(f, (size_t)0);
-	else
-		buffersize = bytesrequested;
-	if (buffersize > PY_SSIZE_T_MAX) {
-		PyErr_SetString(PyExc_OverflowError,
-	"requested number of bytes is more than a Python string can hold");
-		return NULL;
-	}
-	v = PyString_FromStringAndSize((char *)NULL, buffersize);
-	if (v == NULL)
-		return NULL;
-	bytesread = 0;
-	for (;;) {
-		FILE_BEGIN_ALLOW_THREADS(f)
-		errno = 0;
-		chunksize = Py_UniversalNewlineFread(BUF(v) + bytesread,
-			  buffersize - bytesread, f->f_fp, (PyObject *)f);
-		FILE_END_ALLOW_THREADS(f)
-		if (chunksize == 0) {
-			if (!ferror(f->f_fp))
-				break;
-			clearerr(f->f_fp);
-			/* When in non-blocking mode, data shouldn't
-			 * be discarded if a blocking signal was
-			 * received. That will also happen if
-			 * chunksize != 0, but bytesread < buffersize. */
-			if (bytesread > 0 && BLOCKED_ERRNO(errno))
-				break;
-			PyErr_SetFromErrno(PyExc_IOError);
-			Py_DECREF(v);
-			return NULL;
-		}
-		bytesread += chunksize;
-		if (bytesread < buffersize) {
-			clearerr(f->f_fp);
-			break;
-		}
-		if (bytesrequested < 0) {
-			buffersize = new_buffersize(f, buffersize);
-			if (_PyString_Resize(&v, buffersize) < 0)
-				return NULL;
-		} else {
-			/* Got what was requested. */
-			break;
-		}
-	}
-	if (bytesread != buffersize && _PyString_Resize(&v, bytesread))
-		return NULL;
-	return v;
+    if (f->f_fp == NULL)
+        return err_closed();
+    if (!f->readable)
+        return err_mode("reading");
+    /* refuse to mix with f.next() */
+    if (f->f_buf != NULL &&
+        (f->f_bufend - f->f_bufptr) > 0 &&
+        f->f_buf[0] != '\0')
+        return err_iterbuffered();
+    if (!PyArg_ParseTuple(args, "|l:read", &bytesrequested))
+        return NULL;
+    if (bytesrequested < 0)
+        buffersize = new_buffersize(f, (size_t)0);
+    else
+        buffersize = bytesrequested;
+    if (buffersize > PY_SSIZE_T_MAX) {
+        PyErr_SetString(PyExc_OverflowError,
+    "requested number of bytes is more than a Python string can hold");
+        return NULL;
+    }
+    v = PyString_FromStringAndSize((char *)NULL, buffersize);
+    if (v == NULL)
+        return NULL;
+    bytesread = 0;
+    for (;;) {
+        FILE_BEGIN_ALLOW_THREADS(f)
+        errno = 0;
+        chunksize = Py_UniversalNewlineFread(BUF(v) + bytesread,
+                  buffersize - bytesread, f->f_fp, (PyObject *)f);
+        FILE_END_ALLOW_THREADS(f)
+        if (chunksize == 0) {
+            if (!ferror(f->f_fp))
+                break;
+            clearerr(f->f_fp);
+            /* When in non-blocking mode, data shouldn't
+             * be discarded if a blocking signal was
+             * received. That will also happen if
+             * chunksize != 0, but bytesread < buffersize. */
+            if (bytesread > 0 && BLOCKED_ERRNO(errno))
+                break;
+            PyErr_SetFromErrno(PyExc_IOError);
+            Py_DECREF(v);
+            return NULL;
+        }
+        bytesread += chunksize;
+        if (bytesread < buffersize) {
+            clearerr(f->f_fp);
+            break;
+        }
+        if (bytesrequested < 0) {
+            buffersize = new_buffersize(f, buffersize);
+            if (_PyString_Resize(&v, buffersize) < 0)
+                return NULL;
+        } else {
+            /* Got what was requested. */
+            break;
+        }
+    }
+    if (bytesread != buffersize && _PyString_Resize(&v, bytesread))
+        return NULL;
+    return v;
 }
 
 static PyObject *
 file_readinto(PyFileObject *f, PyObject *args)
 {
-	char *ptr;
-	Py_ssize_t ntodo;
-	Py_ssize_t ndone, nnow;
-	Py_buffer pbuf;
+    char *ptr;
+    Py_ssize_t ntodo;
+    Py_ssize_t ndone, nnow;
+    Py_buffer pbuf;
 
-	if (f->f_fp == NULL)
-		return err_closed();
-	if (!f->readable)
-		return err_mode("reading");
-	/* refuse to mix with f.next() */
-	if (f->f_buf != NULL &&
-	    (f->f_bufend - f->f_bufptr) > 0 &&
-	    f->f_buf[0] != '\0')
-		return err_iterbuffered();
-	if (!PyArg_ParseTuple(args, "w*", &pbuf))
-		return NULL;
-	ptr = pbuf.buf;
-	ntodo = pbuf.len;
-	ndone = 0;
-	while (ntodo > 0) {
-		FILE_BEGIN_ALLOW_THREADS(f)
-		errno = 0;
-		nnow = Py_UniversalNewlineFread(ptr+ndone, ntodo, f->f_fp,
-						(PyObject *)f);
-		FILE_END_ALLOW_THREADS(f)
-		if (nnow == 0) {
-			if (!ferror(f->f_fp))
-				break;
-			PyErr_SetFromErrno(PyExc_IOError);
-			clearerr(f->f_fp);
-			PyBuffer_Release(&pbuf);
-			return NULL;
-		}
-		ndone += nnow;
-		ntodo -= nnow;
-	}
-	PyBuffer_Release(&pbuf);
-	return PyInt_FromSsize_t(ndone);
+    if (f->f_fp == NULL)
+        return err_closed();
+    if (!f->readable)
+        return err_mode("reading");
+    /* refuse to mix with f.next() */
+    if (f->f_buf != NULL &&
+        (f->f_bufend - f->f_bufptr) > 0 &&
+        f->f_buf[0] != '\0')
+        return err_iterbuffered();
+    if (!PyArg_ParseTuple(args, "w*", &pbuf))
+        return NULL;
+    ptr = pbuf.buf;
+    ntodo = pbuf.len;
+    ndone = 0;
+    while (ntodo > 0) {
+        FILE_BEGIN_ALLOW_THREADS(f)
+        errno = 0;
+        nnow = Py_UniversalNewlineFread(ptr+ndone, ntodo, f->f_fp,
+                                        (PyObject *)f);
+        FILE_END_ALLOW_THREADS(f)
+        if (nnow == 0) {
+            if (!ferror(f->f_fp))
+                break;
+            PyErr_SetFromErrno(PyExc_IOError);
+            clearerr(f->f_fp);
+            PyBuffer_Release(&pbuf);
+            return NULL;
+        }
+        ndone += nnow;
+        ntodo -= nnow;
+    }
+    PyBuffer_Release(&pbuf);
+    return PyInt_FromSsize_t(ndone);
 }
 
 /**************************************************************************
@@ -1169,9 +1169,9 @@
 
 Reports from other platforms on this method vs getc_unlocked (which MS doesn't
 have):
-	Linux		a wash
-	Solaris		a wash
-	Tru64 Unix	getline_via_fgets significantly faster
+    Linux               a wash
+    Solaris             a wash
+    Tru64 Unix          getline_via_fgets significantly faster
 
 CAUTION:  The C std isn't clear about this:  in those cases where fgets
 writes something into the buffer, can it write into any position beyond the
@@ -1218,151 +1218,151 @@
  */
 #define INITBUFSIZE 100
 #define MAXBUFSIZE 300
-	char* p;	/* temp */
-	char buf[MAXBUFSIZE];
-	PyObject* v;	/* the string object result */
-	char* pvfree;	/* address of next free slot */
-	char* pvend;    /* address one beyond last free slot */
-	size_t nfree;	/* # of free buffer slots; pvend-pvfree */
-	size_t total_v_size;  /* total # of slots in buffer */
-	size_t increment;	/* amount to increment the buffer */
-	size_t prev_v_size;
+    char* p;            /* temp */
+    char buf[MAXBUFSIZE];
+    PyObject* v;        /* the string object result */
+    char* pvfree;       /* address of next free slot */
+    char* pvend;    /* address one beyond last free slot */
+    size_t nfree;       /* # of free buffer slots; pvend-pvfree */
+    size_t total_v_size;  /* total # of slots in buffer */
+    size_t increment;           /* amount to increment the buffer */
+    size_t prev_v_size;
 
-	/* Optimize for normal case:  avoid _PyString_Resize if at all
-	 * possible via first reading into stack buffer "buf".
-	 */
-	total_v_size = INITBUFSIZE;	/* start small and pray */
-	pvfree = buf;
-	for (;;) {
-		FILE_BEGIN_ALLOW_THREADS(f)
-		pvend = buf + total_v_size;
-		nfree = pvend - pvfree;
-		memset(pvfree, '\n', nfree);
-		assert(nfree < INT_MAX); /* Should be atmost MAXBUFSIZE */
-		p = fgets(pvfree, (int)nfree, fp);
-		FILE_END_ALLOW_THREADS(f)
+    /* Optimize for normal case:  avoid _PyString_Resize if at all
+     * possible via first reading into stack buffer "buf".
+     */
+    total_v_size = INITBUFSIZE;         /* start small and pray */
+    pvfree = buf;
+    for (;;) {
+        FILE_BEGIN_ALLOW_THREADS(f)
+        pvend = buf + total_v_size;
+        nfree = pvend - pvfree;
+        memset(pvfree, '\n', nfree);
+        assert(nfree < INT_MAX); /* Should be atmost MAXBUFSIZE */
+        p = fgets(pvfree, (int)nfree, fp);
+        FILE_END_ALLOW_THREADS(f)
 
-		if (p == NULL) {
-			clearerr(fp);
-			if (PyErr_CheckSignals())
-				return NULL;
-			v = PyString_FromStringAndSize(buf, pvfree - buf);
-			return v;
-		}
-		/* fgets read *something* */
-		p = memchr(pvfree, '\n', nfree);
-		if (p != NULL) {
-			/* Did the \n come from fgets or from us?
-			 * Since fgets stops at the first \n, and then writes
-			 * \0, if it's from fgets a \0 must be next.  But if
-			 * that's so, it could not have come from us, since
-			 * the \n's we filled the buffer with have only more
-			 * \n's to the right.
-			 */
-			if (p+1 < pvend && *(p+1) == '\0') {
-				/* It's from fgets:  we win!  In particular,
-				 * we haven't done any mallocs yet, and can
-				 * build the final result on the first try.
-				 */
-				++p;	/* include \n from fgets */
-			}
-			else {
-				/* Must be from us:  fgets didn't fill the
-				 * buffer and didn't find a newline, so it
-				 * must be the last and newline-free line of
-				 * the file.
-				 */
-				assert(p > pvfree && *(p-1) == '\0');
-				--p;	/* don't include \0 from fgets */
-			}
-			v = PyString_FromStringAndSize(buf, p - buf);
-			return v;
-		}
-		/* yuck:  fgets overwrote all the newlines, i.e. the entire
-		 * buffer.  So this line isn't over yet, or maybe it is but
-		 * we're exactly at EOF.  If we haven't already, try using the
-		 * rest of the stack buffer.
-		 */
-		assert(*(pvend-1) == '\0');
-		if (pvfree == buf) {
-			pvfree = pvend - 1;	/* overwrite trailing null */
-			total_v_size = MAXBUFSIZE;
-		}
-		else
-			break;
-	}
+        if (p == NULL) {
+            clearerr(fp);
+            if (PyErr_CheckSignals())
+                return NULL;
+            v = PyString_FromStringAndSize(buf, pvfree - buf);
+            return v;
+        }
+        /* fgets read *something* */
+        p = memchr(pvfree, '\n', nfree);
+        if (p != NULL) {
+            /* Did the \n come from fgets or from us?
+             * Since fgets stops at the first \n, and then writes
+             * \0, if it's from fgets a \0 must be next.  But if
+             * that's so, it could not have come from us, since
+             * the \n's we filled the buffer with have only more
+             * \n's to the right.
+             */
+            if (p+1 < pvend && *(p+1) == '\0') {
+                /* It's from fgets:  we win!  In particular,
+                 * we haven't done any mallocs yet, and can
+                 * build the final result on the first try.
+                 */
+                ++p;                    /* include \n from fgets */
+            }
+            else {
+                /* Must be from us:  fgets didn't fill the
+                 * buffer and didn't find a newline, so it
+                 * must be the last and newline-free line of
+                 * the file.
+                 */
+                assert(p > pvfree && *(p-1) == '\0');
+                --p;                    /* don't include \0 from fgets */
+            }
+            v = PyString_FromStringAndSize(buf, p - buf);
+            return v;
+        }
+        /* yuck:  fgets overwrote all the newlines, i.e. the entire
+         * buffer.  So this line isn't over yet, or maybe it is but
+         * we're exactly at EOF.  If we haven't already, try using the
+         * rest of the stack buffer.
+         */
+        assert(*(pvend-1) == '\0');
+        if (pvfree == buf) {
+            pvfree = pvend - 1;                 /* overwrite trailing null */
+            total_v_size = MAXBUFSIZE;
+        }
+        else
+            break;
+    }
 
-	/* The stack buffer isn't big enough; malloc a string object and read
-	 * into its buffer.
-	 */
-	total_v_size = MAXBUFSIZE << 1;
-	v = PyString_FromStringAndSize((char*)NULL, (int)total_v_size);
-	if (v == NULL)
-		return v;
-	/* copy over everything except the last null byte */
-	memcpy(BUF(v), buf, MAXBUFSIZE-1);
-	pvfree = BUF(v) + MAXBUFSIZE - 1;
+    /* The stack buffer isn't big enough; malloc a string object and read
+     * into its buffer.
+     */
+    total_v_size = MAXBUFSIZE << 1;
+    v = PyString_FromStringAndSize((char*)NULL, (int)total_v_size);
+    if (v == NULL)
+        return v;
+    /* copy over everything except the last null byte */
+    memcpy(BUF(v), buf, MAXBUFSIZE-1);
+    pvfree = BUF(v) + MAXBUFSIZE - 1;
 
-	/* Keep reading stuff into v; if it ever ends successfully, break
-	 * after setting p one beyond the end of the line.  The code here is
-	 * very much like the code above, except reads into v's buffer; see
-	 * the code above for detailed comments about the logic.
-	 */
-	for (;;) {
-		FILE_BEGIN_ALLOW_THREADS(f)
-		pvend = BUF(v) + total_v_size;
-		nfree = pvend - pvfree;
-		memset(pvfree, '\n', nfree);
-		assert(nfree < INT_MAX);
-		p = fgets(pvfree, (int)nfree, fp);
-		FILE_END_ALLOW_THREADS(f)
+    /* Keep reading stuff into v; if it ever ends successfully, break
+     * after setting p one beyond the end of the line.  The code here is
+     * very much like the code above, except reads into v's buffer; see
+     * the code above for detailed comments about the logic.
+     */
+    for (;;) {
+        FILE_BEGIN_ALLOW_THREADS(f)
+        pvend = BUF(v) + total_v_size;
+        nfree = pvend - pvfree;
+        memset(pvfree, '\n', nfree);
+        assert(nfree < INT_MAX);
+        p = fgets(pvfree, (int)nfree, fp);
+        FILE_END_ALLOW_THREADS(f)
 
-		if (p == NULL) {
-			clearerr(fp);
-			if (PyErr_CheckSignals()) {
-				Py_DECREF(v);
-				return NULL;
-			}
-			p = pvfree;
-			break;
-		}
-		p = memchr(pvfree, '\n', nfree);
-		if (p != NULL) {
-			if (p+1 < pvend && *(p+1) == '\0') {
-				/* \n came from fgets */
-				++p;
-				break;
-			}
-			/* \n came from us; last line of file, no newline */
-			assert(p > pvfree && *(p-1) == '\0');
-			--p;
-			break;
-		}
-		/* expand buffer and try again */
-		assert(*(pvend-1) == '\0');
-		increment = total_v_size >> 2;	/* mild exponential growth */
-		prev_v_size = total_v_size;
-		total_v_size += increment;
-		/* check for overflow */
-		if (total_v_size <= prev_v_size ||
-		    total_v_size > PY_SSIZE_T_MAX) {
-			PyErr_SetString(PyExc_OverflowError,
-			    "line is longer than a Python string can hold");
-			Py_DECREF(v);
-			return NULL;
-		}
-		if (_PyString_Resize(&v, (int)total_v_size) < 0)
-			return NULL;
-		/* overwrite the trailing null byte */
-		pvfree = BUF(v) + (prev_v_size - 1);
-	}
-	if (BUF(v) + total_v_size != p && _PyString_Resize(&v, p - BUF(v)))
-		return NULL;
-	return v;
+        if (p == NULL) {
+            clearerr(fp);
+            if (PyErr_CheckSignals()) {
+                Py_DECREF(v);
+                return NULL;
+            }
+            p = pvfree;
+            break;
+        }
+        p = memchr(pvfree, '\n', nfree);
+        if (p != NULL) {
+            if (p+1 < pvend && *(p+1) == '\0') {
+                /* \n came from fgets */
+                ++p;
+                break;
+            }
+            /* \n came from us; last line of file, no newline */
+            assert(p > pvfree && *(p-1) == '\0');
+            --p;
+            break;
+        }
+        /* expand buffer and try again */
+        assert(*(pvend-1) == '\0');
+        increment = total_v_size >> 2;          /* mild exponential growth */
+        prev_v_size = total_v_size;
+        total_v_size += increment;
+        /* check for overflow */
+        if (total_v_size <= prev_v_size ||
+            total_v_size > PY_SSIZE_T_MAX) {
+            PyErr_SetString(PyExc_OverflowError,
+                "line is longer than a Python string can hold");
+            Py_DECREF(v);
+            return NULL;
+        }
+        if (_PyString_Resize(&v, (int)total_v_size) < 0)
+            return NULL;
+        /* overwrite the trailing null byte */
+        pvfree = BUF(v) + (prev_v_size - 1);
+    }
+    if (BUF(v) + total_v_size != p && _PyString_Resize(&v, p - BUF(v)))
+        return NULL;
+    return v;
 #undef INITBUFSIZE
 #undef MAXBUFSIZE
 }
-#endif	/* ifdef USE_FGETS_IN_GETLINE */
+#endif  /* ifdef USE_FGETS_IN_GETLINE */
 
 /* Internal routine to get a line.
    Size argument interpretation:
@@ -1373,105 +1373,105 @@
 static PyObject *
 get_line(PyFileObject *f, int n)
 {
-	FILE *fp = f->f_fp;
-	int c;
-	char *buf, *end;
-	size_t total_v_size;	/* total # of slots in buffer */
-	size_t used_v_size;	/* # used slots in buffer */
-	size_t increment;       /* amount to increment the buffer */
-	PyObject *v;
-	int newlinetypes = f->f_newlinetypes;
-	int skipnextlf = f->f_skipnextlf;
-	int univ_newline = f->f_univ_newline;
+    FILE *fp = f->f_fp;
+    int c;
+    char *buf, *end;
+    size_t total_v_size;        /* total # of slots in buffer */
+    size_t used_v_size;         /* # used slots in buffer */
+    size_t increment;       /* amount to increment the buffer */
+    PyObject *v;
+    int newlinetypes = f->f_newlinetypes;
+    int skipnextlf = f->f_skipnextlf;
+    int univ_newline = f->f_univ_newline;
 
 #if defined(USE_FGETS_IN_GETLINE)
-	if (n <= 0 && !univ_newline )
-		return getline_via_fgets(f, fp);
+    if (n <= 0 && !univ_newline )
+        return getline_via_fgets(f, fp);
 #endif
-	total_v_size = n > 0 ? n : 100;
-	v = PyString_FromStringAndSize((char *)NULL, total_v_size);
-	if (v == NULL)
-		return NULL;
-	buf = BUF(v);
-	end = buf + total_v_size;
+    total_v_size = n > 0 ? n : 100;
+    v = PyString_FromStringAndSize((char *)NULL, total_v_size);
+    if (v == NULL)
+        return NULL;
+    buf = BUF(v);
+    end = buf + total_v_size;
 
-	for (;;) {
-		FILE_BEGIN_ALLOW_THREADS(f)
-		FLOCKFILE(fp);
-		if (univ_newline) {
-			c = 'x'; /* Shut up gcc warning */
-			while ( buf != end && (c = GETC(fp)) != EOF ) {
-				if (skipnextlf ) {
-					skipnextlf = 0;
-					if (c == '\n') {
-						/* Seeing a \n here with
-						 * skipnextlf true means we
-						 * saw a \r before.
-						 */
-						newlinetypes |= NEWLINE_CRLF;
-						c = GETC(fp);
-						if (c == EOF) break;
-					} else {
-						newlinetypes |= NEWLINE_CR;
-					}
-				}
-				if (c == '\r') {
-					skipnextlf = 1;
-					c = '\n';
-				} else if ( c == '\n')
-					newlinetypes |= NEWLINE_LF;
-				*buf++ = c;
-				if (c == '\n') break;
-			}
-			if ( c == EOF && skipnextlf )
-				newlinetypes |= NEWLINE_CR;
-		} else /* If not universal newlines use the normal loop */
-		while ((c = GETC(fp)) != EOF &&
-		       (*buf++ = c) != '\n' &&
-			buf != end)
-			;
-		FUNLOCKFILE(fp);
-		FILE_END_ALLOW_THREADS(f)
-		f->f_newlinetypes = newlinetypes;
-		f->f_skipnextlf = skipnextlf;
-		if (c == '\n')
-			break;
-		if (c == EOF) {
-			if (ferror(fp)) {
-				PyErr_SetFromErrno(PyExc_IOError);
-				clearerr(fp);
-				Py_DECREF(v);
-				return NULL;
-			}
-			clearerr(fp);
-			if (PyErr_CheckSignals()) {
-				Py_DECREF(v);
-				return NULL;
-			}
-			break;
-		}
-		/* Must be because buf == end */
-		if (n > 0)
-			break;
-		used_v_size = total_v_size;
-		increment = total_v_size >> 2; /* mild exponential growth */
-		total_v_size += increment;
-		if (total_v_size > PY_SSIZE_T_MAX) {
-			PyErr_SetString(PyExc_OverflowError,
-			    "line is longer than a Python string can hold");
-			Py_DECREF(v);
-			return NULL;
-		}
-		if (_PyString_Resize(&v, total_v_size) < 0)
-			return NULL;
-		buf = BUF(v) + used_v_size;
-		end = BUF(v) + total_v_size;
-	}
+    for (;;) {
+        FILE_BEGIN_ALLOW_THREADS(f)
+        FLOCKFILE(fp);
+        if (univ_newline) {
+            c = 'x'; /* Shut up gcc warning */
+            while ( buf != end && (c = GETC(fp)) != EOF ) {
+                if (skipnextlf ) {
+                    skipnextlf = 0;
+                    if (c == '\n') {
+                        /* Seeing a \n here with
+                         * skipnextlf true means we
+                         * saw a \r before.
+                         */
+                        newlinetypes |= NEWLINE_CRLF;
+                        c = GETC(fp);
+                        if (c == EOF) break;
+                    } else {
+                        newlinetypes |= NEWLINE_CR;
+                    }
+                }
+                if (c == '\r') {
+                    skipnextlf = 1;
+                    c = '\n';
+                } else if ( c == '\n')
+                    newlinetypes |= NEWLINE_LF;
+                *buf++ = c;
+                if (c == '\n') break;
+            }
+            if ( c == EOF && skipnextlf )
+                newlinetypes |= NEWLINE_CR;
+        } else /* If not universal newlines use the normal loop */
+        while ((c = GETC(fp)) != EOF &&
+               (*buf++ = c) != '\n' &&
+            buf != end)
+            ;
+        FUNLOCKFILE(fp);
+        FILE_END_ALLOW_THREADS(f)
+        f->f_newlinetypes = newlinetypes;
+        f->f_skipnextlf = skipnextlf;
+        if (c == '\n')
+            break;
+        if (c == EOF) {
+            if (ferror(fp)) {
+                PyErr_SetFromErrno(PyExc_IOError);
+                clearerr(fp);
+                Py_DECREF(v);
+                return NULL;
+            }
+            clearerr(fp);
+            if (PyErr_CheckSignals()) {
+                Py_DECREF(v);
+                return NULL;
+            }
+            break;
+        }
+        /* Must be because buf == end */
+        if (n > 0)
+            break;
+        used_v_size = total_v_size;
+        increment = total_v_size >> 2; /* mild exponential growth */
+        total_v_size += increment;
+        if (total_v_size > PY_SSIZE_T_MAX) {
+            PyErr_SetString(PyExc_OverflowError,
+                "line is longer than a Python string can hold");
+            Py_DECREF(v);
+            return NULL;
+        }
+        if (_PyString_Resize(&v, total_v_size) < 0)
+            return NULL;
+        buf = BUF(v) + used_v_size;
+        end = BUF(v) + total_v_size;
+    }
 
-	used_v_size = buf - BUF(v);
-	if (used_v_size != total_v_size && _PyString_Resize(&v, used_v_size))
-		return NULL;
-	return v;
+    used_v_size = buf - BUF(v);
+    if (used_v_size != total_v_size && _PyString_Resize(&v, used_v_size))
+        return NULL;
+    return v;
 }
 
 /* External C interface */
@@ -1479,98 +1479,98 @@
 PyObject *
 PyFile_GetLine(PyObject *f, int n)
 {
-	PyObject *result;
+    PyObject *result;
 
-	if (f == NULL) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
+    if (f == NULL) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
 
-	if (PyFile_Check(f)) {
-		PyFileObject *fo = (PyFileObject *)f;
-		if (fo->f_fp == NULL)
-			return err_closed();
-		if (!fo->readable)
-			return err_mode("reading");
-		/* refuse to mix with f.next() */
-		if (fo->f_buf != NULL &&
-		    (fo->f_bufend - fo->f_bufptr) > 0 &&
-		    fo->f_buf[0] != '\0')
-			return err_iterbuffered();
-		result = get_line(fo, n);
-	}
-	else {
-		PyObject *reader;
-		PyObject *args;
+    if (PyFile_Check(f)) {
+        PyFileObject *fo = (PyFileObject *)f;
+        if (fo->f_fp == NULL)
+            return err_closed();
+        if (!fo->readable)
+            return err_mode("reading");
+        /* refuse to mix with f.next() */
+        if (fo->f_buf != NULL &&
+            (fo->f_bufend - fo->f_bufptr) > 0 &&
+            fo->f_buf[0] != '\0')
+            return err_iterbuffered();
+        result = get_line(fo, n);
+    }
+    else {
+        PyObject *reader;
+        PyObject *args;
 
-		reader = PyObject_GetAttrString(f, "readline");
-		if (reader == NULL)
-			return NULL;
-		if (n <= 0)
-			args = PyTuple_New(0);
-		else
-			args = Py_BuildValue("(i)", n);
-		if (args == NULL) {
-			Py_DECREF(reader);
-			return NULL;
-		}
-		result = PyEval_CallObject(reader, args);
-		Py_DECREF(reader);
-		Py_DECREF(args);
-		if (result != NULL && !PyString_Check(result) &&
-		    !PyUnicode_Check(result)) {
-			Py_DECREF(result);
-			result = NULL;
-			PyErr_SetString(PyExc_TypeError,
-				   "object.readline() returned non-string");
-		}
-	}
+        reader = PyObject_GetAttrString(f, "readline");
+        if (reader == NULL)
+            return NULL;
+        if (n <= 0)
+            args = PyTuple_New(0);
+        else
+            args = Py_BuildValue("(i)", n);
+        if (args == NULL) {
+            Py_DECREF(reader);
+            return NULL;
+        }
+        result = PyEval_CallObject(reader, args);
+        Py_DECREF(reader);
+        Py_DECREF(args);
+        if (result != NULL && !PyString_Check(result) &&
+            !PyUnicode_Check(result)) {
+            Py_DECREF(result);
+            result = NULL;
+            PyErr_SetString(PyExc_TypeError,
+                       "object.readline() returned non-string");
+        }
+    }
 
-	if (n < 0 && result != NULL && PyString_Check(result)) {
-		char *s = PyString_AS_STRING(result);
-		Py_ssize_t len = PyString_GET_SIZE(result);
-		if (len == 0) {
-			Py_DECREF(result);
-			result = NULL;
-			PyErr_SetString(PyExc_EOFError,
-					"EOF when reading a line");
-		}
-		else if (s[len-1] == '\n') {
-			if (result->ob_refcnt == 1) {
-				if (_PyString_Resize(&result, len-1))
-					return NULL;
-			}
-			else {
-				PyObject *v;
-				v = PyString_FromStringAndSize(s, len-1);
-				Py_DECREF(result);
-				result = v;
-			}
-		}
-	}
+    if (n < 0 && result != NULL && PyString_Check(result)) {
+        char *s = PyString_AS_STRING(result);
+        Py_ssize_t len = PyString_GET_SIZE(result);
+        if (len == 0) {
+            Py_DECREF(result);
+            result = NULL;
+            PyErr_SetString(PyExc_EOFError,
+                            "EOF when reading a line");
+        }
+        else if (s[len-1] == '\n') {
+            if (result->ob_refcnt == 1) {
+                if (_PyString_Resize(&result, len-1))
+                    return NULL;
+            }
+            else {
+                PyObject *v;
+                v = PyString_FromStringAndSize(s, len-1);
+                Py_DECREF(result);
+                result = v;
+            }
+        }
+    }
 #ifdef Py_USING_UNICODE
-	if (n < 0 && result != NULL && PyUnicode_Check(result)) {
-		Py_UNICODE *s = PyUnicode_AS_UNICODE(result);
-		Py_ssize_t len = PyUnicode_GET_SIZE(result);
-		if (len == 0) {
-			Py_DECREF(result);
-			result = NULL;
-			PyErr_SetString(PyExc_EOFError,
-					"EOF when reading a line");
-		}
-		else if (s[len-1] == '\n') {
-			if (result->ob_refcnt == 1)
-				PyUnicode_Resize(&result, len-1);
-			else {
-				PyObject *v;
-				v = PyUnicode_FromUnicode(s, len-1);
-				Py_DECREF(result);
-				result = v;
-			}
-		}
-	}
+    if (n < 0 && result != NULL && PyUnicode_Check(result)) {
+        Py_UNICODE *s = PyUnicode_AS_UNICODE(result);
+        Py_ssize_t len = PyUnicode_GET_SIZE(result);
+        if (len == 0) {
+            Py_DECREF(result);
+            result = NULL;
+            PyErr_SetString(PyExc_EOFError,
+                            "EOF when reading a line");
+        }
+        else if (s[len-1] == '\n') {
+            if (result->ob_refcnt == 1)
+                PyUnicode_Resize(&result, len-1);
+            else {
+                PyObject *v;
+                v = PyUnicode_FromUnicode(s, len-1);
+                Py_DECREF(result);
+                result = v;
+            }
+        }
+    }
 #endif
-	return result;
+    return result;
 }
 
 /* Python method */
@@ -1578,341 +1578,341 @@
 static PyObject *
 file_readline(PyFileObject *f, PyObject *args)
 {
-	int n = -1;
+    int n = -1;
 
-	if (f->f_fp == NULL)
-		return err_closed();
-	if (!f->readable)
-		return err_mode("reading");
-	/* refuse to mix with f.next() */
-	if (f->f_buf != NULL &&
-	    (f->f_bufend - f->f_bufptr) > 0 &&
-	    f->f_buf[0] != '\0')
-		return err_iterbuffered();
-	if (!PyArg_ParseTuple(args, "|i:readline", &n))
-		return NULL;
-	if (n == 0)
-		return PyString_FromString("");
-	if (n < 0)
-		n = 0;
-	return get_line(f, n);
+    if (f->f_fp == NULL)
+        return err_closed();
+    if (!f->readable)
+        return err_mode("reading");
+    /* refuse to mix with f.next() */
+    if (f->f_buf != NULL &&
+        (f->f_bufend - f->f_bufptr) > 0 &&
+        f->f_buf[0] != '\0')
+        return err_iterbuffered();
+    if (!PyArg_ParseTuple(args, "|i:readline", &n))
+        return NULL;
+    if (n == 0)
+        return PyString_FromString("");
+    if (n < 0)
+        n = 0;
+    return get_line(f, n);
 }
 
 static PyObject *
 file_readlines(PyFileObject *f, PyObject *args)
 {
-	long sizehint = 0;
-	PyObject *list = NULL;
-	PyObject *line;
-	char small_buffer[SMALLCHUNK];
-	char *buffer = small_buffer;
-	size_t buffersize = SMALLCHUNK;
-	PyObject *big_buffer = NULL;
-	size_t nfilled = 0;
-	size_t nread;
-	size_t totalread = 0;
-	char *p, *q, *end;
-	int err;
-	int shortread = 0;
+    long sizehint = 0;
+    PyObject *list = NULL;
+    PyObject *line;
+    char small_buffer[SMALLCHUNK];
+    char *buffer = small_buffer;
+    size_t buffersize = SMALLCHUNK;
+    PyObject *big_buffer = NULL;
+    size_t nfilled = 0;
+    size_t nread;
+    size_t totalread = 0;
+    char *p, *q, *end;
+    int err;
+    int shortread = 0;
 
-	if (f->f_fp == NULL)
-		return err_closed();
-	if (!f->readable)
-		return err_mode("reading");
-	/* refuse to mix with f.next() */
-	if (f->f_buf != NULL &&
-	    (f->f_bufend - f->f_bufptr) > 0 &&
-	    f->f_buf[0] != '\0')
-		return err_iterbuffered();
-	if (!PyArg_ParseTuple(args, "|l:readlines", &sizehint))
-		return NULL;
-	if ((list = PyList_New(0)) == NULL)
-		return NULL;
-	for (;;) {
-		if (shortread)
-			nread = 0;
-		else {
-			FILE_BEGIN_ALLOW_THREADS(f)
-			errno = 0;
-			nread = Py_UniversalNewlineFread(buffer+nfilled,
-				buffersize-nfilled, f->f_fp, (PyObject *)f);
-			FILE_END_ALLOW_THREADS(f)
-			shortread = (nread < buffersize-nfilled);
-		}
-		if (nread == 0) {
-			sizehint = 0;
-			if (!ferror(f->f_fp))
-				break;
-			PyErr_SetFromErrno(PyExc_IOError);
-			clearerr(f->f_fp);
-			goto error;
-		}
-		totalread += nread;
-		p = (char *)memchr(buffer+nfilled, '\n', nread);
-		if (p == NULL) {
-			/* Need a larger buffer to fit this line */
-			nfilled += nread;
-			buffersize *= 2;
-			if (buffersize > PY_SSIZE_T_MAX) {
-				PyErr_SetString(PyExc_OverflowError,
-			    "line is longer than a Python string can hold");
-				goto error;
-			}
-			if (big_buffer == NULL) {
-				/* Create the big buffer */
-				big_buffer = PyString_FromStringAndSize(
-					NULL, buffersize);
-				if (big_buffer == NULL)
-					goto error;
-				buffer = PyString_AS_STRING(big_buffer);
-				memcpy(buffer, small_buffer, nfilled);
-			}
-			else {
-				/* Grow the big buffer */
-				if ( _PyString_Resize(&big_buffer, buffersize) < 0 )
-					goto error;
-				buffer = PyString_AS_STRING(big_buffer);
-			}
-			continue;
-		}
-		end = buffer+nfilled+nread;
-		q = buffer;
-		do {
-			/* Process complete lines */
-			p++;
-			line = PyString_FromStringAndSize(q, p-q);
-			if (line == NULL)
-				goto error;
-			err = PyList_Append(list, line);
-			Py_DECREF(line);
-			if (err != 0)
-				goto error;
-			q = p;
-			p = (char *)memchr(q, '\n', end-q);
-		} while (p != NULL);
-		/* Move the remaining incomplete line to the start */
-		nfilled = end-q;
-		memmove(buffer, q, nfilled);
-		if (sizehint > 0)
-			if (totalread >= (size_t)sizehint)
-				break;
-	}
-	if (nfilled != 0) {
-		/* Partial last line */
-		line = PyString_FromStringAndSize(buffer, nfilled);
-		if (line == NULL)
-			goto error;
-		if (sizehint > 0) {
-			/* Need to complete the last line */
-			PyObject *rest = get_line(f, 0);
-			if (rest == NULL) {
-				Py_DECREF(line);
-				goto error;
-			}
-			PyString_Concat(&line, rest);
-			Py_DECREF(rest);
-			if (line == NULL)
-				goto error;
-		}
-		err = PyList_Append(list, line);
-		Py_DECREF(line);
-		if (err != 0)
-			goto error;
-	}
+    if (f->f_fp == NULL)
+        return err_closed();
+    if (!f->readable)
+        return err_mode("reading");
+    /* refuse to mix with f.next() */
+    if (f->f_buf != NULL &&
+        (f->f_bufend - f->f_bufptr) > 0 &&
+        f->f_buf[0] != '\0')
+        return err_iterbuffered();
+    if (!PyArg_ParseTuple(args, "|l:readlines", &sizehint))
+        return NULL;
+    if ((list = PyList_New(0)) == NULL)
+        return NULL;
+    for (;;) {
+        if (shortread)
+            nread = 0;
+        else {
+            FILE_BEGIN_ALLOW_THREADS(f)
+            errno = 0;
+            nread = Py_UniversalNewlineFread(buffer+nfilled,
+                buffersize-nfilled, f->f_fp, (PyObject *)f);
+            FILE_END_ALLOW_THREADS(f)
+            shortread = (nread < buffersize-nfilled);
+        }
+        if (nread == 0) {
+            sizehint = 0;
+            if (!ferror(f->f_fp))
+                break;
+            PyErr_SetFromErrno(PyExc_IOError);
+            clearerr(f->f_fp);
+            goto error;
+        }
+        totalread += nread;
+        p = (char *)memchr(buffer+nfilled, '\n', nread);
+        if (p == NULL) {
+            /* Need a larger buffer to fit this line */
+            nfilled += nread;
+            buffersize *= 2;
+            if (buffersize > PY_SSIZE_T_MAX) {
+                PyErr_SetString(PyExc_OverflowError,
+                "line is longer than a Python string can hold");
+                goto error;
+            }
+            if (big_buffer == NULL) {
+                /* Create the big buffer */
+                big_buffer = PyString_FromStringAndSize(
+                    NULL, buffersize);
+                if (big_buffer == NULL)
+                    goto error;
+                buffer = PyString_AS_STRING(big_buffer);
+                memcpy(buffer, small_buffer, nfilled);
+            }
+            else {
+                /* Grow the big buffer */
+                if ( _PyString_Resize(&big_buffer, buffersize) < 0 )
+                    goto error;
+                buffer = PyString_AS_STRING(big_buffer);
+            }
+            continue;
+        }
+        end = buffer+nfilled+nread;
+        q = buffer;
+        do {
+            /* Process complete lines */
+            p++;
+            line = PyString_FromStringAndSize(q, p-q);
+            if (line == NULL)
+                goto error;
+            err = PyList_Append(list, line);
+            Py_DECREF(line);
+            if (err != 0)
+                goto error;
+            q = p;
+            p = (char *)memchr(q, '\n', end-q);
+        } while (p != NULL);
+        /* Move the remaining incomplete line to the start */
+        nfilled = end-q;
+        memmove(buffer, q, nfilled);
+        if (sizehint > 0)
+            if (totalread >= (size_t)sizehint)
+                break;
+    }
+    if (nfilled != 0) {
+        /* Partial last line */
+        line = PyString_FromStringAndSize(buffer, nfilled);
+        if (line == NULL)
+            goto error;
+        if (sizehint > 0) {
+            /* Need to complete the last line */
+            PyObject *rest = get_line(f, 0);
+            if (rest == NULL) {
+                Py_DECREF(line);
+                goto error;
+            }
+            PyString_Concat(&line, rest);
+            Py_DECREF(rest);
+            if (line == NULL)
+                goto error;
+        }
+        err = PyList_Append(list, line);
+        Py_DECREF(line);
+        if (err != 0)
+            goto error;
+    }
 
 cleanup:
-	Py_XDECREF(big_buffer);
-	return list;
+    Py_XDECREF(big_buffer);
+    return list;
 
 error:
-	Py_CLEAR(list);
-	goto cleanup;
+    Py_CLEAR(list);
+    goto cleanup;
 }
 
 static PyObject *
 file_write(PyFileObject *f, PyObject *args)
 {
-	Py_buffer pbuf;
-	char *s;
-	Py_ssize_t n, n2;
-	if (f->f_fp == NULL)
-		return err_closed();
-	if (!f->writable)
-		return err_mode("writing");
-	if (f->f_binary) {
-		if (!PyArg_ParseTuple(args, "s*", &pbuf))
-			return NULL;
-		s = pbuf.buf;
-		n = pbuf.len;
-	} else
-		if (!PyArg_ParseTuple(args, "t#", &s, &n))
-		return NULL;
-	f->f_softspace = 0;
-	FILE_BEGIN_ALLOW_THREADS(f)
-	errno = 0;
-	n2 = fwrite(s, 1, n, f->f_fp);
-	FILE_END_ALLOW_THREADS(f)
-	if (f->f_binary)
-		PyBuffer_Release(&pbuf);
-	if (n2 != n) {
-		PyErr_SetFromErrno(PyExc_IOError);
-		clearerr(f->f_fp);
-		return NULL;
-	}
-	Py_INCREF(Py_None);
-	return Py_None;
+    Py_buffer pbuf;
+    char *s;
+    Py_ssize_t n, n2;
+    if (f->f_fp == NULL)
+        return err_closed();
+    if (!f->writable)
+        return err_mode("writing");
+    if (f->f_binary) {
+        if (!PyArg_ParseTuple(args, "s*", &pbuf))
+            return NULL;
+        s = pbuf.buf;
+        n = pbuf.len;
+    } else
+        if (!PyArg_ParseTuple(args, "t#", &s, &n))
+        return NULL;
+    f->f_softspace = 0;
+    FILE_BEGIN_ALLOW_THREADS(f)
+    errno = 0;
+    n2 = fwrite(s, 1, n, f->f_fp);
+    FILE_END_ALLOW_THREADS(f)
+    if (f->f_binary)
+        PyBuffer_Release(&pbuf);
+    if (n2 != n) {
+        PyErr_SetFromErrno(PyExc_IOError);
+        clearerr(f->f_fp);
+        return NULL;
+    }
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 file_writelines(PyFileObject *f, PyObject *seq)
 {
 #define CHUNKSIZE 1000
-	PyObject *list, *line;
-	PyObject *it;	/* iter(seq) */
-	PyObject *result;
-	int index, islist;
-	Py_ssize_t i, j, nwritten, len;
+    PyObject *list, *line;
+    PyObject *it;       /* iter(seq) */
+    PyObject *result;
+    int index, islist;
+    Py_ssize_t i, j, nwritten, len;
 
-	assert(seq != NULL);
-	if (f->f_fp == NULL)
-		return err_closed();
-	if (!f->writable)
-		return err_mode("writing");
+    assert(seq != NULL);
+    if (f->f_fp == NULL)
+        return err_closed();
+    if (!f->writable)
+        return err_mode("writing");
 
-	result = NULL;
-	list = NULL;
-	islist = PyList_Check(seq);
-	if  (islist)
-		it = NULL;
-	else {
-		it = PyObject_GetIter(seq);
-		if (it == NULL) {
-			PyErr_SetString(PyExc_TypeError,
-				"writelines() requires an iterable argument");
-			return NULL;
-		}
-		/* From here on, fail by going to error, to reclaim "it". */
-		list = PyList_New(CHUNKSIZE);
-		if (list == NULL)
-			goto error;
-	}
+    result = NULL;
+    list = NULL;
+    islist = PyList_Check(seq);
+    if  (islist)
+        it = NULL;
+    else {
+        it = PyObject_GetIter(seq);
+        if (it == NULL) {
+            PyErr_SetString(PyExc_TypeError,
+                "writelines() requires an iterable argument");
+            return NULL;
+        }
+        /* From here on, fail by going to error, to reclaim "it". */
+        list = PyList_New(CHUNKSIZE);
+        if (list == NULL)
+            goto error;
+    }
 
-	/* Strategy: slurp CHUNKSIZE lines into a private list,
-	   checking that they are all strings, then write that list
-	   without holding the interpreter lock, then come back for more. */
-	for (index = 0; ; index += CHUNKSIZE) {
-		if (islist) {
-			Py_XDECREF(list);
-			list = PyList_GetSlice(seq, index, index+CHUNKSIZE);
-			if (list == NULL)
-				goto error;
-			j = PyList_GET_SIZE(list);
-		}
-		else {
-			for (j = 0; j < CHUNKSIZE; j++) {
-				line = PyIter_Next(it);
-				if (line == NULL) {
-					if (PyErr_Occurred())
-						goto error;
-					break;
-				}
-				PyList_SetItem(list, j, line);
-			}
-		}
-		if (j == 0)
-			break;
+    /* Strategy: slurp CHUNKSIZE lines into a private list,
+       checking that they are all strings, then write that list
+       without holding the interpreter lock, then come back for more. */
+    for (index = 0; ; index += CHUNKSIZE) {
+        if (islist) {
+            Py_XDECREF(list);
+            list = PyList_GetSlice(seq, index, index+CHUNKSIZE);
+            if (list == NULL)
+                goto error;
+            j = PyList_GET_SIZE(list);
+        }
+        else {
+            for (j = 0; j < CHUNKSIZE; j++) {
+                line = PyIter_Next(it);
+                if (line == NULL) {
+                    if (PyErr_Occurred())
+                        goto error;
+                    break;
+                }
+                PyList_SetItem(list, j, line);
+            }
+        }
+        if (j == 0)
+            break;
 
-		/* Check that all entries are indeed strings. If not,
-		   apply the same rules as for file.write() and
-		   convert the results to strings. This is slow, but
-		   seems to be the only way since all conversion APIs
-		   could potentially execute Python code. */
-		for (i = 0; i < j; i++) {
-			PyObject *v = PyList_GET_ITEM(list, i);
-			if (!PyString_Check(v)) {
-			    	const char *buffer;
-				if (((f->f_binary &&
-				      PyObject_AsReadBuffer(v,
-					      (const void**)&buffer,
-							    &len)) ||
-				     PyObject_AsCharBuffer(v,
-							   &buffer,
-							   &len))) {
-					PyErr_SetString(PyExc_TypeError,
-			"writelines() argument must be a sequence of strings");
-					goto error;
-				}
-				line = PyString_FromStringAndSize(buffer,
-								  len);
-				if (line == NULL)
-					goto error;
-				Py_DECREF(v);
-				PyList_SET_ITEM(list, i, line);
-			}
-		}
+        /* Check that all entries are indeed strings. If not,
+           apply the same rules as for file.write() and
+           convert the results to strings. This is slow, but
+           seems to be the only way since all conversion APIs
+           could potentially execute Python code. */
+        for (i = 0; i < j; i++) {
+            PyObject *v = PyList_GET_ITEM(list, i);
+            if (!PyString_Check(v)) {
+                const char *buffer;
+                if (((f->f_binary &&
+                      PyObject_AsReadBuffer(v,
+                          (const void**)&buffer,
+                                        &len)) ||
+                     PyObject_AsCharBuffer(v,
+                                           &buffer,
+                                           &len))) {
+                    PyErr_SetString(PyExc_TypeError,
+            "writelines() argument must be a sequence of strings");
+                            goto error;
+                }
+                line = PyString_FromStringAndSize(buffer,
+                                                  len);
+                if (line == NULL)
+                    goto error;
+                Py_DECREF(v);
+                PyList_SET_ITEM(list, i, line);
+            }
+        }
 
-		/* Since we are releasing the global lock, the
-		   following code may *not* execute Python code. */
-		f->f_softspace = 0;
-		FILE_BEGIN_ALLOW_THREADS(f)
-		errno = 0;
-		for (i = 0; i < j; i++) {
-		    	line = PyList_GET_ITEM(list, i);
-			len = PyString_GET_SIZE(line);
-			nwritten = fwrite(PyString_AS_STRING(line),
-					  1, len, f->f_fp);
-			if (nwritten != len) {
-				FILE_ABORT_ALLOW_THREADS(f)
-				PyErr_SetFromErrno(PyExc_IOError);
-				clearerr(f->f_fp);
-				goto error;
-			}
-		}
-		FILE_END_ALLOW_THREADS(f)
+        /* Since we are releasing the global lock, the
+           following code may *not* execute Python code. */
+        f->f_softspace = 0;
+        FILE_BEGIN_ALLOW_THREADS(f)
+        errno = 0;
+        for (i = 0; i < j; i++) {
+            line = PyList_GET_ITEM(list, i);
+            len = PyString_GET_SIZE(line);
+            nwritten = fwrite(PyString_AS_STRING(line),
+                              1, len, f->f_fp);
+            if (nwritten != len) {
+                FILE_ABORT_ALLOW_THREADS(f)
+                PyErr_SetFromErrno(PyExc_IOError);
+                clearerr(f->f_fp);
+                goto error;
+            }
+        }
+        FILE_END_ALLOW_THREADS(f)
 
-		if (j < CHUNKSIZE)
-			break;
-	}
+        if (j < CHUNKSIZE)
+            break;
+    }
 
-	Py_INCREF(Py_None);
-	result = Py_None;
+    Py_INCREF(Py_None);
+    result = Py_None;
   error:
-	Py_XDECREF(list);
-  	Py_XDECREF(it);
-	return result;
+    Py_XDECREF(list);
+    Py_XDECREF(it);
+    return result;
 #undef CHUNKSIZE
 }
 
 static PyObject *
 file_self(PyFileObject *f)
 {
-	if (f->f_fp == NULL)
-		return err_closed();
-	Py_INCREF(f);
-	return (PyObject *)f;
+    if (f->f_fp == NULL)
+        return err_closed();
+    Py_INCREF(f);
+    return (PyObject *)f;
 }
 
 static PyObject *
 file_xreadlines(PyFileObject *f)
 {
-	if (PyErr_WarnPy3k("f.xreadlines() not supported in 3.x, "
-			   "try 'for line in f' instead", 1) < 0)
-	       return NULL;
-	return file_self(f);
+    if (PyErr_WarnPy3k("f.xreadlines() not supported in 3.x, "
+                       "try 'for line in f' instead", 1) < 0)
+           return NULL;
+    return file_self(f);
 }
 
 static PyObject *
 file_exit(PyObject *f, PyObject *args)
 {
-	PyObject *ret = PyObject_CallMethod(f, "close", NULL);
-	if (!ret)
-		/* If error occurred, pass through */
-		return NULL;
-	Py_DECREF(ret);
-	/* We cannot return the result of close since a true
-	 * value will be interpreted as "yes, swallow the
-	 * exception if one was raised inside the with block". */
-	Py_RETURN_NONE;
+    PyObject *ret = PyObject_CallMethod(f, "close", NULL);
+    if (!ret)
+        /* If error occurred, pass through */
+        return NULL;
+    Py_DECREF(ret);
+    /* We cannot return the result of close since a true
+     * value will be interpreted as "yes, swallow the
+     * exception if one was raised inside the with block". */
+    Py_RETURN_NONE;
 }
 
 PyDoc_STRVAR(readline_doc,
@@ -2000,126 +2000,126 @@
 "isatty() -> true or false.  True if the file is connected to a tty device.");
 
 PyDoc_STRVAR(enter_doc,
-	     "__enter__() -> self.");
+             "__enter__() -> self.");
 
 PyDoc_STRVAR(exit_doc,
-	     "__exit__(*excinfo) -> None.  Closes the file.");
+             "__exit__(*excinfo) -> None.  Closes the file.");
 
 static PyMethodDef file_methods[] = {
-	{"readline",  (PyCFunction)file_readline, METH_VARARGS, readline_doc},
-	{"read",      (PyCFunction)file_read,     METH_VARARGS, read_doc},
-	{"write",     (PyCFunction)file_write,    METH_VARARGS, write_doc},
-	{"fileno",    (PyCFunction)file_fileno,   METH_NOARGS,  fileno_doc},
-	{"seek",      (PyCFunction)file_seek,     METH_VARARGS, seek_doc},
+    {"readline",  (PyCFunction)file_readline, METH_VARARGS, readline_doc},
+    {"read",      (PyCFunction)file_read,     METH_VARARGS, read_doc},
+    {"write",     (PyCFunction)file_write,    METH_VARARGS, write_doc},
+    {"fileno",    (PyCFunction)file_fileno,   METH_NOARGS,  fileno_doc},
+    {"seek",      (PyCFunction)file_seek,     METH_VARARGS, seek_doc},
 #ifdef HAVE_FTRUNCATE
-	{"truncate",  (PyCFunction)file_truncate, METH_VARARGS, truncate_doc},
+    {"truncate",  (PyCFunction)file_truncate, METH_VARARGS, truncate_doc},
 #endif
-	{"tell",      (PyCFunction)file_tell,     METH_NOARGS,  tell_doc},
-	{"readinto",  (PyCFunction)file_readinto, METH_VARARGS, readinto_doc},
-	{"readlines", (PyCFunction)file_readlines, METH_VARARGS, readlines_doc},
-	{"xreadlines",(PyCFunction)file_xreadlines, METH_NOARGS, xreadlines_doc},
-	{"writelines",(PyCFunction)file_writelines, METH_O,     writelines_doc},
-	{"flush",     (PyCFunction)file_flush,    METH_NOARGS,  flush_doc},
-	{"close",     (PyCFunction)file_close,    METH_NOARGS,  close_doc},
-	{"isatty",    (PyCFunction)file_isatty,   METH_NOARGS,  isatty_doc},
-	{"__enter__", (PyCFunction)file_self,     METH_NOARGS,  enter_doc},
-	{"__exit__",  (PyCFunction)file_exit,     METH_VARARGS, exit_doc},
-	{NULL,	      NULL}		/* sentinel */
+    {"tell",      (PyCFunction)file_tell,     METH_NOARGS,  tell_doc},
+    {"readinto",  (PyCFunction)file_readinto, METH_VARARGS, readinto_doc},
+    {"readlines", (PyCFunction)file_readlines, METH_VARARGS, readlines_doc},
+    {"xreadlines",(PyCFunction)file_xreadlines, METH_NOARGS, xreadlines_doc},
+    {"writelines",(PyCFunction)file_writelines, METH_O,     writelines_doc},
+    {"flush",     (PyCFunction)file_flush,    METH_NOARGS,  flush_doc},
+    {"close",     (PyCFunction)file_close,    METH_NOARGS,  close_doc},
+    {"isatty",    (PyCFunction)file_isatty,   METH_NOARGS,  isatty_doc},
+    {"__enter__", (PyCFunction)file_self,     METH_NOARGS,  enter_doc},
+    {"__exit__",  (PyCFunction)file_exit,     METH_VARARGS, exit_doc},
+    {NULL,            NULL}             /* sentinel */
 };
 
 #define OFF(x) offsetof(PyFileObject, x)
 
 static PyMemberDef file_memberlist[] = {
-	{"mode",	T_OBJECT,	OFF(f_mode),	RO,
-	 "file mode ('r', 'U', 'w', 'a', possibly with 'b' or '+' added)"},
-	{"name",	T_OBJECT,	OFF(f_name),	RO,
-	 "file name"},
-	{"encoding",	T_OBJECT,	OFF(f_encoding),	RO,
-	 "file encoding"},
-	{"errors",	T_OBJECT,	OFF(f_errors),	RO,
-	 "Unicode error handler"},
-	/* getattr(f, "closed") is implemented without this table */
-	{NULL}	/* Sentinel */
+    {"mode",            T_OBJECT,       OFF(f_mode),    RO,
+     "file mode ('r', 'U', 'w', 'a', possibly with 'b' or '+' added)"},
+    {"name",            T_OBJECT,       OFF(f_name),    RO,
+     "file name"},
+    {"encoding",        T_OBJECT,       OFF(f_encoding),        RO,
+     "file encoding"},
+    {"errors",          T_OBJECT,       OFF(f_errors),  RO,
+     "Unicode error handler"},
+    /* getattr(f, "closed") is implemented without this table */
+    {NULL}      /* Sentinel */
 };
 
 static PyObject *
 get_closed(PyFileObject *f, void *closure)
 {
-	return PyBool_FromLong((long)(f->f_fp == 0));
+    return PyBool_FromLong((long)(f->f_fp == 0));
 }
 static PyObject *
 get_newlines(PyFileObject *f, void *closure)
 {
-	switch (f->f_newlinetypes) {
-	case NEWLINE_UNKNOWN:
-		Py_INCREF(Py_None);
-		return Py_None;
-	case NEWLINE_CR:
-		return PyString_FromString("\r");
-	case NEWLINE_LF:
-		return PyString_FromString("\n");
-	case NEWLINE_CR|NEWLINE_LF:
-		return Py_BuildValue("(ss)", "\r", "\n");
-	case NEWLINE_CRLF:
-		return PyString_FromString("\r\n");
-	case NEWLINE_CR|NEWLINE_CRLF:
-		return Py_BuildValue("(ss)", "\r", "\r\n");
-	case NEWLINE_LF|NEWLINE_CRLF:
-		return Py_BuildValue("(ss)", "\n", "\r\n");
-	case NEWLINE_CR|NEWLINE_LF|NEWLINE_CRLF:
-		return Py_BuildValue("(sss)", "\r", "\n", "\r\n");
-	default:
-		PyErr_Format(PyExc_SystemError,
-			     "Unknown newlines value 0x%x\n",
-			     f->f_newlinetypes);
-		return NULL;
-	}
+    switch (f->f_newlinetypes) {
+    case NEWLINE_UNKNOWN:
+        Py_INCREF(Py_None);
+        return Py_None;
+    case NEWLINE_CR:
+        return PyString_FromString("\r");
+    case NEWLINE_LF:
+        return PyString_FromString("\n");
+    case NEWLINE_CR|NEWLINE_LF:
+        return Py_BuildValue("(ss)", "\r", "\n");
+    case NEWLINE_CRLF:
+        return PyString_FromString("\r\n");
+    case NEWLINE_CR|NEWLINE_CRLF:
+        return Py_BuildValue("(ss)", "\r", "\r\n");
+    case NEWLINE_LF|NEWLINE_CRLF:
+        return Py_BuildValue("(ss)", "\n", "\r\n");
+    case NEWLINE_CR|NEWLINE_LF|NEWLINE_CRLF:
+        return Py_BuildValue("(sss)", "\r", "\n", "\r\n");
+    default:
+        PyErr_Format(PyExc_SystemError,
+                     "Unknown newlines value 0x%x\n",
+                     f->f_newlinetypes);
+        return NULL;
+    }
 }
 
 static PyObject *
 get_softspace(PyFileObject *f, void *closure)
 {
-	if (PyErr_WarnPy3k("file.softspace not supported in 3.x", 1) < 0)
-		return NULL;
-	return PyInt_FromLong(f->f_softspace);
+    if (PyErr_WarnPy3k("file.softspace not supported in 3.x", 1) < 0)
+        return NULL;
+    return PyInt_FromLong(f->f_softspace);
 }
 
 static int
 set_softspace(PyFileObject *f, PyObject *value)
 {
-	int new;
-	if (PyErr_WarnPy3k("file.softspace not supported in 3.x", 1) < 0)
-		return -1;
+    int new;
+    if (PyErr_WarnPy3k("file.softspace not supported in 3.x", 1) < 0)
+        return -1;
 
-	if (value == NULL) {
-		PyErr_SetString(PyExc_TypeError,
-				"can't delete softspace attribute");
-		return -1;
-	}
+    if (value == NULL) {
+        PyErr_SetString(PyExc_TypeError,
+                        "can't delete softspace attribute");
+        return -1;
+    }
 
-	new = PyInt_AsLong(value);
-	if (new == -1 && PyErr_Occurred())
-		return -1;
-	f->f_softspace = new;
-	return 0;
+    new = PyInt_AsLong(value);
+    if (new == -1 && PyErr_Occurred())
+        return -1;
+    f->f_softspace = new;
+    return 0;
 }
 
 static PyGetSetDef file_getsetlist[] = {
-	{"closed", (getter)get_closed, NULL, "True if the file is closed"},
-	{"newlines", (getter)get_newlines, NULL,
-	 "end-of-line convention used in this file"},
-	{"softspace", (getter)get_softspace, (setter)set_softspace,
-	 "flag indicating that a space needs to be printed; used by print"},
-	{0},
+    {"closed", (getter)get_closed, NULL, "True if the file is closed"},
+    {"newlines", (getter)get_newlines, NULL,
+     "end-of-line convention used in this file"},
+    {"softspace", (getter)get_softspace, (setter)set_softspace,
+     "flag indicating that a space needs to be printed; used by print"},
+    {0},
 };
 
 static void
 drop_readahead(PyFileObject *f)
 {
-	if (f->f_buf != NULL) {
-		PyMem_Free(f->f_buf);
-		f->f_buf = NULL;
-	}
+    if (f->f_buf != NULL) {
+        PyMem_Free(f->f_buf);
+        f->f_buf = NULL;
+    }
 }
 
 /* Make sure that file has a readahead buffer with at least one byte
@@ -2128,34 +2128,34 @@
 static int
 readahead(PyFileObject *f, int bufsize)
 {
-	Py_ssize_t chunksize;
+    Py_ssize_t chunksize;
 
-	if (f->f_buf != NULL) {
-		if( (f->f_bufend - f->f_bufptr) >= 1)
-			return 0;
-		else
-			drop_readahead(f);
-	}
-	if ((f->f_buf = (char *)PyMem_Malloc(bufsize)) == NULL) {
-		PyErr_NoMemory();
-		return -1;
-	}
-	FILE_BEGIN_ALLOW_THREADS(f)
-	errno = 0;
-	chunksize = Py_UniversalNewlineFread(
-		f->f_buf, bufsize, f->f_fp, (PyObject *)f);
-	FILE_END_ALLOW_THREADS(f)
-	if (chunksize == 0) {
-		if (ferror(f->f_fp)) {
-			PyErr_SetFromErrno(PyExc_IOError);
-			clearerr(f->f_fp);
-			drop_readahead(f);
-			return -1;
-		}
-	}
-	f->f_bufptr = f->f_buf;
-	f->f_bufend = f->f_buf + chunksize;
-	return 0;
+    if (f->f_buf != NULL) {
+        if( (f->f_bufend - f->f_bufptr) >= 1)
+            return 0;
+        else
+            drop_readahead(f);
+    }
+    if ((f->f_buf = (char *)PyMem_Malloc(bufsize)) == NULL) {
+        PyErr_NoMemory();
+        return -1;
+    }
+    FILE_BEGIN_ALLOW_THREADS(f)
+    errno = 0;
+    chunksize = Py_UniversalNewlineFread(
+        f->f_buf, bufsize, f->f_fp, (PyObject *)f);
+    FILE_END_ALLOW_THREADS(f)
+    if (chunksize == 0) {
+        if (ferror(f->f_fp)) {
+            PyErr_SetFromErrno(PyExc_IOError);
+            clearerr(f->f_fp);
+            drop_readahead(f);
+            return -1;
+        }
+    }
+    f->f_bufptr = f->f_buf;
+    f->f_bufend = f->f_buf + chunksize;
+    return 0;
 }
 
 /* Used by file_iternext.  The returned string will start with 'skip'
@@ -2166,46 +2166,46 @@
 static PyStringObject *
 readahead_get_line_skip(PyFileObject *f, int skip, int bufsize)
 {
-	PyStringObject* s;
-	char *bufptr;
-	char *buf;
-	Py_ssize_t len;
+    PyStringObject* s;
+    char *bufptr;
+    char *buf;
+    Py_ssize_t len;
 
-	if (f->f_buf == NULL)
-		if (readahead(f, bufsize) < 0)
-			return NULL;
+    if (f->f_buf == NULL)
+        if (readahead(f, bufsize) < 0)
+            return NULL;
 
-	len = f->f_bufend - f->f_bufptr;
-	if (len == 0)
-		return (PyStringObject *)
-			PyString_FromStringAndSize(NULL, skip);
-	bufptr = (char *)memchr(f->f_bufptr, '\n', len);
-	if (bufptr != NULL) {
-		bufptr++;			/* Count the '\n' */
-		len = bufptr - f->f_bufptr;
-		s = (PyStringObject *)
-			PyString_FromStringAndSize(NULL, skip+len);
-		if (s == NULL)
-			return NULL;
-		memcpy(PyString_AS_STRING(s)+skip, f->f_bufptr, len);
-		f->f_bufptr = bufptr;
-		if (bufptr == f->f_bufend)
-			drop_readahead(f);
-	} else {
-		bufptr = f->f_bufptr;
-		buf = f->f_buf;
-		f->f_buf = NULL; 	/* Force new readahead buffer */
-		assert(skip+len < INT_MAX);
-                s = readahead_get_line_skip(
-			f, (int)(skip+len), bufsize + (bufsize>>2) );
-		if (s == NULL) {
-		        PyMem_Free(buf);
-			return NULL;
-		}
-		memcpy(PyString_AS_STRING(s)+skip, bufptr, len);
-		PyMem_Free(buf);
-	}
-	return s;
+    len = f->f_bufend - f->f_bufptr;
+    if (len == 0)
+        return (PyStringObject *)
+            PyString_FromStringAndSize(NULL, skip);
+    bufptr = (char *)memchr(f->f_bufptr, '\n', len);
+    if (bufptr != NULL) {
+        bufptr++;                               /* Count the '\n' */
+        len = bufptr - f->f_bufptr;
+        s = (PyStringObject *)
+            PyString_FromStringAndSize(NULL, skip+len);
+        if (s == NULL)
+            return NULL;
+        memcpy(PyString_AS_STRING(s)+skip, f->f_bufptr, len);
+        f->f_bufptr = bufptr;
+        if (bufptr == f->f_bufend)
+            drop_readahead(f);
+    } else {
+        bufptr = f->f_bufptr;
+        buf = f->f_buf;
+        f->f_buf = NULL;                /* Force new readahead buffer */
+        assert(skip+len < INT_MAX);
+        s = readahead_get_line_skip(
+            f, (int)(skip+len), bufsize + (bufsize>>2) );
+        if (s == NULL) {
+            PyMem_Free(buf);
+            return NULL;
+        }
+        memcpy(PyString_AS_STRING(s)+skip, bufptr, len);
+        PyMem_Free(buf);
+    }
+    return s;
 }
 
 /* A larger buffer size may actually decrease performance. */
@@ -2214,122 +2214,122 @@
 static PyObject *
 file_iternext(PyFileObject *f)
 {
-	PyStringObject* l;
+    PyStringObject* l;
 
-	if (f->f_fp == NULL)
-		return err_closed();
-	if (!f->readable)
-		return err_mode("reading");
+    if (f->f_fp == NULL)
+        return err_closed();
+    if (!f->readable)
+        return err_mode("reading");
 
-	l = readahead_get_line_skip(f, 0, READAHEAD_BUFSIZE);
-	if (l == NULL || PyString_GET_SIZE(l) == 0) {
-		Py_XDECREF(l);
-		return NULL;
-	}
-	return (PyObject *)l;
+    l = readahead_get_line_skip(f, 0, READAHEAD_BUFSIZE);
+    if (l == NULL || PyString_GET_SIZE(l) == 0) {
+        Py_XDECREF(l);
+        return NULL;
+    }
+    return (PyObject *)l;
 }
 
 
 static PyObject *
 file_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *self;
-	static PyObject *not_yet_string;
+    PyObject *self;
+    static PyObject *not_yet_string;
 
-	assert(type != NULL && type->tp_alloc != NULL);
+    assert(type != NULL && type->tp_alloc != NULL);
 
-	if (not_yet_string == NULL) {
-		not_yet_string = PyString_InternFromString("<uninitialized file>");
-		if (not_yet_string == NULL)
-			return NULL;
-	}
+    if (not_yet_string == NULL) {
+        not_yet_string = PyString_InternFromString("<uninitialized file>");
+        if (not_yet_string == NULL)
+            return NULL;
+    }
 
-	self = type->tp_alloc(type, 0);
-	if (self != NULL) {
-		/* Always fill in the name and mode, so that nobody else
-		   needs to special-case NULLs there. */
-		Py_INCREF(not_yet_string);
-		((PyFileObject *)self)->f_name = not_yet_string;
-		Py_INCREF(not_yet_string);
-		((PyFileObject *)self)->f_mode = not_yet_string;
-		Py_INCREF(Py_None);
-		((PyFileObject *)self)->f_encoding = Py_None;
-		Py_INCREF(Py_None);
-		((PyFileObject *)self)->f_errors = Py_None;
-		((PyFileObject *)self)->weakreflist = NULL;
-		((PyFileObject *)self)->unlocked_count = 0;
-	}
-	return self;
+    self = type->tp_alloc(type, 0);
+    if (self != NULL) {
+        /* Always fill in the name and mode, so that nobody else
+           needs to special-case NULLs there. */
+        Py_INCREF(not_yet_string);
+        ((PyFileObject *)self)->f_name = not_yet_string;
+        Py_INCREF(not_yet_string);
+        ((PyFileObject *)self)->f_mode = not_yet_string;
+        Py_INCREF(Py_None);
+        ((PyFileObject *)self)->f_encoding = Py_None;
+        Py_INCREF(Py_None);
+        ((PyFileObject *)self)->f_errors = Py_None;
+        ((PyFileObject *)self)->weakreflist = NULL;
+        ((PyFileObject *)self)->unlocked_count = 0;
+    }
+    return self;
 }
 
 static int
 file_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	PyFileObject *foself = (PyFileObject *)self;
-	int ret = 0;
-	static char *kwlist[] = {"name", "mode", "buffering", 0};
-	char *name = NULL;
-	char *mode = "r";
-	int bufsize = -1;
-	int wideargument = 0;
+    PyFileObject *foself = (PyFileObject *)self;
+    int ret = 0;
+    static char *kwlist[] = {"name", "mode", "buffering", 0};
+    char *name = NULL;
+    char *mode = "r";
+    int bufsize = -1;
+    int wideargument = 0;
 #ifdef MS_WINDOWS
-	PyObject *po;
+    PyObject *po;
 #endif
 
-	assert(PyFile_Check(self));
-	if (foself->f_fp != NULL) {
-		/* Have to close the existing file first. */
-		PyObject *closeresult = file_close(foself);
-		if (closeresult == NULL)
-			return -1;
-		Py_DECREF(closeresult);
-	}
+    assert(PyFile_Check(self));
+    if (foself->f_fp != NULL) {
+        /* Have to close the existing file first. */
+        PyObject *closeresult = file_close(foself);
+        if (closeresult == NULL)
+            return -1;
+        Py_DECREF(closeresult);
+    }
 
 #ifdef MS_WINDOWS
-	if (PyArg_ParseTupleAndKeywords(args, kwds, "U|si:file",
-					kwlist, &po, &mode, &bufsize)) {
-		wideargument = 1;
-		if (fill_file_fields(foself, NULL, po, mode,
-				     fclose) == NULL)
-			goto Error;
-	} else {
-		/* Drop the argument parsing error as narrow
-		   strings are also valid. */
-		PyErr_Clear();
-	}
+    if (PyArg_ParseTupleAndKeywords(args, kwds, "U|si:file",
+                                    kwlist, &po, &mode, &bufsize)) {
+        wideargument = 1;
+        if (fill_file_fields(foself, NULL, po, mode,
+                             fclose) == NULL)
+            goto Error;
+    } else {
+        /* Drop the argument parsing error as narrow
+           strings are also valid. */
+        PyErr_Clear();
+    }
 #endif
 
-	if (!wideargument) {
-                PyObject *o_name;
+    if (!wideargument) {
+        PyObject *o_name;
 
-		if (!PyArg_ParseTupleAndKeywords(args, kwds, "et|si:file", kwlist,
-						 Py_FileSystemDefaultEncoding,
-						 &name,
-						 &mode, &bufsize))
-			return -1;
+        if (!PyArg_ParseTupleAndKeywords(args, kwds, "et|si:file", kwlist,
+                                         Py_FileSystemDefaultEncoding,
+                                         &name,
+                                         &mode, &bufsize))
+            return -1;
 
-                /* We parse again to get the name as a PyObject */
-                if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|si:file", 
-                                                 kwlist, &o_name, &mode, 
-                                                 &bufsize))
-                        goto Error;
+        /* We parse again to get the name as a PyObject */
+        if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|si:file",
+                                         kwlist, &o_name, &mode,
+                                         &bufsize))
+            goto Error;
 
-		if (fill_file_fields(foself, NULL, o_name, mode,
-				     fclose) == NULL)
-			goto Error;
-	}
-	if (open_the_file(foself, name, mode) == NULL)
-		goto Error;
-	foself->f_setbuf = NULL;
-	PyFile_SetBufSize(self, bufsize);
-	goto Done;
+        if (fill_file_fields(foself, NULL, o_name, mode,
+                             fclose) == NULL)
+            goto Error;
+    }
+    if (open_the_file(foself, name, mode) == NULL)
+        goto Error;
+    foself->f_setbuf = NULL;
+    PyFile_SetBufSize(self, bufsize);
+    goto Done;
 
 Error:
-	ret = -1;
-	/* fall through */
+    ret = -1;
+    /* fall through */
 Done:
-	PyMem_Free(name); /* free the encoded string */
-	return ret;
+    PyMem_Free(name); /* free the encoded string */
+    return ret;
 }
 
 PyDoc_VAR(file_doc) =
@@ -2356,46 +2356,46 @@
 );
 
 PyTypeObject PyFile_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"file",
-	sizeof(PyFileObject),
-	0,
-	(destructor)file_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,			 		/* tp_getattr */
-	0,			 		/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)file_repr, 			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	/* softspace is writable:  we must supply tp_setattro */
-	PyObject_GenericSetAttr,		/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
-	file_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	offsetof(PyFileObject, weakreflist),	/* tp_weaklistoffset */
-	(getiterfunc)file_self,			/* tp_iter */
-	(iternextfunc)file_iternext,		/* tp_iternext */
-	file_methods,				/* tp_methods */
-	file_memberlist,			/* tp_members */
-	file_getsetlist,			/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	file_init,				/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	file_new,				/* tp_new */
-	PyObject_Del,                           /* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "file",
+    sizeof(PyFileObject),
+    0,
+    (destructor)file_dealloc,                   /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)file_repr,                        /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    /* softspace is writable:  we must supply tp_setattro */
+    PyObject_GenericSetAttr,                    /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
+    file_doc,                                   /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    offsetof(PyFileObject, weakreflist),        /* tp_weaklistoffset */
+    (getiterfunc)file_self,                     /* tp_iter */
+    (iternextfunc)file_iternext,                /* tp_iternext */
+    file_methods,                               /* tp_methods */
+    file_memberlist,                            /* tp_members */
+    file_getsetlist,                            /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    file_init,                                  /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    file_new,                                   /* tp_new */
+    PyObject_Del,                           /* tp_free */
 };
 
 /* Interface for the 'soft space' between print items. */
@@ -2403,35 +2403,35 @@
 int
 PyFile_SoftSpace(PyObject *f, int newflag)
 {
-	long oldflag = 0;
-	if (f == NULL) {
-		/* Do nothing */
-	}
-	else if (PyFile_Check(f)) {
-		oldflag = ((PyFileObject *)f)->f_softspace;
-		((PyFileObject *)f)->f_softspace = newflag;
-	}
-	else {
-		PyObject *v;
-		v = PyObject_GetAttrString(f, "softspace");
-		if (v == NULL)
-			PyErr_Clear();
-		else {
-			if (PyInt_Check(v))
-				oldflag = PyInt_AsLong(v);
-			assert(oldflag < INT_MAX);
-			Py_DECREF(v);
-		}
-		v = PyInt_FromLong((long)newflag);
-		if (v == NULL)
-			PyErr_Clear();
-		else {
-			if (PyObject_SetAttrString(f, "softspace", v) != 0)
-				PyErr_Clear();
-			Py_DECREF(v);
-		}
-	}
-	return (int)oldflag;
+    long oldflag = 0;
+    if (f == NULL) {
+        /* Do nothing */
+    }
+    else if (PyFile_Check(f)) {
+        oldflag = ((PyFileObject *)f)->f_softspace;
+        ((PyFileObject *)f)->f_softspace = newflag;
+    }
+    else {
+        PyObject *v;
+        v = PyObject_GetAttrString(f, "softspace");
+        if (v == NULL)
+            PyErr_Clear();
+        else {
+            if (PyInt_Check(v))
+                oldflag = PyInt_AsLong(v);
+            assert(oldflag < INT_MAX);
+            Py_DECREF(v);
+        }
+        v = PyInt_FromLong((long)newflag);
+        if (v == NULL)
+            PyErr_Clear();
+        else {
+            if (PyObject_SetAttrString(f, "softspace", v) != 0)
+                PyErr_Clear();
+            Py_DECREF(v);
+        }
+    }
+    return (int)oldflag;
 }
 
 /* Interfaces to write objects/strings to file-like objects */
@@ -2439,107 +2439,107 @@
 int
 PyFile_WriteObject(PyObject *v, PyObject *f, int flags)
 {
-	PyObject *writer, *value, *args, *result;
-	if (f == NULL) {
-		PyErr_SetString(PyExc_TypeError, "writeobject with NULL file");
-		return -1;
-	}
-	else if (PyFile_Check(f)) {
-		PyFileObject *fobj = (PyFileObject *) f;
+    PyObject *writer, *value, *args, *result;
+    if (f == NULL) {
+        PyErr_SetString(PyExc_TypeError, "writeobject with NULL file");
+        return -1;
+    }
+    else if (PyFile_Check(f)) {
+        PyFileObject *fobj = (PyFileObject *) f;
 #ifdef Py_USING_UNICODE
-		PyObject *enc = fobj->f_encoding;
-		int result;
+        PyObject *enc = fobj->f_encoding;
+        int result;
 #endif
-		if (fobj->f_fp == NULL) {
-			err_closed();
-			return -1;
-		}
+        if (fobj->f_fp == NULL) {
+            err_closed();
+            return -1;
+        }
 #ifdef Py_USING_UNICODE
-                if ((flags & Py_PRINT_RAW) &&
-		    PyUnicode_Check(v) && enc != Py_None) {
-			char *cenc = PyString_AS_STRING(enc);
-			char *errors = fobj->f_errors == Py_None ? 
-			  "strict" : PyString_AS_STRING(fobj->f_errors);
-			value = PyUnicode_AsEncodedString(v, cenc, errors);
-			if (value == NULL)
-				return -1;
-		} else {
-			value = v;
-			Py_INCREF(value);
-		}
-		result = file_PyObject_Print(value, fobj, flags);
-		Py_DECREF(value);
-		return result;
+        if ((flags & Py_PRINT_RAW) &&
+            PyUnicode_Check(v) && enc != Py_None) {
+            char *cenc = PyString_AS_STRING(enc);
+            char *errors = fobj->f_errors == Py_None ?
+              "strict" : PyString_AS_STRING(fobj->f_errors);
+            value = PyUnicode_AsEncodedString(v, cenc, errors);
+            if (value == NULL)
+                return -1;
+        } else {
+            value = v;
+            Py_INCREF(value);
+        }
+        result = file_PyObject_Print(value, fobj, flags);
+        Py_DECREF(value);
+        return result;
 #else
-		return file_PyObject_Print(v, fobj, flags);
+        return file_PyObject_Print(v, fobj, flags);
 #endif
-	}
-	writer = PyObject_GetAttrString(f, "write");
-	if (writer == NULL)
-		return -1;
-	if (flags & Py_PRINT_RAW) {
-                if (PyUnicode_Check(v)) {
-                        value = v;
-                        Py_INCREF(value);
-                } else
-                        value = PyObject_Str(v);
-	}
-        else
-		value = PyObject_Repr(v);
-	if (value == NULL) {
-		Py_DECREF(writer);
-		return -1;
-	}
-	args = PyTuple_Pack(1, value);
-	if (args == NULL) {
-		Py_DECREF(value);
-		Py_DECREF(writer);
-		return -1;
-	}
-	result = PyEval_CallObject(writer, args);
-	Py_DECREF(args);
-	Py_DECREF(value);
-	Py_DECREF(writer);
-	if (result == NULL)
-		return -1;
-	Py_DECREF(result);
-	return 0;
+    }
+    writer = PyObject_GetAttrString(f, "write");
+    if (writer == NULL)
+        return -1;
+    if (flags & Py_PRINT_RAW) {
+        if (PyUnicode_Check(v)) {
+            value = v;
+            Py_INCREF(value);
+        } else
+            value = PyObject_Str(v);
+    }
+    else
+        value = PyObject_Repr(v);
+    if (value == NULL) {
+        Py_DECREF(writer);
+        return -1;
+    }
+    args = PyTuple_Pack(1, value);
+    if (args == NULL) {
+        Py_DECREF(value);
+        Py_DECREF(writer);
+        return -1;
+    }
+    result = PyEval_CallObject(writer, args);
+    Py_DECREF(args);
+    Py_DECREF(value);
+    Py_DECREF(writer);
+    if (result == NULL)
+        return -1;
+    Py_DECREF(result);
+    return 0;
 }
 
 int
 PyFile_WriteString(const char *s, PyObject *f)
 {
 
-	if (f == NULL) {
-		/* Should be caused by a pre-existing error */
-		if (!PyErr_Occurred())
-			PyErr_SetString(PyExc_SystemError,
-					"null file for PyFile_WriteString");
-		return -1;
-	}
-	else if (PyFile_Check(f)) {
-		PyFileObject *fobj = (PyFileObject *) f;
-		FILE *fp = PyFile_AsFile(f);
-		if (fp == NULL) {
-			err_closed();
-			return -1;
-		}
-		FILE_BEGIN_ALLOW_THREADS(fobj)
-		fputs(s, fp);
-		FILE_END_ALLOW_THREADS(fobj)
-		return 0;
-	}
-	else if (!PyErr_Occurred()) {
-		PyObject *v = PyString_FromString(s);
-		int err;
-		if (v == NULL)
-			return -1;
-		err = PyFile_WriteObject(v, f, Py_PRINT_RAW);
-		Py_DECREF(v);
-		return err;
-	}
-	else
-		return -1;
+    if (f == NULL) {
+        /* Should be caused by a pre-existing error */
+        if (!PyErr_Occurred())
+            PyErr_SetString(PyExc_SystemError,
+                            "null file for PyFile_WriteString");
+        return -1;
+    }
+    else if (PyFile_Check(f)) {
+        PyFileObject *fobj = (PyFileObject *) f;
+        FILE *fp = PyFile_AsFile(f);
+        if (fp == NULL) {
+            err_closed();
+            return -1;
+        }
+        FILE_BEGIN_ALLOW_THREADS(fobj)
+        fputs(s, fp);
+        FILE_END_ALLOW_THREADS(fobj)
+        return 0;
+    }
+    else if (!PyErr_Occurred()) {
+        PyObject *v = PyString_FromString(s);
+        int err;
+        if (v == NULL)
+            return -1;
+        err = PyFile_WriteObject(v, f, Py_PRINT_RAW);
+        Py_DECREF(v);
+        return err;
+    }
+    else
+        return -1;
 }
 
 /* Try to get a file-descriptor from a Python object.  If the object
@@ -2551,50 +2551,50 @@
 
 int PyObject_AsFileDescriptor(PyObject *o)
 {
-	int fd;
-	PyObject *meth;
+    int fd;
+    PyObject *meth;
 
-	if (PyInt_Check(o)) {
-		fd = PyInt_AsLong(o);
-	}
-	else if (PyLong_Check(o)) {
-		fd = PyLong_AsLong(o);
-	}
-	else if ((meth = PyObject_GetAttrString(o, "fileno")) != NULL)
-	{
-		PyObject *fno = PyEval_CallObject(meth, NULL);
-		Py_DECREF(meth);
-		if (fno == NULL)
-			return -1;
+    if (PyInt_Check(o)) {
+        fd = PyInt_AsLong(o);
+    }
+    else if (PyLong_Check(o)) {
+        fd = PyLong_AsLong(o);
+    }
+    else if ((meth = PyObject_GetAttrString(o, "fileno")) != NULL)
+    {
+        PyObject *fno = PyEval_CallObject(meth, NULL);
+        Py_DECREF(meth);
+        if (fno == NULL)
+            return -1;
 
-		if (PyInt_Check(fno)) {
-			fd = PyInt_AsLong(fno);
-			Py_DECREF(fno);
-		}
-		else if (PyLong_Check(fno)) {
-			fd = PyLong_AsLong(fno);
-			Py_DECREF(fno);
-		}
-		else {
-			PyErr_SetString(PyExc_TypeError,
-					"fileno() returned a non-integer");
-			Py_DECREF(fno);
-			return -1;
-		}
-	}
-	else {
-		PyErr_SetString(PyExc_TypeError,
-				"argument must be an int, or have a fileno() method.");
-		return -1;
-	}
+        if (PyInt_Check(fno)) {
+            fd = PyInt_AsLong(fno);
+            Py_DECREF(fno);
+        }
+        else if (PyLong_Check(fno)) {
+            fd = PyLong_AsLong(fno);
+            Py_DECREF(fno);
+        }
+        else {
+            PyErr_SetString(PyExc_TypeError,
+                            "fileno() returned a non-integer");
+            Py_DECREF(fno);
+            return -1;
+        }
+    }
+    else {
+        PyErr_SetString(PyExc_TypeError,
+                        "argument must be an int, or have a fileno() method.");
+        return -1;
+    }
 
-	if (fd < 0) {
-		PyErr_Format(PyExc_ValueError,
-			     "file descriptor cannot be a negative integer (%i)",
-			     fd);
-		return -1;
-	}
-	return fd;
+    if (fd < 0) {
+        PyErr_Format(PyExc_ValueError,
+                     "file descriptor cannot be a negative integer (%i)",
+                     fd);
+        return -1;
+    }
+    return fd;
 }
 
 /* From here on we need access to the real fgets and fread */
@@ -2618,79 +2618,79 @@
 char *
 Py_UniversalNewlineFgets(char *buf, int n, FILE *stream, PyObject *fobj)
 {
-	char *p = buf;
-	int c;
-	int newlinetypes = 0;
-	int skipnextlf = 0;
-	int univ_newline = 1;
+    char *p = buf;
+    int c;
+    int newlinetypes = 0;
+    int skipnextlf = 0;
+    int univ_newline = 1;
 
-	if (fobj) {
-		if (!PyFile_Check(fobj)) {
-			errno = ENXIO;	/* What can you do... */
-			return NULL;
-		}
-		univ_newline = ((PyFileObject *)fobj)->f_univ_newline;
-		if ( !univ_newline )
-			return fgets(buf, n, stream);
-		newlinetypes = ((PyFileObject *)fobj)->f_newlinetypes;
-		skipnextlf = ((PyFileObject *)fobj)->f_skipnextlf;
-	}
-	FLOCKFILE(stream);
-	c = 'x'; /* Shut up gcc warning */
-	while (--n > 0 && (c = GETC(stream)) != EOF ) {
-		if (skipnextlf ) {
-			skipnextlf = 0;
-			if (c == '\n') {
-				/* Seeing a \n here with skipnextlf true
-				** means we saw a \r before.
-				*/
-				newlinetypes |= NEWLINE_CRLF;
-				c = GETC(stream);
-				if (c == EOF) break;
-			} else {
-				/*
-				** Note that c == EOF also brings us here,
-				** so we're okay if the last char in the file
-				** is a CR.
-				*/
-				newlinetypes |= NEWLINE_CR;
-			}
-		}
-		if (c == '\r') {
-			/* A \r is translated into a \n, and we skip
-			** an adjacent \n, if any. We don't set the
-			** newlinetypes flag until we've seen the next char.
-			*/
-			skipnextlf = 1;
-			c = '\n';
-		} else if ( c == '\n') {
-			newlinetypes |= NEWLINE_LF;
-		}
-		*p++ = c;
-		if (c == '\n') break;
-	}
-	if ( c == EOF && skipnextlf )
-		newlinetypes |= NEWLINE_CR;
-	FUNLOCKFILE(stream);
-	*p = '\0';
-	if (fobj) {
-		((PyFileObject *)fobj)->f_newlinetypes = newlinetypes;
-		((PyFileObject *)fobj)->f_skipnextlf = skipnextlf;
-	} else if ( skipnextlf ) {
-		/* If we have no file object we cannot save the
-		** skipnextlf flag. We have to readahead, which
-		** will cause a pause if we're reading from an
-		** interactive stream, but that is very unlikely
-		** unless we're doing something silly like
-		** execfile("/dev/tty").
-		*/
-		c = GETC(stream);
-		if ( c != '\n' )
-			ungetc(c, stream);
-	}
-	if (p == buf)
-		return NULL;
-	return buf;
+    if (fobj) {
+        if (!PyFile_Check(fobj)) {
+            errno = ENXIO;              /* What can you do... */
+            return NULL;
+        }
+        univ_newline = ((PyFileObject *)fobj)->f_univ_newline;
+        if ( !univ_newline )
+            return fgets(buf, n, stream);
+        newlinetypes = ((PyFileObject *)fobj)->f_newlinetypes;
+        skipnextlf = ((PyFileObject *)fobj)->f_skipnextlf;
+    }
+    FLOCKFILE(stream);
+    c = 'x'; /* Shut up gcc warning */
+    while (--n > 0 && (c = GETC(stream)) != EOF ) {
+        if (skipnextlf ) {
+            skipnextlf = 0;
+            if (c == '\n') {
+                /* Seeing a \n here with skipnextlf true
+                ** means we saw a \r before.
+                */
+                newlinetypes |= NEWLINE_CRLF;
+                c = GETC(stream);
+                if (c == EOF) break;
+            } else {
+                /*
+                ** Note that c == EOF also brings us here,
+                ** so we're okay if the last char in the file
+                ** is a CR.
+                */
+                newlinetypes |= NEWLINE_CR;
+            }
+        }
+        if (c == '\r') {
+            /* A \r is translated into a \n, and we skip
+            ** an adjacent \n, if any. We don't set the
+            ** newlinetypes flag until we've seen the next char.
+            */
+            skipnextlf = 1;
+            c = '\n';
+        } else if ( c == '\n') {
+            newlinetypes |= NEWLINE_LF;
+        }
+        *p++ = c;
+        if (c == '\n') break;
+    }
+    if ( c == EOF && skipnextlf )
+        newlinetypes |= NEWLINE_CR;
+    FUNLOCKFILE(stream);
+    *p = '\0';
+    if (fobj) {
+        ((PyFileObject *)fobj)->f_newlinetypes = newlinetypes;
+        ((PyFileObject *)fobj)->f_skipnextlf = skipnextlf;
+    } else if ( skipnextlf ) {
+        /* If we have no file object we cannot save the
+        ** skipnextlf flag. We have to readahead, which
+        ** will cause a pause if we're reading from an
+        ** interactive stream, but that is very unlikely
+        ** unless we're doing something silly like
+        ** execfile("/dev/tty").
+        */
+        c = GETC(stream);
+        if ( c != '\n' )
+            ungetc(c, stream);
+    }
+    if (p == buf)
+        return NULL;
+    return buf;
 }
 
 /*
@@ -2705,74 +2705,74 @@
 */
 size_t
 Py_UniversalNewlineFread(char *buf, size_t n,
-			 FILE *stream, PyObject *fobj)
+                         FILE *stream, PyObject *fobj)
 {
-	char *dst = buf;
-	PyFileObject *f = (PyFileObject *)fobj;
-	int newlinetypes, skipnextlf;
+    char *dst = buf;
+    PyFileObject *f = (PyFileObject *)fobj;
+    int newlinetypes, skipnextlf;
 
-	assert(buf != NULL);
-	assert(stream != NULL);
+    assert(buf != NULL);
+    assert(stream != NULL);
 
-	if (!fobj || !PyFile_Check(fobj)) {
-		errno = ENXIO;	/* What can you do... */
-		return 0;
-	}
-	if (!f->f_univ_newline)
-		return fread(buf, 1, n, stream);
-	newlinetypes = f->f_newlinetypes;
-	skipnextlf = f->f_skipnextlf;
-	/* Invariant:  n is the number of bytes remaining to be filled
-	 * in the buffer.
-	 */
-	while (n) {
-		size_t nread;
-		int shortread;
-		char *src = dst;
+    if (!fobj || !PyFile_Check(fobj)) {
+        errno = ENXIO;          /* What can you do... */
+        return 0;
+    }
+    if (!f->f_univ_newline)
+        return fread(buf, 1, n, stream);
+    newlinetypes = f->f_newlinetypes;
+    skipnextlf = f->f_skipnextlf;
+    /* Invariant:  n is the number of bytes remaining to be filled
+     * in the buffer.
+     */
+    while (n) {
+        size_t nread;
+        int shortread;
+        char *src = dst;
 
-		nread = fread(dst, 1, n, stream);
-		assert(nread <= n);
-		if (nread == 0)
-			break;
+        nread = fread(dst, 1, n, stream);
+        assert(nread <= n);
+        if (nread == 0)
+            break;
 
-		n -= nread; /* assuming 1 byte out for each in; will adjust */
-		shortread = n != 0;	/* true iff EOF or error */
-		while (nread--) {
-			char c = *src++;
-			if (c == '\r') {
-				/* Save as LF and set flag to skip next LF. */
-				*dst++ = '\n';
-				skipnextlf = 1;
-			}
-			else if (skipnextlf && c == '\n') {
-				/* Skip LF, and remember we saw CR LF. */
-				skipnextlf = 0;
-				newlinetypes |= NEWLINE_CRLF;
-				++n;
-			}
-			else {
-				/* Normal char to be stored in buffer.  Also
-				 * update the newlinetypes flag if either this
-				 * is an LF or the previous char was a CR.
-				 */
-				if (c == '\n')
-					newlinetypes |= NEWLINE_LF;
-				else if (skipnextlf)
-					newlinetypes |= NEWLINE_CR;
-				*dst++ = c;
-				skipnextlf = 0;
-			}
-		}
-		if (shortread) {
-			/* If this is EOF, update type flags. */
-			if (skipnextlf && feof(stream))
-				newlinetypes |= NEWLINE_CR;
-			break;
-		}
-	}
-	f->f_newlinetypes = newlinetypes;
-	f->f_skipnextlf = skipnextlf;
-	return dst - buf;
+        n -= nread; /* assuming 1 byte out for each in; will adjust */
+        shortread = n != 0;             /* true iff EOF or error */
+        while (nread--) {
+            char c = *src++;
+            if (c == '\r') {
+                /* Save as LF and set flag to skip next LF. */
+                *dst++ = '\n';
+                skipnextlf = 1;
+            }
+            else if (skipnextlf && c == '\n') {
+                /* Skip LF, and remember we saw CR LF. */
+                skipnextlf = 0;
+                newlinetypes |= NEWLINE_CRLF;
+                ++n;
+            }
+            else {
+                /* Normal char to be stored in buffer.  Also
+                 * update the newlinetypes flag if either this
+                 * is an LF or the previous char was a CR.
+                 */
+                if (c == '\n')
+                    newlinetypes |= NEWLINE_LF;
+                else if (skipnextlf)
+                    newlinetypes |= NEWLINE_CR;
+                *dst++ = c;
+                skipnextlf = 0;
+            }
+        }
+        if (shortread) {
+            /* If this is EOF, update type flags. */
+            if (skipnextlf && feof(stream))
+                newlinetypes |= NEWLINE_CR;
+            break;
+        }
+    }
+    f->f_newlinetypes = newlinetypes;
+    f->f_skipnextlf = skipnextlf;
+    return dst - buf;
 }
 
 #ifdef __cplusplus
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index d6a5a35..682bafb 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -21,13 +21,13 @@
 #endif
 
 /* Special free list -- see comments for same code in intobject.c. */
-#define BLOCK_SIZE	1000	/* 1K less typical malloc overhead */
-#define BHEAD_SIZE	8	/* Enough for a 64-bit pointer */
-#define N_FLOATOBJECTS	((BLOCK_SIZE - BHEAD_SIZE) / sizeof(PyFloatObject))
+#define BLOCK_SIZE      1000    /* 1K less typical malloc overhead */
+#define BHEAD_SIZE      8       /* Enough for a 64-bit pointer */
+#define N_FLOATOBJECTS  ((BLOCK_SIZE - BHEAD_SIZE) / sizeof(PyFloatObject))
 
 struct _floatblock {
-	struct _floatblock *next;
-	PyFloatObject objects[N_FLOATOBJECTS];
+    struct _floatblock *next;
+    PyFloatObject objects[N_FLOATOBJECTS];
 };
 
 typedef struct _floatblock PyFloatBlock;
@@ -38,31 +38,31 @@
 static PyFloatObject *
 fill_free_list(void)
 {
-	PyFloatObject *p, *q;
-	/* XXX Float blocks escape the object heap. Use PyObject_MALLOC ??? */
-	p = (PyFloatObject *) PyMem_MALLOC(sizeof(PyFloatBlock));
-	if (p == NULL)
-		return (PyFloatObject *) PyErr_NoMemory();
-	((PyFloatBlock *)p)->next = block_list;
-	block_list = (PyFloatBlock *)p;
-	p = &((PyFloatBlock *)p)->objects[0];
-	q = p + N_FLOATOBJECTS;
-	while (--q > p)
-		Py_TYPE(q) = (struct _typeobject *)(q-1);
-	Py_TYPE(q) = NULL;
-	return p + N_FLOATOBJECTS - 1;
+    PyFloatObject *p, *q;
+    /* XXX Float blocks escape the object heap. Use PyObject_MALLOC ??? */
+    p = (PyFloatObject *) PyMem_MALLOC(sizeof(PyFloatBlock));
+    if (p == NULL)
+        return (PyFloatObject *) PyErr_NoMemory();
+    ((PyFloatBlock *)p)->next = block_list;
+    block_list = (PyFloatBlock *)p;
+    p = &((PyFloatBlock *)p)->objects[0];
+    q = p + N_FLOATOBJECTS;
+    while (--q > p)
+        Py_TYPE(q) = (struct _typeobject *)(q-1);
+    Py_TYPE(q) = NULL;
+    return p + N_FLOATOBJECTS - 1;
 }
 
 double
 PyFloat_GetMax(void)
 {
-	return DBL_MAX;
+    return DBL_MAX;
 }
 
 double
 PyFloat_GetMin(void)
 {
-	return DBL_MIN;
+    return DBL_MIN;
 }
 
 static PyTypeObject FloatInfoType = {0, 0, 0, 0, 0, 0};
@@ -75,83 +75,83 @@
 your system's :file:`float.h` for more information.");
 
 static PyStructSequence_Field floatinfo_fields[] = {
-	{"max",		"DBL_MAX -- maximum representable finite float"},
-	{"max_exp",	"DBL_MAX_EXP -- maximum int e such that radix**(e-1) "
-			"is representable"},
-	{"max_10_exp",	"DBL_MAX_10_EXP -- maximum int e such that 10**e "
-			"is representable"},
-	{"min",		"DBL_MIN -- Minimum positive normalizer float"},
-	{"min_exp",	"DBL_MIN_EXP -- minimum int e such that radix**(e-1) "
-			"is a normalized float"},
-	{"min_10_exp",	"DBL_MIN_10_EXP -- minimum int e such that 10**e is "
-			"a normalized"},
-	{"dig",		"DBL_DIG -- digits"},
-	{"mant_dig",	"DBL_MANT_DIG -- mantissa digits"},
-	{"epsilon",	"DBL_EPSILON -- Difference between 1 and the next "
-			"representable float"},
-	{"radix",	"FLT_RADIX -- radix of exponent"},
-	{"rounds",	"FLT_ROUNDS -- addition rounds"},
-	{0}
+    {"max",             "DBL_MAX -- maximum representable finite float"},
+    {"max_exp",         "DBL_MAX_EXP -- maximum int e such that radix**(e-1) "
+                    "is representable"},
+    {"max_10_exp",      "DBL_MAX_10_EXP -- maximum int e such that 10**e "
+                    "is representable"},
+    {"min",             "DBL_MIN -- Minimum positive normalizer float"},
+    {"min_exp",         "DBL_MIN_EXP -- minimum int e such that radix**(e-1) "
+                    "is a normalized float"},
+    {"min_10_exp",      "DBL_MIN_10_EXP -- minimum int e such that 10**e is "
+                    "a normalized"},
+    {"dig",             "DBL_DIG -- digits"},
+    {"mant_dig",        "DBL_MANT_DIG -- mantissa digits"},
+    {"epsilon",         "DBL_EPSILON -- Difference between 1 and the next "
+                    "representable float"},
+    {"radix",           "FLT_RADIX -- radix of exponent"},
+    {"rounds",          "FLT_ROUNDS -- addition rounds"},
+    {0}
 };
 
 static PyStructSequence_Desc floatinfo_desc = {
-	"sys.float_info",	/* name */
-	floatinfo__doc__,	/* doc */
-	floatinfo_fields,	/* fields */
-	11
+    "sys.float_info",           /* name */
+    floatinfo__doc__,           /* doc */
+    floatinfo_fields,           /* fields */
+    11
 };
 
 PyObject *
 PyFloat_GetInfo(void)
 {
-	PyObject* floatinfo;
-	int pos = 0;
+    PyObject* floatinfo;
+    int pos = 0;
 
-	floatinfo = PyStructSequence_New(&FloatInfoType);
-	if (floatinfo == NULL) {
-		return NULL;
-	}
+    floatinfo = PyStructSequence_New(&FloatInfoType);
+    if (floatinfo == NULL) {
+        return NULL;
+    }
 
 #define SetIntFlag(flag) \
-	PyStructSequence_SET_ITEM(floatinfo, pos++, PyInt_FromLong(flag))
+    PyStructSequence_SET_ITEM(floatinfo, pos++, PyInt_FromLong(flag))
 #define SetDblFlag(flag) \
-	PyStructSequence_SET_ITEM(floatinfo, pos++, PyFloat_FromDouble(flag))
+    PyStructSequence_SET_ITEM(floatinfo, pos++, PyFloat_FromDouble(flag))
 
-	SetDblFlag(DBL_MAX);
-	SetIntFlag(DBL_MAX_EXP);
-	SetIntFlag(DBL_MAX_10_EXP);
-	SetDblFlag(DBL_MIN);
-	SetIntFlag(DBL_MIN_EXP);
-	SetIntFlag(DBL_MIN_10_EXP);
-	SetIntFlag(DBL_DIG);
-	SetIntFlag(DBL_MANT_DIG);
-	SetDblFlag(DBL_EPSILON);
-	SetIntFlag(FLT_RADIX);
-	SetIntFlag(FLT_ROUNDS);
+    SetDblFlag(DBL_MAX);
+    SetIntFlag(DBL_MAX_EXP);
+    SetIntFlag(DBL_MAX_10_EXP);
+    SetDblFlag(DBL_MIN);
+    SetIntFlag(DBL_MIN_EXP);
+    SetIntFlag(DBL_MIN_10_EXP);
+    SetIntFlag(DBL_DIG);
+    SetIntFlag(DBL_MANT_DIG);
+    SetDblFlag(DBL_EPSILON);
+    SetIntFlag(FLT_RADIX);
+    SetIntFlag(FLT_ROUNDS);
 #undef SetIntFlag
 #undef SetDblFlag
-	
-	if (PyErr_Occurred()) {
-		Py_CLEAR(floatinfo);
-		return NULL;
-	}
-	return floatinfo;
+
+    if (PyErr_Occurred()) {
+        Py_CLEAR(floatinfo);
+        return NULL;
+    }
+    return floatinfo;
 }
 
 PyObject *
 PyFloat_FromDouble(double fval)
 {
-	register PyFloatObject *op;
-	if (free_list == NULL) {
-		if ((free_list = fill_free_list()) == NULL)
-			return NULL;
-	}
-	/* Inline PyObject_New */
-	op = free_list;
-	free_list = (PyFloatObject *)Py_TYPE(op);
-	PyObject_INIT(op, &PyFloat_Type);
-	op->ob_fval = fval;
-	return (PyObject *) op;
+    register PyFloatObject *op;
+    if (free_list == NULL) {
+        if ((free_list = fill_free_list()) == NULL)
+            return NULL;
+    }
+    /* Inline PyObject_New */
+    op = free_list;
+    free_list = (PyFloatObject *)Py_TYPE(op);
+    PyObject_INIT(op, &PyFloat_Type);
+    op->ob_fval = fval;
+    return (PyObject *) op;
 }
 
 /**************************************************************************
@@ -173,113 +173,113 @@
 PyObject *
 PyFloat_FromString(PyObject *v, char **pend)
 {
-	const char *s, *last, *end;
-	double x;
-	char buffer[256]; /* for errors */
+    const char *s, *last, *end;
+    double x;
+    char buffer[256]; /* for errors */
 #ifdef Py_USING_UNICODE
-	char *s_buffer = NULL;
+    char *s_buffer = NULL;
 #endif
-	Py_ssize_t len;
-	PyObject *result = NULL;
+    Py_ssize_t len;
+    PyObject *result = NULL;
 
-	if (pend)
-		*pend = NULL;
-	if (PyString_Check(v)) {
-		s = PyString_AS_STRING(v);
-		len = PyString_GET_SIZE(v);
-	}
+    if (pend)
+        *pend = NULL;
+    if (PyString_Check(v)) {
+        s = PyString_AS_STRING(v);
+        len = PyString_GET_SIZE(v);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(v)) {
-		s_buffer = (char *)PyMem_MALLOC(PyUnicode_GET_SIZE(v)+1);
-		if (s_buffer == NULL)
-			return PyErr_NoMemory();
-		if (PyUnicode_EncodeDecimal(PyUnicode_AS_UNICODE(v),
-					    PyUnicode_GET_SIZE(v),
-					    s_buffer,
-					    NULL))
-			goto error;
-		s = s_buffer;
-		len = strlen(s);
-	}
+    else if (PyUnicode_Check(v)) {
+        s_buffer = (char *)PyMem_MALLOC(PyUnicode_GET_SIZE(v)+1);
+        if (s_buffer == NULL)
+            return PyErr_NoMemory();
+        if (PyUnicode_EncodeDecimal(PyUnicode_AS_UNICODE(v),
+                                    PyUnicode_GET_SIZE(v),
+                                    s_buffer,
+                                    NULL))
+            goto error;
+        s = s_buffer;
+        len = strlen(s);
+    }
 #endif
-	else if (PyObject_AsCharBuffer(v, &s, &len)) {
-		PyErr_SetString(PyExc_TypeError,
-			"float() argument must be a string or a number");
-		return NULL;
-	}
-	last = s + len;
+    else if (PyObject_AsCharBuffer(v, &s, &len)) {
+        PyErr_SetString(PyExc_TypeError,
+            "float() argument must be a string or a number");
+        return NULL;
+    }
+    last = s + len;
 
-	while (Py_ISSPACE(*s))
-		s++;
-	/* We don't care about overflow or underflow.  If the platform
-	 * supports them, infinities and signed zeroes (on underflow) are
-	 * fine. */
-	x = PyOS_string_to_double(s, (char **)&end, NULL);
-	if (x == -1.0 && PyErr_Occurred())
-		goto error;
-	while (Py_ISSPACE(*end))
-		end++;
-	if (end == last)
-		result = PyFloat_FromDouble(x);
-	else {
-		PyOS_snprintf(buffer, sizeof(buffer),
-			      "invalid literal for float(): %.200s", s);
-		PyErr_SetString(PyExc_ValueError, buffer);
-		result = NULL;
-	}
+    while (Py_ISSPACE(*s))
+        s++;
+    /* We don't care about overflow or underflow.  If the platform
+     * supports them, infinities and signed zeroes (on underflow) are
+     * fine. */
+    x = PyOS_string_to_double(s, (char **)&end, NULL);
+    if (x == -1.0 && PyErr_Occurred())
+        goto error;
+    while (Py_ISSPACE(*end))
+        end++;
+    if (end == last)
+        result = PyFloat_FromDouble(x);
+    else {
+        PyOS_snprintf(buffer, sizeof(buffer),
+                      "invalid literal for float(): %.200s", s);
+        PyErr_SetString(PyExc_ValueError, buffer);
+        result = NULL;
+    }
 
   error:
 #ifdef Py_USING_UNICODE
-	if (s_buffer)
-		PyMem_FREE(s_buffer);
+    if (s_buffer)
+        PyMem_FREE(s_buffer);
 #endif
-	return result;
+    return result;
 }
 
 static void
 float_dealloc(PyFloatObject *op)
 {
-	if (PyFloat_CheckExact(op)) {
-		Py_TYPE(op) = (struct _typeobject *)free_list;
-		free_list = op;
-	}
-	else
-		Py_TYPE(op)->tp_free((PyObject *)op);
+    if (PyFloat_CheckExact(op)) {
+        Py_TYPE(op) = (struct _typeobject *)free_list;
+        free_list = op;
+    }
+    else
+        Py_TYPE(op)->tp_free((PyObject *)op);
 }
 
 double
 PyFloat_AsDouble(PyObject *op)
 {
-	PyNumberMethods *nb;
-	PyFloatObject *fo;
-	double val;
+    PyNumberMethods *nb;
+    PyFloatObject *fo;
+    double val;
 
-	if (op && PyFloat_Check(op))
-		return PyFloat_AS_DOUBLE((PyFloatObject*) op);
+    if (op && PyFloat_Check(op))
+        return PyFloat_AS_DOUBLE((PyFloatObject*) op);
 
-	if (op == NULL) {
-		PyErr_BadArgument();
-		return -1;
-	}
+    if (op == NULL) {
+        PyErr_BadArgument();
+        return -1;
+    }
 
-	if ((nb = Py_TYPE(op)->tp_as_number) == NULL || nb->nb_float == NULL) {
-		PyErr_SetString(PyExc_TypeError, "a float is required");
-		return -1;
-	}
+    if ((nb = Py_TYPE(op)->tp_as_number) == NULL || nb->nb_float == NULL) {
+        PyErr_SetString(PyExc_TypeError, "a float is required");
+        return -1;
+    }
 
-	fo = (PyFloatObject*) (*nb->nb_float) (op);
-	if (fo == NULL)
-		return -1;
-	if (!PyFloat_Check(fo)) {
-		PyErr_SetString(PyExc_TypeError,
-				"nb_float should return float object");
-		return -1;
-	}
+    fo = (PyFloatObject*) (*nb->nb_float) (op);
+    if (fo == NULL)
+        return -1;
+    if (!PyFloat_Check(fo)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "nb_float should return float object");
+        return -1;
+    }
 
-	val = PyFloat_AS_DOUBLE(fo);
-	Py_DECREF(fo);
+    val = PyFloat_AS_DOUBLE(fo);
+    Py_DECREF(fo);
 
-	return val;
+    return val;
 }
 
 /* Methods */
@@ -291,33 +291,33 @@
    obj is not of float, int or long type, Py_NotImplemented is incref'ed,
    stored in obj, and returned from the function invoking this macro.
 */
-#define CONVERT_TO_DOUBLE(obj, dbl)			\
-	if (PyFloat_Check(obj))				\
-		dbl = PyFloat_AS_DOUBLE(obj);		\
-	else if (convert_to_double(&(obj), &(dbl)) < 0)	\
-		return obj;
+#define CONVERT_TO_DOUBLE(obj, dbl)                     \
+    if (PyFloat_Check(obj))                             \
+        dbl = PyFloat_AS_DOUBLE(obj);                   \
+    else if (convert_to_double(&(obj), &(dbl)) < 0)     \
+        return obj;
 
 static int
 convert_to_double(PyObject **v, double *dbl)
 {
-	register PyObject *obj = *v;
+    register PyObject *obj = *v;
 
-	if (PyInt_Check(obj)) {
-		*dbl = (double)PyInt_AS_LONG(obj);
-	}
-	else if (PyLong_Check(obj)) {
-		*dbl = PyLong_AsDouble(obj);
-		if (*dbl == -1.0 && PyErr_Occurred()) {
-			*v = NULL;
-			return -1;
-		}
-	}
-	else {
-		Py_INCREF(Py_NotImplemented);
-		*v = Py_NotImplemented;
-		return -1;
-	}
-	return 0;
+    if (PyInt_Check(obj)) {
+        *dbl = (double)PyInt_AS_LONG(obj);
+    }
+    else if (PyLong_Check(obj)) {
+        *dbl = PyLong_AsDouble(obj);
+        if (*dbl == -1.0 && PyErr_Occurred()) {
+            *v = NULL;
+            return -1;
+        }
+    }
+    else {
+        Py_INCREF(Py_NotImplemented);
+        *v = Py_NotImplemented;
+        return -1;
+    }
+    return 0;
 }
 
 /* XXX PyFloat_AsString and PyFloat_AsReprString are deprecated:
@@ -326,66 +326,66 @@
 void
 PyFloat_AsString(char *buf, PyFloatObject *v)
 {
-	char *tmp = PyOS_double_to_string(v->ob_fval, 'g',
-			PyFloat_STR_PRECISION,
-			Py_DTSF_ADD_DOT_0, NULL);
-	strcpy(buf, tmp);
-	PyMem_Free(tmp);
+    char *tmp = PyOS_double_to_string(v->ob_fval, 'g',
+                    PyFloat_STR_PRECISION,
+                    Py_DTSF_ADD_DOT_0, NULL);
+    strcpy(buf, tmp);
+    PyMem_Free(tmp);
 }
 
 void
 PyFloat_AsReprString(char *buf, PyFloatObject *v)
 {
-	char * tmp = PyOS_double_to_string(v->ob_fval, 'r', 0,
-			Py_DTSF_ADD_DOT_0, NULL);
-	strcpy(buf, tmp);
-	PyMem_Free(tmp);
+    char * tmp = PyOS_double_to_string(v->ob_fval, 'r', 0,
+                    Py_DTSF_ADD_DOT_0, NULL);
+    strcpy(buf, tmp);
+    PyMem_Free(tmp);
 }
 
 /* ARGSUSED */
 static int
 float_print(PyFloatObject *v, FILE *fp, int flags)
 {
-	char *buf;
-	if (flags & Py_PRINT_RAW)
-		buf = PyOS_double_to_string(v->ob_fval,
-					    'g', PyFloat_STR_PRECISION,
-					    Py_DTSF_ADD_DOT_0, NULL);
-	else
-		buf = PyOS_double_to_string(v->ob_fval,
-				    'r', 0, Py_DTSF_ADD_DOT_0, NULL);
-	Py_BEGIN_ALLOW_THREADS
-	fputs(buf, fp);
-	Py_END_ALLOW_THREADS
-	PyMem_Free(buf);
-	return 0;
+    char *buf;
+    if (flags & Py_PRINT_RAW)
+        buf = PyOS_double_to_string(v->ob_fval,
+                                    'g', PyFloat_STR_PRECISION,
+                                    Py_DTSF_ADD_DOT_0, NULL);
+    else
+        buf = PyOS_double_to_string(v->ob_fval,
+                            'r', 0, Py_DTSF_ADD_DOT_0, NULL);
+    Py_BEGIN_ALLOW_THREADS
+    fputs(buf, fp);
+    Py_END_ALLOW_THREADS
+    PyMem_Free(buf);
+    return 0;
 }
 
 static PyObject *
 float_str_or_repr(PyFloatObject *v, int precision, char format_code)
 {
-	PyObject *result;
-	char *buf = PyOS_double_to_string(PyFloat_AS_DOUBLE(v),
-				      format_code, precision,
-				      Py_DTSF_ADD_DOT_0,
-				      NULL);
-	if (!buf)
-		return PyErr_NoMemory();
-	result = PyString_FromString(buf);
-	PyMem_Free(buf);
-	return result;
+    PyObject *result;
+    char *buf = PyOS_double_to_string(PyFloat_AS_DOUBLE(v),
+                                  format_code, precision,
+                                  Py_DTSF_ADD_DOT_0,
+                                  NULL);
+    if (!buf)
+        return PyErr_NoMemory();
+    result = PyString_FromString(buf);
+    PyMem_Free(buf);
+    return result;
 }
 
 static PyObject *
 float_repr(PyFloatObject *v)
 {
-	return float_str_or_repr(v, 0, 'r');
+    return float_str_or_repr(v, 0, 'r');
 }
 
 static PyObject *
 float_str(PyFloatObject *v)
 {
-	return float_str_or_repr(v, PyFloat_STR_PRECISION, 'g');
+    return float_str_or_repr(v, PyFloat_STR_PRECISION, 'g');
 }
 
 /* Comparison is pretty much a nightmare.  When comparing float to float,
@@ -406,389 +406,389 @@
 static PyObject*
 float_richcompare(PyObject *v, PyObject *w, int op)
 {
-	double i, j;
-	int r = 0;
+    double i, j;
+    int r = 0;
 
-	assert(PyFloat_Check(v));
-	i = PyFloat_AS_DOUBLE(v);
+    assert(PyFloat_Check(v));
+    i = PyFloat_AS_DOUBLE(v);
 
-	/* Switch on the type of w.  Set i and j to doubles to be compared,
-	 * and op to the richcomp to use.
-	 */
-	if (PyFloat_Check(w))
-		j = PyFloat_AS_DOUBLE(w);
+    /* Switch on the type of w.  Set i and j to doubles to be compared,
+     * and op to the richcomp to use.
+     */
+    if (PyFloat_Check(w))
+        j = PyFloat_AS_DOUBLE(w);
 
-	else if (!Py_IS_FINITE(i)) {
-		if (PyInt_Check(w) || PyLong_Check(w))
-			/* If i is an infinity, its magnitude exceeds any
-			 * finite integer, so it doesn't matter which int we
-			 * compare i with.  If i is a NaN, similarly.
-			 */
-			j = 0.0;
-		else
-			goto Unimplemented;
-	}
+    else if (!Py_IS_FINITE(i)) {
+        if (PyInt_Check(w) || PyLong_Check(w))
+            /* If i is an infinity, its magnitude exceeds any
+             * finite integer, so it doesn't matter which int we
+             * compare i with.  If i is a NaN, similarly.
+             */
+            j = 0.0;
+        else
+            goto Unimplemented;
+    }
 
-	else if (PyInt_Check(w)) {
-		long jj = PyInt_AS_LONG(w);
-		/* In the worst realistic case I can imagine, C double is a
-		 * Cray single with 48 bits of precision, and long has 64
-		 * bits.
-		 */
+    else if (PyInt_Check(w)) {
+        long jj = PyInt_AS_LONG(w);
+        /* In the worst realistic case I can imagine, C double is a
+         * Cray single with 48 bits of precision, and long has 64
+         * bits.
+         */
 #if SIZEOF_LONG > 6
-		unsigned long abs = (unsigned long)(jj < 0 ? -jj : jj);
-		if (abs >> 48) {
-			/* Needs more than 48 bits.  Make it take the
-			 * PyLong path.
-			 */
-			PyObject *result;
-			PyObject *ww = PyLong_FromLong(jj);
+        unsigned long abs = (unsigned long)(jj < 0 ? -jj : jj);
+        if (abs >> 48) {
+            /* Needs more than 48 bits.  Make it take the
+             * PyLong path.
+             */
+            PyObject *result;
+            PyObject *ww = PyLong_FromLong(jj);
 
-			if (ww == NULL)
-				return NULL;
-			result = float_richcompare(v, ww, op);
-			Py_DECREF(ww);
-			return result;
-		}
+            if (ww == NULL)
+                return NULL;
+            result = float_richcompare(v, ww, op);
+            Py_DECREF(ww);
+            return result;
+        }
 #endif
-		j = (double)jj;
-		assert((long)j == jj);
-	}
+        j = (double)jj;
+        assert((long)j == jj);
+    }
 
-	else if (PyLong_Check(w)) {
-		int vsign = i == 0.0 ? 0 : i < 0.0 ? -1 : 1;
-		int wsign = _PyLong_Sign(w);
-		size_t nbits;
-		int exponent;
+    else if (PyLong_Check(w)) {
+        int vsign = i == 0.0 ? 0 : i < 0.0 ? -1 : 1;
+        int wsign = _PyLong_Sign(w);
+        size_t nbits;
+        int exponent;
 
-		if (vsign != wsign) {
-			/* Magnitudes are irrelevant -- the signs alone
-			 * determine the outcome.
-			 */
-			i = (double)vsign;
-			j = (double)wsign;
-			goto Compare;
-		}
-		/* The signs are the same. */
-		/* Convert w to a double if it fits.  In particular, 0 fits. */
-		nbits = _PyLong_NumBits(w);
-		if (nbits == (size_t)-1 && PyErr_Occurred()) {
-			/* This long is so large that size_t isn't big enough
-			 * to hold the # of bits.  Replace with little doubles
-			 * that give the same outcome -- w is so large that
-			 * its magnitude must exceed the magnitude of any
-			 * finite float.
-			 */
-			PyErr_Clear();
-			i = (double)vsign;
-			assert(wsign != 0);
-			j = wsign * 2.0;
-			goto Compare;
-		}
-		if (nbits <= 48) {
-			j = PyLong_AsDouble(w);
-			/* It's impossible that <= 48 bits overflowed. */
-			assert(j != -1.0 || ! PyErr_Occurred());
-			goto Compare;
-		}
-		assert(wsign != 0); /* else nbits was 0 */
-		assert(vsign != 0); /* if vsign were 0, then since wsign is
-		                     * not 0, we would have taken the
-		                     * vsign != wsign branch at the start */
-		/* We want to work with non-negative numbers. */
-		if (vsign < 0) {
-			/* "Multiply both sides" by -1; this also swaps the
-			 * comparator.
-			 */
-			i = -i;
-			op = _Py_SwappedOp[op];
-		}
-		assert(i > 0.0);
-		(void) frexp(i, &exponent);
-		/* exponent is the # of bits in v before the radix point;
-		 * we know that nbits (the # of bits in w) > 48 at this point
-		 */
-		if (exponent < 0 || (size_t)exponent < nbits) {
-			i = 1.0;
-			j = 2.0;
-			goto Compare;
-		}
-		if ((size_t)exponent > nbits) {
-			i = 2.0;
-			j = 1.0;
-			goto Compare;
-		}
-		/* v and w have the same number of bits before the radix
-		 * point.  Construct two longs that have the same comparison
-		 * outcome.
-		 */
-		{
-			double fracpart;
-			double intpart;
-			PyObject *result = NULL;
-			PyObject *one = NULL;
-			PyObject *vv = NULL;
-			PyObject *ww = w;
+        if (vsign != wsign) {
+            /* Magnitudes are irrelevant -- the signs alone
+             * determine the outcome.
+             */
+            i = (double)vsign;
+            j = (double)wsign;
+            goto Compare;
+        }
+        /* The signs are the same. */
+        /* Convert w to a double if it fits.  In particular, 0 fits. */
+        nbits = _PyLong_NumBits(w);
+        if (nbits == (size_t)-1 && PyErr_Occurred()) {
+            /* This long is so large that size_t isn't big enough
+             * to hold the # of bits.  Replace with little doubles
+             * that give the same outcome -- w is so large that
+             * its magnitude must exceed the magnitude of any
+             * finite float.
+             */
+            PyErr_Clear();
+            i = (double)vsign;
+            assert(wsign != 0);
+            j = wsign * 2.0;
+            goto Compare;
+        }
+        if (nbits <= 48) {
+            j = PyLong_AsDouble(w);
+            /* It's impossible that <= 48 bits overflowed. */
+            assert(j != -1.0 || ! PyErr_Occurred());
+            goto Compare;
+        }
+        assert(wsign != 0); /* else nbits was 0 */
+        assert(vsign != 0); /* if vsign were 0, then since wsign is
+                             * not 0, we would have taken the
+                             * vsign != wsign branch at the start */
+        /* We want to work with non-negative numbers. */
+        if (vsign < 0) {
+            /* "Multiply both sides" by -1; this also swaps the
+             * comparator.
+             */
+            i = -i;
+            op = _Py_SwappedOp[op];
+        }
+        assert(i > 0.0);
+        (void) frexp(i, &exponent);
+        /* exponent is the # of bits in v before the radix point;
+         * we know that nbits (the # of bits in w) > 48 at this point
+         */
+        if (exponent < 0 || (size_t)exponent < nbits) {
+            i = 1.0;
+            j = 2.0;
+            goto Compare;
+        }
+        if ((size_t)exponent > nbits) {
+            i = 2.0;
+            j = 1.0;
+            goto Compare;
+        }
+        /* v and w have the same number of bits before the radix
+         * point.  Construct two longs that have the same comparison
+         * outcome.
+         */
+        {
+            double fracpart;
+            double intpart;
+            PyObject *result = NULL;
+            PyObject *one = NULL;
+            PyObject *vv = NULL;
+            PyObject *ww = w;
 
-			if (wsign < 0) {
-				ww = PyNumber_Negative(w);
-				if (ww == NULL)
-					goto Error;
-			}
-			else
-				Py_INCREF(ww);
+            if (wsign < 0) {
+                ww = PyNumber_Negative(w);
+                if (ww == NULL)
+                    goto Error;
+            }
+            else
+                Py_INCREF(ww);
 
-			fracpart = modf(i, &intpart);
-			vv = PyLong_FromDouble(intpart);
-			if (vv == NULL)
-				goto Error;
+            fracpart = modf(i, &intpart);
+            vv = PyLong_FromDouble(intpart);
+            if (vv == NULL)
+                goto Error;
 
-			if (fracpart != 0.0) {
-				/* Shift left, and or a 1 bit into vv
-				 * to represent the lost fraction.
-				 */
-				PyObject *temp;
+            if (fracpart != 0.0) {
+                /* Shift left, and or a 1 bit into vv
+                 * to represent the lost fraction.
+                 */
+                PyObject *temp;
 
-				one = PyInt_FromLong(1);
-				if (one == NULL)
-					goto Error;
+                one = PyInt_FromLong(1);
+                if (one == NULL)
+                    goto Error;
 
-				temp = PyNumber_Lshift(ww, one);
-				if (temp == NULL)
-					goto Error;
-				Py_DECREF(ww);
-				ww = temp;
+                temp = PyNumber_Lshift(ww, one);
+                if (temp == NULL)
+                    goto Error;
+                Py_DECREF(ww);
+                ww = temp;
 
-				temp = PyNumber_Lshift(vv, one);
-				if (temp == NULL)
-					goto Error;
-				Py_DECREF(vv);
-				vv = temp;
+                temp = PyNumber_Lshift(vv, one);
+                if (temp == NULL)
+                    goto Error;
+                Py_DECREF(vv);
+                vv = temp;
 
-				temp = PyNumber_Or(vv, one);
-				if (temp == NULL)
-					goto Error;
-				Py_DECREF(vv);
-				vv = temp;
-			}
+                temp = PyNumber_Or(vv, one);
+                if (temp == NULL)
+                    goto Error;
+                Py_DECREF(vv);
+                vv = temp;
+            }
 
-			r = PyObject_RichCompareBool(vv, ww, op);
-			if (r < 0)
-				goto Error;
-			result = PyBool_FromLong(r);
- 		 Error:
- 		 	Py_XDECREF(vv);
- 		 	Py_XDECREF(ww);
- 		 	Py_XDECREF(one);
- 		 	return result;
-		}
-	} /* else if (PyLong_Check(w)) */
+            r = PyObject_RichCompareBool(vv, ww, op);
+            if (r < 0)
+                goto Error;
+            result = PyBool_FromLong(r);
+         Error:
+            Py_XDECREF(vv);
+            Py_XDECREF(ww);
+            Py_XDECREF(one);
+            return result;
+        }
+    } /* else if (PyLong_Check(w)) */
 
-	else	/* w isn't float, int, or long */
-		goto Unimplemented;
+    else        /* w isn't float, int, or long */
+        goto Unimplemented;
 
  Compare:
-	PyFPE_START_PROTECT("richcompare", return NULL)
-	switch (op) {
-	case Py_EQ:
-		r = i == j;
-		break;
-	case Py_NE:
-		r = i != j;
-		break;
-	case Py_LE:
-		r = i <= j;
-		break;
-	case Py_GE:
-		r = i >= j;
-		break;
-	case Py_LT:
-		r = i < j;
-		break;
-	case Py_GT:
-		r = i > j;
-		break;
-	}
-	PyFPE_END_PROTECT(r)
-	return PyBool_FromLong(r);
+    PyFPE_START_PROTECT("richcompare", return NULL)
+    switch (op) {
+    case Py_EQ:
+        r = i == j;
+        break;
+    case Py_NE:
+        r = i != j;
+        break;
+    case Py_LE:
+        r = i <= j;
+        break;
+    case Py_GE:
+        r = i >= j;
+        break;
+    case Py_LT:
+        r = i < j;
+        break;
+    case Py_GT:
+        r = i > j;
+        break;
+    }
+    PyFPE_END_PROTECT(r)
+    return PyBool_FromLong(r);
 
  Unimplemented:
-	Py_INCREF(Py_NotImplemented);
-	return Py_NotImplemented;
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
 }
 
 static long
 float_hash(PyFloatObject *v)
 {
-	return _Py_HashDouble(v->ob_fval);
+    return _Py_HashDouble(v->ob_fval);
 }
 
 static PyObject *
 float_add(PyObject *v, PyObject *w)
 {
-	double a,b;
-	CONVERT_TO_DOUBLE(v, a);
-	CONVERT_TO_DOUBLE(w, b);
-	PyFPE_START_PROTECT("add", return 0)
-	a = a + b;
-	PyFPE_END_PROTECT(a)
-	return PyFloat_FromDouble(a);
+    double a,b;
+    CONVERT_TO_DOUBLE(v, a);
+    CONVERT_TO_DOUBLE(w, b);
+    PyFPE_START_PROTECT("add", return 0)
+    a = a + b;
+    PyFPE_END_PROTECT(a)
+    return PyFloat_FromDouble(a);
 }
 
 static PyObject *
 float_sub(PyObject *v, PyObject *w)
 {
-	double a,b;
-	CONVERT_TO_DOUBLE(v, a);
-	CONVERT_TO_DOUBLE(w, b);
-	PyFPE_START_PROTECT("subtract", return 0)
-	a = a - b;
-	PyFPE_END_PROTECT(a)
-	return PyFloat_FromDouble(a);
+    double a,b;
+    CONVERT_TO_DOUBLE(v, a);
+    CONVERT_TO_DOUBLE(w, b);
+    PyFPE_START_PROTECT("subtract", return 0)
+    a = a - b;
+    PyFPE_END_PROTECT(a)
+    return PyFloat_FromDouble(a);
 }
 
 static PyObject *
 float_mul(PyObject *v, PyObject *w)
 {
-	double a,b;
-	CONVERT_TO_DOUBLE(v, a);
-	CONVERT_TO_DOUBLE(w, b);
-	PyFPE_START_PROTECT("multiply", return 0)
-	a = a * b;
-	PyFPE_END_PROTECT(a)
-	return PyFloat_FromDouble(a);
+    double a,b;
+    CONVERT_TO_DOUBLE(v, a);
+    CONVERT_TO_DOUBLE(w, b);
+    PyFPE_START_PROTECT("multiply", return 0)
+    a = a * b;
+    PyFPE_END_PROTECT(a)
+    return PyFloat_FromDouble(a);
 }
 
 static PyObject *
 float_div(PyObject *v, PyObject *w)
 {
-	double a,b;
-	CONVERT_TO_DOUBLE(v, a);
-	CONVERT_TO_DOUBLE(w, b);
+    double a,b;
+    CONVERT_TO_DOUBLE(v, a);
+    CONVERT_TO_DOUBLE(w, b);
 #ifdef Py_NAN
-	if (b == 0.0) {
-		PyErr_SetString(PyExc_ZeroDivisionError,
-				"float division by zero");
-		return NULL;
-	}
+    if (b == 0.0) {
+        PyErr_SetString(PyExc_ZeroDivisionError,
+                        "float division by zero");
+        return NULL;
+    }
 #endif
-	PyFPE_START_PROTECT("divide", return 0)
-	a = a / b;
-	PyFPE_END_PROTECT(a)
-	return PyFloat_FromDouble(a);
+    PyFPE_START_PROTECT("divide", return 0)
+    a = a / b;
+    PyFPE_END_PROTECT(a)
+    return PyFloat_FromDouble(a);
 }
 
 static PyObject *
 float_classic_div(PyObject *v, PyObject *w)
 {
-	double a,b;
-	CONVERT_TO_DOUBLE(v, a);
-	CONVERT_TO_DOUBLE(w, b);
-	if (Py_DivisionWarningFlag >= 2 &&
-	    PyErr_Warn(PyExc_DeprecationWarning, "classic float division") < 0)
-		return NULL;
+    double a,b;
+    CONVERT_TO_DOUBLE(v, a);
+    CONVERT_TO_DOUBLE(w, b);
+    if (Py_DivisionWarningFlag >= 2 &&
+        PyErr_Warn(PyExc_DeprecationWarning, "classic float division") < 0)
+        return NULL;
 #ifdef Py_NAN
-	if (b == 0.0) {
-		PyErr_SetString(PyExc_ZeroDivisionError,
-				"float division by zero");
-		return NULL;
-	}
+    if (b == 0.0) {
+        PyErr_SetString(PyExc_ZeroDivisionError,
+                        "float division by zero");
+        return NULL;
+    }
 #endif
-	PyFPE_START_PROTECT("divide", return 0)
-	a = a / b;
-	PyFPE_END_PROTECT(a)
-	return PyFloat_FromDouble(a);
+    PyFPE_START_PROTECT("divide", return 0)
+    a = a / b;
+    PyFPE_END_PROTECT(a)
+    return PyFloat_FromDouble(a);
 }
 
 static PyObject *
 float_rem(PyObject *v, PyObject *w)
 {
-	double vx, wx;
-	double mod;
-	CONVERT_TO_DOUBLE(v, vx);
-	CONVERT_TO_DOUBLE(w, wx);
+    double vx, wx;
+    double mod;
+    CONVERT_TO_DOUBLE(v, vx);
+    CONVERT_TO_DOUBLE(w, wx);
 #ifdef Py_NAN
-	if (wx == 0.0) {
-		PyErr_SetString(PyExc_ZeroDivisionError,
-				"float modulo");
-		return NULL;
-	}
+    if (wx == 0.0) {
+        PyErr_SetString(PyExc_ZeroDivisionError,
+                        "float modulo");
+        return NULL;
+    }
 #endif
-	PyFPE_START_PROTECT("modulo", return 0)
-	mod = fmod(vx, wx);
-	/* note: checking mod*wx < 0 is incorrect -- underflows to
-	   0 if wx < sqrt(smallest nonzero double) */
-	if (mod && ((wx < 0) != (mod < 0))) {
-		mod += wx;
-	}
-	PyFPE_END_PROTECT(mod)
-	return PyFloat_FromDouble(mod);
+    PyFPE_START_PROTECT("modulo", return 0)
+    mod = fmod(vx, wx);
+    /* note: checking mod*wx < 0 is incorrect -- underflows to
+       0 if wx < sqrt(smallest nonzero double) */
+    if (mod && ((wx < 0) != (mod < 0))) {
+        mod += wx;
+    }
+    PyFPE_END_PROTECT(mod)
+    return PyFloat_FromDouble(mod);
 }
 
 static PyObject *
 float_divmod(PyObject *v, PyObject *w)
 {
-	double vx, wx;
-	double div, mod, floordiv;
- 	CONVERT_TO_DOUBLE(v, vx);
- 	CONVERT_TO_DOUBLE(w, wx);
-	if (wx == 0.0) {
-		PyErr_SetString(PyExc_ZeroDivisionError, "float divmod()");
-		return NULL;
-	}
-	PyFPE_START_PROTECT("divmod", return 0)
-	mod = fmod(vx, wx);
-	/* fmod is typically exact, so vx-mod is *mathematically* an
-	   exact multiple of wx.  But this is fp arithmetic, and fp
-	   vx - mod is an approximation; the result is that div may
-	   not be an exact integral value after the division, although
-	   it will always be very close to one.
-	*/
-	div = (vx - mod) / wx;
-	if (mod) {
-		/* ensure the remainder has the same sign as the denominator */
-		if ((wx < 0) != (mod < 0)) {
-			mod += wx;
-			div -= 1.0;
-		}
-	}
-	else {
-		/* the remainder is zero, and in the presence of signed zeroes
-		   fmod returns different results across platforms; ensure
-		   it has the same sign as the denominator; we'd like to do
-		   "mod = wx * 0.0", but that may get optimized away */
-		mod *= mod;  /* hide "mod = +0" from optimizer */
-		if (wx < 0.0)
-			mod = -mod;
-	}
-	/* snap quotient to nearest integral value */
-	if (div) {
-		floordiv = floor(div);
-		if (div - floordiv > 0.5)
-			floordiv += 1.0;
-	}
-	else {
-		/* div is zero - get the same sign as the true quotient */
-		div *= div;	/* hide "div = +0" from optimizers */
-		floordiv = div * vx / wx; /* zero w/ sign of vx/wx */
-	}
-	PyFPE_END_PROTECT(floordiv)
-	return Py_BuildValue("(dd)", floordiv, mod);
+    double vx, wx;
+    double div, mod, floordiv;
+    CONVERT_TO_DOUBLE(v, vx);
+    CONVERT_TO_DOUBLE(w, wx);
+    if (wx == 0.0) {
+        PyErr_SetString(PyExc_ZeroDivisionError, "float divmod()");
+        return NULL;
+    }
+    PyFPE_START_PROTECT("divmod", return 0)
+    mod = fmod(vx, wx);
+    /* fmod is typically exact, so vx-mod is *mathematically* an
+       exact multiple of wx.  But this is fp arithmetic, and fp
+       vx - mod is an approximation; the result is that div may
+       not be an exact integral value after the division, although
+       it will always be very close to one.
+    */
+    div = (vx - mod) / wx;
+    if (mod) {
+        /* ensure the remainder has the same sign as the denominator */
+        if ((wx < 0) != (mod < 0)) {
+            mod += wx;
+            div -= 1.0;
+        }
+    }
+    else {
+        /* the remainder is zero, and in the presence of signed zeroes
+           fmod returns different results across platforms; ensure
+           it has the same sign as the denominator; we'd like to do
+           "mod = wx * 0.0", but that may get optimized away */
+        mod *= mod;  /* hide "mod = +0" from optimizer */
+        if (wx < 0.0)
+            mod = -mod;
+    }
+    /* snap quotient to nearest integral value */
+    if (div) {
+        floordiv = floor(div);
+        if (div - floordiv > 0.5)
+            floordiv += 1.0;
+    }
+    else {
+        /* div is zero - get the same sign as the true quotient */
+        div *= div;             /* hide "div = +0" from optimizers */
+        floordiv = div * vx / wx; /* zero w/ sign of vx/wx */
+    }
+    PyFPE_END_PROTECT(floordiv)
+    return Py_BuildValue("(dd)", floordiv, mod);
 }
 
 static PyObject *
 float_floor_div(PyObject *v, PyObject *w)
 {
-	PyObject *t, *r;
+    PyObject *t, *r;
 
-	t = float_divmod(v, w);
-	if (t == NULL || t == Py_NotImplemented)
-		return t;
-	assert(PyTuple_CheckExact(t));
-	r = PyTuple_GET_ITEM(t, 0);
-	Py_INCREF(r);
-	Py_DECREF(t);
-	return r;
+    t = float_divmod(v, w);
+    if (t == NULL || t == Py_NotImplemented)
+        return t;
+    assert(PyTuple_CheckExact(t));
+    r = PyTuple_GET_ITEM(t, 0);
+    Py_INCREF(r);
+    Py_DECREF(t);
+    return r;
 }
 
 /* determine whether x is an odd integer or not;  assumes that
@@ -798,122 +798,122 @@
 static PyObject *
 float_pow(PyObject *v, PyObject *w, PyObject *z)
 {
-	double iv, iw, ix;
-	int negate_result = 0;
+    double iv, iw, ix;
+    int negate_result = 0;
 
-	if ((PyObject *)z != Py_None) {
-		PyErr_SetString(PyExc_TypeError, "pow() 3rd argument not "
-			"allowed unless all arguments are integers");
-		return NULL;
-	}
+    if ((PyObject *)z != Py_None) {
+        PyErr_SetString(PyExc_TypeError, "pow() 3rd argument not "
+            "allowed unless all arguments are integers");
+        return NULL;
+    }
 
-	CONVERT_TO_DOUBLE(v, iv);
-	CONVERT_TO_DOUBLE(w, iw);
+    CONVERT_TO_DOUBLE(v, iv);
+    CONVERT_TO_DOUBLE(w, iw);
 
-	/* Sort out special cases here instead of relying on pow() */
-	if (iw == 0) {		/* v**0 is 1, even 0**0 */
-		return PyFloat_FromDouble(1.0);
-	}
-	if (Py_IS_NAN(iv)) {	/* nan**w = nan, unless w == 0 */
-		return PyFloat_FromDouble(iv);
-	}
-	if (Py_IS_NAN(iw)) {	/* v**nan = nan, unless v == 1; 1**nan = 1 */
-		return PyFloat_FromDouble(iv == 1.0 ? 1.0 : iw);
-	}
-	if (Py_IS_INFINITY(iw)) {
-		/* v**inf is: 0.0 if abs(v) < 1; 1.0 if abs(v) == 1; inf if
-		 *     abs(v) > 1 (including case where v infinite)
-		 *
-		 * v**-inf is: inf if abs(v) < 1; 1.0 if abs(v) == 1; 0.0 if
-		 *     abs(v) > 1 (including case where v infinite)
-		 */
-		iv = fabs(iv);
-		if (iv == 1.0)
-			return PyFloat_FromDouble(1.0);
-		else if ((iw > 0.0) == (iv > 1.0))
-			return PyFloat_FromDouble(fabs(iw)); /* return inf */
-		else
-			return PyFloat_FromDouble(0.0);
-	}
-	if (Py_IS_INFINITY(iv)) {
-		/* (+-inf)**w is: inf for w positive, 0 for w negative; in
-		 *     both cases, we need to add the appropriate sign if w is
-		 *     an odd integer.
-		 */
-		int iw_is_odd = DOUBLE_IS_ODD_INTEGER(iw);
-		if (iw > 0.0)
-			return PyFloat_FromDouble(iw_is_odd ? iv : fabs(iv));
-		else
-			return PyFloat_FromDouble(iw_is_odd ?
-						  copysign(0.0, iv) : 0.0);
-	}
-	if (iv == 0.0) {  /* 0**w is: 0 for w positive, 1 for w zero
-			     (already dealt with above), and an error
-			     if w is negative. */
-		int iw_is_odd = DOUBLE_IS_ODD_INTEGER(iw);
-		if (iw < 0.0) {
-			PyErr_SetString(PyExc_ZeroDivisionError,
-					"0.0 cannot be raised to a "
-					"negative power");
-			return NULL;
-		}
-		/* use correct sign if iw is odd */
-		return PyFloat_FromDouble(iw_is_odd ? iv : 0.0);
-	}
+    /* Sort out special cases here instead of relying on pow() */
+    if (iw == 0) {              /* v**0 is 1, even 0**0 */
+        return PyFloat_FromDouble(1.0);
+    }
+    if (Py_IS_NAN(iv)) {        /* nan**w = nan, unless w == 0 */
+        return PyFloat_FromDouble(iv);
+    }
+    if (Py_IS_NAN(iw)) {        /* v**nan = nan, unless v == 1; 1**nan = 1 */
+        return PyFloat_FromDouble(iv == 1.0 ? 1.0 : iw);
+    }
+    if (Py_IS_INFINITY(iw)) {
+        /* v**inf is: 0.0 if abs(v) < 1; 1.0 if abs(v) == 1; inf if
+         *     abs(v) > 1 (including case where v infinite)
+         *
+         * v**-inf is: inf if abs(v) < 1; 1.0 if abs(v) == 1; 0.0 if
+         *     abs(v) > 1 (including case where v infinite)
+         */
+        iv = fabs(iv);
+        if (iv == 1.0)
+            return PyFloat_FromDouble(1.0);
+        else if ((iw > 0.0) == (iv > 1.0))
+            return PyFloat_FromDouble(fabs(iw)); /* return inf */
+        else
+            return PyFloat_FromDouble(0.0);
+    }
+    if (Py_IS_INFINITY(iv)) {
+        /* (+-inf)**w is: inf for w positive, 0 for w negative; in
+         *     both cases, we need to add the appropriate sign if w is
+         *     an odd integer.
+         */
+        int iw_is_odd = DOUBLE_IS_ODD_INTEGER(iw);
+        if (iw > 0.0)
+            return PyFloat_FromDouble(iw_is_odd ? iv : fabs(iv));
+        else
+            return PyFloat_FromDouble(iw_is_odd ?
+                                      copysign(0.0, iv) : 0.0);
+    }
+    if (iv == 0.0) {  /* 0**w is: 0 for w positive, 1 for w zero
+                         (already dealt with above), and an error
+                         if w is negative. */
+        int iw_is_odd = DOUBLE_IS_ODD_INTEGER(iw);
+        if (iw < 0.0) {
+            PyErr_SetString(PyExc_ZeroDivisionError,
+                            "0.0 cannot be raised to a "
+                            "negative power");
+            return NULL;
+        }
+        /* use correct sign if iw is odd */
+        return PyFloat_FromDouble(iw_is_odd ? iv : 0.0);
+    }
 
-	if (iv < 0.0) {
-		/* Whether this is an error is a mess, and bumps into libm
-		 * bugs so we have to figure it out ourselves.
-		 */
-		if (iw != floor(iw)) {
-			PyErr_SetString(PyExc_ValueError, "negative number "
-				"cannot be raised to a fractional power");
-			return NULL;
-		}
-		/* iw is an exact integer, albeit perhaps a very large
-		 * one.  Replace iv by its absolute value and remember
-		 * to negate the pow result if iw is odd.
-		 */
-		iv = -iv;
-		negate_result = DOUBLE_IS_ODD_INTEGER(iw);
-	}
+    if (iv < 0.0) {
+        /* Whether this is an error is a mess, and bumps into libm
+         * bugs so we have to figure it out ourselves.
+         */
+        if (iw != floor(iw)) {
+            PyErr_SetString(PyExc_ValueError, "negative number "
+                "cannot be raised to a fractional power");
+            return NULL;
+        }
+        /* iw is an exact integer, albeit perhaps a very large
+         * one.  Replace iv by its absolute value and remember
+         * to negate the pow result if iw is odd.
+         */
+        iv = -iv;
+        negate_result = DOUBLE_IS_ODD_INTEGER(iw);
+    }
 
-	if (iv == 1.0) { /* 1**w is 1, even 1**inf and 1**nan */
-		/* (-1) ** large_integer also ends up here.  Here's an
-		 * extract from the comments for the previous
-		 * implementation explaining why this special case is
-		 * necessary:
-		 *
-		 * -1 raised to an exact integer should never be exceptional.
-		 * Alas, some libms (chiefly glibc as of early 2003) return
-		 * NaN and set EDOM on pow(-1, large_int) if the int doesn't
-		 * happen to be representable in a *C* integer.  That's a
-		 * bug.
-		 */
-		return PyFloat_FromDouble(negate_result ? -1.0 : 1.0);
-	}
+    if (iv == 1.0) { /* 1**w is 1, even 1**inf and 1**nan */
+        /* (-1) ** large_integer also ends up here.  Here's an
+         * extract from the comments for the previous
+         * implementation explaining why this special case is
+         * necessary:
+         *
+         * -1 raised to an exact integer should never be exceptional.
+         * Alas, some libms (chiefly glibc as of early 2003) return
+         * NaN and set EDOM on pow(-1, large_int) if the int doesn't
+         * happen to be representable in a *C* integer.  That's a
+         * bug.
+         */
+        return PyFloat_FromDouble(negate_result ? -1.0 : 1.0);
+    }
 
-	/* Now iv and iw are finite, iw is nonzero, and iv is
-	 * positive and not equal to 1.0.  We finally allow
-	 * the platform pow to step in and do the rest.
-	 */
-	errno = 0;
-	PyFPE_START_PROTECT("pow", return NULL)
-	ix = pow(iv, iw);
-	PyFPE_END_PROTECT(ix)
-	Py_ADJUST_ERANGE1(ix);
-	if (negate_result)
-		ix = -ix;
+    /* Now iv and iw are finite, iw is nonzero, and iv is
+     * positive and not equal to 1.0.  We finally allow
+     * the platform pow to step in and do the rest.
+     */
+    errno = 0;
+    PyFPE_START_PROTECT("pow", return NULL)
+    ix = pow(iv, iw);
+    PyFPE_END_PROTECT(ix)
+    Py_ADJUST_ERANGE1(ix);
+    if (negate_result)
+        ix = -ix;
 
-	if (errno != 0) {
-		/* We don't expect any errno value other than ERANGE, but
-		 * the range of libm bugs appears unbounded.
-		 */
-		PyErr_SetFromErrno(errno == ERANGE ? PyExc_OverflowError :
-						     PyExc_ValueError);
-		return NULL;
-	}
-	return PyFloat_FromDouble(ix);
+    if (errno != 0) {
+        /* We don't expect any errno value other than ERANGE, but
+         * the range of libm bugs appears unbounded.
+         */
+        PyErr_SetFromErrno(errno == ERANGE ? PyExc_OverflowError :
+                             PyExc_ValueError);
+        return NULL;
+    }
+    return PyFloat_FromDouble(ix);
 }
 
 #undef DOUBLE_IS_ODD_INTEGER
@@ -921,129 +921,129 @@
 static PyObject *
 float_neg(PyFloatObject *v)
 {
-	return PyFloat_FromDouble(-v->ob_fval);
+    return PyFloat_FromDouble(-v->ob_fval);
 }
 
 static PyObject *
 float_abs(PyFloatObject *v)
 {
-	return PyFloat_FromDouble(fabs(v->ob_fval));
+    return PyFloat_FromDouble(fabs(v->ob_fval));
 }
 
 static int
 float_nonzero(PyFloatObject *v)
 {
-	return v->ob_fval != 0.0;
+    return v->ob_fval != 0.0;
 }
 
 static int
 float_coerce(PyObject **pv, PyObject **pw)
 {
-	if (PyInt_Check(*pw)) {
-		long x = PyInt_AsLong(*pw);
-		*pw = PyFloat_FromDouble((double)x);
-		Py_INCREF(*pv);
-		return 0;
-	}
-	else if (PyLong_Check(*pw)) {
-		double x = PyLong_AsDouble(*pw);
-		if (x == -1.0 && PyErr_Occurred())
-			return -1;
-		*pw = PyFloat_FromDouble(x);
-		Py_INCREF(*pv);
-		return 0;
-	}
-	else if (PyFloat_Check(*pw)) {
-		Py_INCREF(*pv);
-		Py_INCREF(*pw);
-		return 0;
-	}
-	return 1; /* Can't do it */
+    if (PyInt_Check(*pw)) {
+        long x = PyInt_AsLong(*pw);
+        *pw = PyFloat_FromDouble((double)x);
+        Py_INCREF(*pv);
+        return 0;
+    }
+    else if (PyLong_Check(*pw)) {
+        double x = PyLong_AsDouble(*pw);
+        if (x == -1.0 && PyErr_Occurred())
+            return -1;
+        *pw = PyFloat_FromDouble(x);
+        Py_INCREF(*pv);
+        return 0;
+    }
+    else if (PyFloat_Check(*pw)) {
+        Py_INCREF(*pv);
+        Py_INCREF(*pw);
+        return 0;
+    }
+    return 1; /* Can't do it */
 }
 
 static PyObject *
 float_is_integer(PyObject *v)
 {
-	double x = PyFloat_AsDouble(v);
-	PyObject *o;
-	
-	if (x == -1.0 && PyErr_Occurred())
-		return NULL;
-	if (!Py_IS_FINITE(x))
-		Py_RETURN_FALSE;
-	errno = 0;
-	PyFPE_START_PROTECT("is_integer", return NULL)
-	o = (floor(x) == x) ? Py_True : Py_False;
-	PyFPE_END_PROTECT(x)
-	if (errno != 0) {
-		PyErr_SetFromErrno(errno == ERANGE ? PyExc_OverflowError :
-						     PyExc_ValueError);
-		return NULL;
-	}
-	Py_INCREF(o);
-	return o;
+    double x = PyFloat_AsDouble(v);
+    PyObject *o;
+
+    if (x == -1.0 && PyErr_Occurred())
+        return NULL;
+    if (!Py_IS_FINITE(x))
+        Py_RETURN_FALSE;
+    errno = 0;
+    PyFPE_START_PROTECT("is_integer", return NULL)
+    o = (floor(x) == x) ? Py_True : Py_False;
+    PyFPE_END_PROTECT(x)
+    if (errno != 0) {
+        PyErr_SetFromErrno(errno == ERANGE ? PyExc_OverflowError :
+                             PyExc_ValueError);
+        return NULL;
+    }
+    Py_INCREF(o);
+    return o;
 }
 
 #if 0
 static PyObject *
 float_is_inf(PyObject *v)
 {
-	double x = PyFloat_AsDouble(v);
-	if (x == -1.0 && PyErr_Occurred())
-		return NULL;
-	return PyBool_FromLong((long)Py_IS_INFINITY(x));
+    double x = PyFloat_AsDouble(v);
+    if (x == -1.0 && PyErr_Occurred())
+        return NULL;
+    return PyBool_FromLong((long)Py_IS_INFINITY(x));
 }
 
 static PyObject *
 float_is_nan(PyObject *v)
 {
-	double x = PyFloat_AsDouble(v);
-	if (x == -1.0 && PyErr_Occurred())
-		return NULL;
-	return PyBool_FromLong((long)Py_IS_NAN(x));
+    double x = PyFloat_AsDouble(v);
+    if (x == -1.0 && PyErr_Occurred())
+        return NULL;
+    return PyBool_FromLong((long)Py_IS_NAN(x));
 }
 
 static PyObject *
 float_is_finite(PyObject *v)
 {
-	double x = PyFloat_AsDouble(v);
-	if (x == -1.0 && PyErr_Occurred())
-		return NULL;
-	return PyBool_FromLong((long)Py_IS_FINITE(x));
+    double x = PyFloat_AsDouble(v);
+    if (x == -1.0 && PyErr_Occurred())
+        return NULL;
+    return PyBool_FromLong((long)Py_IS_FINITE(x));
 }
 #endif
 
 static PyObject *
 float_trunc(PyObject *v)
 {
-	double x = PyFloat_AsDouble(v);
-	double wholepart;	/* integral portion of x, rounded toward 0 */
+    double x = PyFloat_AsDouble(v);
+    double wholepart;           /* integral portion of x, rounded toward 0 */
 
-	(void)modf(x, &wholepart);
-	/* Try to get out cheap if this fits in a Python int.  The attempt
-	 * to cast to long must be protected, as C doesn't define what
-	 * happens if the double is too big to fit in a long.  Some rare
-	 * systems raise an exception then (RISCOS was mentioned as one,
-	 * and someone using a non-default option on Sun also bumped into
-	 * that).  Note that checking for >= and <= LONG_{MIN,MAX} would
-	 * still be vulnerable:  if a long has more bits of precision than
-	 * a double, casting MIN/MAX to double may yield an approximation,
-	 * and if that's rounded up, then, e.g., wholepart=LONG_MAX+1 would
-	 * yield true from the C expression wholepart<=LONG_MAX, despite
-	 * that wholepart is actually greater than LONG_MAX.
-	 */
-	if (LONG_MIN < wholepart && wholepart < LONG_MAX) {
-		const long aslong = (long)wholepart;
-		return PyInt_FromLong(aslong);
-	}
-	return PyLong_FromDouble(wholepart);
+    (void)modf(x, &wholepart);
+    /* Try to get out cheap if this fits in a Python int.  The attempt
+     * to cast to long must be protected, as C doesn't define what
+     * happens if the double is too big to fit in a long.  Some rare
+     * systems raise an exception then (RISCOS was mentioned as one,
+     * and someone using a non-default option on Sun also bumped into
+     * that).  Note that checking for >= and <= LONG_{MIN,MAX} would
+     * still be vulnerable:  if a long has more bits of precision than
+     * a double, casting MIN/MAX to double may yield an approximation,
+     * and if that's rounded up, then, e.g., wholepart=LONG_MAX+1 would
+     * yield true from the C expression wholepart<=LONG_MAX, despite
+     * that wholepart is actually greater than LONG_MAX.
+     */
+    if (LONG_MIN < wholepart && wholepart < LONG_MAX) {
+        const long aslong = (long)wholepart;
+        return PyInt_FromLong(aslong);
+    }
+    return PyLong_FromDouble(wholepart);
 }
 
 static PyObject *
 float_long(PyObject *v)
 {
-	double x = PyFloat_AsDouble(v);
-	return PyLong_FromDouble(x);
+    double x = PyFloat_AsDouble(v);
+    return PyLong_FromDouble(x);
 }
 
 /* _Py_double_round: rounds a finite nonzero double to the closest multiple of
@@ -1068,124 +1068,124 @@
 PyObject *
 _Py_double_round(double x, int ndigits) {
 
-	double rounded, m;
-	Py_ssize_t buflen, mybuflen=100;
-	char *buf, *buf_end, shortbuf[100], *mybuf=shortbuf;
-	int decpt, sign, val, halfway_case;
-	PyObject *result = NULL;
+    double rounded, m;
+    Py_ssize_t buflen, mybuflen=100;
+    char *buf, *buf_end, shortbuf[100], *mybuf=shortbuf;
+    int decpt, sign, val, halfway_case;
+    PyObject *result = NULL;
 
-	/* The basic idea is very simple: convert and round the double to a
-	   decimal string using _Py_dg_dtoa, then convert that decimal string
-	   back to a double with _Py_dg_strtod.  There's one minor difficulty:
-	   Python 2.x expects round to do round-half-away-from-zero, while
-	   _Py_dg_dtoa does round-half-to-even.  So we need some way to detect
-	   and correct the halfway cases.
+    /* The basic idea is very simple: convert and round the double to a
+       decimal string using _Py_dg_dtoa, then convert that decimal string
+       back to a double with _Py_dg_strtod.  There's one minor difficulty:
+       Python 2.x expects round to do round-half-away-from-zero, while
+       _Py_dg_dtoa does round-half-to-even.  So we need some way to detect
+       and correct the halfway cases.
 
-	   Detection: a halfway value has the form k * 0.5 * 10**-ndigits for
-	   some odd integer k.  Or in other words, a rational number x is
-	   exactly halfway between two multiples of 10**-ndigits if its
-	   2-valuation is exactly -ndigits-1 and its 5-valuation is at least
-	   -ndigits.  For ndigits >= 0 the latter condition is automatically
-	   satisfied for a binary float x, since any such float has
-	   nonnegative 5-valuation.  For 0 > ndigits >= -22, x needs to be an
-	   integral multiple of 5**-ndigits; we can check this using fmod.
-	   For -22 > ndigits, there are no halfway cases: 5**23 takes 54 bits
-	   to represent exactly, so any odd multiple of 0.5 * 10**n for n >=
-	   23 takes at least 54 bits of precision to represent exactly.
+       Detection: a halfway value has the form k * 0.5 * 10**-ndigits for
+       some odd integer k.  Or in other words, a rational number x is
+       exactly halfway between two multiples of 10**-ndigits if its
+       2-valuation is exactly -ndigits-1 and its 5-valuation is at least
+       -ndigits.  For ndigits >= 0 the latter condition is automatically
+       satisfied for a binary float x, since any such float has
+       nonnegative 5-valuation.  For 0 > ndigits >= -22, x needs to be an
+       integral multiple of 5**-ndigits; we can check this using fmod.
+       For -22 > ndigits, there are no halfway cases: 5**23 takes 54 bits
+       to represent exactly, so any odd multiple of 0.5 * 10**n for n >=
+       23 takes at least 54 bits of precision to represent exactly.
 
-	   Correction: a simple strategy for dealing with halfway cases is to
-	   (for the halfway cases only) call _Py_dg_dtoa with an argument of
-	   ndigits+1 instead of ndigits (thus doing an exact conversion to
-	   decimal), round the resulting string manually, and then convert
-	   back using _Py_dg_strtod.
-	*/
+       Correction: a simple strategy for dealing with halfway cases is to
+       (for the halfway cases only) call _Py_dg_dtoa with an argument of
+       ndigits+1 instead of ndigits (thus doing an exact conversion to
+       decimal), round the resulting string manually, and then convert
+       back using _Py_dg_strtod.
+    */
 
-	/* nans, infinities and zeros should have already been dealt
-	   with by the caller (in this case, builtin_round) */
-	assert(Py_IS_FINITE(x) && x != 0.0);
+    /* nans, infinities and zeros should have already been dealt
+       with by the caller (in this case, builtin_round) */
+    assert(Py_IS_FINITE(x) && x != 0.0);
 
-	/* find 2-valuation val of x */
-	m = frexp(x, &val);
-	while (m != floor(m)) {
-		m *= 2.0;
-		val--;
-	}
+    /* find 2-valuation val of x */
+    m = frexp(x, &val);
+    while (m != floor(m)) {
+        m *= 2.0;
+        val--;
+    }
 
-	/* determine whether this is a halfway case */
-	if (val == -ndigits-1) {
-		if (ndigits >= 0)
-			halfway_case = 1;
-		else if (ndigits >= -FIVE_POW_LIMIT) {
-			double five_pow = 1.0;
-			int i;
-			for (i=0; i < -ndigits; i++)
-				five_pow *= 5.0;
-			halfway_case = fmod(x, five_pow) == 0.0;
-		}
-		else
-			halfway_case = 0;
-	}
-	else
-		halfway_case = 0;
+    /* determine whether this is a halfway case */
+    if (val == -ndigits-1) {
+        if (ndigits >= 0)
+            halfway_case = 1;
+        else if (ndigits >= -FIVE_POW_LIMIT) {
+            double five_pow = 1.0;
+            int i;
+            for (i=0; i < -ndigits; i++)
+                five_pow *= 5.0;
+            halfway_case = fmod(x, five_pow) == 0.0;
+        }
+        else
+            halfway_case = 0;
+    }
+    else
+        halfway_case = 0;
 
-	/* round to a decimal string; use an extra place for halfway case */
-	buf = _Py_dg_dtoa(x, 3, ndigits+halfway_case, &decpt, &sign, &buf_end);
-	if (buf == NULL) {
-		PyErr_NoMemory();
-		return NULL;
-	}
-	buflen = buf_end - buf;
+    /* round to a decimal string; use an extra place for halfway case */
+    buf = _Py_dg_dtoa(x, 3, ndigits+halfway_case, &decpt, &sign, &buf_end);
+    if (buf == NULL) {
+        PyErr_NoMemory();
+        return NULL;
+    }
+    buflen = buf_end - buf;
 
-	/* in halfway case, do the round-half-away-from-zero manually */
-	if (halfway_case) {
-		int i, carry;
-		/* sanity check: _Py_dg_dtoa should not have stripped
-		   any zeros from the result: there should be exactly
-		   ndigits+1 places following the decimal point, and
-		   the last digit in the buffer should be a '5'.*/
-		assert(buflen - decpt == ndigits+1);
-		assert(buf[buflen-1] == '5');
+    /* in halfway case, do the round-half-away-from-zero manually */
+    if (halfway_case) {
+        int i, carry;
+        /* sanity check: _Py_dg_dtoa should not have stripped
+           any zeros from the result: there should be exactly
+           ndigits+1 places following the decimal point, and
+           the last digit in the buffer should be a '5'.*/
+        assert(buflen - decpt == ndigits+1);
+        assert(buf[buflen-1] == '5');
 
-		/* increment and shift right at the same time. */
-		decpt += 1;
-		carry = 1;
-		for (i=buflen-1; i-- > 0;) {
-			carry += buf[i] - '0';
-			buf[i+1] = carry % 10 + '0';
-			carry /= 10;
-		}
-		buf[0] = carry + '0';
-	}
+        /* increment and shift right at the same time. */
+        decpt += 1;
+        carry = 1;
+        for (i=buflen-1; i-- > 0;) {
+            carry += buf[i] - '0';
+            buf[i+1] = carry % 10 + '0';
+            carry /= 10;
+        }
+        buf[0] = carry + '0';
+    }
 
-	/* Get new buffer if shortbuf is too small.  Space needed <= buf_end -
-	   buf + 8: (1 extra for '0', 1 for sign, 5 for exp, 1 for '\0'). */
-	if (buflen + 8 > mybuflen) {
-		mybuflen = buflen+8;
-		mybuf = (char *)PyMem_Malloc(mybuflen);
-		if (mybuf == NULL) {
-			PyErr_NoMemory();
-			goto exit;
-		}
-	}
-	/* copy buf to mybuf, adding exponent, sign and leading 0 */
-	PyOS_snprintf(mybuf, mybuflen, "%s0%se%d", (sign ? "-" : ""),
-		      buf, decpt - (int)buflen);
+    /* Get new buffer if shortbuf is too small.  Space needed <= buf_end -
+       buf + 8: (1 extra for '0', 1 for sign, 5 for exp, 1 for '\0'). */
+    if (buflen + 8 > mybuflen) {
+        mybuflen = buflen+8;
+        mybuf = (char *)PyMem_Malloc(mybuflen);
+        if (mybuf == NULL) {
+            PyErr_NoMemory();
+            goto exit;
+        }
+    }
+    /* copy buf to mybuf, adding exponent, sign and leading 0 */
+    PyOS_snprintf(mybuf, mybuflen, "%s0%se%d", (sign ? "-" : ""),
+                  buf, decpt - (int)buflen);
 
-	/* and convert the resulting string back to a double */
-	errno = 0;
-	rounded = _Py_dg_strtod(mybuf, NULL);
-	if (errno == ERANGE && fabs(rounded) >= 1.)
-		PyErr_SetString(PyExc_OverflowError,
-				"rounded value too large to represent");
-	else
-		result = PyFloat_FromDouble(rounded);
+    /* and convert the resulting string back to a double */
+    errno = 0;
+    rounded = _Py_dg_strtod(mybuf, NULL);
+    if (errno == ERANGE && fabs(rounded) >= 1.)
+        PyErr_SetString(PyExc_OverflowError,
+                        "rounded value too large to represent");
+    else
+        result = PyFloat_FromDouble(rounded);
 
-	/* done computing value;  now clean up */
-	if (mybuf != shortbuf)
-		PyMem_Free(mybuf);
+    /* done computing value;  now clean up */
+    if (mybuf != shortbuf)
+        PyMem_Free(mybuf);
   exit:
-	_Py_dg_freedtoa(buf);
-	return result;
+    _Py_dg_freedtoa(buf);
+    return result;
 }
 
 #undef FIVE_POW_LIMIT
@@ -1197,47 +1197,47 @@
 
 PyObject *
 _Py_double_round(double x, int ndigits) {
-	double pow1, pow2, y, z;
-	if (ndigits >= 0) {
-		if (ndigits > 22) {
-			/* pow1 and pow2 are each safe from overflow, but
-			   pow1*pow2 ~= pow(10.0, ndigits) might overflow */
-			pow1 = pow(10.0, (double)(ndigits-22));
-			pow2 = 1e22;
-		}
-		else {
-			pow1 = pow(10.0, (double)ndigits);
-			pow2 = 1.0;
-		}
-		y = (x*pow1)*pow2;
-		/* if y overflows, then rounded value is exactly x */
-		if (!Py_IS_FINITE(y))
-			return PyFloat_FromDouble(x);
-	}
-	else {
-		pow1 = pow(10.0, (double)-ndigits);
-		pow2 = 1.0; /* unused; silences a gcc compiler warning */
-		y = x / pow1;
-	}
+    double pow1, pow2, y, z;
+    if (ndigits >= 0) {
+        if (ndigits > 22) {
+            /* pow1 and pow2 are each safe from overflow, but
+               pow1*pow2 ~= pow(10.0, ndigits) might overflow */
+            pow1 = pow(10.0, (double)(ndigits-22));
+            pow2 = 1e22;
+        }
+        else {
+            pow1 = pow(10.0, (double)ndigits);
+            pow2 = 1.0;
+        }
+        y = (x*pow1)*pow2;
+        /* if y overflows, then rounded value is exactly x */
+        if (!Py_IS_FINITE(y))
+            return PyFloat_FromDouble(x);
+    }
+    else {
+        pow1 = pow(10.0, (double)-ndigits);
+        pow2 = 1.0; /* unused; silences a gcc compiler warning */
+        y = x / pow1;
+    }
 
-	z = round(y);
-	if (fabs(y-z) == 0.5)
-		/* halfway between two integers; use round-away-from-zero */
-		z = y + copysign(0.5, y);
+    z = round(y);
+    if (fabs(y-z) == 0.5)
+        /* halfway between two integers; use round-away-from-zero */
+        z = y + copysign(0.5, y);
 
-	if (ndigits >= 0)
-		z = (z / pow2) / pow1;
-	else
-		z *= pow1;
+    if (ndigits >= 0)
+        z = (z / pow2) / pow1;
+    else
+        z *= pow1;
 
-	/* if computation resulted in overflow, raise OverflowError */
-	if (!Py_IS_FINITE(z)) {
-		PyErr_SetString(PyExc_OverflowError,
-				"overflow occurred during round");
-		return NULL;
-	}
+    /* if computation resulted in overflow, raise OverflowError */
+    if (!Py_IS_FINITE(z)) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "overflow occurred during round");
+        return NULL;
+    }
 
-	return PyFloat_FromDouble(z);
+    return PyFloat_FromDouble(z);
 }
 
 #endif /* PY_NO_SHORT_FLOAT_REPR */
@@ -1245,11 +1245,11 @@
 static PyObject *
 float_float(PyObject *v)
 {
-	if (PyFloat_CheckExact(v))
-		Py_INCREF(v);
-	else
-		v = PyFloat_FromDouble(((PyFloatObject *)v)->ob_fval);
-	return v;
+    if (PyFloat_CheckExact(v))
+        Py_INCREF(v);
+    else
+        v = PyFloat_FromDouble(((PyFloatObject *)v)->ob_fval);
+    return v;
 }
 
 /* turn ASCII hex characters into integer values and vice versa */
@@ -1257,73 +1257,73 @@
 static char
 char_from_hex(int x)
 {
-	assert(0 <= x && x < 16);
-	return "0123456789abcdef"[x];
+    assert(0 <= x && x < 16);
+    return "0123456789abcdef"[x];
 }
 
 static int
 hex_from_char(char c) {
-	int x;
-	switch(c) {
-	case '0':
-		x = 0;
-		break;
-	case '1':
-		x = 1;
-		break;
-	case '2':
-		x = 2;
-		break;
-	case '3':
-		x = 3;
-		break;
-	case '4':
-		x = 4;
-		break;
-	case '5':
-		x = 5;
-		break;
-	case '6':
-		x = 6;
-		break;
-	case '7':
-		x = 7;
-		break;
-	case '8':
-		x = 8;
-		break;
-	case '9':
-		x = 9;
-		break;
-	case 'a':
-	case 'A':
-		x = 10;
-		break;
-	case 'b':
-	case 'B':
-		x = 11;
-		break;
-	case 'c':
-	case 'C':
-		x = 12;
-		break;
-	case 'd':
-	case 'D':
-		x = 13;
-		break;
-	case 'e':
-	case 'E':
-		x = 14;
-		break;
-	case 'f':
-	case 'F':
-		x = 15;
-		break;
-	default:
-		x = -1;
-		break;
-	}
-	return x;
+    int x;
+    switch(c) {
+    case '0':
+        x = 0;
+        break;
+    case '1':
+        x = 1;
+        break;
+    case '2':
+        x = 2;
+        break;
+    case '3':
+        x = 3;
+        break;
+    case '4':
+        x = 4;
+        break;
+    case '5':
+        x = 5;
+        break;
+    case '6':
+        x = 6;
+        break;
+    case '7':
+        x = 7;
+        break;
+    case '8':
+        x = 8;
+        break;
+    case '9':
+        x = 9;
+        break;
+    case 'a':
+    case 'A':
+        x = 10;
+        break;
+    case 'b':
+    case 'B':
+        x = 11;
+        break;
+    case 'c':
+    case 'C':
+        x = 12;
+        break;
+    case 'd':
+    case 'D':
+        x = 13;
+        break;
+    case 'e':
+    case 'E':
+        x = 14;
+        break;
+    case 'f':
+    case 'F':
+        x = 15;
+        break;
+    default:
+        x = -1;
+        break;
+    }
+    return x;
 }
 
 /* convert a float to a hexadecimal string */
@@ -1335,54 +1335,54 @@
 static PyObject *
 float_hex(PyObject *v)
 {
-	double x, m;
-	int e, shift, i, si, esign;
-	/* Space for 1+(TOHEX_NBITS-1)/4 digits, a decimal point, and the
-	   trailing NUL byte. */
-	char s[(TOHEX_NBITS-1)/4+3];
+    double x, m;
+    int e, shift, i, si, esign;
+    /* Space for 1+(TOHEX_NBITS-1)/4 digits, a decimal point, and the
+       trailing NUL byte. */
+    char s[(TOHEX_NBITS-1)/4+3];
 
-	CONVERT_TO_DOUBLE(v, x);
+    CONVERT_TO_DOUBLE(v, x);
 
-	if (Py_IS_NAN(x) || Py_IS_INFINITY(x))
-		return float_str((PyFloatObject *)v);
+    if (Py_IS_NAN(x) || Py_IS_INFINITY(x))
+        return float_str((PyFloatObject *)v);
 
-	if (x == 0.0) {
-		if(copysign(1.0, x) == -1.0)
-			return PyString_FromString("-0x0.0p+0");
-		else
-			return PyString_FromString("0x0.0p+0");
-	}
+    if (x == 0.0) {
+        if(copysign(1.0, x) == -1.0)
+            return PyString_FromString("-0x0.0p+0");
+        else
+            return PyString_FromString("0x0.0p+0");
+    }
 
-	m = frexp(fabs(x), &e);
-	shift = 1 - MAX(DBL_MIN_EXP - e, 0);
-	m = ldexp(m, shift);
-	e -= shift;
+    m = frexp(fabs(x), &e);
+    shift = 1 - MAX(DBL_MIN_EXP - e, 0);
+    m = ldexp(m, shift);
+    e -= shift;
 
-	si = 0;
-	s[si] = char_from_hex((int)m);
-	si++;
-	m -= (int)m;
-	s[si] = '.';
-	si++;
-	for (i=0; i < (TOHEX_NBITS-1)/4; i++) {
-		m *= 16.0;
-		s[si] = char_from_hex((int)m);
-		si++;
-		m -= (int)m;
-	}
-	s[si] = '\0';
+    si = 0;
+    s[si] = char_from_hex((int)m);
+    si++;
+    m -= (int)m;
+    s[si] = '.';
+    si++;
+    for (i=0; i < (TOHEX_NBITS-1)/4; i++) {
+        m *= 16.0;
+        s[si] = char_from_hex((int)m);
+        si++;
+        m -= (int)m;
+    }
+    s[si] = '\0';
 
-	if (e < 0) {
-		esign = (int)'-';
-		e = -e;
-	}
-	else
-		esign = (int)'+';
+    if (e < 0) {
+        esign = (int)'-';
+        e = -e;
+    }
+    else
+        esign = (int)'+';
 
-	if (x < 0.0)
-		return PyString_FromFormat("-0x%sp%c%d", s, esign, e);
-	else
-		return PyString_FromFormat("0x%sp%c%d", s, esign, e);
+    if (x < 0.0)
+        return PyString_FromFormat("-0x%sp%c%d", s, esign, e);
+    else
+        return PyString_FromFormat("0x%sp%c%d", s, esign, e);
 }
 
 PyDoc_STRVAR(float_hex_doc,
@@ -1401,11 +1401,11 @@
 static int
 case_insensitive_match(const char *s, const char *t)
 {
-	while(*t && Py_TOLOWER(*s) == *t) {
-		s++;
-		t++;
-	}
-	return *t ? 0 : 1;
+    while(*t && Py_TOLOWER(*s) == *t) {
+        s++;
+        t++;
+    }
+    return *t ? 0 : 1;
 }
 
 /* Convert a hexadecimal string to a float. */
@@ -1413,250 +1413,250 @@
 static PyObject *
 float_fromhex(PyObject *cls, PyObject *arg)
 {
-	PyObject *result_as_float, *result;
-	double x;
-	long exp, top_exp, lsb, key_digit;
-	char *s, *coeff_start, *s_store, *coeff_end, *exp_start, *s_end;
-	int half_eps, digit, round_up, sign=1;
-	Py_ssize_t length, ndigits, fdigits, i;
+    PyObject *result_as_float, *result;
+    double x;
+    long exp, top_exp, lsb, key_digit;
+    char *s, *coeff_start, *s_store, *coeff_end, *exp_start, *s_end;
+    int half_eps, digit, round_up, sign=1;
+    Py_ssize_t length, ndigits, fdigits, i;
 
-	/*
-	 * For the sake of simplicity and correctness, we impose an artificial
-	 * limit on ndigits, the total number of hex digits in the coefficient
-	 * The limit is chosen to ensure that, writing exp for the exponent,
-	 *
-	 *   (1) if exp > LONG_MAX/2 then the value of the hex string is
-	 *   guaranteed to overflow (provided it's nonzero)
-	 *
-	 *   (2) if exp < LONG_MIN/2 then the value of the hex string is
-	 *   guaranteed to underflow to 0.
-	 *
-	 *   (3) if LONG_MIN/2 <= exp <= LONG_MAX/2 then there's no danger of
-	 *   overflow in the calculation of exp and top_exp below.
-	 *
-	 * More specifically, ndigits is assumed to satisfy the following
-	 * inequalities:
-	 *
-	 *   4*ndigits <= DBL_MIN_EXP - DBL_MANT_DIG - LONG_MIN/2
-	 *   4*ndigits <= LONG_MAX/2 + 1 - DBL_MAX_EXP
-	 *
-	 * If either of these inequalities is not satisfied, a ValueError is
-	 * raised.  Otherwise, write x for the value of the hex string, and
-	 * assume x is nonzero.  Then
-	 *
-	 *   2**(exp-4*ndigits) <= |x| < 2**(exp+4*ndigits).
-	 *
-	 * Now if exp > LONG_MAX/2 then:
-	 *
-	 *   exp - 4*ndigits >= LONG_MAX/2 + 1 - (LONG_MAX/2 + 1 - DBL_MAX_EXP)
-	 *                    = DBL_MAX_EXP
-	 *
-	 * so |x| >= 2**DBL_MAX_EXP, which is too large to be stored in C
-	 * double, so overflows.  If exp < LONG_MIN/2, then
-	 *
-	 *   exp + 4*ndigits <= LONG_MIN/2 - 1 + (
-	 *                      DBL_MIN_EXP - DBL_MANT_DIG - LONG_MIN/2)
-	 *                    = DBL_MIN_EXP - DBL_MANT_DIG - 1
-	 *
-	 * and so |x| < 2**(DBL_MIN_EXP-DBL_MANT_DIG-1), hence underflows to 0
-	 * when converted to a C double.
-	 *
-	 * It's easy to show that if LONG_MIN/2 <= exp <= LONG_MAX/2 then both
-	 * exp+4*ndigits and exp-4*ndigits are within the range of a long.
-	 */
+    /*
+     * For the sake of simplicity and correctness, we impose an artificial
+     * limit on ndigits, the total number of hex digits in the coefficient
+     * The limit is chosen to ensure that, writing exp for the exponent,
+     *
+     *   (1) if exp > LONG_MAX/2 then the value of the hex string is
+     *   guaranteed to overflow (provided it's nonzero)
+     *
+     *   (2) if exp < LONG_MIN/2 then the value of the hex string is
+     *   guaranteed to underflow to 0.
+     *
+     *   (3) if LONG_MIN/2 <= exp <= LONG_MAX/2 then there's no danger of
+     *   overflow in the calculation of exp and top_exp below.
+     *
+     * More specifically, ndigits is assumed to satisfy the following
+     * inequalities:
+     *
+     *   4*ndigits <= DBL_MIN_EXP - DBL_MANT_DIG - LONG_MIN/2
+     *   4*ndigits <= LONG_MAX/2 + 1 - DBL_MAX_EXP
+     *
+     * If either of these inequalities is not satisfied, a ValueError is
+     * raised.  Otherwise, write x for the value of the hex string, and
+     * assume x is nonzero.  Then
+     *
+     *   2**(exp-4*ndigits) <= |x| < 2**(exp+4*ndigits).
+     *
+     * Now if exp > LONG_MAX/2 then:
+     *
+     *   exp - 4*ndigits >= LONG_MAX/2 + 1 - (LONG_MAX/2 + 1 - DBL_MAX_EXP)
+     *                    = DBL_MAX_EXP
+     *
+     * so |x| >= 2**DBL_MAX_EXP, which is too large to be stored in C
+     * double, so overflows.  If exp < LONG_MIN/2, then
+     *
+     *   exp + 4*ndigits <= LONG_MIN/2 - 1 + (
+     *                      DBL_MIN_EXP - DBL_MANT_DIG - LONG_MIN/2)
+     *                    = DBL_MIN_EXP - DBL_MANT_DIG - 1
+     *
+     * and so |x| < 2**(DBL_MIN_EXP-DBL_MANT_DIG-1), hence underflows to 0
+     * when converted to a C double.
+     *
+     * It's easy to show that if LONG_MIN/2 <= exp <= LONG_MAX/2 then both
+     * exp+4*ndigits and exp-4*ndigits are within the range of a long.
+     */
 
-	if (PyString_AsStringAndSize(arg, &s, &length))
-		return NULL;
-	s_end = s + length;
+    if (PyString_AsStringAndSize(arg, &s, &length))
+        return NULL;
+    s_end = s + length;
 
-	/********************
-	 * Parse the string *
-	 ********************/
+    /********************
+     * Parse the string *
+     ********************/
 
-	/* leading whitespace and optional sign */
-	while (Py_ISSPACE(*s))
-		s++;
-	if (*s == '-') {
-		s++;
-		sign = -1;
-	}
-	else if (*s == '+')
-		s++;
+    /* leading whitespace and optional sign */
+    while (Py_ISSPACE(*s))
+        s++;
+    if (*s == '-') {
+        s++;
+        sign = -1;
+    }
+    else if (*s == '+')
+        s++;
 
-	/* infinities and nans */
-	if (*s == 'i' || *s == 'I') {
-		if (!case_insensitive_match(s+1, "nf"))
-			goto parse_error;
-		s += 3;
-		x = Py_HUGE_VAL;
-		if (case_insensitive_match(s, "inity"))
-			s += 5;
-		goto finished;
-	}
-	if (*s == 'n' || *s == 'N') {
-		if (!case_insensitive_match(s+1, "an"))
-			goto parse_error;
-		s += 3;
-		x = Py_NAN;
-		goto finished;
-	}
+    /* infinities and nans */
+    if (*s == 'i' || *s == 'I') {
+        if (!case_insensitive_match(s+1, "nf"))
+            goto parse_error;
+        s += 3;
+        x = Py_HUGE_VAL;
+        if (case_insensitive_match(s, "inity"))
+            s += 5;
+        goto finished;
+    }
+    if (*s == 'n' || *s == 'N') {
+        if (!case_insensitive_match(s+1, "an"))
+            goto parse_error;
+        s += 3;
+        x = Py_NAN;
+        goto finished;
+    }
 
-	/* [0x] */
-	s_store = s;
-	if (*s == '0') {
-		s++;
-		if (*s == 'x' || *s == 'X')
-			s++;
-		else
-			s = s_store;
-	}
+    /* [0x] */
+    s_store = s;
+    if (*s == '0') {
+        s++;
+        if (*s == 'x' || *s == 'X')
+            s++;
+        else
+            s = s_store;
+    }
 
-	/* coefficient: <integer> [. <fraction>] */
-	coeff_start = s;
-	while (hex_from_char(*s) >= 0)
-		s++;
-	s_store = s;
-	if (*s == '.') {
-		s++;
-		while (hex_from_char(*s) >= 0)
-			s++;
-		coeff_end = s-1;
-	}
-	else
-		coeff_end = s;
+    /* coefficient: <integer> [. <fraction>] */
+    coeff_start = s;
+    while (hex_from_char(*s) >= 0)
+        s++;
+    s_store = s;
+    if (*s == '.') {
+        s++;
+        while (hex_from_char(*s) >= 0)
+            s++;
+        coeff_end = s-1;
+    }
+    else
+        coeff_end = s;
 
-	/* ndigits = total # of hex digits; fdigits = # after point */
-	ndigits = coeff_end - coeff_start;
-	fdigits = coeff_end - s_store;
-	if (ndigits == 0)
-		goto parse_error;
-	if (ndigits > MIN(DBL_MIN_EXP - DBL_MANT_DIG - LONG_MIN/2,
-			  LONG_MAX/2 + 1 - DBL_MAX_EXP)/4)
-		goto insane_length_error;
+    /* ndigits = total # of hex digits; fdigits = # after point */
+    ndigits = coeff_end - coeff_start;
+    fdigits = coeff_end - s_store;
+    if (ndigits == 0)
+        goto parse_error;
+    if (ndigits > MIN(DBL_MIN_EXP - DBL_MANT_DIG - LONG_MIN/2,
+                      LONG_MAX/2 + 1 - DBL_MAX_EXP)/4)
+        goto insane_length_error;
 
-	/* [p <exponent>] */
-	if (*s == 'p' || *s == 'P') {
-		s++;
-		exp_start = s;
-		if (*s == '-' || *s == '+')
-			s++;
-		if (!('0' <= *s && *s <= '9'))
-			goto parse_error;
-		s++;
-		while ('0' <= *s && *s <= '9')
-			s++;
-		exp = strtol(exp_start, NULL, 10);
-	}
-	else
-		exp = 0;
+    /* [p <exponent>] */
+    if (*s == 'p' || *s == 'P') {
+        s++;
+        exp_start = s;
+        if (*s == '-' || *s == '+')
+            s++;
+        if (!('0' <= *s && *s <= '9'))
+            goto parse_error;
+        s++;
+        while ('0' <= *s && *s <= '9')
+            s++;
+        exp = strtol(exp_start, NULL, 10);
+    }
+    else
+        exp = 0;
 
 /* for 0 <= j < ndigits, HEX_DIGIT(j) gives the jth most significant digit */
-#define HEX_DIGIT(j) hex_from_char(*((j) < fdigits ?		\
-				     coeff_end-(j) :			\
-				     coeff_end-1-(j)))
+#define HEX_DIGIT(j) hex_from_char(*((j) < fdigits ?            \
+                     coeff_end-(j) :                                    \
+                     coeff_end-1-(j)))
 
-	/*******************************************
-	 * Compute rounded value of the hex string *
-	 *******************************************/
+    /*******************************************
+     * Compute rounded value of the hex string *
+     *******************************************/
 
-	/* Discard leading zeros, and catch extreme overflow and underflow */
-	while (ndigits > 0 && HEX_DIGIT(ndigits-1) == 0)
-		ndigits--;
-	if (ndigits == 0 || exp < LONG_MIN/2) {
-		x = 0.0;
-		goto finished;
-	}
-	if (exp > LONG_MAX/2)
-		goto overflow_error;
+    /* Discard leading zeros, and catch extreme overflow and underflow */
+    while (ndigits > 0 && HEX_DIGIT(ndigits-1) == 0)
+        ndigits--;
+    if (ndigits == 0 || exp < LONG_MIN/2) {
+        x = 0.0;
+        goto finished;
+    }
+    if (exp > LONG_MAX/2)
+        goto overflow_error;
 
-	/* Adjust exponent for fractional part. */
-	exp = exp - 4*((long)fdigits);
+    /* Adjust exponent for fractional part. */
+    exp = exp - 4*((long)fdigits);
 
-	/* top_exp = 1 more than exponent of most sig. bit of coefficient */
-	top_exp = exp + 4*((long)ndigits - 1);
-	for (digit = HEX_DIGIT(ndigits-1); digit != 0; digit /= 2)
-		top_exp++;
+    /* top_exp = 1 more than exponent of most sig. bit of coefficient */
+    top_exp = exp + 4*((long)ndigits - 1);
+    for (digit = HEX_DIGIT(ndigits-1); digit != 0; digit /= 2)
+        top_exp++;
 
-	/* catch almost all nonextreme cases of overflow and underflow here */
-	if (top_exp < DBL_MIN_EXP - DBL_MANT_DIG) {
-		x = 0.0;
-		goto finished;
-	}
-	if (top_exp > DBL_MAX_EXP)
-		goto overflow_error;
+    /* catch almost all nonextreme cases of overflow and underflow here */
+    if (top_exp < DBL_MIN_EXP - DBL_MANT_DIG) {
+        x = 0.0;
+        goto finished;
+    }
+    if (top_exp > DBL_MAX_EXP)
+        goto overflow_error;
 
-	/* lsb = exponent of least significant bit of the *rounded* value.
-	   This is top_exp - DBL_MANT_DIG unless result is subnormal. */
-	lsb = MAX(top_exp, (long)DBL_MIN_EXP) - DBL_MANT_DIG;
+    /* lsb = exponent of least significant bit of the *rounded* value.
+       This is top_exp - DBL_MANT_DIG unless result is subnormal. */
+    lsb = MAX(top_exp, (long)DBL_MIN_EXP) - DBL_MANT_DIG;
 
-	x = 0.0;
-	if (exp >= lsb) {
-		/* no rounding required */
-		for (i = ndigits-1; i >= 0; i--)
-			x = 16.0*x + HEX_DIGIT(i);
-		x = ldexp(x, (int)(exp));
-		goto finished;
-	}
-	/* rounding required.  key_digit is the index of the hex digit
-	   containing the first bit to be rounded away. */
-	half_eps = 1 << (int)((lsb - exp - 1) % 4);
-	key_digit = (lsb - exp - 1) / 4;
-	for (i = ndigits-1; i > key_digit; i--)
-		x = 16.0*x + HEX_DIGIT(i);
-	digit = HEX_DIGIT(key_digit);
-	x = 16.0*x + (double)(digit & (16-2*half_eps));
+    x = 0.0;
+    if (exp >= lsb) {
+        /* no rounding required */
+        for (i = ndigits-1; i >= 0; i--)
+            x = 16.0*x + HEX_DIGIT(i);
+        x = ldexp(x, (int)(exp));
+        goto finished;
+    }
+    /* rounding required.  key_digit is the index of the hex digit
+       containing the first bit to be rounded away. */
+    half_eps = 1 << (int)((lsb - exp - 1) % 4);
+    key_digit = (lsb - exp - 1) / 4;
+    for (i = ndigits-1; i > key_digit; i--)
+        x = 16.0*x + HEX_DIGIT(i);
+    digit = HEX_DIGIT(key_digit);
+    x = 16.0*x + (double)(digit & (16-2*half_eps));
 
-	/* round-half-even: round up if bit lsb-1 is 1 and at least one of
-	   bits lsb, lsb-2, lsb-3, lsb-4, ... is 1. */
-	if ((digit & half_eps) != 0) {
-		round_up = 0;
-		if ((digit & (3*half_eps-1)) != 0 ||
-		    (half_eps == 8 && (HEX_DIGIT(key_digit+1) & 1) != 0))
-			round_up = 1;
-		else
-			for (i = key_digit-1; i >= 0; i--)
-				if (HEX_DIGIT(i) != 0) {
-					round_up = 1;
-					break;
-				}
-		if (round_up == 1) {
-			x += 2*half_eps;
-			if (top_exp == DBL_MAX_EXP &&
-			    x == ldexp((double)(2*half_eps), DBL_MANT_DIG))
-				/* overflow corner case: pre-rounded value <
-				   2**DBL_MAX_EXP; rounded=2**DBL_MAX_EXP. */
-				goto overflow_error;
-		}
-	}
-	x = ldexp(x, (int)(exp+4*key_digit));
+    /* round-half-even: round up if bit lsb-1 is 1 and at least one of
+       bits lsb, lsb-2, lsb-3, lsb-4, ... is 1. */
+    if ((digit & half_eps) != 0) {
+        round_up = 0;
+        if ((digit & (3*half_eps-1)) != 0 ||
+            (half_eps == 8 && (HEX_DIGIT(key_digit+1) & 1) != 0))
+            round_up = 1;
+        else
+            for (i = key_digit-1; i >= 0; i--)
+                if (HEX_DIGIT(i) != 0) {
+                    round_up = 1;
+                    break;
+                }
+        if (round_up == 1) {
+            x += 2*half_eps;
+            if (top_exp == DBL_MAX_EXP &&
+                x == ldexp((double)(2*half_eps), DBL_MANT_DIG))
+                /* overflow corner case: pre-rounded value <
+                   2**DBL_MAX_EXP; rounded=2**DBL_MAX_EXP. */
+                goto overflow_error;
+        }
+    }
+    x = ldexp(x, (int)(exp+4*key_digit));
 
   finished:
-	/* optional trailing whitespace leading to the end of the string */
-	while (Py_ISSPACE(*s))
-		s++;
-	if (s != s_end)
-		goto parse_error;
-	result_as_float = Py_BuildValue("(d)", sign * x);
-	if (result_as_float == NULL)
-		return NULL;
-	result = PyObject_CallObject(cls, result_as_float);
-	Py_DECREF(result_as_float);
-	return result;
+    /* optional trailing whitespace leading to the end of the string */
+    while (Py_ISSPACE(*s))
+        s++;
+    if (s != s_end)
+        goto parse_error;
+    result_as_float = Py_BuildValue("(d)", sign * x);
+    if (result_as_float == NULL)
+        return NULL;
+    result = PyObject_CallObject(cls, result_as_float);
+    Py_DECREF(result_as_float);
+    return result;
 
   overflow_error:
-	PyErr_SetString(PyExc_OverflowError,
-			"hexadecimal value too large to represent as a float");
-	return NULL;
+    PyErr_SetString(PyExc_OverflowError,
+                    "hexadecimal value too large to represent as a float");
+    return NULL;
 
   parse_error:
-	PyErr_SetString(PyExc_ValueError,
-			"invalid hexadecimal floating-point string");
-	return NULL;
+    PyErr_SetString(PyExc_ValueError,
+                    "invalid hexadecimal floating-point string");
+    return NULL;
 
   insane_length_error:
-	PyErr_SetString(PyExc_ValueError,
-			"hexadecimal string too long to convert");
-	return NULL;
+    PyErr_SetString(PyExc_ValueError,
+                    "hexadecimal string too long to convert");
+    return NULL;
 }
 
 PyDoc_STRVAR(float_fromhex_doc,
@@ -1672,85 +1672,85 @@
 static PyObject *
 float_as_integer_ratio(PyObject *v, PyObject *unused)
 {
-	double self;
-	double float_part;
-	int exponent;
-	int i;
+    double self;
+    double float_part;
+    int exponent;
+    int i;
 
-	PyObject *prev;
-	PyObject *py_exponent = NULL;
-	PyObject *numerator = NULL;
-	PyObject *denominator = NULL;
-	PyObject *result_pair = NULL;
-	PyNumberMethods *long_methods = PyLong_Type.tp_as_number;
+    PyObject *prev;
+    PyObject *py_exponent = NULL;
+    PyObject *numerator = NULL;
+    PyObject *denominator = NULL;
+    PyObject *result_pair = NULL;
+    PyNumberMethods *long_methods = PyLong_Type.tp_as_number;
 
 #define INPLACE_UPDATE(obj, call) \
-	prev = obj; \
-	obj = call; \
-	Py_DECREF(prev); \
+    prev = obj; \
+    obj = call; \
+    Py_DECREF(prev); \
 
-	CONVERT_TO_DOUBLE(v, self);
+    CONVERT_TO_DOUBLE(v, self);
 
-	if (Py_IS_INFINITY(self)) {
-	  PyErr_SetString(PyExc_OverflowError,
-			  "Cannot pass infinity to float.as_integer_ratio.");
-	  return NULL;
-	}
+    if (Py_IS_INFINITY(self)) {
+      PyErr_SetString(PyExc_OverflowError,
+                      "Cannot pass infinity to float.as_integer_ratio.");
+      return NULL;
+    }
 #ifdef Py_NAN
-	if (Py_IS_NAN(self)) {
-	  PyErr_SetString(PyExc_ValueError,
-			  "Cannot pass NaN to float.as_integer_ratio.");
-	  return NULL;
-	}
+    if (Py_IS_NAN(self)) {
+      PyErr_SetString(PyExc_ValueError,
+                      "Cannot pass NaN to float.as_integer_ratio.");
+      return NULL;
+    }
 #endif
 
-	PyFPE_START_PROTECT("as_integer_ratio", goto error);
-	float_part = frexp(self, &exponent);  	/* self == float_part * 2**exponent exactly */
-	PyFPE_END_PROTECT(float_part);
-	
-	for (i=0; i<300 && float_part != floor(float_part) ; i++) {
-		float_part *= 2.0;
-		exponent--;
-	}	
-	/* self == float_part * 2**exponent exactly and float_part is integral.
-           If FLT_RADIX != 2, the 300 steps may leave a tiny fractional part
-           to be truncated by PyLong_FromDouble(). */
+    PyFPE_START_PROTECT("as_integer_ratio", goto error);
+    float_part = frexp(self, &exponent);        /* self == float_part * 2**exponent exactly */
+    PyFPE_END_PROTECT(float_part);
 
-	numerator = PyLong_FromDouble(float_part);
-	if (numerator == NULL) goto error;
+    for (i=0; i<300 && float_part != floor(float_part) ; i++) {
+        float_part *= 2.0;
+        exponent--;
+    }
+    /* self == float_part * 2**exponent exactly and float_part is integral.
+       If FLT_RADIX != 2, the 300 steps may leave a tiny fractional part
+       to be truncated by PyLong_FromDouble(). */
 
-	/* fold in 2**exponent */
-	denominator = PyLong_FromLong(1);
-	py_exponent = PyLong_FromLong(labs((long)exponent));
-	if (py_exponent == NULL) goto error;
-	INPLACE_UPDATE(py_exponent,
-		       long_methods->nb_lshift(denominator, py_exponent));
-	if (py_exponent == NULL) goto error;
-	if (exponent > 0) {
-		INPLACE_UPDATE(numerator,
-			       long_methods->nb_multiply(numerator, py_exponent));
-		if (numerator == NULL) goto error;
-	}
-	else {
-		Py_DECREF(denominator);
-		denominator = py_exponent;
-		py_exponent = NULL;
-	}
+    numerator = PyLong_FromDouble(float_part);
+    if (numerator == NULL) goto error;
 
-	/* Returns ints instead of longs where possible */
-	INPLACE_UPDATE(numerator, PyNumber_Int(numerator));
-	if (numerator == NULL) goto error;
-	INPLACE_UPDATE(denominator, PyNumber_Int(denominator));
-	if (denominator == NULL) goto error;
+    /* fold in 2**exponent */
+    denominator = PyLong_FromLong(1);
+    py_exponent = PyLong_FromLong(labs((long)exponent));
+    if (py_exponent == NULL) goto error;
+    INPLACE_UPDATE(py_exponent,
+                   long_methods->nb_lshift(denominator, py_exponent));
+    if (py_exponent == NULL) goto error;
+    if (exponent > 0) {
+        INPLACE_UPDATE(numerator,
+                       long_methods->nb_multiply(numerator, py_exponent));
+        if (numerator == NULL) goto error;
+    }
+    else {
+        Py_DECREF(denominator);
+        denominator = py_exponent;
+        py_exponent = NULL;
+    }
 
-	result_pair = PyTuple_Pack(2, numerator, denominator);
+    /* Returns ints instead of longs where possible */
+    INPLACE_UPDATE(numerator, PyNumber_Int(numerator));
+    if (numerator == NULL) goto error;
+    INPLACE_UPDATE(denominator, PyNumber_Int(denominator));
+    if (denominator == NULL) goto error;
+
+    result_pair = PyTuple_Pack(2, numerator, denominator);
 
 #undef INPLACE_UPDATE
 error:
-	Py_XDECREF(py_exponent);
-	Py_XDECREF(denominator);
-	Py_XDECREF(numerator);
-	return result_pair;
+    Py_XDECREF(py_exponent);
+    Py_XDECREF(denominator);
+    Py_XDECREF(numerator);
+    return result_pair;
 }
 
 PyDoc_STRVAR(float_as_integer_ratio_doc,
@@ -1774,18 +1774,18 @@
 static PyObject *
 float_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *x = Py_False; /* Integer zero */
-	static char *kwlist[] = {"x", 0};
+    PyObject *x = Py_False; /* Integer zero */
+    static char *kwlist[] = {"x", 0};
 
-	if (type != &PyFloat_Type)
-		return float_subtype_new(type, args, kwds); /* Wimp out */
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:float", kwlist, &x))
-		return NULL;
-	/* If it's a string, but not a string subclass, use
-	   PyFloat_FromString. */
-	if (PyString_CheckExact(x))
-		return PyFloat_FromString(x, NULL);
-	return PyNumber_Float(x);
+    if (type != &PyFloat_Type)
+        return float_subtype_new(type, args, kwds); /* Wimp out */
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:float", kwlist, &x))
+        return NULL;
+    /* If it's a string, but not a string subclass, use
+       PyFloat_FromString. */
+    if (PyString_CheckExact(x))
+        return PyFloat_FromString(x, NULL);
+    return PyNumber_Float(x);
 }
 
 /* Wimpy, slow approach to tp_new calls for subtypes of float:
@@ -1796,33 +1796,33 @@
 static PyObject *
 float_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *tmp, *newobj;
+    PyObject *tmp, *newobj;
 
-	assert(PyType_IsSubtype(type, &PyFloat_Type));
-	tmp = float_new(&PyFloat_Type, args, kwds);
-	if (tmp == NULL)
-		return NULL;
-	assert(PyFloat_CheckExact(tmp));
-	newobj = type->tp_alloc(type, 0);
-	if (newobj == NULL) {
-		Py_DECREF(tmp);
-		return NULL;
-	}
-	((PyFloatObject *)newobj)->ob_fval = ((PyFloatObject *)tmp)->ob_fval;
-	Py_DECREF(tmp);
-	return newobj;
+    assert(PyType_IsSubtype(type, &PyFloat_Type));
+    tmp = float_new(&PyFloat_Type, args, kwds);
+    if (tmp == NULL)
+        return NULL;
+    assert(PyFloat_CheckExact(tmp));
+    newobj = type->tp_alloc(type, 0);
+    if (newobj == NULL) {
+        Py_DECREF(tmp);
+        return NULL;
+    }
+    ((PyFloatObject *)newobj)->ob_fval = ((PyFloatObject *)tmp)->ob_fval;
+    Py_DECREF(tmp);
+    return newobj;
 }
 
 static PyObject *
 float_getnewargs(PyFloatObject *v)
 {
-	return Py_BuildValue("(d)", v->ob_fval);
+    return Py_BuildValue("(d)", v->ob_fval);
 }
 
 /* this is for the benefit of the pack/unpack routines below */
 
 typedef enum {
-	unknown_format, ieee_big_endian_format, ieee_little_endian_format
+    unknown_format, ieee_big_endian_format, ieee_little_endian_format
 } float_format_type;
 
 static float_format_type double_format, float_format;
@@ -1831,40 +1831,40 @@
 static PyObject *
 float_getformat(PyTypeObject *v, PyObject* arg)
 {
-	char* s;
-	float_format_type r;
+    char* s;
+    float_format_type r;
 
-	if (!PyString_Check(arg)) {
-		PyErr_Format(PyExc_TypeError,
-	     "__getformat__() argument must be string, not %.500s",
-			     Py_TYPE(arg)->tp_name);
-		return NULL;
-	}
-	s = PyString_AS_STRING(arg);
-	if (strcmp(s, "double") == 0) {
-		r = double_format;
-	}
-	else if (strcmp(s, "float") == 0) {
-		r = float_format;
-	}
-	else {
-		PyErr_SetString(PyExc_ValueError,
-				"__getformat__() argument 1 must be "
-				"'double' or 'float'");
-		return NULL;
-	}
-	
-	switch (r) {
-	case unknown_format:
-		return PyString_FromString("unknown");
-	case ieee_little_endian_format:
-		return PyString_FromString("IEEE, little-endian");
-	case ieee_big_endian_format:
-		return PyString_FromString("IEEE, big-endian");
-	default:
-		Py_FatalError("insane float_format or double_format");
-		return NULL;
-	}
+    if (!PyString_Check(arg)) {
+        PyErr_Format(PyExc_TypeError,
+         "__getformat__() argument must be string, not %.500s",
+                         Py_TYPE(arg)->tp_name);
+        return NULL;
+    }
+    s = PyString_AS_STRING(arg);
+    if (strcmp(s, "double") == 0) {
+        r = double_format;
+    }
+    else if (strcmp(s, "float") == 0) {
+        r = float_format;
+    }
+    else {
+        PyErr_SetString(PyExc_ValueError,
+                        "__getformat__() argument 1 must be "
+                        "'double' or 'float'");
+        return NULL;
+    }
+
+    switch (r) {
+    case unknown_format:
+        return PyString_FromString("unknown");
+    case ieee_little_endian_format:
+        return PyString_FromString("IEEE, little-endian");
+    case ieee_big_endian_format:
+        return PyString_FromString("IEEE, big-endian");
+    default:
+        Py_FatalError("insane float_format or double_format");
+        return NULL;
+    }
 }
 
 PyDoc_STRVAR(float_getformat_doc,
@@ -1880,57 +1880,57 @@
 static PyObject *
 float_setformat(PyTypeObject *v, PyObject* args)
 {
-	char* typestr;
-	char* format;
-	float_format_type f;
-	float_format_type detected;
-	float_format_type *p;
+    char* typestr;
+    char* format;
+    float_format_type f;
+    float_format_type detected;
+    float_format_type *p;
 
-	if (!PyArg_ParseTuple(args, "ss:__setformat__", &typestr, &format))
-		return NULL;
+    if (!PyArg_ParseTuple(args, "ss:__setformat__", &typestr, &format))
+        return NULL;
 
-	if (strcmp(typestr, "double") == 0) {
-		p = &double_format;
-		detected = detected_double_format;
-	}
-	else if (strcmp(typestr, "float") == 0) {
-		p = &float_format;
-		detected = detected_float_format;
-	}
-	else {
-		PyErr_SetString(PyExc_ValueError,
-				"__setformat__() argument 1 must "
-				"be 'double' or 'float'");
-		return NULL;
-	}
-	
-	if (strcmp(format, "unknown") == 0) {
-		f = unknown_format;
-	}
-	else if (strcmp(format, "IEEE, little-endian") == 0) {
-		f = ieee_little_endian_format;
-	}
-	else if (strcmp(format, "IEEE, big-endian") == 0) {
-		f = ieee_big_endian_format;
-	}
-	else {
-		PyErr_SetString(PyExc_ValueError,
-				"__setformat__() argument 2 must be "
-				"'unknown', 'IEEE, little-endian' or "
-				"'IEEE, big-endian'");
-		return NULL;
+    if (strcmp(typestr, "double") == 0) {
+        p = &double_format;
+        detected = detected_double_format;
+    }
+    else if (strcmp(typestr, "float") == 0) {
+        p = &float_format;
+        detected = detected_float_format;
+    }
+    else {
+        PyErr_SetString(PyExc_ValueError,
+                        "__setformat__() argument 1 must "
+                        "be 'double' or 'float'");
+        return NULL;
+    }
 
-	}
+    if (strcmp(format, "unknown") == 0) {
+        f = unknown_format;
+    }
+    else if (strcmp(format, "IEEE, little-endian") == 0) {
+        f = ieee_little_endian_format;
+    }
+    else if (strcmp(format, "IEEE, big-endian") == 0) {
+        f = ieee_big_endian_format;
+    }
+    else {
+        PyErr_SetString(PyExc_ValueError,
+                        "__setformat__() argument 2 must be "
+                        "'unknown', 'IEEE, little-endian' or "
+                        "'IEEE, big-endian'");
+        return NULL;
 
-	if (f != unknown_format && f != detected) {
-		PyErr_Format(PyExc_ValueError,
-			     "can only set %s format to 'unknown' or the "
-			     "detected platform value", typestr);
-		return NULL;
-	}
+    }
 
-	*p = f;
-	Py_RETURN_NONE;
+    if (f != unknown_format && f != detected) {
+        PyErr_Format(PyExc_ValueError,
+                     "can only set %s format to 'unknown' or the "
+                     "detected platform value", typestr);
+        return NULL;
+    }
+
+    *p = f;
+    Py_RETURN_NONE;
 }
 
 PyDoc_STRVAR(float_setformat_doc,
@@ -1949,37 +1949,37 @@
 static PyObject *
 float_getzero(PyObject *v, void *closure)
 {
-	return PyFloat_FromDouble(0.0);
+    return PyFloat_FromDouble(0.0);
 }
 
 static PyObject *
 float__format__(PyObject *self, PyObject *args)
 {
-	PyObject *format_spec;
+    PyObject *format_spec;
 
-	if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
-		return NULL;
-	if (PyBytes_Check(format_spec))
-		return _PyFloat_FormatAdvanced(self,
-					       PyBytes_AS_STRING(format_spec),
-					       PyBytes_GET_SIZE(format_spec));
-	if (PyUnicode_Check(format_spec)) {
-		/* Convert format_spec to a str */
-		PyObject *result;
-		PyObject *str_spec = PyObject_Str(format_spec);
+    if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
+        return NULL;
+    if (PyBytes_Check(format_spec))
+        return _PyFloat_FormatAdvanced(self,
+                                       PyBytes_AS_STRING(format_spec),
+                                       PyBytes_GET_SIZE(format_spec));
+    if (PyUnicode_Check(format_spec)) {
+        /* Convert format_spec to a str */
+        PyObject *result;
+        PyObject *str_spec = PyObject_Str(format_spec);
 
-		if (str_spec == NULL)
-			return NULL;
+        if (str_spec == NULL)
+            return NULL;
 
-		result = _PyFloat_FormatAdvanced(self,
-						 PyBytes_AS_STRING(str_spec),
-						 PyBytes_GET_SIZE(str_spec));
+        result = _PyFloat_FormatAdvanced(self,
+                                         PyBytes_AS_STRING(str_spec),
+                                         PyBytes_GET_SIZE(str_spec));
 
-		Py_DECREF(str_spec);
-		return result;
-	}
-	PyErr_SetString(PyExc_TypeError, "__format__ requires str or unicode");
-	return NULL;
+        Py_DECREF(str_spec);
+        return result;
+    }
+    PyErr_SetString(PyExc_TypeError, "__format__ requires str or unicode");
+    return NULL;
 }
 
 PyDoc_STRVAR(float__format__doc,
@@ -1989,42 +1989,42 @@
 
 
 static PyMethodDef float_methods[] = {
-	{"conjugate",	(PyCFunction)float_float,	METH_NOARGS,
-	 "Returns self, the complex conjugate of any float."},
-	{"__trunc__",	(PyCFunction)float_trunc, METH_NOARGS,
-         "Returns the Integral closest to x between 0 and x."},
-	{"as_integer_ratio", (PyCFunction)float_as_integer_ratio, METH_NOARGS,
-	 float_as_integer_ratio_doc},
-	{"fromhex", (PyCFunction)float_fromhex,
-	 METH_O|METH_CLASS, float_fromhex_doc},
-	{"hex", (PyCFunction)float_hex,
-	 METH_NOARGS, float_hex_doc},
-	{"is_integer",	(PyCFunction)float_is_integer,	METH_NOARGS,
-	 "Returns True if the float is an integer."},
+    {"conjugate",       (PyCFunction)float_float,       METH_NOARGS,
+     "Returns self, the complex conjugate of any float."},
+    {"__trunc__",       (PyCFunction)float_trunc, METH_NOARGS,
+     "Returns the Integral closest to x between 0 and x."},
+    {"as_integer_ratio", (PyCFunction)float_as_integer_ratio, METH_NOARGS,
+     float_as_integer_ratio_doc},
+    {"fromhex", (PyCFunction)float_fromhex,
+     METH_O|METH_CLASS, float_fromhex_doc},
+    {"hex", (PyCFunction)float_hex,
+     METH_NOARGS, float_hex_doc},
+    {"is_integer",      (PyCFunction)float_is_integer,  METH_NOARGS,
+     "Returns True if the float is an integer."},
 #if 0
-	{"is_inf",	(PyCFunction)float_is_inf,	METH_NOARGS,
-	 "Returns True if the float is positive or negative infinite."},
-	{"is_finite",	(PyCFunction)float_is_finite,	METH_NOARGS,
-	 "Returns True if the float is finite, neither infinite nor NaN."},
-	{"is_nan",	(PyCFunction)float_is_nan,	METH_NOARGS,
-	 "Returns True if the float is not a number (NaN)."},
+    {"is_inf",          (PyCFunction)float_is_inf,      METH_NOARGS,
+     "Returns True if the float is positive or negative infinite."},
+    {"is_finite",       (PyCFunction)float_is_finite,   METH_NOARGS,
+     "Returns True if the float is finite, neither infinite nor NaN."},
+    {"is_nan",          (PyCFunction)float_is_nan,      METH_NOARGS,
+     "Returns True if the float is not a number (NaN)."},
 #endif
-	{"__getnewargs__",	(PyCFunction)float_getnewargs,	METH_NOARGS},
-	{"__getformat__",	(PyCFunction)float_getformat,	
-	 METH_O|METH_CLASS,		float_getformat_doc},
-	{"__setformat__",	(PyCFunction)float_setformat,	
-	 METH_VARARGS|METH_CLASS,	float_setformat_doc},
-        {"__format__",          (PyCFunction)float__format__,
-         METH_VARARGS,                  float__format__doc},
-	{NULL,		NULL}		/* sentinel */
+    {"__getnewargs__",          (PyCFunction)float_getnewargs,  METH_NOARGS},
+    {"__getformat__",           (PyCFunction)float_getformat,
+     METH_O|METH_CLASS,                 float_getformat_doc},
+    {"__setformat__",           (PyCFunction)float_setformat,
+     METH_VARARGS|METH_CLASS,           float_setformat_doc},
+    {"__format__",          (PyCFunction)float__format__,
+     METH_VARARGS,                  float__format__doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyGetSetDef float_getset[] = {
-    {"real", 
+    {"real",
      (getter)float_float, (setter)NULL,
      "the real part of a complex number",
      NULL},
-    {"imag", 
+    {"imag",
      (getter)float_getzero, (setter)NULL,
      "the imaginary part of a complex number",
      NULL},
@@ -2038,235 +2038,235 @@
 
 
 static PyNumberMethods float_as_number = {
-	float_add, 	/*nb_add*/
-	float_sub, 	/*nb_subtract*/
-	float_mul, 	/*nb_multiply*/
-	float_classic_div, /*nb_divide*/
-	float_rem, 	/*nb_remainder*/
-	float_divmod, 	/*nb_divmod*/
-	float_pow, 	/*nb_power*/
-	(unaryfunc)float_neg, /*nb_negative*/
-	(unaryfunc)float_float, /*nb_positive*/
-	(unaryfunc)float_abs, /*nb_absolute*/
-	(inquiry)float_nonzero, /*nb_nonzero*/
-	0,		/*nb_invert*/
-	0,		/*nb_lshift*/
-	0,		/*nb_rshift*/
-	0,		/*nb_and*/
-	0,		/*nb_xor*/
-	0,		/*nb_or*/
-	float_coerce, 	/*nb_coerce*/
-	float_trunc, 	/*nb_int*/
-	float_long, 	/*nb_long*/
-	float_float,	/*nb_float*/
-	0,		/* nb_oct */
-	0,		/* nb_hex */
-	0,		/* nb_inplace_add */
-	0,		/* nb_inplace_subtract */
-	0,		/* nb_inplace_multiply */
-	0,		/* nb_inplace_divide */
-	0,		/* nb_inplace_remainder */
-	0, 		/* nb_inplace_power */
-	0,		/* nb_inplace_lshift */
-	0,		/* nb_inplace_rshift */
-	0,		/* nb_inplace_and */
-	0,		/* nb_inplace_xor */
-	0,		/* nb_inplace_or */
-	float_floor_div, /* nb_floor_divide */
-	float_div,	/* nb_true_divide */
-	0,		/* nb_inplace_floor_divide */
-	0,		/* nb_inplace_true_divide */
+    float_add,          /*nb_add*/
+    float_sub,          /*nb_subtract*/
+    float_mul,          /*nb_multiply*/
+    float_classic_div, /*nb_divide*/
+    float_rem,          /*nb_remainder*/
+    float_divmod,       /*nb_divmod*/
+    float_pow,          /*nb_power*/
+    (unaryfunc)float_neg, /*nb_negative*/
+    (unaryfunc)float_float, /*nb_positive*/
+    (unaryfunc)float_abs, /*nb_absolute*/
+    (inquiry)float_nonzero, /*nb_nonzero*/
+    0,                  /*nb_invert*/
+    0,                  /*nb_lshift*/
+    0,                  /*nb_rshift*/
+    0,                  /*nb_and*/
+    0,                  /*nb_xor*/
+    0,                  /*nb_or*/
+    float_coerce,       /*nb_coerce*/
+    float_trunc,        /*nb_int*/
+    float_long,         /*nb_long*/
+    float_float,        /*nb_float*/
+    0,                  /* nb_oct */
+    0,                  /* nb_hex */
+    0,                  /* nb_inplace_add */
+    0,                  /* nb_inplace_subtract */
+    0,                  /* nb_inplace_multiply */
+    0,                  /* nb_inplace_divide */
+    0,                  /* nb_inplace_remainder */
+    0,                  /* nb_inplace_power */
+    0,                  /* nb_inplace_lshift */
+    0,                  /* nb_inplace_rshift */
+    0,                  /* nb_inplace_and */
+    0,                  /* nb_inplace_xor */
+    0,                  /* nb_inplace_or */
+    float_floor_div, /* nb_floor_divide */
+    float_div,          /* nb_true_divide */
+    0,                  /* nb_inplace_floor_divide */
+    0,                  /* nb_inplace_true_divide */
 };
 
 PyTypeObject PyFloat_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"float",
-	sizeof(PyFloatObject),
-	0,
-	(destructor)float_dealloc,		/* tp_dealloc */
-	(printfunc)float_print, 		/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,			 		/* tp_compare */
-	(reprfunc)float_repr,			/* tp_repr */
-	&float_as_number,			/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	(hashfunc)float_hash,			/* tp_hash */
-	0,					/* tp_call */
-	(reprfunc)float_str,			/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
-		Py_TPFLAGS_BASETYPE,		/* tp_flags */
-	float_doc,				/* tp_doc */
- 	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	float_richcompare,			/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	float_methods,				/* tp_methods */
-	0,					/* tp_members */
-	float_getset,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	float_new,				/* tp_new */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "float",
+    sizeof(PyFloatObject),
+    0,
+    (destructor)float_dealloc,                  /* tp_dealloc */
+    (printfunc)float_print,                     /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)float_repr,                       /* tp_repr */
+    &float_as_number,                           /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)float_hash,                       /* tp_hash */
+    0,                                          /* tp_call */
+    (reprfunc)float_str,                        /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
+        Py_TPFLAGS_BASETYPE,                    /* tp_flags */
+    float_doc,                                  /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    float_richcompare,                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    float_methods,                              /* tp_methods */
+    0,                                          /* tp_members */
+    float_getset,                               /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    float_new,                                  /* tp_new */
 };
 
 void
 _PyFloat_Init(void)
 {
-	/* We attempt to determine if this machine is using IEEE
-	   floating point formats by peering at the bits of some
-	   carefully chosen values.  If it looks like we are on an
-	   IEEE platform, the float packing/unpacking routines can
-	   just copy bits, if not they resort to arithmetic & shifts
-	   and masks.  The shifts & masks approach works on all finite
-	   values, but what happens to infinities, NaNs and signed
-	   zeroes on packing is an accident, and attempting to unpack
-	   a NaN or an infinity will raise an exception.
+    /* We attempt to determine if this machine is using IEEE
+       floating point formats by peering at the bits of some
+       carefully chosen values.  If it looks like we are on an
+       IEEE platform, the float packing/unpacking routines can
+       just copy bits, if not they resort to arithmetic & shifts
+       and masks.  The shifts & masks approach works on all finite
+       values, but what happens to infinities, NaNs and signed
+       zeroes on packing is an accident, and attempting to unpack
+       a NaN or an infinity will raise an exception.
 
-	   Note that if we're on some whacked-out platform which uses
-	   IEEE formats but isn't strictly little-endian or big-
-	   endian, we will fall back to the portable shifts & masks
-	   method. */
+       Note that if we're on some whacked-out platform which uses
+       IEEE formats but isn't strictly little-endian or big-
+       endian, we will fall back to the portable shifts & masks
+       method. */
 
 #if SIZEOF_DOUBLE == 8
-	{
-		double x = 9006104071832581.0;
-		if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
-			detected_double_format = ieee_big_endian_format;
-		else if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
-			detected_double_format = ieee_little_endian_format;
-		else 
-			detected_double_format = unknown_format;
-	}
+    {
+        double x = 9006104071832581.0;
+        if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
+            detected_double_format = ieee_big_endian_format;
+        else if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
+            detected_double_format = ieee_little_endian_format;
+        else
+            detected_double_format = unknown_format;
+    }
 #else
-	detected_double_format = unknown_format;
+    detected_double_format = unknown_format;
 #endif
 
 #if SIZEOF_FLOAT == 4
-	{
-		float y = 16711938.0;
-		if (memcmp(&y, "\x4b\x7f\x01\x02", 4) == 0)
-			detected_float_format = ieee_big_endian_format;
-		else if (memcmp(&y, "\x02\x01\x7f\x4b", 4) == 0)
-			detected_float_format = ieee_little_endian_format;
-		else 
-			detected_float_format = unknown_format;
-	}
+    {
+        float y = 16711938.0;
+        if (memcmp(&y, "\x4b\x7f\x01\x02", 4) == 0)
+            detected_float_format = ieee_big_endian_format;
+        else if (memcmp(&y, "\x02\x01\x7f\x4b", 4) == 0)
+            detected_float_format = ieee_little_endian_format;
+        else
+            detected_float_format = unknown_format;
+    }
 #else
-	detected_float_format = unknown_format;
+    detected_float_format = unknown_format;
 #endif
 
-	double_format = detected_double_format;
-	float_format = detected_float_format;
+    double_format = detected_double_format;
+    float_format = detected_float_format;
 
-	/* Init float info */
-	if (FloatInfoType.tp_name == 0)
-		PyStructSequence_InitType(&FloatInfoType, &floatinfo_desc);
+    /* Init float info */
+    if (FloatInfoType.tp_name == 0)
+        PyStructSequence_InitType(&FloatInfoType, &floatinfo_desc);
 }
 
 int
 PyFloat_ClearFreeList(void)
 {
-	PyFloatObject *p;
-	PyFloatBlock *list, *next;
-	int i;
-	int u;			/* remaining unfreed ints per block */
-	int freelist_size = 0;
+    PyFloatObject *p;
+    PyFloatBlock *list, *next;
+    int i;
+    int u;                      /* remaining unfreed ints per block */
+    int freelist_size = 0;
 
-	list = block_list;
-	block_list = NULL;
-	free_list = NULL;
-	while (list != NULL) {
-		u = 0;
-		for (i = 0, p = &list->objects[0];
-		     i < N_FLOATOBJECTS;
-		     i++, p++) {
-			if (PyFloat_CheckExact(p) && Py_REFCNT(p) != 0)
-				u++;
-		}
-		next = list->next;
-		if (u) {
-			list->next = block_list;
-			block_list = list;
-			for (i = 0, p = &list->objects[0];
-			     i < N_FLOATOBJECTS;
-			     i++, p++) {
-				if (!PyFloat_CheckExact(p) ||
-				    Py_REFCNT(p) == 0) {
-					Py_TYPE(p) = (struct _typeobject *)
-						free_list;
-					free_list = p;
-				}
-			}
-		}
-		else {
-			PyMem_FREE(list);
-		}
-		freelist_size += u;
-		list = next;
-	}
-	return freelist_size;
+    list = block_list;
+    block_list = NULL;
+    free_list = NULL;
+    while (list != NULL) {
+        u = 0;
+        for (i = 0, p = &list->objects[0];
+             i < N_FLOATOBJECTS;
+             i++, p++) {
+            if (PyFloat_CheckExact(p) && Py_REFCNT(p) != 0)
+                u++;
+        }
+        next = list->next;
+        if (u) {
+            list->next = block_list;
+            block_list = list;
+            for (i = 0, p = &list->objects[0];
+                 i < N_FLOATOBJECTS;
+                 i++, p++) {
+                if (!PyFloat_CheckExact(p) ||
+                    Py_REFCNT(p) == 0) {
+                    Py_TYPE(p) = (struct _typeobject *)
+                        free_list;
+                    free_list = p;
+                }
+            }
+        }
+        else {
+            PyMem_FREE(list);
+        }
+        freelist_size += u;
+        list = next;
+    }
+    return freelist_size;
 }
 
 void
 PyFloat_Fini(void)
 {
-	PyFloatObject *p;
-	PyFloatBlock *list;
-	int i;
-	int u;			/* total unfreed floats per block */
+    PyFloatObject *p;
+    PyFloatBlock *list;
+    int i;
+    int u;                      /* total unfreed floats per block */
 
-	u = PyFloat_ClearFreeList();
+    u = PyFloat_ClearFreeList();
 
-	if (!Py_VerboseFlag)
-		return;
-	fprintf(stderr, "# cleanup floats");
-	if (!u) {
-		fprintf(stderr, "\n");
-	}
-	else {
-		fprintf(stderr,
-			": %d unfreed float%s\n",
-			u, u == 1 ? "" : "s");
-	}
-	if (Py_VerboseFlag > 1) {
-		list = block_list;
-		while (list != NULL) {
-			for (i = 0, p = &list->objects[0];
-			     i < N_FLOATOBJECTS;
-			     i++, p++) {
-				if (PyFloat_CheckExact(p) &&
-				    Py_REFCNT(p) != 0) {
-					char *buf = PyOS_double_to_string(
-						PyFloat_AS_DOUBLE(p), 'r',
-						0, 0, NULL);
-					if (buf) {
-						/* XXX(twouters) cast
-						   refcount to long
-						   until %zd is
-						   universally
-						   available
-						*/
-						fprintf(stderr,
-			     "#   <float at %p, refcnt=%ld, val=%s>\n",
-						p, (long)Py_REFCNT(p), buf);
-						PyMem_Free(buf);
-					}
-				}
-			}
-			list = list->next;
-		}
-	}
+    if (!Py_VerboseFlag)
+        return;
+    fprintf(stderr, "# cleanup floats");
+    if (!u) {
+        fprintf(stderr, "\n");
+    }
+    else {
+        fprintf(stderr,
+            ": %d unfreed float%s\n",
+            u, u == 1 ? "" : "s");
+    }
+    if (Py_VerboseFlag > 1) {
+        list = block_list;
+        while (list != NULL) {
+            for (i = 0, p = &list->objects[0];
+                 i < N_FLOATOBJECTS;
+                 i++, p++) {
+                if (PyFloat_CheckExact(p) &&
+                    Py_REFCNT(p) != 0) {
+                    char *buf = PyOS_double_to_string(
+                        PyFloat_AS_DOUBLE(p), 'r',
+                        0, 0, NULL);
+                    if (buf) {
+                        /* XXX(twouters) cast
+                           refcount to long
+                           until %zd is
+                           universally
+                           available
+                        */
+                        fprintf(stderr,
+                 "#   <float at %p, refcnt=%ld, val=%s>\n",
+                                    p, (long)Py_REFCNT(p), buf);
+                                    PyMem_Free(buf);
+                            }
+                }
+            }
+            list = list->next;
+        }
+    }
 }
 
 /*----------------------------------------------------------------------------
@@ -2275,406 +2275,406 @@
 int
 _PyFloat_Pack4(double x, unsigned char *p, int le)
 {
-	if (float_format == unknown_format) {
-		unsigned char sign;
-		int e;
-		double f;
-		unsigned int fbits;
-		int incr = 1;
+    if (float_format == unknown_format) {
+        unsigned char sign;
+        int e;
+        double f;
+        unsigned int fbits;
+        int incr = 1;
 
-		if (le) {
-			p += 3;
-			incr = -1;
-		}
+        if (le) {
+            p += 3;
+            incr = -1;
+        }
 
-		if (x < 0) {
-			sign = 1;
-			x = -x;
-		}
-		else
-			sign = 0;
+        if (x < 0) {
+            sign = 1;
+            x = -x;
+        }
+        else
+            sign = 0;
 
-		f = frexp(x, &e);
+        f = frexp(x, &e);
 
-		/* Normalize f to be in the range [1.0, 2.0) */
-		if (0.5 <= f && f < 1.0) {
-			f *= 2.0;
-			e--;
-		}
-		else if (f == 0.0)
-			e = 0;
-		else {
-			PyErr_SetString(PyExc_SystemError,
-					"frexp() result out of range");
-			return -1;
-		}
+        /* Normalize f to be in the range [1.0, 2.0) */
+        if (0.5 <= f && f < 1.0) {
+            f *= 2.0;
+            e--;
+        }
+        else if (f == 0.0)
+            e = 0;
+        else {
+            PyErr_SetString(PyExc_SystemError,
+                            "frexp() result out of range");
+            return -1;
+        }
 
-		if (e >= 128)
-			goto Overflow;
-		else if (e < -126) {
-			/* Gradual underflow */
-			f = ldexp(f, 126 + e);
-			e = 0;
-		}
-		else if (!(e == 0 && f == 0.0)) {
-			e += 127;
-			f -= 1.0; /* Get rid of leading 1 */
-		}
+        if (e >= 128)
+            goto Overflow;
+        else if (e < -126) {
+            /* Gradual underflow */
+            f = ldexp(f, 126 + e);
+            e = 0;
+        }
+        else if (!(e == 0 && f == 0.0)) {
+            e += 127;
+            f -= 1.0; /* Get rid of leading 1 */
+        }
 
-		f *= 8388608.0; /* 2**23 */
-		fbits = (unsigned int)(f + 0.5); /* Round */
-		assert(fbits <= 8388608);
-		if (fbits >> 23) {
-			/* The carry propagated out of a string of 23 1 bits. */
-			fbits = 0;
-			++e;
-			if (e >= 255)
-				goto Overflow;
-		}
+        f *= 8388608.0; /* 2**23 */
+        fbits = (unsigned int)(f + 0.5); /* Round */
+        assert(fbits <= 8388608);
+        if (fbits >> 23) {
+            /* The carry propagated out of a string of 23 1 bits. */
+            fbits = 0;
+            ++e;
+            if (e >= 255)
+                goto Overflow;
+        }
 
-		/* First byte */
-		*p = (sign << 7) | (e >> 1);
-		p += incr;
+        /* First byte */
+        *p = (sign << 7) | (e >> 1);
+        p += incr;
 
-		/* Second byte */
-		*p = (char) (((e & 1) << 7) | (fbits >> 16));
-		p += incr;
+        /* Second byte */
+        *p = (char) (((e & 1) << 7) | (fbits >> 16));
+        p += incr;
 
-		/* Third byte */
-		*p = (fbits >> 8) & 0xFF;
-		p += incr;
+        /* Third byte */
+        *p = (fbits >> 8) & 0xFF;
+        p += incr;
 
-		/* Fourth byte */
-		*p = fbits & 0xFF;
+        /* Fourth byte */
+        *p = fbits & 0xFF;
 
-		/* Done */
-		return 0;
+        /* Done */
+        return 0;
 
-	}
-	else {
-		float y = (float)x;
-		const char *s = (char*)&y;
-		int i, incr = 1;
+    }
+    else {
+        float y = (float)x;
+        const char *s = (char*)&y;
+        int i, incr = 1;
 
-		if (Py_IS_INFINITY(y) && !Py_IS_INFINITY(x))
-			goto Overflow;
+        if (Py_IS_INFINITY(y) && !Py_IS_INFINITY(x))
+            goto Overflow;
 
-		if ((float_format == ieee_little_endian_format && !le)
-		    || (float_format == ieee_big_endian_format && le)) {
-			p += 3;
-			incr = -1;
-		}
+        if ((float_format == ieee_little_endian_format && !le)
+            || (float_format == ieee_big_endian_format && le)) {
+            p += 3;
+            incr = -1;
+        }
 
-		for (i = 0; i < 4; i++) {
-			*p = *s++;
-			p += incr;
-		}
-		return 0;
-	}
+        for (i = 0; i < 4; i++) {
+            *p = *s++;
+            p += incr;
+        }
+        return 0;
+    }
   Overflow:
-	PyErr_SetString(PyExc_OverflowError,
-			"float too large to pack with f format");
-	return -1;
+    PyErr_SetString(PyExc_OverflowError,
+                    "float too large to pack with f format");
+    return -1;
 }
 
 int
 _PyFloat_Pack8(double x, unsigned char *p, int le)
 {
-	if (double_format == unknown_format) {
-		unsigned char sign;
-		int e;
-		double f;
-		unsigned int fhi, flo;
-		int incr = 1;
+    if (double_format == unknown_format) {
+        unsigned char sign;
+        int e;
+        double f;
+        unsigned int fhi, flo;
+        int incr = 1;
 
-		if (le) {
-			p += 7;
-			incr = -1;
-		}
+        if (le) {
+            p += 7;
+            incr = -1;
+        }
 
-		if (x < 0) {
-			sign = 1;
-			x = -x;
-		}
-		else
-			sign = 0;
+        if (x < 0) {
+            sign = 1;
+            x = -x;
+        }
+        else
+            sign = 0;
 
-		f = frexp(x, &e);
+        f = frexp(x, &e);
 
-		/* Normalize f to be in the range [1.0, 2.0) */
-		if (0.5 <= f && f < 1.0) {
-			f *= 2.0;
-			e--;
-		}
-		else if (f == 0.0)
-			e = 0;
-		else {
-			PyErr_SetString(PyExc_SystemError,
-					"frexp() result out of range");
-			return -1;
-		}
+        /* Normalize f to be in the range [1.0, 2.0) */
+        if (0.5 <= f && f < 1.0) {
+            f *= 2.0;
+            e--;
+        }
+        else if (f == 0.0)
+            e = 0;
+        else {
+            PyErr_SetString(PyExc_SystemError,
+                            "frexp() result out of range");
+            return -1;
+        }
 
-		if (e >= 1024)
-			goto Overflow;
-		else if (e < -1022) {
-			/* Gradual underflow */
-			f = ldexp(f, 1022 + e);
-			e = 0;
-		}
-		else if (!(e == 0 && f == 0.0)) {
-			e += 1023;
-			f -= 1.0; /* Get rid of leading 1 */
-		}
+        if (e >= 1024)
+            goto Overflow;
+        else if (e < -1022) {
+            /* Gradual underflow */
+            f = ldexp(f, 1022 + e);
+            e = 0;
+        }
+        else if (!(e == 0 && f == 0.0)) {
+            e += 1023;
+            f -= 1.0; /* Get rid of leading 1 */
+        }
 
-		/* fhi receives the high 28 bits; flo the low 24 bits (== 52 bits) */
-		f *= 268435456.0; /* 2**28 */
-		fhi = (unsigned int)f; /* Truncate */
-		assert(fhi < 268435456);
+        /* fhi receives the high 28 bits; flo the low 24 bits (== 52 bits) */
+        f *= 268435456.0; /* 2**28 */
+        fhi = (unsigned int)f; /* Truncate */
+        assert(fhi < 268435456);
 
-		f -= (double)fhi;
-		f *= 16777216.0; /* 2**24 */
-		flo = (unsigned int)(f + 0.5); /* Round */
-		assert(flo <= 16777216);
-		if (flo >> 24) {
-			/* The carry propagated out of a string of 24 1 bits. */
-			flo = 0;
-			++fhi;
-			if (fhi >> 28) {
-				/* And it also progagated out of the next 28 bits. */
-				fhi = 0;
-				++e;
-				if (e >= 2047)
-					goto Overflow;
-			}
-		}
+        f -= (double)fhi;
+        f *= 16777216.0; /* 2**24 */
+        flo = (unsigned int)(f + 0.5); /* Round */
+        assert(flo <= 16777216);
+        if (flo >> 24) {
+            /* The carry propagated out of a string of 24 1 bits. */
+            flo = 0;
+            ++fhi;
+            if (fhi >> 28) {
+                /* And it also progagated out of the next 28 bits. */
+                fhi = 0;
+                ++e;
+                if (e >= 2047)
+                    goto Overflow;
+            }
+        }
 
-		/* First byte */
-		*p = (sign << 7) | (e >> 4);
-		p += incr;
+        /* First byte */
+        *p = (sign << 7) | (e >> 4);
+        p += incr;
 
-		/* Second byte */
-		*p = (unsigned char) (((e & 0xF) << 4) | (fhi >> 24));
-		p += incr;
+        /* Second byte */
+        *p = (unsigned char) (((e & 0xF) << 4) | (fhi >> 24));
+        p += incr;
 
-		/* Third byte */
-		*p = (fhi >> 16) & 0xFF;
-		p += incr;
+        /* Third byte */
+        *p = (fhi >> 16) & 0xFF;
+        p += incr;
 
-		/* Fourth byte */
-		*p = (fhi >> 8) & 0xFF;
-		p += incr;
+        /* Fourth byte */
+        *p = (fhi >> 8) & 0xFF;
+        p += incr;
 
-		/* Fifth byte */
-		*p = fhi & 0xFF;
-		p += incr;
+        /* Fifth byte */
+        *p = fhi & 0xFF;
+        p += incr;
 
-		/* Sixth byte */
-		*p = (flo >> 16) & 0xFF;
-		p += incr;
+        /* Sixth byte */
+        *p = (flo >> 16) & 0xFF;
+        p += incr;
 
-		/* Seventh byte */
-		*p = (flo >> 8) & 0xFF;
-		p += incr;
+        /* Seventh byte */
+        *p = (flo >> 8) & 0xFF;
+        p += incr;
 
-		/* Eighth byte */
-		*p = flo & 0xFF;
-		/* p += incr; Unneeded (for now) */
+        /* Eighth byte */
+        *p = flo & 0xFF;
+        /* p += incr; Unneeded (for now) */
 
-		/* Done */
-		return 0;
+        /* Done */
+        return 0;
 
-	  Overflow:
-		PyErr_SetString(PyExc_OverflowError,
-				"float too large to pack with d format");
-		return -1;
-	}
-	else {
-		const char *s = (char*)&x;
-		int i, incr = 1;
+      Overflow:
+        PyErr_SetString(PyExc_OverflowError,
+                        "float too large to pack with d format");
+        return -1;
+    }
+    else {
+        const char *s = (char*)&x;
+        int i, incr = 1;
 
-		if ((double_format == ieee_little_endian_format && !le)
-		    || (double_format == ieee_big_endian_format && le)) {
-			p += 7;
-			incr = -1;
-		}
-		
-		for (i = 0; i < 8; i++) {
-			*p = *s++;
-			p += incr;
-		}
-		return 0;
-	}
+        if ((double_format == ieee_little_endian_format && !le)
+            || (double_format == ieee_big_endian_format && le)) {
+            p += 7;
+            incr = -1;
+        }
+
+        for (i = 0; i < 8; i++) {
+            *p = *s++;
+            p += incr;
+        }
+        return 0;
+    }
 }
 
 double
 _PyFloat_Unpack4(const unsigned char *p, int le)
 {
-	if (float_format == unknown_format) {
-		unsigned char sign;
-		int e;
-		unsigned int f;
-		double x;
-		int incr = 1;
+    if (float_format == unknown_format) {
+        unsigned char sign;
+        int e;
+        unsigned int f;
+        double x;
+        int incr = 1;
 
-		if (le) {
-			p += 3;
-			incr = -1;
-		}
+        if (le) {
+            p += 3;
+            incr = -1;
+        }
 
-		/* First byte */
-		sign = (*p >> 7) & 1;
-		e = (*p & 0x7F) << 1;
-		p += incr;
+        /* First byte */
+        sign = (*p >> 7) & 1;
+        e = (*p & 0x7F) << 1;
+        p += incr;
 
-		/* Second byte */
-		e |= (*p >> 7) & 1;
-		f = (*p & 0x7F) << 16;
-		p += incr;
+        /* Second byte */
+        e |= (*p >> 7) & 1;
+        f = (*p & 0x7F) << 16;
+        p += incr;
 
-		if (e == 255) {
-			PyErr_SetString(
-				PyExc_ValueError,
-				"can't unpack IEEE 754 special value "
-				"on non-IEEE platform");
-			return -1;
-		}
+        if (e == 255) {
+            PyErr_SetString(
+                PyExc_ValueError,
+                "can't unpack IEEE 754 special value "
+                "on non-IEEE platform");
+            return -1;
+        }
 
-		/* Third byte */
-		f |= *p << 8;
-		p += incr;
+        /* Third byte */
+        f |= *p << 8;
+        p += incr;
 
-		/* Fourth byte */
-		f |= *p;
+        /* Fourth byte */
+        f |= *p;
 
-		x = (double)f / 8388608.0;
+        x = (double)f / 8388608.0;
 
-		/* XXX This sadly ignores Inf/NaN issues */
-		if (e == 0)
-			e = -126;
-		else {
-			x += 1.0;
-			e -= 127;
-		}
-		x = ldexp(x, e);
+        /* XXX This sadly ignores Inf/NaN issues */
+        if (e == 0)
+            e = -126;
+        else {
+            x += 1.0;
+            e -= 127;
+        }
+        x = ldexp(x, e);
 
-		if (sign)
-			x = -x;
+        if (sign)
+            x = -x;
 
-		return x;
-	}
-	else {
-		float x;
+        return x;
+    }
+    else {
+        float x;
 
-		if ((float_format == ieee_little_endian_format && !le)
-		    || (float_format == ieee_big_endian_format && le)) {
-			char buf[4];
-			char *d = &buf[3];
-			int i;
+        if ((float_format == ieee_little_endian_format && !le)
+            || (float_format == ieee_big_endian_format && le)) {
+            char buf[4];
+            char *d = &buf[3];
+            int i;
 
-			for (i = 0; i < 4; i++) {
-				*d-- = *p++;
-			}
-			memcpy(&x, buf, 4);
-		}
-		else {
-			memcpy(&x, p, 4);
-		}
+            for (i = 0; i < 4; i++) {
+                *d-- = *p++;
+            }
+            memcpy(&x, buf, 4);
+        }
+        else {
+            memcpy(&x, p, 4);
+        }
 
-		return x;
-	}		
+        return x;
+    }
 }
 
 double
 _PyFloat_Unpack8(const unsigned char *p, int le)
 {
-	if (double_format == unknown_format) {
-		unsigned char sign;
-		int e;
-		unsigned int fhi, flo;
-		double x;
-		int incr = 1;
+    if (double_format == unknown_format) {
+        unsigned char sign;
+        int e;
+        unsigned int fhi, flo;
+        double x;
+        int incr = 1;
 
-		if (le) {
-			p += 7;
-			incr = -1;
-		}
+        if (le) {
+            p += 7;
+            incr = -1;
+        }
 
-		/* First byte */
-		sign = (*p >> 7) & 1;
-		e = (*p & 0x7F) << 4;
-		
-		p += incr;
+        /* First byte */
+        sign = (*p >> 7) & 1;
+        e = (*p & 0x7F) << 4;
 
-		/* Second byte */
-		e |= (*p >> 4) & 0xF;
-		fhi = (*p & 0xF) << 24;
-		p += incr;
+        p += incr;
 
-		if (e == 2047) {
-			PyErr_SetString(
-				PyExc_ValueError,
-				"can't unpack IEEE 754 special value "
-				"on non-IEEE platform");
-			return -1.0;
-		}
+        /* Second byte */
+        e |= (*p >> 4) & 0xF;
+        fhi = (*p & 0xF) << 24;
+        p += incr;
 
-		/* Third byte */
-		fhi |= *p << 16;
-		p += incr;
+        if (e == 2047) {
+            PyErr_SetString(
+                PyExc_ValueError,
+                "can't unpack IEEE 754 special value "
+                "on non-IEEE platform");
+            return -1.0;
+        }
 
-		/* Fourth byte */
-		fhi |= *p  << 8;
-		p += incr;
+        /* Third byte */
+        fhi |= *p << 16;
+        p += incr;
 
-		/* Fifth byte */
-		fhi |= *p;
-		p += incr;
+        /* Fourth byte */
+        fhi |= *p  << 8;
+        p += incr;
 
-		/* Sixth byte */
-		flo = *p << 16;
-		p += incr;
+        /* Fifth byte */
+        fhi |= *p;
+        p += incr;
 
-		/* Seventh byte */
-		flo |= *p << 8;
-		p += incr;
+        /* Sixth byte */
+        flo = *p << 16;
+        p += incr;
 
-		/* Eighth byte */
-		flo |= *p;
+        /* Seventh byte */
+        flo |= *p << 8;
+        p += incr;
 
-		x = (double)fhi + (double)flo / 16777216.0; /* 2**24 */
-		x /= 268435456.0; /* 2**28 */
+        /* Eighth byte */
+        flo |= *p;
 
-		if (e == 0)
-			e = -1022;
-		else {
-			x += 1.0;
-			e -= 1023;
-		}
-		x = ldexp(x, e);
+        x = (double)fhi + (double)flo / 16777216.0; /* 2**24 */
+        x /= 268435456.0; /* 2**28 */
 
-		if (sign)
-			x = -x;
+        if (e == 0)
+            e = -1022;
+        else {
+            x += 1.0;
+            e -= 1023;
+        }
+        x = ldexp(x, e);
 
-		return x;
-	}
-	else {
-		double x;
+        if (sign)
+            x = -x;
 
-		if ((double_format == ieee_little_endian_format && !le)
-		    || (double_format == ieee_big_endian_format && le)) {
-			char buf[8];
-			char *d = &buf[7];
-			int i;
-			
-			for (i = 0; i < 8; i++) {
-				*d-- = *p++;
-			}
-			memcpy(&x, buf, 8);
-		}
-		else {
-			memcpy(&x, p, 8);
-		}
+        return x;
+    }
+    else {
+        double x;
 
-		return x;
-	}
+        if ((double_format == ieee_little_endian_format && !le)
+            || (double_format == ieee_big_endian_format && le)) {
+            char buf[8];
+            char *d = &buf[7];
+            int i;
+
+            for (i = 0; i < 8; i++) {
+                *d-- = *p++;
+            }
+            memcpy(&x, buf, 8);
+        }
+        else {
+            memcpy(&x, p, 8);
+        }
+
+        return x;
+    }
 }
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 21396ff..a3476cf 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -15,35 +15,35 @@
 #define OFF(x) offsetof(PyFrameObject, x)
 
 static PyMemberDef frame_memberlist[] = {
-	{"f_back",	T_OBJECT,	OFF(f_back),	RO},
-	{"f_code",	T_OBJECT,	OFF(f_code),	RO},
-	{"f_builtins",	T_OBJECT,	OFF(f_builtins),RO},
-	{"f_globals",	T_OBJECT,	OFF(f_globals),	RO},
-	{"f_lasti",	T_INT,		OFF(f_lasti),	RO},
-	{NULL}	/* Sentinel */
+    {"f_back",          T_OBJECT,       OFF(f_back),    RO},
+    {"f_code",          T_OBJECT,       OFF(f_code),    RO},
+    {"f_builtins",      T_OBJECT,       OFF(f_builtins),RO},
+    {"f_globals",       T_OBJECT,       OFF(f_globals), RO},
+    {"f_lasti",         T_INT,          OFF(f_lasti),   RO},
+    {NULL}      /* Sentinel */
 };
 
 #define WARN_GET_SET(NAME) \
 static PyObject * frame_get_ ## NAME(PyFrameObject *f) { \
-	if (PyErr_WarnPy3k(#NAME " has been removed in 3.x", 2) < 0) \
-		return NULL; \
-	if (f->NAME) { \
-		Py_INCREF(f->NAME); \
-		return f->NAME; \
-	} \
-        Py_RETURN_NONE;	\
+    if (PyErr_WarnPy3k(#NAME " has been removed in 3.x", 2) < 0) \
+        return NULL; \
+    if (f->NAME) { \
+        Py_INCREF(f->NAME); \
+        return f->NAME; \
+    } \
+    Py_RETURN_NONE;     \
 } \
 static int frame_set_ ## NAME(PyFrameObject *f, PyObject *new) { \
-	if (PyErr_WarnPy3k(#NAME " has been removed in 3.x", 2) < 0) \
-		return -1; \
-	if (f->NAME) { \
-		Py_CLEAR(f->NAME); \
-	} \
-        if (new == Py_None) \
-            new = NULL; \
-	Py_XINCREF(new); \
-	f->NAME = new; \
-	return 0; \
+    if (PyErr_WarnPy3k(#NAME " has been removed in 3.x", 2) < 0) \
+        return -1; \
+    if (f->NAME) { \
+        Py_CLEAR(f->NAME); \
+    } \
+    if (new == Py_None) \
+        new = NULL; \
+    Py_XINCREF(new); \
+    f->NAME = new; \
+    return 0; \
 }
 
 
@@ -55,28 +55,28 @@
 static PyObject *
 frame_getlocals(PyFrameObject *f, void *closure)
 {
-	PyFrame_FastToLocals(f);
-	Py_INCREF(f->f_locals);
-	return f->f_locals;
+    PyFrame_FastToLocals(f);
+    Py_INCREF(f->f_locals);
+    return f->f_locals;
 }
 
 int
 PyFrame_GetLineNumber(PyFrameObject *f)
 {
-	if (f->f_trace)
-		return f->f_lineno;
-	else
-		return PyCode_Addr2Line(f->f_code, f->f_lasti);
+    if (f->f_trace)
+        return f->f_lineno;
+    else
+        return PyCode_Addr2Line(f->f_code, f->f_lasti);
 }
 
 static PyObject *
 frame_getlineno(PyFrameObject *f, void *closure)
 {
-	return PyInt_FromLong(PyFrame_GetLineNumber(f));
+    return PyInt_FromLong(PyFrame_GetLineNumber(f));
 }
 
 /* Setter for f_lineno - you can set f_lineno from within a trace function in
- * order to jump to a given line of code, subject to some restrictions.	 Most
+ * order to jump to a given line of code, subject to some restrictions.  Most
  * lines are OK to jump to because they don't make any assumptions about the
  * state of the stack (obvious because you could remove the line and the code
  * would still work without any stack errors), but there are some constructs
@@ -93,307 +93,307 @@
 static int
 frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
 {
-	int new_lineno = 0;		/* The new value of f_lineno */
-	int new_lasti = 0;		/* The new value of f_lasti */
-	int new_iblock = 0;		/* The new value of f_iblock */
-	unsigned char *code = NULL;	/* The bytecode for the frame... */
-	Py_ssize_t code_len = 0;	/* ...and its length */
-	unsigned char *lnotab = NULL;	/* Iterating over co_lnotab */
-	Py_ssize_t lnotab_len = 0;	/* (ditto) */
-	int offset = 0;			/* (ditto) */
-	int line = 0;			/* (ditto) */
-	int addr = 0;			/* (ditto) */
-	int min_addr = 0;		/* Scanning the SETUPs and POPs */
-	int max_addr = 0;		/* (ditto) */
-	int delta_iblock = 0;		/* (ditto) */
-	int min_delta_iblock = 0;	/* (ditto) */
-	int min_iblock = 0;		/* (ditto) */
-	int f_lasti_setup_addr = 0;	/* Policing no-jump-into-finally */
-	int new_lasti_setup_addr = 0;	/* (ditto) */
-	int blockstack[CO_MAXBLOCKS];	/* Walking the 'finally' blocks */
-	int in_finally[CO_MAXBLOCKS];	/* (ditto) */
-	int blockstack_top = 0;		/* (ditto) */
-	unsigned char setup_op = 0;	/* (ditto) */
+    int new_lineno = 0;                 /* The new value of f_lineno */
+    int new_lasti = 0;                  /* The new value of f_lasti */
+    int new_iblock = 0;                 /* The new value of f_iblock */
+    unsigned char *code = NULL;         /* The bytecode for the frame... */
+    Py_ssize_t code_len = 0;            /* ...and its length */
+    unsigned char *lnotab = NULL;       /* Iterating over co_lnotab */
+    Py_ssize_t lnotab_len = 0;          /* (ditto) */
+    int offset = 0;                     /* (ditto) */
+    int line = 0;                       /* (ditto) */
+    int addr = 0;                       /* (ditto) */
+    int min_addr = 0;                   /* Scanning the SETUPs and POPs */
+    int max_addr = 0;                   /* (ditto) */
+    int delta_iblock = 0;               /* (ditto) */
+    int min_delta_iblock = 0;           /* (ditto) */
+    int min_iblock = 0;                 /* (ditto) */
+    int f_lasti_setup_addr = 0;         /* Policing no-jump-into-finally */
+    int new_lasti_setup_addr = 0;       /* (ditto) */
+    int blockstack[CO_MAXBLOCKS];       /* Walking the 'finally' blocks */
+    int in_finally[CO_MAXBLOCKS];       /* (ditto) */
+    int blockstack_top = 0;             /* (ditto) */
+    unsigned char setup_op = 0;         /* (ditto) */
 
-	/* f_lineno must be an integer. */
-	if (!PyInt_Check(p_new_lineno)) {
-		PyErr_SetString(PyExc_ValueError,
-				"lineno must be an integer");
-		return -1;
-	}
+    /* f_lineno must be an integer. */
+    if (!PyInt_Check(p_new_lineno)) {
+        PyErr_SetString(PyExc_ValueError,
+                        "lineno must be an integer");
+        return -1;
+    }
 
-	/* You can only do this from within a trace function, not via
-	 * _getframe or similar hackery. */
-	if (!f->f_trace)
-	{
-		PyErr_Format(PyExc_ValueError,
-			     "f_lineno can only be set by a"
-			     " line trace function");
-		return -1;
-	}
+    /* You can only do this from within a trace function, not via
+     * _getframe or similar hackery. */
+    if (!f->f_trace)
+    {
+        PyErr_Format(PyExc_ValueError,
+                     "f_lineno can only be set by a"
+                     " line trace function");
+        return -1;
+    }
 
-	/* Fail if the line comes before the start of the code block. */
-	new_lineno = (int) PyInt_AsLong(p_new_lineno);
-	if (new_lineno < f->f_code->co_firstlineno) {
-		PyErr_Format(PyExc_ValueError,
-			     "line %d comes before the current code block",
-			     new_lineno);
-		return -1;
-	}
-	else if (new_lineno == f->f_code->co_firstlineno) {
-		new_lasti = 0;
-		new_lineno = f->f_code->co_firstlineno;
-	}
-	else {
-		/* Find the bytecode offset for the start of the given
-		 * line, or the first code-owning line after it. */
-		char *tmp;
-		PyString_AsStringAndSize(f->f_code->co_lnotab,
-					 &tmp, &lnotab_len);
-		lnotab = (unsigned char *) tmp;
-		addr = 0;
-		line = f->f_code->co_firstlineno;
-		new_lasti = -1;
-		for (offset = 0; offset < lnotab_len; offset += 2) {
-			addr += lnotab[offset];
-			line += lnotab[offset+1];
-			if (line >= new_lineno) {
-				new_lasti = addr;
-				new_lineno = line;
-				break;
-			}
-		}
-	}
+    /* Fail if the line comes before the start of the code block. */
+    new_lineno = (int) PyInt_AsLong(p_new_lineno);
+    if (new_lineno < f->f_code->co_firstlineno) {
+        PyErr_Format(PyExc_ValueError,
+                     "line %d comes before the current code block",
+                     new_lineno);
+        return -1;
+    }
+    else if (new_lineno == f->f_code->co_firstlineno) {
+        new_lasti = 0;
+        new_lineno = f->f_code->co_firstlineno;
+    }
+    else {
+        /* Find the bytecode offset for the start of the given
+         * line, or the first code-owning line after it. */
+        char *tmp;
+        PyString_AsStringAndSize(f->f_code->co_lnotab,
+                                 &tmp, &lnotab_len);
+        lnotab = (unsigned char *) tmp;
+        addr = 0;
+        line = f->f_code->co_firstlineno;
+        new_lasti = -1;
+        for (offset = 0; offset < lnotab_len; offset += 2) {
+            addr += lnotab[offset];
+            line += lnotab[offset+1];
+            if (line >= new_lineno) {
+                new_lasti = addr;
+                new_lineno = line;
+                break;
+            }
+        }
+    }
 
-	/* If we didn't reach the requested line, return an error. */
-	if (new_lasti == -1) {
-		PyErr_Format(PyExc_ValueError,
-			     "line %d comes after the current code block",
-			     new_lineno);
-		return -1;
-	}
+    /* If we didn't reach the requested line, return an error. */
+    if (new_lasti == -1) {
+        PyErr_Format(PyExc_ValueError,
+                     "line %d comes after the current code block",
+                     new_lineno);
+        return -1;
+    }
 
-	/* We're now ready to look at the bytecode. */
-	PyString_AsStringAndSize(f->f_code->co_code, (char **)&code, &code_len);
-	min_addr = MIN(new_lasti, f->f_lasti);
-	max_addr = MAX(new_lasti, f->f_lasti);
+    /* We're now ready to look at the bytecode. */
+    PyString_AsStringAndSize(f->f_code->co_code, (char **)&code, &code_len);
+    min_addr = MIN(new_lasti, f->f_lasti);
+    max_addr = MAX(new_lasti, f->f_lasti);
 
-	/* You can't jump onto a line with an 'except' statement on it -
-	 * they expect to have an exception on the top of the stack, which
-	 * won't be true if you jump to them.  They always start with code
-	 * that either pops the exception using POP_TOP (plain 'except:'
-	 * lines do this) or duplicates the exception on the stack using
-	 * DUP_TOP (if there's an exception type specified).  See compile.c,
-	 * 'com_try_except' for the full details.  There aren't any other
-	 * cases (AFAIK) where a line's code can start with DUP_TOP or
-	 * POP_TOP, but if any ever appear, they'll be subject to the same
-	 * restriction (but with a different error message). */
-	if (code[new_lasti] == DUP_TOP || code[new_lasti] == POP_TOP) {
-		PyErr_SetString(PyExc_ValueError,
-		    "can't jump to 'except' line as there's no exception");
-		return -1;
-	}
+    /* You can't jump onto a line with an 'except' statement on it -
+     * they expect to have an exception on the top of the stack, which
+     * won't be true if you jump to them.  They always start with code
+     * that either pops the exception using POP_TOP (plain 'except:'
+     * lines do this) or duplicates the exception on the stack using
+     * DUP_TOP (if there's an exception type specified).  See compile.c,
+     * 'com_try_except' for the full details.  There aren't any other
+     * cases (AFAIK) where a line's code can start with DUP_TOP or
+     * POP_TOP, but if any ever appear, they'll be subject to the same
+     * restriction (but with a different error message). */
+    if (code[new_lasti] == DUP_TOP || code[new_lasti] == POP_TOP) {
+        PyErr_SetString(PyExc_ValueError,
+            "can't jump to 'except' line as there's no exception");
+        return -1;
+    }
 
-	/* You can't jump into or out of a 'finally' block because the 'try'
-	 * block leaves something on the stack for the END_FINALLY to clean
-	 * up.	So we walk the bytecode, maintaining a simulated blockstack.
-	 * When we reach the old or new address and it's in a 'finally' block
-	 * we note the address of the corresponding SETUP_FINALLY.  The jump
-	 * is only legal if neither address is in a 'finally' block or
-	 * they're both in the same one.  'blockstack' is a stack of the
-	 * bytecode addresses of the SETUP_X opcodes, and 'in_finally' tracks
-	 * whether we're in a 'finally' block at each blockstack level. */
-	f_lasti_setup_addr = -1;
-	new_lasti_setup_addr = -1;
-	memset(blockstack, '\0', sizeof(blockstack));
-	memset(in_finally, '\0', sizeof(in_finally));
-	blockstack_top = 0;
-	for (addr = 0; addr < code_len; addr++) {
-		unsigned char op = code[addr];
-		switch (op) {
-		case SETUP_LOOP:
-		case SETUP_EXCEPT:
-		case SETUP_FINALLY:
-			blockstack[blockstack_top++] = addr;
-			in_finally[blockstack_top-1] = 0;
-			break;
+    /* You can't jump into or out of a 'finally' block because the 'try'
+     * block leaves something on the stack for the END_FINALLY to clean
+     * up.      So we walk the bytecode, maintaining a simulated blockstack.
+     * When we reach the old or new address and it's in a 'finally' block
+     * we note the address of the corresponding SETUP_FINALLY.  The jump
+     * is only legal if neither address is in a 'finally' block or
+     * they're both in the same one.  'blockstack' is a stack of the
+     * bytecode addresses of the SETUP_X opcodes, and 'in_finally' tracks
+     * whether we're in a 'finally' block at each blockstack level. */
+    f_lasti_setup_addr = -1;
+    new_lasti_setup_addr = -1;
+    memset(blockstack, '\0', sizeof(blockstack));
+    memset(in_finally, '\0', sizeof(in_finally));
+    blockstack_top = 0;
+    for (addr = 0; addr < code_len; addr++) {
+        unsigned char op = code[addr];
+        switch (op) {
+        case SETUP_LOOP:
+        case SETUP_EXCEPT:
+        case SETUP_FINALLY:
+            blockstack[blockstack_top++] = addr;
+            in_finally[blockstack_top-1] = 0;
+            break;
 
-		case POP_BLOCK:
-			assert(blockstack_top > 0);
-			setup_op = code[blockstack[blockstack_top-1]];
-			if (setup_op == SETUP_FINALLY) {
-				in_finally[blockstack_top-1] = 1;
-			}
-			else {
-				blockstack_top--;
-			}
-			break;
+        case POP_BLOCK:
+            assert(blockstack_top > 0);
+            setup_op = code[blockstack[blockstack_top-1]];
+            if (setup_op == SETUP_FINALLY) {
+                in_finally[blockstack_top-1] = 1;
+            }
+            else {
+                blockstack_top--;
+            }
+            break;
 
-		case END_FINALLY:
-			/* Ignore END_FINALLYs for SETUP_EXCEPTs - they exist
-			 * in the bytecode but don't correspond to an actual
-			 * 'finally' block.  (If blockstack_top is 0, we must
-			 * be seeing such an END_FINALLY.) */
-			if (blockstack_top > 0) {
-				setup_op = code[blockstack[blockstack_top-1]];
-				if (setup_op == SETUP_FINALLY) {
-					blockstack_top--;
-				}
-			}
-			break;
-		}
+        case END_FINALLY:
+            /* Ignore END_FINALLYs for SETUP_EXCEPTs - they exist
+             * in the bytecode but don't correspond to an actual
+             * 'finally' block.  (If blockstack_top is 0, we must
+             * be seeing such an END_FINALLY.) */
+            if (blockstack_top > 0) {
+                setup_op = code[blockstack[blockstack_top-1]];
+                if (setup_op == SETUP_FINALLY) {
+                    blockstack_top--;
+                }
+            }
+            break;
+        }
 
-		/* For the addresses we're interested in, see whether they're
-		 * within a 'finally' block and if so, remember the address
-		 * of the SETUP_FINALLY. */
-		if (addr == new_lasti || addr == f->f_lasti) {
-			int i = 0;
-			int setup_addr = -1;
-			for (i = blockstack_top-1; i >= 0; i--) {
-				if (in_finally[i]) {
-					setup_addr = blockstack[i];
-					break;
-				}
-			}
+        /* For the addresses we're interested in, see whether they're
+         * within a 'finally' block and if so, remember the address
+         * of the SETUP_FINALLY. */
+        if (addr == new_lasti || addr == f->f_lasti) {
+            int i = 0;
+            int setup_addr = -1;
+            for (i = blockstack_top-1; i >= 0; i--) {
+                if (in_finally[i]) {
+                    setup_addr = blockstack[i];
+                    break;
+                }
+            }
 
-			if (setup_addr != -1) {
-				if (addr == new_lasti) {
-					new_lasti_setup_addr = setup_addr;
-				}
+            if (setup_addr != -1) {
+                if (addr == new_lasti) {
+                    new_lasti_setup_addr = setup_addr;
+                }
 
-				if (addr == f->f_lasti) {
-					f_lasti_setup_addr = setup_addr;
-				}
-			}
-		}
+                if (addr == f->f_lasti) {
+                    f_lasti_setup_addr = setup_addr;
+                }
+            }
+        }
 
-		if (op >= HAVE_ARGUMENT) {
-			addr += 2;
-		}
-	}
+        if (op >= HAVE_ARGUMENT) {
+            addr += 2;
+        }
+    }
 
-	/* Verify that the blockstack tracking code didn't get lost. */
-	assert(blockstack_top == 0);
+    /* Verify that the blockstack tracking code didn't get lost. */
+    assert(blockstack_top == 0);
 
-	/* After all that, are we jumping into / out of a 'finally' block? */
-	if (new_lasti_setup_addr != f_lasti_setup_addr) {
-		PyErr_SetString(PyExc_ValueError,
-			    "can't jump into or out of a 'finally' block");
-		return -1;
-	}
+    /* After all that, are we jumping into / out of a 'finally' block? */
+    if (new_lasti_setup_addr != f_lasti_setup_addr) {
+        PyErr_SetString(PyExc_ValueError,
+                    "can't jump into or out of a 'finally' block");
+        return -1;
+    }
 
 
-	/* Police block-jumping (you can't jump into the middle of a block)
-	 * and ensure that the blockstack finishes up in a sensible state (by
-	 * popping any blocks we're jumping out of).  We look at all the
-	 * blockstack operations between the current position and the new
-	 * one, and keep track of how many blocks we drop out of on the way.
-	 * By also keeping track of the lowest blockstack position we see, we
-	 * can tell whether the jump goes into any blocks without coming out
-	 * again - in that case we raise an exception below. */
-	delta_iblock = 0;
-	for (addr = min_addr; addr < max_addr; addr++) {
-		unsigned char op = code[addr];
-		switch (op) {
-		case SETUP_LOOP:
-		case SETUP_EXCEPT:
-		case SETUP_FINALLY:
-			delta_iblock++;
-			break;
+    /* Police block-jumping (you can't jump into the middle of a block)
+     * and ensure that the blockstack finishes up in a sensible state (by
+     * popping any blocks we're jumping out of).  We look at all the
+     * blockstack operations between the current position and the new
+     * one, and keep track of how many blocks we drop out of on the way.
+     * By also keeping track of the lowest blockstack position we see, we
+     * can tell whether the jump goes into any blocks without coming out
+     * again - in that case we raise an exception below. */
+    delta_iblock = 0;
+    for (addr = min_addr; addr < max_addr; addr++) {
+        unsigned char op = code[addr];
+        switch (op) {
+        case SETUP_LOOP:
+        case SETUP_EXCEPT:
+        case SETUP_FINALLY:
+            delta_iblock++;
+            break;
 
-		case POP_BLOCK:
-			delta_iblock--;
-			break;
-		}
+        case POP_BLOCK:
+            delta_iblock--;
+            break;
+        }
 
-		min_delta_iblock = MIN(min_delta_iblock, delta_iblock);
+        min_delta_iblock = MIN(min_delta_iblock, delta_iblock);
 
-		if (op >= HAVE_ARGUMENT) {
-			addr += 2;
-		}
-	}
+        if (op >= HAVE_ARGUMENT) {
+            addr += 2;
+        }
+    }
 
-	/* Derive the absolute iblock values from the deltas. */
-	min_iblock = f->f_iblock + min_delta_iblock;
-	if (new_lasti > f->f_lasti) {
-		/* Forwards jump. */
-		new_iblock = f->f_iblock + delta_iblock;
-	}
-	else {
-		/* Backwards jump. */
-		new_iblock = f->f_iblock - delta_iblock;
-	}
+    /* Derive the absolute iblock values from the deltas. */
+    min_iblock = f->f_iblock + min_delta_iblock;
+    if (new_lasti > f->f_lasti) {
+        /* Forwards jump. */
+        new_iblock = f->f_iblock + delta_iblock;
+    }
+    else {
+        /* Backwards jump. */
+        new_iblock = f->f_iblock - delta_iblock;
+    }
 
-	/* Are we jumping into a block? */
-	if (new_iblock > min_iblock) {
-		PyErr_SetString(PyExc_ValueError,
-				"can't jump into the middle of a block");
-		return -1;
-	}
+    /* Are we jumping into a block? */
+    if (new_iblock > min_iblock) {
+        PyErr_SetString(PyExc_ValueError,
+                        "can't jump into the middle of a block");
+        return -1;
+    }
 
-	/* Pop any blocks that we're jumping out of. */
-	while (f->f_iblock > new_iblock) {
-		PyTryBlock *b = &f->f_blockstack[--f->f_iblock];
-		while ((f->f_stacktop - f->f_valuestack) > b->b_level) {
-			PyObject *v = (*--f->f_stacktop);
-			Py_DECREF(v);
-		}
-	}
+    /* Pop any blocks that we're jumping out of. */
+    while (f->f_iblock > new_iblock) {
+        PyTryBlock *b = &f->f_blockstack[--f->f_iblock];
+        while ((f->f_stacktop - f->f_valuestack) > b->b_level) {
+            PyObject *v = (*--f->f_stacktop);
+            Py_DECREF(v);
+        }
+    }
 
-	/* Finally set the new f_lineno and f_lasti and return OK. */
-	f->f_lineno = new_lineno;
-	f->f_lasti = new_lasti;
-	return 0;
+    /* Finally set the new f_lineno and f_lasti and return OK. */
+    f->f_lineno = new_lineno;
+    f->f_lasti = new_lasti;
+    return 0;
 }
 
 static PyObject *
 frame_gettrace(PyFrameObject *f, void *closure)
 {
-	PyObject* trace = f->f_trace;
+    PyObject* trace = f->f_trace;
 
-	if (trace == NULL)
-		trace = Py_None;
+    if (trace == NULL)
+        trace = Py_None;
 
-	Py_INCREF(trace);
+    Py_INCREF(trace);
 
-	return trace;
+    return trace;
 }
 
 static int
 frame_settrace(PyFrameObject *f, PyObject* v, void *closure)
 {
-	PyObject* old_value;
+    PyObject* old_value;
 
-	/* We rely on f_lineno being accurate when f_trace is set. */
-	f->f_lineno = PyFrame_GetLineNumber(f);
+    /* We rely on f_lineno being accurate when f_trace is set. */
+    f->f_lineno = PyFrame_GetLineNumber(f);
 
-	old_value = f->f_trace;
-	Py_XINCREF(v);
-	f->f_trace = v;
-	Py_XDECREF(old_value);
+    old_value = f->f_trace;
+    Py_XINCREF(v);
+    f->f_trace = v;
+    Py_XDECREF(old_value);
 
-	return 0;
+    return 0;
 }
 
 static PyObject *
 frame_getrestricted(PyFrameObject *f, void *closure)
 {
-	return PyBool_FromLong(PyFrame_IsRestricted(f));
+    return PyBool_FromLong(PyFrame_IsRestricted(f));
 }
 
 static PyGetSetDef frame_getsetlist[] = {
-	{"f_locals",	(getter)frame_getlocals, NULL, NULL},
-	{"f_lineno",	(getter)frame_getlineno,
-			(setter)frame_setlineno, NULL},
-	{"f_trace",	(getter)frame_gettrace, (setter)frame_settrace, NULL},
-	{"f_restricted",(getter)frame_getrestricted,NULL, NULL},
-	{"f_exc_traceback", (getter)frame_get_f_exc_traceback,
-	                (setter)frame_set_f_exc_traceback, NULL},
-        {"f_exc_type",  (getter)frame_get_f_exc_type,
-                        (setter)frame_set_f_exc_type, NULL},
-        {"f_exc_value", (getter)frame_get_f_exc_value,
-                        (setter)frame_set_f_exc_value, NULL},
-	{0}
+    {"f_locals",        (getter)frame_getlocals, NULL, NULL},
+    {"f_lineno",        (getter)frame_getlineno,
+                    (setter)frame_setlineno, NULL},
+    {"f_trace",         (getter)frame_gettrace, (setter)frame_settrace, NULL},
+    {"f_restricted",(getter)frame_getrestricted,NULL, NULL},
+    {"f_exc_traceback", (getter)frame_get_f_exc_traceback,
+                    (setter)frame_set_f_exc_traceback, NULL},
+    {"f_exc_type",  (getter)frame_get_f_exc_type,
+                    (setter)frame_set_f_exc_type, NULL},
+    {"f_exc_value", (getter)frame_get_f_exc_value,
+                    (setter)frame_set_f_exc_value, NULL},
+    {0}
 };
 
 /* Stack frames are allocated and deallocated at a considerable rate.
@@ -410,7 +410,7 @@
    the following fields are still valid:
 
      * ob_type, ob_size, f_code, f_valuestack;
-       
+
      * f_locals, f_trace,
        f_exc_type, f_exc_value, f_exc_traceback are NULL;
 
@@ -421,10 +421,10 @@
    integers are allocated in a special way -- see intobject.c).  When
    a stack frame is on the free list, only the following members have
    a meaning:
-	ob_type		== &Frametype
-	f_back		next item on free list, or NULL
-	f_stacksize	size of value stack
-	ob_size		size of localsplus
+    ob_type             == &Frametype
+    f_back              next item on free list, or NULL
+    f_stacksize         size of value stack
+    ob_size             size of localsplus
    Note that the value and block stacks are preserved -- this can save
    another malloc() call or two (and two free() calls as well!).
    Also note that, unlike for integers, each frame object is a
@@ -440,307 +440,307 @@
 */
 
 static PyFrameObject *free_list = NULL;
-static int numfree = 0;		/* number of frames currently in free_list */
+static int numfree = 0;         /* number of frames currently in free_list */
 /* max value for numfree */
-#define PyFrame_MAXFREELIST 200	
+#define PyFrame_MAXFREELIST 200
 
 static void
 frame_dealloc(PyFrameObject *f)
 {
-	PyObject **p, **valuestack;
-	PyCodeObject *co;
+    PyObject **p, **valuestack;
+    PyCodeObject *co;
 
-	PyObject_GC_UnTrack(f);
-	Py_TRASHCAN_SAFE_BEGIN(f)
-	/* Kill all local variables */
-	valuestack = f->f_valuestack;
-	for (p = f->f_localsplus; p < valuestack; p++)
-		Py_CLEAR(*p);
+    PyObject_GC_UnTrack(f);
+    Py_TRASHCAN_SAFE_BEGIN(f)
+    /* Kill all local variables */
+    valuestack = f->f_valuestack;
+    for (p = f->f_localsplus; p < valuestack; p++)
+        Py_CLEAR(*p);
 
-	/* Free stack */
-	if (f->f_stacktop != NULL) {
-		for (p = valuestack; p < f->f_stacktop; p++)
-			Py_XDECREF(*p);
-	}
+    /* Free stack */
+    if (f->f_stacktop != NULL) {
+        for (p = valuestack; p < f->f_stacktop; p++)
+            Py_XDECREF(*p);
+    }
 
-	Py_XDECREF(f->f_back);
-	Py_DECREF(f->f_builtins);
-	Py_DECREF(f->f_globals);
-	Py_CLEAR(f->f_locals);
-	Py_CLEAR(f->f_trace);
-	Py_CLEAR(f->f_exc_type);
-	Py_CLEAR(f->f_exc_value);
-	Py_CLEAR(f->f_exc_traceback);
+    Py_XDECREF(f->f_back);
+    Py_DECREF(f->f_builtins);
+    Py_DECREF(f->f_globals);
+    Py_CLEAR(f->f_locals);
+    Py_CLEAR(f->f_trace);
+    Py_CLEAR(f->f_exc_type);
+    Py_CLEAR(f->f_exc_value);
+    Py_CLEAR(f->f_exc_traceback);
 
-	co = f->f_code;
-	if (co->co_zombieframe == NULL)
-		co->co_zombieframe = f;
-	else if (numfree < PyFrame_MAXFREELIST) {
-		++numfree;
-		f->f_back = free_list;
-		free_list = f;
-	}
-	else 
-		PyObject_GC_Del(f);
+    co = f->f_code;
+    if (co->co_zombieframe == NULL)
+        co->co_zombieframe = f;
+    else if (numfree < PyFrame_MAXFREELIST) {
+        ++numfree;
+        f->f_back = free_list;
+        free_list = f;
+    }
+    else
+        PyObject_GC_Del(f);
 
-	Py_DECREF(co);
-	Py_TRASHCAN_SAFE_END(f)
+    Py_DECREF(co);
+    Py_TRASHCAN_SAFE_END(f)
 }
 
 static int
 frame_traverse(PyFrameObject *f, visitproc visit, void *arg)
 {
-	PyObject **fastlocals, **p;
-	int i, slots;
+    PyObject **fastlocals, **p;
+    int i, slots;
 
-	Py_VISIT(f->f_back);
-	Py_VISIT(f->f_code);
-	Py_VISIT(f->f_builtins);
-	Py_VISIT(f->f_globals);
-	Py_VISIT(f->f_locals);
-	Py_VISIT(f->f_trace);
-	Py_VISIT(f->f_exc_type);
-	Py_VISIT(f->f_exc_value);
-	Py_VISIT(f->f_exc_traceback);
+    Py_VISIT(f->f_back);
+    Py_VISIT(f->f_code);
+    Py_VISIT(f->f_builtins);
+    Py_VISIT(f->f_globals);
+    Py_VISIT(f->f_locals);
+    Py_VISIT(f->f_trace);
+    Py_VISIT(f->f_exc_type);
+    Py_VISIT(f->f_exc_value);
+    Py_VISIT(f->f_exc_traceback);
 
-	/* locals */
-	slots = f->f_code->co_nlocals + PyTuple_GET_SIZE(f->f_code->co_cellvars) + PyTuple_GET_SIZE(f->f_code->co_freevars);
-	fastlocals = f->f_localsplus;
-	for (i = slots; --i >= 0; ++fastlocals)
-		Py_VISIT(*fastlocals);
+    /* locals */
+    slots = f->f_code->co_nlocals + PyTuple_GET_SIZE(f->f_code->co_cellvars) + PyTuple_GET_SIZE(f->f_code->co_freevars);
+    fastlocals = f->f_localsplus;
+    for (i = slots; --i >= 0; ++fastlocals)
+        Py_VISIT(*fastlocals);
 
-	/* stack */
-	if (f->f_stacktop != NULL) {
-		for (p = f->f_valuestack; p < f->f_stacktop; p++)
-			Py_VISIT(*p);
-	}
-	return 0;
+    /* stack */
+    if (f->f_stacktop != NULL) {
+        for (p = f->f_valuestack; p < f->f_stacktop; p++)
+            Py_VISIT(*p);
+    }
+    return 0;
 }
 
 static void
 frame_clear(PyFrameObject *f)
 {
-	PyObject **fastlocals, **p, **oldtop;
-	int i, slots;
+    PyObject **fastlocals, **p, **oldtop;
+    int i, slots;
 
-	/* Before anything else, make sure that this frame is clearly marked
-	 * as being defunct!  Else, e.g., a generator reachable from this
-	 * frame may also point to this frame, believe itself to still be
-	 * active, and try cleaning up this frame again.
-	 */
-	oldtop = f->f_stacktop;
-	f->f_stacktop = NULL;
+    /* Before anything else, make sure that this frame is clearly marked
+     * as being defunct!  Else, e.g., a generator reachable from this
+     * frame may also point to this frame, believe itself to still be
+     * active, and try cleaning up this frame again.
+     */
+    oldtop = f->f_stacktop;
+    f->f_stacktop = NULL;
 
-	Py_CLEAR(f->f_exc_type);
-	Py_CLEAR(f->f_exc_value);
-	Py_CLEAR(f->f_exc_traceback);
-	Py_CLEAR(f->f_trace);
+    Py_CLEAR(f->f_exc_type);
+    Py_CLEAR(f->f_exc_value);
+    Py_CLEAR(f->f_exc_traceback);
+    Py_CLEAR(f->f_trace);
 
-	/* locals */
-	slots = f->f_code->co_nlocals + PyTuple_GET_SIZE(f->f_code->co_cellvars) + PyTuple_GET_SIZE(f->f_code->co_freevars);
-	fastlocals = f->f_localsplus;
-	for (i = slots; --i >= 0; ++fastlocals)
-		Py_CLEAR(*fastlocals);
+    /* locals */
+    slots = f->f_code->co_nlocals + PyTuple_GET_SIZE(f->f_code->co_cellvars) + PyTuple_GET_SIZE(f->f_code->co_freevars);
+    fastlocals = f->f_localsplus;
+    for (i = slots; --i >= 0; ++fastlocals)
+        Py_CLEAR(*fastlocals);
 
-	/* stack */
-	if (oldtop != NULL) {
-		for (p = f->f_valuestack; p < oldtop; p++)
-			Py_CLEAR(*p);
-	}
+    /* stack */
+    if (oldtop != NULL) {
+        for (p = f->f_valuestack; p < oldtop; p++)
+            Py_CLEAR(*p);
+    }
 }
 
 static PyObject *
 frame_sizeof(PyFrameObject *f)
 {
-	Py_ssize_t res, extras, ncells, nfrees;
+    Py_ssize_t res, extras, ncells, nfrees;
 
-	ncells = PyTuple_GET_SIZE(f->f_code->co_cellvars);
-	nfrees = PyTuple_GET_SIZE(f->f_code->co_freevars);
-	extras = f->f_code->co_stacksize + f->f_code->co_nlocals +
-		 ncells + nfrees;
-	/* subtract one as it is already included in PyFrameObject */
-	res = sizeof(PyFrameObject) + (extras-1) * sizeof(PyObject *);
+    ncells = PyTuple_GET_SIZE(f->f_code->co_cellvars);
+    nfrees = PyTuple_GET_SIZE(f->f_code->co_freevars);
+    extras = f->f_code->co_stacksize + f->f_code->co_nlocals +
+             ncells + nfrees;
+    /* subtract one as it is already included in PyFrameObject */
+    res = sizeof(PyFrameObject) + (extras-1) * sizeof(PyObject *);
 
-	return PyInt_FromSsize_t(res);
+    return PyInt_FromSsize_t(res);
 }
 
 PyDoc_STRVAR(sizeof__doc__,
 "F.__sizeof__() -> size of F in memory, in bytes");
 
 static PyMethodDef frame_methods[] = {
-	{"__sizeof__",	(PyCFunction)frame_sizeof,	METH_NOARGS,
-	 sizeof__doc__},
-	{NULL,		NULL}	/* sentinel */
+    {"__sizeof__",      (PyCFunction)frame_sizeof,      METH_NOARGS,
+     sizeof__doc__},
+    {NULL,              NULL}   /* sentinel */
 };
 
 PyTypeObject PyFrame_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"frame",
-	sizeof(PyFrameObject),
-	sizeof(PyObject *),
-	(destructor)frame_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	PyObject_GenericSetAttr,		/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
-	0,					/* tp_doc */
-	(traverseproc)frame_traverse,		/* tp_traverse */
-	(inquiry)frame_clear,			/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	frame_methods,				/* tp_methods */
-	frame_memberlist,			/* tp_members */
-	frame_getsetlist,			/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "frame",
+    sizeof(PyFrameObject),
+    sizeof(PyObject *),
+    (destructor)frame_dealloc,                  /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    PyObject_GenericSetAttr,                    /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)frame_traverse,               /* tp_traverse */
+    (inquiry)frame_clear,                       /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    frame_methods,                              /* tp_methods */
+    frame_memberlist,                           /* tp_members */
+    frame_getsetlist,                           /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
 };
 
 static PyObject *builtin_object;
 
 int _PyFrame_Init()
 {
-	builtin_object = PyString_InternFromString("__builtins__");
-	if (builtin_object == NULL)
-		return 0;
-	return 1;
+    builtin_object = PyString_InternFromString("__builtins__");
+    if (builtin_object == NULL)
+        return 0;
+    return 1;
 }
 
 PyFrameObject *
 PyFrame_New(PyThreadState *tstate, PyCodeObject *code, PyObject *globals,
-	    PyObject *locals)
+            PyObject *locals)
 {
-	PyFrameObject *back = tstate->frame;
-	PyFrameObject *f;
-	PyObject *builtins;
-	Py_ssize_t i;
+    PyFrameObject *back = tstate->frame;
+    PyFrameObject *f;
+    PyObject *builtins;
+    Py_ssize_t i;
 
 #ifdef Py_DEBUG
-	if (code == NULL || globals == NULL || !PyDict_Check(globals) ||
-	    (locals != NULL && !PyMapping_Check(locals))) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
+    if (code == NULL || globals == NULL || !PyDict_Check(globals) ||
+        (locals != NULL && !PyMapping_Check(locals))) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
 #endif
-	if (back == NULL || back->f_globals != globals) {
-		builtins = PyDict_GetItem(globals, builtin_object);
-		if (builtins) {
-			if (PyModule_Check(builtins)) {
-				builtins = PyModule_GetDict(builtins);
-				assert(!builtins || PyDict_Check(builtins));
-			}
-			else if (!PyDict_Check(builtins))
-				builtins = NULL;
-		}
-		if (builtins == NULL) {
-			/* No builtins!	 Make up a minimal one
-			   Give them 'None', at least. */
-			builtins = PyDict_New();
-			if (builtins == NULL ||
-			    PyDict_SetItemString(
-				    builtins, "None", Py_None) < 0)
-				return NULL;
-		}
-		else
-			Py_INCREF(builtins);
+    if (back == NULL || back->f_globals != globals) {
+        builtins = PyDict_GetItem(globals, builtin_object);
+        if (builtins) {
+            if (PyModule_Check(builtins)) {
+                builtins = PyModule_GetDict(builtins);
+                assert(!builtins || PyDict_Check(builtins));
+            }
+            else if (!PyDict_Check(builtins))
+                builtins = NULL;
+        }
+        if (builtins == NULL) {
+            /* No builtins!              Make up a minimal one
+               Give them 'None', at least. */
+            builtins = PyDict_New();
+            if (builtins == NULL ||
+                PyDict_SetItemString(
+                    builtins, "None", Py_None) < 0)
+                return NULL;
+        }
+        else
+            Py_INCREF(builtins);
 
-	}
-	else {
-		/* If we share the globals, we share the builtins.
-		   Save a lookup and a call. */
-		builtins = back->f_builtins;
-		assert(builtins != NULL && PyDict_Check(builtins));
-		Py_INCREF(builtins);
-	}
-	if (code->co_zombieframe != NULL) {
-		f = code->co_zombieframe;
-		code->co_zombieframe = NULL;
-		_Py_NewReference((PyObject *)f);
-		assert(f->f_code == code);
-	}
-	else {
-		Py_ssize_t extras, ncells, nfrees;
-		ncells = PyTuple_GET_SIZE(code->co_cellvars);
-		nfrees = PyTuple_GET_SIZE(code->co_freevars);
-		extras = code->co_stacksize + code->co_nlocals + ncells +
-		    nfrees;
-		if (free_list == NULL) {
-		    f = PyObject_GC_NewVar(PyFrameObject, &PyFrame_Type,
-			extras);
-		    if (f == NULL) {
-			    Py_DECREF(builtins);
-			    return NULL;
-		    }
-		}
-		else {
-		    assert(numfree > 0);
-		    --numfree;
-		    f = free_list;
-		    free_list = free_list->f_back;
-		    if (Py_SIZE(f) < extras) {
-			    f = PyObject_GC_Resize(PyFrameObject, f, extras);
-			    if (f == NULL) {
-				    Py_DECREF(builtins);
-				    return NULL;
-			    }
-		    }
-		    _Py_NewReference((PyObject *)f);
-		}
+    }
+    else {
+        /* If we share the globals, we share the builtins.
+           Save a lookup and a call. */
+        builtins = back->f_builtins;
+        assert(builtins != NULL && PyDict_Check(builtins));
+        Py_INCREF(builtins);
+    }
+    if (code->co_zombieframe != NULL) {
+        f = code->co_zombieframe;
+        code->co_zombieframe = NULL;
+        _Py_NewReference((PyObject *)f);
+        assert(f->f_code == code);
+    }
+    else {
+        Py_ssize_t extras, ncells, nfrees;
+        ncells = PyTuple_GET_SIZE(code->co_cellvars);
+        nfrees = PyTuple_GET_SIZE(code->co_freevars);
+        extras = code->co_stacksize + code->co_nlocals + ncells +
+            nfrees;
+        if (free_list == NULL) {
+            f = PyObject_GC_NewVar(PyFrameObject, &PyFrame_Type,
+            extras);
+            if (f == NULL) {
+                Py_DECREF(builtins);
+                return NULL;
+            }
+        }
+        else {
+            assert(numfree > 0);
+            --numfree;
+            f = free_list;
+            free_list = free_list->f_back;
+            if (Py_SIZE(f) < extras) {
+                f = PyObject_GC_Resize(PyFrameObject, f, extras);
+                if (f == NULL) {
+                    Py_DECREF(builtins);
+                    return NULL;
+                }
+            }
+            _Py_NewReference((PyObject *)f);
+        }
 
-		f->f_code = code;
-		extras = code->co_nlocals + ncells + nfrees;
-		f->f_valuestack = f->f_localsplus + extras;
-		for (i=0; i<extras; i++)
-			f->f_localsplus[i] = NULL;
-		f->f_locals = NULL;
-		f->f_trace = NULL;
-		f->f_exc_type = f->f_exc_value = f->f_exc_traceback = NULL;
-	}
-	f->f_stacktop = f->f_valuestack;
-	f->f_builtins = builtins;
-	Py_XINCREF(back);
-	f->f_back = back;
-	Py_INCREF(code);
-	Py_INCREF(globals);
-	f->f_globals = globals;
-	/* Most functions have CO_NEWLOCALS and CO_OPTIMIZED set. */
-	if ((code->co_flags & (CO_NEWLOCALS | CO_OPTIMIZED)) ==
-		(CO_NEWLOCALS | CO_OPTIMIZED))
-		; /* f_locals = NULL; will be set by PyFrame_FastToLocals() */
-	else if (code->co_flags & CO_NEWLOCALS) {
-		locals = PyDict_New();
-		if (locals == NULL) {
-			Py_DECREF(f);
-			return NULL;
-		}
-		f->f_locals = locals;
-	}
-	else {
-		if (locals == NULL)
-			locals = globals;
-		Py_INCREF(locals);
-		f->f_locals = locals;
-	}
-	f->f_tstate = tstate;
+        f->f_code = code;
+        extras = code->co_nlocals + ncells + nfrees;
+        f->f_valuestack = f->f_localsplus + extras;
+        for (i=0; i<extras; i++)
+            f->f_localsplus[i] = NULL;
+        f->f_locals = NULL;
+        f->f_trace = NULL;
+        f->f_exc_type = f->f_exc_value = f->f_exc_traceback = NULL;
+    }
+    f->f_stacktop = f->f_valuestack;
+    f->f_builtins = builtins;
+    Py_XINCREF(back);
+    f->f_back = back;
+    Py_INCREF(code);
+    Py_INCREF(globals);
+    f->f_globals = globals;
+    /* Most functions have CO_NEWLOCALS and CO_OPTIMIZED set. */
+    if ((code->co_flags & (CO_NEWLOCALS | CO_OPTIMIZED)) ==
+        (CO_NEWLOCALS | CO_OPTIMIZED))
+        ; /* f_locals = NULL; will be set by PyFrame_FastToLocals() */
+    else if (code->co_flags & CO_NEWLOCALS) {
+        locals = PyDict_New();
+        if (locals == NULL) {
+            Py_DECREF(f);
+            return NULL;
+        }
+        f->f_locals = locals;
+    }
+    else {
+        if (locals == NULL)
+            locals = globals;
+        Py_INCREF(locals);
+        f->f_locals = locals;
+    }
+    f->f_tstate = tstate;
 
-	f->f_lasti = -1;
-	f->f_lineno = code->co_firstlineno;
-	f->f_iblock = 0;
+    f->f_lasti = -1;
+    f->f_lineno = code->co_firstlineno;
+    f->f_iblock = 0;
 
-	_PyObject_GC_TRACK(f);
-	return f;
+    _PyObject_GC_TRACK(f);
+    return f;
 }
 
 /* Block management */
@@ -748,28 +748,28 @@
 void
 PyFrame_BlockSetup(PyFrameObject *f, int type, int handler, int level)
 {
-	PyTryBlock *b;
-	if (f->f_iblock >= CO_MAXBLOCKS)
-		Py_FatalError("XXX block stack overflow");
-	b = &f->f_blockstack[f->f_iblock++];
-	b->b_type = type;
-	b->b_level = level;
-	b->b_handler = handler;
+    PyTryBlock *b;
+    if (f->f_iblock >= CO_MAXBLOCKS)
+        Py_FatalError("XXX block stack overflow");
+    b = &f->f_blockstack[f->f_iblock++];
+    b->b_type = type;
+    b->b_level = level;
+    b->b_handler = handler;
 }
 
 PyTryBlock *
 PyFrame_BlockPop(PyFrameObject *f)
 {
-	PyTryBlock *b;
-	if (f->f_iblock <= 0)
-		Py_FatalError("XXX block stack underflow");
-	b = &f->f_blockstack[--f->f_iblock];
-	return b;
+    PyTryBlock *b;
+    if (f->f_iblock <= 0)
+        Py_FatalError("XXX block stack underflow");
+    b = &f->f_blockstack[--f->f_iblock];
+    return b;
 }
 
 /* Convert between "fast" version of locals and dictionary version.
-   
-   map and values are input arguments.	map is a tuple of strings.
+
+   map and values are input arguments.  map is a tuple of strings.
    values is an array of PyObject*.  At index i, map[i] is the name of
    the variable with value values[i].  The function copies the first
    nmap variable from map/values into dict.  If values[i] is NULL,
@@ -785,29 +785,29 @@
 
 static void
 map_to_dict(PyObject *map, Py_ssize_t nmap, PyObject *dict, PyObject **values,
-	    int deref)
+            int deref)
 {
-	Py_ssize_t j;
-	assert(PyTuple_Check(map));
-	assert(PyDict_Check(dict));
-	assert(PyTuple_Size(map) >= nmap);
-	for (j = nmap; --j >= 0; ) {
-		PyObject *key = PyTuple_GET_ITEM(map, j);
-		PyObject *value = values[j];
-		assert(PyString_Check(key));
-		if (deref) {
-			assert(PyCell_Check(value));
-			value = PyCell_GET(value);
-		}
-		if (value == NULL) {
-			if (PyObject_DelItem(dict, key) != 0)
-				PyErr_Clear();
-		}
-		else {
-			if (PyObject_SetItem(dict, key, value) != 0)
-				PyErr_Clear();
-		}
-	}
+    Py_ssize_t j;
+    assert(PyTuple_Check(map));
+    assert(PyDict_Check(dict));
+    assert(PyTuple_Size(map) >= nmap);
+    for (j = nmap; --j >= 0; ) {
+        PyObject *key = PyTuple_GET_ITEM(map, j);
+        PyObject *value = values[j];
+        assert(PyString_Check(key));
+        if (deref) {
+            assert(PyCell_Check(value));
+            value = PyCell_GET(value);
+        }
+        if (value == NULL) {
+            if (PyObject_DelItem(dict, key) != 0)
+                PyErr_Clear();
+        }
+        else {
+            if (PyObject_SetItem(dict, key, value) != 0)
+                PyErr_Clear();
+        }
+    }
 }
 
 /* Copy values from the "locals" dict into the fast locals.
@@ -815,7 +815,7 @@
    dict is an input argument containing string keys representing
    variables names and arbitrary PyObject* as values.
 
-   map and values are input arguments.	map is a tuple of strings.
+   map and values are input arguments.  map is a tuple of strings.
    values is an array of PyObject*.  At index i, map[i] is the name of
    the variable with value values[i].  The function copies the first
    nmap variable from map/values into dict.  If values[i] is NULL,
@@ -833,150 +833,150 @@
 
 static void
 dict_to_map(PyObject *map, Py_ssize_t nmap, PyObject *dict, PyObject **values,
-	    int deref, int clear)
+            int deref, int clear)
 {
-	Py_ssize_t j;
-	assert(PyTuple_Check(map));
-	assert(PyDict_Check(dict));
-	assert(PyTuple_Size(map) >= nmap);
-	for (j = nmap; --j >= 0; ) {
-		PyObject *key = PyTuple_GET_ITEM(map, j);
-		PyObject *value = PyObject_GetItem(dict, key);
-		assert(PyString_Check(key));
-		/* We only care about NULLs if clear is true. */
-		if (value == NULL) {
-			PyErr_Clear();
-			if (!clear)
-				continue;
-		}
-		if (deref) {
-			assert(PyCell_Check(values[j]));
-			if (PyCell_GET(values[j]) != value) {
-				if (PyCell_Set(values[j], value) < 0)
-					PyErr_Clear();
-			}
-		} else if (values[j] != value) {
-			Py_XINCREF(value);
-			Py_XDECREF(values[j]);
-			values[j] = value;
-		}
-		Py_XDECREF(value);
-	}
+    Py_ssize_t j;
+    assert(PyTuple_Check(map));
+    assert(PyDict_Check(dict));
+    assert(PyTuple_Size(map) >= nmap);
+    for (j = nmap; --j >= 0; ) {
+        PyObject *key = PyTuple_GET_ITEM(map, j);
+        PyObject *value = PyObject_GetItem(dict, key);
+        assert(PyString_Check(key));
+        /* We only care about NULLs if clear is true. */
+        if (value == NULL) {
+            PyErr_Clear();
+            if (!clear)
+                continue;
+        }
+        if (deref) {
+            assert(PyCell_Check(values[j]));
+            if (PyCell_GET(values[j]) != value) {
+                if (PyCell_Set(values[j], value) < 0)
+                    PyErr_Clear();
+            }
+        } else if (values[j] != value) {
+            Py_XINCREF(value);
+            Py_XDECREF(values[j]);
+            values[j] = value;
+        }
+        Py_XDECREF(value);
+    }
 }
 
 void
 PyFrame_FastToLocals(PyFrameObject *f)
 {
-	/* Merge fast locals into f->f_locals */
-	PyObject *locals, *map;
-	PyObject **fast;
-	PyObject *error_type, *error_value, *error_traceback;
-	PyCodeObject *co;
-	Py_ssize_t j;
-	int ncells, nfreevars;
-	if (f == NULL)
-		return;
-	locals = f->f_locals;
-	if (locals == NULL) {
-		locals = f->f_locals = PyDict_New();
-		if (locals == NULL) {
-			PyErr_Clear(); /* Can't report it :-( */
-			return;
-		}
-	}
-	co = f->f_code;
-	map = co->co_varnames;
-	if (!PyTuple_Check(map))
-		return;
-	PyErr_Fetch(&error_type, &error_value, &error_traceback);
-	fast = f->f_localsplus;
-	j = PyTuple_GET_SIZE(map);
-	if (j > co->co_nlocals)
-		j = co->co_nlocals;
-	if (co->co_nlocals)
-		map_to_dict(map, j, locals, fast, 0);
-	ncells = PyTuple_GET_SIZE(co->co_cellvars);
-	nfreevars = PyTuple_GET_SIZE(co->co_freevars);
-	if (ncells || nfreevars) {
-		map_to_dict(co->co_cellvars, ncells,
-			    locals, fast + co->co_nlocals, 1);
-		/* If the namespace is unoptimized, then one of the 
-		   following cases applies:
-		   1. It does not contain free variables, because it
-		      uses import * or is a top-level namespace.
-		   2. It is a class namespace.
-		   We don't want to accidentally copy free variables
-		   into the locals dict used by the class.
-		*/
-		if (co->co_flags & CO_OPTIMIZED) {
-			map_to_dict(co->co_freevars, nfreevars,
-				    locals, fast + co->co_nlocals + ncells, 1);
-		}
-	}
-	PyErr_Restore(error_type, error_value, error_traceback);
+    /* Merge fast locals into f->f_locals */
+    PyObject *locals, *map;
+    PyObject **fast;
+    PyObject *error_type, *error_value, *error_traceback;
+    PyCodeObject *co;
+    Py_ssize_t j;
+    int ncells, nfreevars;
+    if (f == NULL)
+        return;
+    locals = f->f_locals;
+    if (locals == NULL) {
+        locals = f->f_locals = PyDict_New();
+        if (locals == NULL) {
+            PyErr_Clear(); /* Can't report it :-( */
+            return;
+        }
+    }
+    co = f->f_code;
+    map = co->co_varnames;
+    if (!PyTuple_Check(map))
+        return;
+    PyErr_Fetch(&error_type, &error_value, &error_traceback);
+    fast = f->f_localsplus;
+    j = PyTuple_GET_SIZE(map);
+    if (j > co->co_nlocals)
+        j = co->co_nlocals;
+    if (co->co_nlocals)
+        map_to_dict(map, j, locals, fast, 0);
+    ncells = PyTuple_GET_SIZE(co->co_cellvars);
+    nfreevars = PyTuple_GET_SIZE(co->co_freevars);
+    if (ncells || nfreevars) {
+        map_to_dict(co->co_cellvars, ncells,
+                    locals, fast + co->co_nlocals, 1);
+        /* If the namespace is unoptimized, then one of the
+           following cases applies:
+           1. It does not contain free variables, because it
+              uses import * or is a top-level namespace.
+           2. It is a class namespace.
+           We don't want to accidentally copy free variables
+           into the locals dict used by the class.
+        */
+        if (co->co_flags & CO_OPTIMIZED) {
+            map_to_dict(co->co_freevars, nfreevars,
+                        locals, fast + co->co_nlocals + ncells, 1);
+        }
+    }
+    PyErr_Restore(error_type, error_value, error_traceback);
 }
 
 void
 PyFrame_LocalsToFast(PyFrameObject *f, int clear)
 {
-	/* Merge f->f_locals into fast locals */
-	PyObject *locals, *map;
-	PyObject **fast;
-	PyObject *error_type, *error_value, *error_traceback;
-	PyCodeObject *co;
-	Py_ssize_t j;
-	int ncells, nfreevars;
-	if (f == NULL)
-		return;
-	locals = f->f_locals;
-	co = f->f_code;
-	map = co->co_varnames;
-	if (locals == NULL)
-		return;
-	if (!PyTuple_Check(map))
-		return;
-	PyErr_Fetch(&error_type, &error_value, &error_traceback);
-	fast = f->f_localsplus;
-	j = PyTuple_GET_SIZE(map);
-	if (j > co->co_nlocals)
-		j = co->co_nlocals;
-	if (co->co_nlocals)
-	    dict_to_map(co->co_varnames, j, locals, fast, 0, clear);
-	ncells = PyTuple_GET_SIZE(co->co_cellvars);
-	nfreevars = PyTuple_GET_SIZE(co->co_freevars);
-	if (ncells || nfreevars) {
-		dict_to_map(co->co_cellvars, ncells,
-			    locals, fast + co->co_nlocals, 1, clear);
-		/* Same test as in PyFrame_FastToLocals() above. */
-		if (co->co_flags & CO_OPTIMIZED) {
-			dict_to_map(co->co_freevars, nfreevars,
-			        locals, fast + co->co_nlocals + ncells, 1, 
-			        clear);
-		}
-	}
-	PyErr_Restore(error_type, error_value, error_traceback);
+    /* Merge f->f_locals into fast locals */
+    PyObject *locals, *map;
+    PyObject **fast;
+    PyObject *error_type, *error_value, *error_traceback;
+    PyCodeObject *co;
+    Py_ssize_t j;
+    int ncells, nfreevars;
+    if (f == NULL)
+        return;
+    locals = f->f_locals;
+    co = f->f_code;
+    map = co->co_varnames;
+    if (locals == NULL)
+        return;
+    if (!PyTuple_Check(map))
+        return;
+    PyErr_Fetch(&error_type, &error_value, &error_traceback);
+    fast = f->f_localsplus;
+    j = PyTuple_GET_SIZE(map);
+    if (j > co->co_nlocals)
+        j = co->co_nlocals;
+    if (co->co_nlocals)
+        dict_to_map(co->co_varnames, j, locals, fast, 0, clear);
+    ncells = PyTuple_GET_SIZE(co->co_cellvars);
+    nfreevars = PyTuple_GET_SIZE(co->co_freevars);
+    if (ncells || nfreevars) {
+        dict_to_map(co->co_cellvars, ncells,
+                    locals, fast + co->co_nlocals, 1, clear);
+        /* Same test as in PyFrame_FastToLocals() above. */
+        if (co->co_flags & CO_OPTIMIZED) {
+            dict_to_map(co->co_freevars, nfreevars,
+                locals, fast + co->co_nlocals + ncells, 1,
+                clear);
+        }
+    }
+    PyErr_Restore(error_type, error_value, error_traceback);
 }
 
 /* Clear out the free list */
 int
 PyFrame_ClearFreeList(void)
 {
-	int freelist_size = numfree;
-	
-	while (free_list != NULL) {
-		PyFrameObject *f = free_list;
-		free_list = free_list->f_back;
-		PyObject_GC_Del(f);
-		--numfree;
-	}
-	assert(numfree == 0);
-	return freelist_size;
+    int freelist_size = numfree;
+
+    while (free_list != NULL) {
+        PyFrameObject *f = free_list;
+        free_list = free_list->f_back;
+        PyObject_GC_Del(f);
+        --numfree;
+    }
+    assert(numfree == 0);
+    return freelist_size;
 }
 
 void
 PyFrame_Fini(void)
 {
-	(void)PyFrame_ClearFreeList();
-	Py_XDECREF(builtin_object);
-	builtin_object = NULL;
+    (void)PyFrame_ClearFreeList();
+    Py_XDECREF(builtin_object);
+    builtin_object = NULL;
 }
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index 075f820..ad0f427 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -9,149 +9,149 @@
 PyObject *
 PyFunction_New(PyObject *code, PyObject *globals)
 {
-	PyFunctionObject *op = PyObject_GC_New(PyFunctionObject,
-					    &PyFunction_Type);
-	static PyObject *__name__ = 0;
-	if (op != NULL) {
-		PyObject *doc;
-		PyObject *consts;
-		PyObject *module;
-		op->func_weakreflist = NULL;
-		Py_INCREF(code);
-		op->func_code = code;
-		Py_INCREF(globals);
-		op->func_globals = globals;
-		op->func_name = ((PyCodeObject *)code)->co_name;
-		Py_INCREF(op->func_name);
-		op->func_defaults = NULL; /* No default arguments */
-		op->func_closure = NULL;
-		consts = ((PyCodeObject *)code)->co_consts;
-		if (PyTuple_Size(consts) >= 1) {
-			doc = PyTuple_GetItem(consts, 0);
-			if (!PyString_Check(doc) && !PyUnicode_Check(doc))
-				doc = Py_None;
-		}
-		else
-			doc = Py_None;
-		Py_INCREF(doc);
-		op->func_doc = doc;
-		op->func_dict = NULL;
-		op->func_module = NULL;
+    PyFunctionObject *op = PyObject_GC_New(PyFunctionObject,
+                                        &PyFunction_Type);
+    static PyObject *__name__ = 0;
+    if (op != NULL) {
+        PyObject *doc;
+        PyObject *consts;
+        PyObject *module;
+        op->func_weakreflist = NULL;
+        Py_INCREF(code);
+        op->func_code = code;
+        Py_INCREF(globals);
+        op->func_globals = globals;
+        op->func_name = ((PyCodeObject *)code)->co_name;
+        Py_INCREF(op->func_name);
+        op->func_defaults = NULL; /* No default arguments */
+        op->func_closure = NULL;
+        consts = ((PyCodeObject *)code)->co_consts;
+        if (PyTuple_Size(consts) >= 1) {
+            doc = PyTuple_GetItem(consts, 0);
+            if (!PyString_Check(doc) && !PyUnicode_Check(doc))
+                doc = Py_None;
+        }
+        else
+            doc = Py_None;
+        Py_INCREF(doc);
+        op->func_doc = doc;
+        op->func_dict = NULL;
+        op->func_module = NULL;
 
-		/* __module__: If module name is in globals, use it.
-		   Otherwise, use None.
-		*/
-		if (!__name__) {
-			__name__ = PyString_InternFromString("__name__");
-			if (!__name__) {
-				Py_DECREF(op);
-				return NULL;
-			}
-		}
-		module = PyDict_GetItem(globals, __name__);
-		if (module) {
-		    Py_INCREF(module);
-		    op->func_module = module;
-		}
-	}
-	else
-		return NULL;
-	_PyObject_GC_TRACK(op);
-	return (PyObject *)op;
+        /* __module__: If module name is in globals, use it.
+           Otherwise, use None.
+        */
+        if (!__name__) {
+            __name__ = PyString_InternFromString("__name__");
+            if (!__name__) {
+                Py_DECREF(op);
+                return NULL;
+            }
+        }
+        module = PyDict_GetItem(globals, __name__);
+        if (module) {
+            Py_INCREF(module);
+            op->func_module = module;
+        }
+    }
+    else
+        return NULL;
+    _PyObject_GC_TRACK(op);
+    return (PyObject *)op;
 }
 
 PyObject *
 PyFunction_GetCode(PyObject *op)
 {
-	if (!PyFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyFunctionObject *) op) -> func_code;
+    if (!PyFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyFunctionObject *) op) -> func_code;
 }
 
 PyObject *
 PyFunction_GetGlobals(PyObject *op)
 {
-	if (!PyFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyFunctionObject *) op) -> func_globals;
+    if (!PyFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyFunctionObject *) op) -> func_globals;
 }
 
 PyObject *
 PyFunction_GetModule(PyObject *op)
 {
-	if (!PyFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyFunctionObject *) op) -> func_module;
+    if (!PyFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyFunctionObject *) op) -> func_module;
 }
 
 PyObject *
 PyFunction_GetDefaults(PyObject *op)
 {
-	if (!PyFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyFunctionObject *) op) -> func_defaults;
+    if (!PyFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyFunctionObject *) op) -> func_defaults;
 }
 
 int
 PyFunction_SetDefaults(PyObject *op, PyObject *defaults)
 {
-	if (!PyFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (defaults == Py_None)
-		defaults = NULL;
-	else if (defaults && PyTuple_Check(defaults)) {
-		Py_INCREF(defaults);
-	}
-	else {
-		PyErr_SetString(PyExc_SystemError, "non-tuple default args");
-		return -1;
-	}
-	Py_XDECREF(((PyFunctionObject *) op) -> func_defaults);
-	((PyFunctionObject *) op) -> func_defaults = defaults;
-	return 0;
+    if (!PyFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (defaults == Py_None)
+        defaults = NULL;
+    else if (defaults && PyTuple_Check(defaults)) {
+        Py_INCREF(defaults);
+    }
+    else {
+        PyErr_SetString(PyExc_SystemError, "non-tuple default args");
+        return -1;
+    }
+    Py_XDECREF(((PyFunctionObject *) op) -> func_defaults);
+    ((PyFunctionObject *) op) -> func_defaults = defaults;
+    return 0;
 }
 
 PyObject *
 PyFunction_GetClosure(PyObject *op)
 {
-	if (!PyFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyFunctionObject *) op) -> func_closure;
+    if (!PyFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyFunctionObject *) op) -> func_closure;
 }
 
 int
 PyFunction_SetClosure(PyObject *op, PyObject *closure)
 {
-	if (!PyFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (closure == Py_None)
-		closure = NULL;
-	else if (PyTuple_Check(closure)) {
-		Py_INCREF(closure);
-	}
-	else {
-		PyErr_Format(PyExc_SystemError, 
-			     "expected tuple for closure, got '%.100s'",
-			     closure->ob_type->tp_name);
-		return -1;
-	}
-	Py_XDECREF(((PyFunctionObject *) op) -> func_closure);
-	((PyFunctionObject *) op) -> func_closure = closure;
-	return 0;
+    if (!PyFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (closure == Py_None)
+        closure = NULL;
+    else if (PyTuple_Check(closure)) {
+        Py_INCREF(closure);
+    }
+    else {
+        PyErr_Format(PyExc_SystemError,
+                     "expected tuple for closure, got '%.100s'",
+                     closure->ob_type->tp_name);
+        return -1;
+    }
+    Py_XDECREF(((PyFunctionObject *) op) -> func_closure);
+    ((PyFunctionObject *) op) -> func_closure = closure;
+    return 0;
 }
 
 /* Methods */
@@ -159,188 +159,188 @@
 #define OFF(x) offsetof(PyFunctionObject, x)
 
 static PyMemberDef func_memberlist[] = {
-        {"func_closure",  T_OBJECT,     OFF(func_closure),
-	 RESTRICTED|READONLY},
-        {"__closure__",  T_OBJECT,      OFF(func_closure),
-	 RESTRICTED|READONLY},
-        {"func_doc",      T_OBJECT,     OFF(func_doc), PY_WRITE_RESTRICTED},
-        {"__doc__",       T_OBJECT,     OFF(func_doc), PY_WRITE_RESTRICTED},
-        {"func_globals",  T_OBJECT,     OFF(func_globals),
-	 RESTRICTED|READONLY},
-        {"__globals__",  T_OBJECT,      OFF(func_globals),
-	 RESTRICTED|READONLY},
-        {"__module__",    T_OBJECT,     OFF(func_module), PY_WRITE_RESTRICTED},
-        {NULL}  /* Sentinel */
+    {"func_closure",  T_OBJECT,     OFF(func_closure),
+     RESTRICTED|READONLY},
+    {"__closure__",  T_OBJECT,      OFF(func_closure),
+     RESTRICTED|READONLY},
+    {"func_doc",      T_OBJECT,     OFF(func_doc), PY_WRITE_RESTRICTED},
+    {"__doc__",       T_OBJECT,     OFF(func_doc), PY_WRITE_RESTRICTED},
+    {"func_globals",  T_OBJECT,     OFF(func_globals),
+     RESTRICTED|READONLY},
+    {"__globals__",  T_OBJECT,      OFF(func_globals),
+     RESTRICTED|READONLY},
+    {"__module__",    T_OBJECT,     OFF(func_module), PY_WRITE_RESTRICTED},
+    {NULL}  /* Sentinel */
 };
 
 static int
 restricted(void)
 {
-	if (!PyEval_GetRestricted())
-		return 0;
-	PyErr_SetString(PyExc_RuntimeError,
-		"function attributes not accessible in restricted mode");
-	return 1;
+    if (!PyEval_GetRestricted())
+        return 0;
+    PyErr_SetString(PyExc_RuntimeError,
+        "function attributes not accessible in restricted mode");
+    return 1;
 }
 
 static PyObject *
 func_get_dict(PyFunctionObject *op)
 {
-	if (restricted())
-		return NULL;
-	if (op->func_dict == NULL) {
-		op->func_dict = PyDict_New();
-		if (op->func_dict == NULL)
-			return NULL;
-	}
-	Py_INCREF(op->func_dict);
-	return op->func_dict;
+    if (restricted())
+        return NULL;
+    if (op->func_dict == NULL) {
+        op->func_dict = PyDict_New();
+        if (op->func_dict == NULL)
+            return NULL;
+    }
+    Py_INCREF(op->func_dict);
+    return op->func_dict;
 }
 
 static int
 func_set_dict(PyFunctionObject *op, PyObject *value)
 {
-	PyObject *tmp;
+    PyObject *tmp;
 
-	if (restricted())
-		return -1;
-	/* It is illegal to del f.func_dict */
-	if (value == NULL) {
-		PyErr_SetString(PyExc_TypeError,
-				"function's dictionary may not be deleted");
-		return -1;
-	}
-	/* Can only set func_dict to a dictionary */
-	if (!PyDict_Check(value)) {
-		PyErr_SetString(PyExc_TypeError,
-				"setting function's dictionary to a non-dict");
-		return -1;
-	}
-	tmp = op->func_dict;
-	Py_INCREF(value);
-	op->func_dict = value;
-	Py_XDECREF(tmp);
-	return 0;
+    if (restricted())
+        return -1;
+    /* It is illegal to del f.func_dict */
+    if (value == NULL) {
+        PyErr_SetString(PyExc_TypeError,
+                        "function's dictionary may not be deleted");
+        return -1;
+    }
+    /* Can only set func_dict to a dictionary */
+    if (!PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "setting function's dictionary to a non-dict");
+        return -1;
+    }
+    tmp = op->func_dict;
+    Py_INCREF(value);
+    op->func_dict = value;
+    Py_XDECREF(tmp);
+    return 0;
 }
 
 static PyObject *
 func_get_code(PyFunctionObject *op)
 {
-	if (restricted())
-		return NULL;
-	Py_INCREF(op->func_code);
-	return op->func_code;
+    if (restricted())
+        return NULL;
+    Py_INCREF(op->func_code);
+    return op->func_code;
 }
 
 static int
 func_set_code(PyFunctionObject *op, PyObject *value)
 {
-	PyObject *tmp;
-	Py_ssize_t nfree, nclosure;
+    PyObject *tmp;
+    Py_ssize_t nfree, nclosure;
 
-	if (restricted())
-		return -1;
-	/* Not legal to del f.func_code or to set it to anything
-	 * other than a code object. */
-	if (value == NULL || !PyCode_Check(value)) {
-		PyErr_SetString(PyExc_TypeError,
-				"__code__ must be set to a code object");
-		return -1;
-	}
-	nfree = PyCode_GetNumFree((PyCodeObject *)value);
-	nclosure = (op->func_closure == NULL ? 0 :
-		    PyTuple_GET_SIZE(op->func_closure));
-	if (nclosure != nfree) {
-		PyErr_Format(PyExc_ValueError,
-			     "%s() requires a code object with %zd free vars,"
-			     " not %zd",
-			     PyString_AsString(op->func_name),
-			     nclosure, nfree);
-		return -1;
-	}
-	tmp = op->func_code;
-	Py_INCREF(value);
-	op->func_code = value;
-	Py_DECREF(tmp);
-	return 0;
+    if (restricted())
+        return -1;
+    /* Not legal to del f.func_code or to set it to anything
+     * other than a code object. */
+    if (value == NULL || !PyCode_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__code__ must be set to a code object");
+        return -1;
+    }
+    nfree = PyCode_GetNumFree((PyCodeObject *)value);
+    nclosure = (op->func_closure == NULL ? 0 :
+            PyTuple_GET_SIZE(op->func_closure));
+    if (nclosure != nfree) {
+        PyErr_Format(PyExc_ValueError,
+                     "%s() requires a code object with %zd free vars,"
+                     " not %zd",
+                     PyString_AsString(op->func_name),
+                     nclosure, nfree);
+        return -1;
+    }
+    tmp = op->func_code;
+    Py_INCREF(value);
+    op->func_code = value;
+    Py_DECREF(tmp);
+    return 0;
 }
 
 static PyObject *
 func_get_name(PyFunctionObject *op)
 {
-	Py_INCREF(op->func_name);
-	return op->func_name;
+    Py_INCREF(op->func_name);
+    return op->func_name;
 }
 
 static int
 func_set_name(PyFunctionObject *op, PyObject *value)
 {
-	PyObject *tmp;
+    PyObject *tmp;
 
-	if (restricted())
-		return -1;
-	/* Not legal to del f.func_name or to set it to anything
-	 * other than a string object. */
-	if (value == NULL || !PyString_Check(value)) {
-		PyErr_SetString(PyExc_TypeError,
-				"__name__ must be set to a string object");
-		return -1;
-	}
-	tmp = op->func_name;
-	Py_INCREF(value);
-	op->func_name = value;
-	Py_DECREF(tmp);
-	return 0;
+    if (restricted())
+        return -1;
+    /* Not legal to del f.func_name or to set it to anything
+     * other than a string object. */
+    if (value == NULL || !PyString_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__name__ must be set to a string object");
+        return -1;
+    }
+    tmp = op->func_name;
+    Py_INCREF(value);
+    op->func_name = value;
+    Py_DECREF(tmp);
+    return 0;
 }
 
 static PyObject *
 func_get_defaults(PyFunctionObject *op)
 {
-	if (restricted())
-		return NULL;
-	if (op->func_defaults == NULL) {
-		Py_INCREF(Py_None);
-		return Py_None;
-	}
-	Py_INCREF(op->func_defaults);
-	return op->func_defaults;
+    if (restricted())
+        return NULL;
+    if (op->func_defaults == NULL) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    Py_INCREF(op->func_defaults);
+    return op->func_defaults;
 }
 
 static int
 func_set_defaults(PyFunctionObject *op, PyObject *value)
 {
-	PyObject *tmp;
+    PyObject *tmp;
 
-	if (restricted())
-		return -1;
-	/* Legal to del f.func_defaults.
-	 * Can only set func_defaults to NULL or a tuple. */
-	if (value == Py_None)
-		value = NULL;
-	if (value != NULL && !PyTuple_Check(value)) {
-		PyErr_SetString(PyExc_TypeError,
-				"__defaults__ must be set to a tuple object");
-		return -1;
-	}
-	tmp = op->func_defaults;
-	Py_XINCREF(value);
-	op->func_defaults = value;
-	Py_XDECREF(tmp);
-	return 0;
+    if (restricted())
+        return -1;
+    /* Legal to del f.func_defaults.
+     * Can only set func_defaults to NULL or a tuple. */
+    if (value == Py_None)
+        value = NULL;
+    if (value != NULL && !PyTuple_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__defaults__ must be set to a tuple object");
+        return -1;
+    }
+    tmp = op->func_defaults;
+    Py_XINCREF(value);
+    op->func_defaults = value;
+    Py_XDECREF(tmp);
+    return 0;
 }
 
 static PyGetSetDef func_getsetlist[] = {
-        {"func_code", (getter)func_get_code, (setter)func_set_code},
-        {"__code__", (getter)func_get_code, (setter)func_set_code},
-        {"func_defaults", (getter)func_get_defaults,
-	 (setter)func_set_defaults},
-        {"__defaults__", (getter)func_get_defaults,
-	 (setter)func_set_defaults},
-	{"func_dict", (getter)func_get_dict, (setter)func_set_dict},
-	{"__dict__", (getter)func_get_dict, (setter)func_set_dict},
-	{"func_name", (getter)func_get_name, (setter)func_set_name},
-	{"__name__", (getter)func_get_name, (setter)func_set_name},
-	{NULL} /* Sentinel */
+    {"func_code", (getter)func_get_code, (setter)func_set_code},
+    {"__code__", (getter)func_get_code, (setter)func_set_code},
+    {"func_defaults", (getter)func_get_defaults,
+     (setter)func_set_defaults},
+    {"__defaults__", (getter)func_get_defaults,
+     (setter)func_set_defaults},
+    {"func_dict", (getter)func_get_dict, (setter)func_set_dict},
+    {"__dict__", (getter)func_get_dict, (setter)func_set_dict},
+    {"func_name", (getter)func_get_name, (setter)func_set_name},
+    {"__name__", (getter)func_get_name, (setter)func_set_name},
+    {NULL} /* Sentinel */
 };
 
 PyDoc_STRVAR(func_doc,
@@ -353,236 +353,236 @@
 
 /* func_new() maintains the following invariants for closures.  The
    closure must correspond to the free variables of the code object.
-   
-   if len(code.co_freevars) == 0: 
-           closure = NULL
+
+   if len(code.co_freevars) == 0:
+       closure = NULL
    else:
-           len(closure) == len(code.co_freevars)
+       len(closure) == len(code.co_freevars)
    for every elt in closure, type(elt) == cell
 */
 
 static PyObject *
 func_new(PyTypeObject* type, PyObject* args, PyObject* kw)
 {
-	PyCodeObject *code;
-	PyObject *globals;
-	PyObject *name = Py_None;
-	PyObject *defaults = Py_None;
-	PyObject *closure = Py_None;
-	PyFunctionObject *newfunc;
-	Py_ssize_t nfree, nclosure;
-	static char *kwlist[] = {"code", "globals", "name",
-				 "argdefs", "closure", 0};
+    PyCodeObject *code;
+    PyObject *globals;
+    PyObject *name = Py_None;
+    PyObject *defaults = Py_None;
+    PyObject *closure = Py_None;
+    PyFunctionObject *newfunc;
+    Py_ssize_t nfree, nclosure;
+    static char *kwlist[] = {"code", "globals", "name",
+                             "argdefs", "closure", 0};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kw, "O!O!|OOO:function",
-			      kwlist,
-			      &PyCode_Type, &code,
-			      &PyDict_Type, &globals,
-			      &name, &defaults, &closure))
-		return NULL;
-	if (name != Py_None && !PyString_Check(name)) {
-		PyErr_SetString(PyExc_TypeError,
-				"arg 3 (name) must be None or string");
-		return NULL;
-	}
-	if (defaults != Py_None && !PyTuple_Check(defaults)) {
-		PyErr_SetString(PyExc_TypeError,
-				"arg 4 (defaults) must be None or tuple");
-		return NULL;
-	}
-	nfree = PyTuple_GET_SIZE(code->co_freevars);
-	if (!PyTuple_Check(closure)) {
-		if (nfree && closure == Py_None) {
-			PyErr_SetString(PyExc_TypeError,
-					"arg 5 (closure) must be tuple");
-			return NULL;
-		}
-		else if (closure != Py_None) {
-			PyErr_SetString(PyExc_TypeError,
-				"arg 5 (closure) must be None or tuple");
-			return NULL;
-		}
-	}
+    if (!PyArg_ParseTupleAndKeywords(args, kw, "O!O!|OOO:function",
+                          kwlist,
+                          &PyCode_Type, &code,
+                          &PyDict_Type, &globals,
+                          &name, &defaults, &closure))
+        return NULL;
+    if (name != Py_None && !PyString_Check(name)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "arg 3 (name) must be None or string");
+        return NULL;
+    }
+    if (defaults != Py_None && !PyTuple_Check(defaults)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "arg 4 (defaults) must be None or tuple");
+        return NULL;
+    }
+    nfree = PyTuple_GET_SIZE(code->co_freevars);
+    if (!PyTuple_Check(closure)) {
+        if (nfree && closure == Py_None) {
+            PyErr_SetString(PyExc_TypeError,
+                            "arg 5 (closure) must be tuple");
+            return NULL;
+        }
+        else if (closure != Py_None) {
+            PyErr_SetString(PyExc_TypeError,
+                "arg 5 (closure) must be None or tuple");
+            return NULL;
+        }
+    }
 
-	/* check that the closure is well-formed */
-	nclosure = closure == Py_None ? 0 : PyTuple_GET_SIZE(closure);
-	if (nfree != nclosure)
-		return PyErr_Format(PyExc_ValueError,
-				    "%s requires closure of length %zd, not %zd",
-				    PyString_AS_STRING(code->co_name),
-				    nfree, nclosure);
-	if (nclosure) {
-		Py_ssize_t i;
-		for (i = 0; i < nclosure; i++) {
-			PyObject *o = PyTuple_GET_ITEM(closure, i);
-			if (!PyCell_Check(o)) {
-				return PyErr_Format(PyExc_TypeError,
-				    "arg 5 (closure) expected cell, found %s",
-						    o->ob_type->tp_name);
-			}
-		}
-	}
-	
-	newfunc = (PyFunctionObject *)PyFunction_New((PyObject *)code, 
-						     globals);
-	if (newfunc == NULL)
-		return NULL;
-	
-	if (name != Py_None) {
-		Py_INCREF(name);
-		Py_DECREF(newfunc->func_name);
-		newfunc->func_name = name;
-	}
-	if (defaults != Py_None) {
-		Py_INCREF(defaults);
-		newfunc->func_defaults  = defaults;
-	}
-	if (closure != Py_None) {
-		Py_INCREF(closure);
-		newfunc->func_closure = closure;
-	}
+    /* check that the closure is well-formed */
+    nclosure = closure == Py_None ? 0 : PyTuple_GET_SIZE(closure);
+    if (nfree != nclosure)
+        return PyErr_Format(PyExc_ValueError,
+                            "%s requires closure of length %zd, not %zd",
+                            PyString_AS_STRING(code->co_name),
+                            nfree, nclosure);
+    if (nclosure) {
+        Py_ssize_t i;
+        for (i = 0; i < nclosure; i++) {
+            PyObject *o = PyTuple_GET_ITEM(closure, i);
+            if (!PyCell_Check(o)) {
+                return PyErr_Format(PyExc_TypeError,
+                    "arg 5 (closure) expected cell, found %s",
+                                    o->ob_type->tp_name);
+            }
+        }
+    }
 
-	return (PyObject *)newfunc;
+    newfunc = (PyFunctionObject *)PyFunction_New((PyObject *)code,
+                                                 globals);
+    if (newfunc == NULL)
+        return NULL;
+
+    if (name != Py_None) {
+        Py_INCREF(name);
+        Py_DECREF(newfunc->func_name);
+        newfunc->func_name = name;
+    }
+    if (defaults != Py_None) {
+        Py_INCREF(defaults);
+        newfunc->func_defaults  = defaults;
+    }
+    if (closure != Py_None) {
+        Py_INCREF(closure);
+        newfunc->func_closure = closure;
+    }
+
+    return (PyObject *)newfunc;
 }
 
 static void
 func_dealloc(PyFunctionObject *op)
 {
-	_PyObject_GC_UNTRACK(op);
-	if (op->func_weakreflist != NULL)
-		PyObject_ClearWeakRefs((PyObject *) op);
-	Py_DECREF(op->func_code);
-	Py_DECREF(op->func_globals);
-	Py_XDECREF(op->func_module);
-	Py_DECREF(op->func_name);
-	Py_XDECREF(op->func_defaults);
-	Py_XDECREF(op->func_doc);
-	Py_XDECREF(op->func_dict);
-	Py_XDECREF(op->func_closure);
-	PyObject_GC_Del(op);
+    _PyObject_GC_UNTRACK(op);
+    if (op->func_weakreflist != NULL)
+        PyObject_ClearWeakRefs((PyObject *) op);
+    Py_DECREF(op->func_code);
+    Py_DECREF(op->func_globals);
+    Py_XDECREF(op->func_module);
+    Py_DECREF(op->func_name);
+    Py_XDECREF(op->func_defaults);
+    Py_XDECREF(op->func_doc);
+    Py_XDECREF(op->func_dict);
+    Py_XDECREF(op->func_closure);
+    PyObject_GC_Del(op);
 }
 
 static PyObject*
 func_repr(PyFunctionObject *op)
 {
-	return PyString_FromFormat("<function %s at %p>",
-				   PyString_AsString(op->func_name),
-				   op);
+    return PyString_FromFormat("<function %s at %p>",
+                               PyString_AsString(op->func_name),
+                               op);
 }
 
 static int
 func_traverse(PyFunctionObject *f, visitproc visit, void *arg)
 {
-	Py_VISIT(f->func_code);
-	Py_VISIT(f->func_globals);
-	Py_VISIT(f->func_module);
-	Py_VISIT(f->func_defaults);
-	Py_VISIT(f->func_doc);
-	Py_VISIT(f->func_name);
-	Py_VISIT(f->func_dict);
-	Py_VISIT(f->func_closure);
-	return 0;
+    Py_VISIT(f->func_code);
+    Py_VISIT(f->func_globals);
+    Py_VISIT(f->func_module);
+    Py_VISIT(f->func_defaults);
+    Py_VISIT(f->func_doc);
+    Py_VISIT(f->func_name);
+    Py_VISIT(f->func_dict);
+    Py_VISIT(f->func_closure);
+    return 0;
 }
 
 static PyObject *
 function_call(PyObject *func, PyObject *arg, PyObject *kw)
 {
-	PyObject *result;
-	PyObject *argdefs;
-	PyObject *kwtuple = NULL;
-	PyObject **d, **k;
-	Py_ssize_t nk, nd;
+    PyObject *result;
+    PyObject *argdefs;
+    PyObject *kwtuple = NULL;
+    PyObject **d, **k;
+    Py_ssize_t nk, nd;
 
-	argdefs = PyFunction_GET_DEFAULTS(func);
-	if (argdefs != NULL && PyTuple_Check(argdefs)) {
-		d = &PyTuple_GET_ITEM((PyTupleObject *)argdefs, 0);
-		nd = PyTuple_GET_SIZE(argdefs);
-	}
-	else {
-		d = NULL;
-		nd = 0;
-	}
+    argdefs = PyFunction_GET_DEFAULTS(func);
+    if (argdefs != NULL && PyTuple_Check(argdefs)) {
+        d = &PyTuple_GET_ITEM((PyTupleObject *)argdefs, 0);
+        nd = PyTuple_GET_SIZE(argdefs);
+    }
+    else {
+        d = NULL;
+        nd = 0;
+    }
 
-	if (kw != NULL && PyDict_Check(kw)) {
-		Py_ssize_t pos, i;
-		nk = PyDict_Size(kw);
-		kwtuple = PyTuple_New(2*nk);
-		if (kwtuple == NULL)
-			return NULL;
-		k = &PyTuple_GET_ITEM(kwtuple, 0);
-		pos = i = 0;
-		while (PyDict_Next(kw, &pos, &k[i], &k[i+1])) {
-			Py_INCREF(k[i]);
-			Py_INCREF(k[i+1]);
-			i += 2;
-		}
-		nk = i/2;
-	}
-	else {
-		k = NULL;
-		nk = 0;
-	}
+    if (kw != NULL && PyDict_Check(kw)) {
+        Py_ssize_t pos, i;
+        nk = PyDict_Size(kw);
+        kwtuple = PyTuple_New(2*nk);
+        if (kwtuple == NULL)
+            return NULL;
+        k = &PyTuple_GET_ITEM(kwtuple, 0);
+        pos = i = 0;
+        while (PyDict_Next(kw, &pos, &k[i], &k[i+1])) {
+            Py_INCREF(k[i]);
+            Py_INCREF(k[i+1]);
+            i += 2;
+        }
+        nk = i/2;
+    }
+    else {
+        k = NULL;
+        nk = 0;
+    }
 
-	result = PyEval_EvalCodeEx(
-		(PyCodeObject *)PyFunction_GET_CODE(func),
-		PyFunction_GET_GLOBALS(func), (PyObject *)NULL,
-		&PyTuple_GET_ITEM(arg, 0), PyTuple_GET_SIZE(arg),
-		k, nk, d, nd,
-		PyFunction_GET_CLOSURE(func));
+    result = PyEval_EvalCodeEx(
+        (PyCodeObject *)PyFunction_GET_CODE(func),
+        PyFunction_GET_GLOBALS(func), (PyObject *)NULL,
+        &PyTuple_GET_ITEM(arg, 0), PyTuple_GET_SIZE(arg),
+        k, nk, d, nd,
+        PyFunction_GET_CLOSURE(func));
 
-	Py_XDECREF(kwtuple);
+    Py_XDECREF(kwtuple);
 
-	return result;
+    return result;
 }
 
 /* Bind a function to an object */
 static PyObject *
 func_descr_get(PyObject *func, PyObject *obj, PyObject *type)
 {
-	if (obj == Py_None)
-		obj = NULL;
-	return PyMethod_New(func, obj, type);
+    if (obj == Py_None)
+        obj = NULL;
+    return PyMethod_New(func, obj, type);
 }
 
 PyTypeObject PyFunction_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"function",
-	sizeof(PyFunctionObject),
-	0,
-	(destructor)func_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)func_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	function_call,				/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	PyObject_GenericSetAttr,		/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
-	func_doc,				/* tp_doc */
-	(traverseproc)func_traverse,		/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	offsetof(PyFunctionObject, func_weakreflist), /* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	func_memberlist,			/* tp_members */
-	func_getsetlist,			/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	func_descr_get,				/* tp_descr_get */
-	0,					/* tp_descr_set */
-	offsetof(PyFunctionObject, func_dict),	/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	func_new,				/* tp_new */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "function",
+    sizeof(PyFunctionObject),
+    0,
+    (destructor)func_dealloc,                   /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)func_repr,                        /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    function_call,                              /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    PyObject_GenericSetAttr,                    /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    func_doc,                                   /* tp_doc */
+    (traverseproc)func_traverse,                /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    offsetof(PyFunctionObject, func_weakreflist), /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    func_memberlist,                            /* tp_members */
+    func_getsetlist,                            /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    func_descr_get,                             /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    offsetof(PyFunctionObject, func_dict),      /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    func_new,                                   /* tp_new */
 };
 
 
@@ -593,9 +593,9 @@
    To declare a class method, use this idiom:
 
      class C:
-         def f(cls, arg1, arg2, ...): ...
-	 f = classmethod(f)
-   
+     def f(cls, arg1, arg2, ...): ...
+     f = classmethod(f)
+
    It can be called either on the class (e.g. C.f()) or on an instance
    (e.g. C().f()); the instance is ignored except for its class.
    If a class method is called for a derived class, the derived class
@@ -606,67 +606,67 @@
 */
 
 typedef struct {
-	PyObject_HEAD
-	PyObject *cm_callable;
+    PyObject_HEAD
+    PyObject *cm_callable;
 } classmethod;
 
 static void
 cm_dealloc(classmethod *cm)
 {
-	_PyObject_GC_UNTRACK((PyObject *)cm);
-	Py_XDECREF(cm->cm_callable);
-	Py_TYPE(cm)->tp_free((PyObject *)cm);
+    _PyObject_GC_UNTRACK((PyObject *)cm);
+    Py_XDECREF(cm->cm_callable);
+    Py_TYPE(cm)->tp_free((PyObject *)cm);
 }
 
 static int
 cm_traverse(classmethod *cm, visitproc visit, void *arg)
 {
-	Py_VISIT(cm->cm_callable);
-	return 0;
+    Py_VISIT(cm->cm_callable);
+    return 0;
 }
 
 static int
 cm_clear(classmethod *cm)
 {
-	Py_CLEAR(cm->cm_callable);
-	return 0;
+    Py_CLEAR(cm->cm_callable);
+    return 0;
 }
 
 
 static PyObject *
 cm_descr_get(PyObject *self, PyObject *obj, PyObject *type)
 {
-	classmethod *cm = (classmethod *)self;
+    classmethod *cm = (classmethod *)self;
 
-	if (cm->cm_callable == NULL) {
-		PyErr_SetString(PyExc_RuntimeError,
-				"uninitialized classmethod object");
-		return NULL;
-	}
-	if (type == NULL)
-		type = (PyObject *)(Py_TYPE(obj));
- 	return PyMethod_New(cm->cm_callable,
-			    type, (PyObject *)(Py_TYPE(type)));
+    if (cm->cm_callable == NULL) {
+        PyErr_SetString(PyExc_RuntimeError,
+                        "uninitialized classmethod object");
+        return NULL;
+    }
+    if (type == NULL)
+        type = (PyObject *)(Py_TYPE(obj));
+    return PyMethod_New(cm->cm_callable,
+                        type, (PyObject *)(Py_TYPE(type)));
 }
 
 static int
 cm_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	classmethod *cm = (classmethod *)self;
-	PyObject *callable;
+    classmethod *cm = (classmethod *)self;
+    PyObject *callable;
 
-	if (!PyArg_UnpackTuple(args, "classmethod", 1, 1, &callable))
-		return -1;
-	if (!_PyArg_NoKeywords("classmethod", kwds))
-		return -1;
-	Py_INCREF(callable);
-	cm->cm_callable = callable;
-	return 0;
+    if (!PyArg_UnpackTuple(args, "classmethod", 1, 1, &callable))
+        return -1;
+    if (!_PyArg_NoKeywords("classmethod", kwds))
+        return -1;
+    Py_INCREF(callable);
+    cm->cm_callable = callable;
+    return 0;
 }
 
 static PyMemberDef cm_memberlist[] = {
-	{"__func__", T_OBJECT, offsetof(classmethod, cm_callable), READONLY},
-	{NULL}  /* Sentinel */
+    {"__func__", T_OBJECT, offsetof(classmethod, cm_callable), READONLY},
+    {NULL}  /* Sentinel */
 };
 
 PyDoc_STRVAR(classmethod_doc,
@@ -691,57 +691,57 @@
 If you want those, see the staticmethod builtin.");
 
 PyTypeObject PyClassMethod_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"classmethod",
-	sizeof(classmethod),
-	0,
-	(destructor)cm_dealloc,			/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
-	classmethod_doc,			/* tp_doc */
-	(traverseproc)cm_traverse,		/* tp_traverse */
-	(inquiry)cm_clear,			/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	cm_memberlist,		/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	cm_descr_get,				/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	cm_init,				/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	PyType_GenericNew,			/* tp_new */
-	PyObject_GC_Del,	                /* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "classmethod",
+    sizeof(classmethod),
+    0,
+    (destructor)cm_dealloc,                     /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+    classmethod_doc,                            /* tp_doc */
+    (traverseproc)cm_traverse,                  /* tp_traverse */
+    (inquiry)cm_clear,                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    cm_memberlist,              /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    cm_descr_get,                               /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    cm_init,                                    /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    PyType_GenericNew,                          /* tp_new */
+    PyObject_GC_Del,                            /* tp_free */
 };
 
 PyObject *
 PyClassMethod_New(PyObject *callable)
 {
-	classmethod *cm = (classmethod *)
-		PyType_GenericAlloc(&PyClassMethod_Type, 0);
-	if (cm != NULL) {
-		Py_INCREF(callable);
-		cm->cm_callable = callable;
-	}
-	return (PyObject *)cm;
+    classmethod *cm = (classmethod *)
+        PyType_GenericAlloc(&PyClassMethod_Type, 0);
+    if (cm != NULL) {
+        Py_INCREF(callable);
+        cm->cm_callable = callable;
+    }
+    return (PyObject *)cm;
 }
 
 
@@ -751,8 +751,8 @@
    To declare a static method, use this idiom:
 
      class C:
-         def f(arg1, arg2, ...): ...
-	 f = staticmethod(f)
+     def f(arg1, arg2, ...): ...
+     f = staticmethod(f)
 
    It can be called either on the class (e.g. C.f()) or on an instance
    (e.g. C().f()); the instance is ignored except for its class.
@@ -762,66 +762,66 @@
 */
 
 typedef struct {
-	PyObject_HEAD
-	PyObject *sm_callable;
+    PyObject_HEAD
+    PyObject *sm_callable;
 } staticmethod;
 
 static void
 sm_dealloc(staticmethod *sm)
 {
-	_PyObject_GC_UNTRACK((PyObject *)sm);
-	Py_XDECREF(sm->sm_callable);
-	Py_TYPE(sm)->tp_free((PyObject *)sm);
+    _PyObject_GC_UNTRACK((PyObject *)sm);
+    Py_XDECREF(sm->sm_callable);
+    Py_TYPE(sm)->tp_free((PyObject *)sm);
 }
 
 static int
 sm_traverse(staticmethod *sm, visitproc visit, void *arg)
 {
-	Py_VISIT(sm->sm_callable);
-	return 0;
+    Py_VISIT(sm->sm_callable);
+    return 0;
 }
 
 static int
 sm_clear(staticmethod *sm)
 {
-	Py_XDECREF(sm->sm_callable);
-	sm->sm_callable = NULL;
+    Py_XDECREF(sm->sm_callable);
+    sm->sm_callable = NULL;
 
-	return 0;
+    return 0;
 }
 
 static PyObject *
 sm_descr_get(PyObject *self, PyObject *obj, PyObject *type)
 {
-	staticmethod *sm = (staticmethod *)self;
+    staticmethod *sm = (staticmethod *)self;
 
-	if (sm->sm_callable == NULL) {
-		PyErr_SetString(PyExc_RuntimeError,
-				"uninitialized staticmethod object");
-		return NULL;
-	}
-	Py_INCREF(sm->sm_callable);
-	return sm->sm_callable;
+    if (sm->sm_callable == NULL) {
+        PyErr_SetString(PyExc_RuntimeError,
+                        "uninitialized staticmethod object");
+        return NULL;
+    }
+    Py_INCREF(sm->sm_callable);
+    return sm->sm_callable;
 }
 
 static int
 sm_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	staticmethod *sm = (staticmethod *)self;
-	PyObject *callable;
+    staticmethod *sm = (staticmethod *)self;
+    PyObject *callable;
 
-	if (!PyArg_UnpackTuple(args, "staticmethod", 1, 1, &callable))
-		return -1;
-	if (!_PyArg_NoKeywords("staticmethod", kwds))
-		return -1;
-	Py_INCREF(callable);
-	sm->sm_callable = callable;
-	return 0;
+    if (!PyArg_UnpackTuple(args, "staticmethod", 1, 1, &callable))
+        return -1;
+    if (!_PyArg_NoKeywords("staticmethod", kwds))
+        return -1;
+    Py_INCREF(callable);
+    sm->sm_callable = callable;
+    return 0;
 }
 
 static PyMemberDef sm_memberlist[] = {
-	{"__func__", T_OBJECT, offsetof(staticmethod, sm_callable), READONLY},
-	{NULL}  /* Sentinel */
+    {"__func__", T_OBJECT, offsetof(staticmethod, sm_callable), READONLY},
+    {NULL}  /* Sentinel */
 };
 
 PyDoc_STRVAR(staticmethod_doc,
@@ -833,8 +833,8 @@
 To declare a static method, use this idiom:\n\
 \n\
      class C:\n\
-         def f(arg1, arg2, ...): ...\n\
-	 f = staticmethod(f)\n\
+     def f(arg1, arg2, ...): ...\n\
+     f = staticmethod(f)\n\
 \n\
 It can be called either on the class (e.g. C.f()) or on an instance\n\
 (e.g. C().f()).  The instance is ignored except for its class.\n\
@@ -843,55 +843,55 @@
 For a more advanced concept, see the classmethod builtin.");
 
 PyTypeObject PyStaticMethod_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"staticmethod",
-	sizeof(staticmethod),
-	0,
-	(destructor)sm_dealloc,			/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
-	staticmethod_doc,			/* tp_doc */
-	(traverseproc)sm_traverse,		/* tp_traverse */
-	(inquiry)sm_clear,			/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	sm_memberlist,		/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	sm_descr_get,				/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	sm_init,				/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	PyType_GenericNew,			/* tp_new */
-	PyObject_GC_Del,           		/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "staticmethod",
+    sizeof(staticmethod),
+    0,
+    (destructor)sm_dealloc,                     /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+    staticmethod_doc,                           /* tp_doc */
+    (traverseproc)sm_traverse,                  /* tp_traverse */
+    (inquiry)sm_clear,                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    sm_memberlist,              /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    sm_descr_get,                               /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    sm_init,                                    /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    PyType_GenericNew,                          /* tp_new */
+    PyObject_GC_Del,                            /* tp_free */
 };
 
 PyObject *
 PyStaticMethod_New(PyObject *callable)
 {
-	staticmethod *sm = (staticmethod *)
-		PyType_GenericAlloc(&PyStaticMethod_Type, 0);
-	if (sm != NULL) {
-		Py_INCREF(callable);
-		sm->sm_callable = callable;
-	}
-	return (PyObject *)sm;
+    staticmethod *sm = (staticmethod *)
+        PyType_GenericAlloc(&PyStaticMethod_Type, 0);
+    if (sm != NULL) {
+        Py_INCREF(callable);
+        sm->sm_callable = callable;
+    }
+    return (PyObject *)sm;
 }
diff --git a/Objects/genobject.c b/Objects/genobject.c
index c3fa64b..af812c0 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -10,103 +10,103 @@
 static int
 gen_traverse(PyGenObject *gen, visitproc visit, void *arg)
 {
-	Py_VISIT((PyObject *)gen->gi_frame);
-	Py_VISIT(gen->gi_code);
-	return 0;
+    Py_VISIT((PyObject *)gen->gi_frame);
+    Py_VISIT(gen->gi_code);
+    return 0;
 }
 
 static void
 gen_dealloc(PyGenObject *gen)
 {
-	PyObject *self = (PyObject *) gen;
+    PyObject *self = (PyObject *) gen;
 
-	_PyObject_GC_UNTRACK(gen);
+    _PyObject_GC_UNTRACK(gen);
 
-	if (gen->gi_weakreflist != NULL)
-		PyObject_ClearWeakRefs(self);
+    if (gen->gi_weakreflist != NULL)
+        PyObject_ClearWeakRefs(self);
 
-	_PyObject_GC_TRACK(self);
+    _PyObject_GC_TRACK(self);
 
-	if (gen->gi_frame != NULL && gen->gi_frame->f_stacktop != NULL) {
-		/* Generator is paused, so we need to close */
-		Py_TYPE(gen)->tp_del(self);
-		if (self->ob_refcnt > 0)
-			return;		/* resurrected.  :( */
-	}
+    if (gen->gi_frame != NULL && gen->gi_frame->f_stacktop != NULL) {
+        /* Generator is paused, so we need to close */
+        Py_TYPE(gen)->tp_del(self);
+        if (self->ob_refcnt > 0)
+            return;                     /* resurrected.  :( */
+    }
 
-	_PyObject_GC_UNTRACK(self);
-	Py_CLEAR(gen->gi_frame);
-	Py_CLEAR(gen->gi_code);
-	PyObject_GC_Del(gen);
+    _PyObject_GC_UNTRACK(self);
+    Py_CLEAR(gen->gi_frame);
+    Py_CLEAR(gen->gi_code);
+    PyObject_GC_Del(gen);
 }
 
 
 static PyObject *
 gen_send_ex(PyGenObject *gen, PyObject *arg, int exc)
 {
-	PyThreadState *tstate = PyThreadState_GET();
-	PyFrameObject *f = gen->gi_frame;
-	PyObject *result;
+    PyThreadState *tstate = PyThreadState_GET();
+    PyFrameObject *f = gen->gi_frame;
+    PyObject *result;
 
-	if (gen->gi_running) {
-		PyErr_SetString(PyExc_ValueError,
-				"generator already executing");
-		return NULL;
-	}
-	if (f==NULL || f->f_stacktop == NULL) {
-		/* Only set exception if called from send() */
-		if (arg && !exc)
-			PyErr_SetNone(PyExc_StopIteration);
-		return NULL;
-	}
+    if (gen->gi_running) {
+        PyErr_SetString(PyExc_ValueError,
+                        "generator already executing");
+        return NULL;
+    }
+    if (f==NULL || f->f_stacktop == NULL) {
+        /* Only set exception if called from send() */
+        if (arg && !exc)
+            PyErr_SetNone(PyExc_StopIteration);
+        return NULL;
+    }
 
-	if (f->f_lasti == -1) {
-		if (arg && arg != Py_None) {
-			PyErr_SetString(PyExc_TypeError,
-					"can't send non-None value to a "
-					"just-started generator");
-			return NULL;
-		}
-	} else {
-		/* Push arg onto the frame's value stack */
-		result = arg ? arg : Py_None;
-	        Py_INCREF(result);
-	        *(f->f_stacktop++) = result;
-	}
+    if (f->f_lasti == -1) {
+        if (arg && arg != Py_None) {
+            PyErr_SetString(PyExc_TypeError,
+                            "can't send non-None value to a "
+                            "just-started generator");
+            return NULL;
+        }
+    } else {
+        /* Push arg onto the frame's value stack */
+        result = arg ? arg : Py_None;
+        Py_INCREF(result);
+        *(f->f_stacktop++) = result;
+    }
 
-	/* Generators always return to their most recent caller, not
-	 * necessarily their creator. */
-	Py_XINCREF(tstate->frame);
-	assert(f->f_back == NULL);
-	f->f_back = tstate->frame;
+    /* Generators always return to their most recent caller, not
+     * necessarily their creator. */
+    Py_XINCREF(tstate->frame);
+    assert(f->f_back == NULL);
+    f->f_back = tstate->frame;
 
-	gen->gi_running = 1;
-	result = PyEval_EvalFrameEx(f, exc);
-	gen->gi_running = 0;
+    gen->gi_running = 1;
+    result = PyEval_EvalFrameEx(f, exc);
+    gen->gi_running = 0;
 
-	/* Don't keep the reference to f_back any longer than necessary.  It
-	 * may keep a chain of frames alive or it could create a reference
-	 * cycle. */
-	assert(f->f_back == tstate->frame);
-	Py_CLEAR(f->f_back);
+    /* Don't keep the reference to f_back any longer than necessary.  It
+     * may keep a chain of frames alive or it could create a reference
+     * cycle. */
+    assert(f->f_back == tstate->frame);
+    Py_CLEAR(f->f_back);
 
-	/* If the generator just returned (as opposed to yielding), signal
-	 * that the generator is exhausted. */
-	if (result == Py_None && f->f_stacktop == NULL) {
-		Py_DECREF(result);
-		result = NULL;
-		/* Set exception if not called by gen_iternext() */
-		if (arg)
-			PyErr_SetNone(PyExc_StopIteration);
-	}
+    /* If the generator just returned (as opposed to yielding), signal
+     * that the generator is exhausted. */
+    if (result == Py_None && f->f_stacktop == NULL) {
+        Py_DECREF(result);
+        result = NULL;
+        /* Set exception if not called by gen_iternext() */
+        if (arg)
+            PyErr_SetNone(PyExc_StopIteration);
+    }
 
-	if (!result || f->f_stacktop == NULL) {
-		/* generator can't be rerun, so release the frame */
-		Py_DECREF(f);
-		gen->gi_frame = NULL;
-	}
+    if (!result || f->f_stacktop == NULL) {
+        /* generator can't be rerun, so release the frame */
+        Py_DECREF(f);
+        gen->gi_frame = NULL;
+    }
 
-	return result;
+    return result;
 }
 
 PyDoc_STRVAR(send_doc,
@@ -116,7 +116,7 @@
 static PyObject *
 gen_send(PyGenObject *gen, PyObject *arg)
 {
-	return gen_send_ex(gen, arg, 0);
+    return gen_send_ex(gen, arg, 0);
 }
 
 PyDoc_STRVAR(close_doc,
@@ -125,83 +125,83 @@
 static PyObject *
 gen_close(PyGenObject *gen, PyObject *args)
 {
-	PyObject *retval;
-	PyErr_SetNone(PyExc_GeneratorExit);
-	retval = gen_send_ex(gen, Py_None, 1);
-	if (retval) {
-		Py_DECREF(retval);
-		PyErr_SetString(PyExc_RuntimeError,
-				"generator ignored GeneratorExit");
-		return NULL;
-	}
-	if (PyErr_ExceptionMatches(PyExc_StopIteration)
-	    || PyErr_ExceptionMatches(PyExc_GeneratorExit))
-	{
-		PyErr_Clear();	/* ignore these errors */
-		Py_INCREF(Py_None);
-		return Py_None;
-	}
-	return NULL;
+    PyObject *retval;
+    PyErr_SetNone(PyExc_GeneratorExit);
+    retval = gen_send_ex(gen, Py_None, 1);
+    if (retval) {
+        Py_DECREF(retval);
+        PyErr_SetString(PyExc_RuntimeError,
+                        "generator ignored GeneratorExit");
+        return NULL;
+    }
+    if (PyErr_ExceptionMatches(PyExc_StopIteration)
+        || PyErr_ExceptionMatches(PyExc_GeneratorExit))
+    {
+        PyErr_Clear();          /* ignore these errors */
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return NULL;
 }
 
 static void
 gen_del(PyObject *self)
 {
-        PyObject *res;
-        PyObject *error_type, *error_value, *error_traceback;
-	PyGenObject *gen = (PyGenObject *)self;
+    PyObject *res;
+    PyObject *error_type, *error_value, *error_traceback;
+    PyGenObject *gen = (PyGenObject *)self;
 
-	if (gen->gi_frame == NULL || gen->gi_frame->f_stacktop == NULL)
-		/* Generator isn't paused, so no need to close */
-		return;
+    if (gen->gi_frame == NULL || gen->gi_frame->f_stacktop == NULL)
+        /* Generator isn't paused, so no need to close */
+        return;
 
-        /* Temporarily resurrect the object. */
-        assert(self->ob_refcnt == 0);
-        self->ob_refcnt = 1;
+    /* Temporarily resurrect the object. */
+    assert(self->ob_refcnt == 0);
+    self->ob_refcnt = 1;
 
-        /* Save the current exception, if any. */
-        PyErr_Fetch(&error_type, &error_value, &error_traceback);
+    /* Save the current exception, if any. */
+    PyErr_Fetch(&error_type, &error_value, &error_traceback);
 
-	res = gen_close(gen, NULL);
+    res = gen_close(gen, NULL);
 
-	if (res == NULL)
-		PyErr_WriteUnraisable(self);
-	else
-		Py_DECREF(res);
+    if (res == NULL)
+        PyErr_WriteUnraisable(self);
+    else
+        Py_DECREF(res);
 
-        /* Restore the saved exception. */
-        PyErr_Restore(error_type, error_value, error_traceback);
+    /* Restore the saved exception. */
+    PyErr_Restore(error_type, error_value, error_traceback);
 
-        /* Undo the temporary resurrection; can't use DECREF here, it would
-         * cause a recursive call.
-         */
-        assert(self->ob_refcnt > 0);
-        if (--self->ob_refcnt == 0)
-                return; /* this is the normal path out */
+    /* Undo the temporary resurrection; can't use DECREF here, it would
+     * cause a recursive call.
+     */
+    assert(self->ob_refcnt > 0);
+    if (--self->ob_refcnt == 0)
+        return; /* this is the normal path out */
 
-        /* close() resurrected it!  Make it look like the original Py_DECREF
-         * never happened.
-         */
-        {
-                Py_ssize_t refcnt = self->ob_refcnt;
-                _Py_NewReference(self);
-                self->ob_refcnt = refcnt;
-        }
-        assert(PyType_IS_GC(self->ob_type) &&
-               _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
+    /* close() resurrected it!  Make it look like the original Py_DECREF
+     * never happened.
+     */
+    {
+        Py_ssize_t refcnt = self->ob_refcnt;
+        _Py_NewReference(self);
+        self->ob_refcnt = refcnt;
+    }
+    assert(PyType_IS_GC(self->ob_type) &&
+           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
 
-        /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
-         * we need to undo that. */
-        _Py_DEC_REFTOTAL;
-        /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
-         * chain, so no more to do there.
-         * If COUNT_ALLOCS, the original decref bumped tp_frees, and
-         * _Py_NewReference bumped tp_allocs:  both of those need to be
-         * undone.
-         */
+    /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
+     * we need to undo that. */
+    _Py_DEC_REFTOTAL;
+    /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
+     * chain, so no more to do there.
+     * If COUNT_ALLOCS, the original decref bumped tp_frees, and
+     * _Py_NewReference bumped tp_allocs:  both of those need to be
+     * undone.
+     */
 #ifdef COUNT_ALLOCS
-        --self->ob_type->tp_frees;
-        --self->ob_type->tp_allocs;
+    --self->ob_type->tp_frees;
+    --self->ob_type->tp_allocs;
 #endif
 }
 
@@ -214,91 +214,91 @@
 static PyObject *
 gen_throw(PyGenObject *gen, PyObject *args)
 {
-	PyObject *typ;
-	PyObject *tb = NULL;
-	PyObject *val = NULL;
+    PyObject *typ;
+    PyObject *tb = NULL;
+    PyObject *val = NULL;
 
-	if (!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))
-		return NULL;
+    if (!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))
+        return NULL;
 
-	/* First, check the traceback argument, replacing None with
-	   NULL. */
-	if (tb == Py_None)
-		tb = NULL;
-	else if (tb != NULL && !PyTraceBack_Check(tb)) {
-		PyErr_SetString(PyExc_TypeError,
-			"throw() third argument must be a traceback object");
-		return NULL;
-	}
+    /* First, check the traceback argument, replacing None with
+       NULL. */
+    if (tb == Py_None)
+        tb = NULL;
+    else if (tb != NULL && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "throw() third argument must be a traceback object");
+        return NULL;
+    }
 
-	Py_INCREF(typ);
-	Py_XINCREF(val);
-	Py_XINCREF(tb);
+    Py_INCREF(typ);
+    Py_XINCREF(val);
+    Py_XINCREF(tb);
 
-	if (PyExceptionClass_Check(typ)) {
-		PyErr_NormalizeException(&typ, &val, &tb);
-	}
+    if (PyExceptionClass_Check(typ)) {
+        PyErr_NormalizeException(&typ, &val, &tb);
+    }
 
-	else if (PyExceptionInstance_Check(typ)) {
-		/* Raising an instance.  The value should be a dummy. */
-		if (val && val != Py_None) {
-			PyErr_SetString(PyExc_TypeError,
-			  "instance exception may not have a separate value");
-			goto failed_throw;
-		}
-		else {
-			/* Normalize to raise <class>, <instance> */
-			Py_XDECREF(val);
-			val = typ;
-			typ = PyExceptionInstance_Class(typ);
-			Py_INCREF(typ);
-		}
-	}
-	else {
-		/* Not something you can raise.  throw() fails. */
-		PyErr_Format(PyExc_TypeError,
-			     "exceptions must be classes, or instances, not %s",
-			     typ->ob_type->tp_name);
-			goto failed_throw;
-	}
+    else if (PyExceptionInstance_Check(typ)) {
+        /* Raising an instance.  The value should be a dummy. */
+        if (val && val != Py_None) {
+            PyErr_SetString(PyExc_TypeError,
+              "instance exception may not have a separate value");
+            goto failed_throw;
+        }
+        else {
+            /* Normalize to raise <class>, <instance> */
+            Py_XDECREF(val);
+            val = typ;
+            typ = PyExceptionInstance_Class(typ);
+            Py_INCREF(typ);
+        }
+    }
+    else {
+        /* Not something you can raise.  throw() fails. */
+        PyErr_Format(PyExc_TypeError,
+                     "exceptions must be classes, or instances, not %s",
+                     typ->ob_type->tp_name);
+            goto failed_throw;
+    }
 
-	PyErr_Restore(typ, val, tb);
-	return gen_send_ex(gen, Py_None, 1);
+    PyErr_Restore(typ, val, tb);
+    return gen_send_ex(gen, Py_None, 1);
 
 failed_throw:
-	/* Didn't use our arguments, so restore their original refcounts */
-	Py_DECREF(typ);
-	Py_XDECREF(val);
-	Py_XDECREF(tb);
-	return NULL;
+    /* Didn't use our arguments, so restore their original refcounts */
+    Py_DECREF(typ);
+    Py_XDECREF(val);
+    Py_XDECREF(tb);
+    return NULL;
 }
 
 
 static PyObject *
 gen_iternext(PyGenObject *gen)
 {
-	return gen_send_ex(gen, NULL, 0);
+    return gen_send_ex(gen, NULL, 0);
 }
 
 
 static PyObject *
 gen_repr(PyGenObject *gen)
 {
-	char *code_name;
-	code_name = PyString_AsString(((PyCodeObject *)gen->gi_code)->co_name);
-	if (code_name == NULL)
-		return NULL;
-	return PyString_FromFormat("<generator object %.200s at %p>",
-				   code_name, gen);
+    char *code_name;
+    code_name = PyString_AsString(((PyCodeObject *)gen->gi_code)->co_name);
+    if (code_name == NULL)
+        return NULL;
+    return PyString_FromFormat("<generator object %.200s at %p>",
+                               code_name, gen);
 }
 
 
 static PyObject *
 gen_get_name(PyGenObject *gen)
 {
-	PyObject *name = ((PyCodeObject *)gen->gi_code)->co_name;
-	Py_INCREF(name);
-	return name;
+    PyObject *name = ((PyCodeObject *)gen->gi_code)->co_name;
+    Py_INCREF(name);
+    return name;
 }
 
 
@@ -306,109 +306,109 @@
 "Return the name of the generator's associated code object.");
 
 static PyGetSetDef gen_getsetlist[] = {
-	{"__name__", (getter)gen_get_name, NULL, gen__name__doc__},
-	{NULL}
+    {"__name__", (getter)gen_get_name, NULL, gen__name__doc__},
+    {NULL}
 };
 
 
 static PyMemberDef gen_memberlist[] = {
-	{"gi_frame",	T_OBJECT, offsetof(PyGenObject, gi_frame),	RO},
-	{"gi_running",	T_INT,    offsetof(PyGenObject, gi_running),	RO},
-        {"gi_code",     T_OBJECT, offsetof(PyGenObject, gi_code),  RO},
-	{NULL}	/* Sentinel */
+    {"gi_frame",        T_OBJECT, offsetof(PyGenObject, gi_frame),      RO},
+    {"gi_running",      T_INT,    offsetof(PyGenObject, gi_running),    RO},
+    {"gi_code",     T_OBJECT, offsetof(PyGenObject, gi_code),  RO},
+    {NULL}      /* Sentinel */
 };
 
 static PyMethodDef gen_methods[] = {
-	{"send",(PyCFunction)gen_send, METH_O, send_doc},
-	{"throw",(PyCFunction)gen_throw, METH_VARARGS, throw_doc},
-	{"close",(PyCFunction)gen_close, METH_NOARGS, close_doc},
-	{NULL, NULL}	/* Sentinel */
+    {"send",(PyCFunction)gen_send, METH_O, send_doc},
+    {"throw",(PyCFunction)gen_throw, METH_VARARGS, throw_doc},
+    {"close",(PyCFunction)gen_close, METH_NOARGS, close_doc},
+    {NULL, NULL}        /* Sentinel */
 };
 
 PyTypeObject PyGen_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"generator",				/* tp_name */
-	sizeof(PyGenObject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)gen_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0, 					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)gen_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)gen_traverse,		/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	offsetof(PyGenObject, gi_weakreflist),	/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)gen_iternext,		/* tp_iternext */
-	gen_methods,				/* tp_methods */
-	gen_memberlist,				/* tp_members */
-	gen_getsetlist,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "generator",                                /* tp_name */
+    sizeof(PyGenObject),                        /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)gen_dealloc,                    /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)gen_repr,                         /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)gen_traverse,                 /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    offsetof(PyGenObject, gi_weakreflist),      /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)gen_iternext,                 /* tp_iternext */
+    gen_methods,                                /* tp_methods */
+    gen_memberlist,                             /* tp_members */
+    gen_getsetlist,                             /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
 
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	0,					/* tp_new */
-	0,					/* tp_free */
-	0,					/* tp_is_gc */
-	0,					/* tp_bases */
-	0,					/* tp_mro */
-	0,					/* tp_cache */
-	0,					/* tp_subclasses */
-	0,					/* tp_weaklist */
-	gen_del,				/* tp_del */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    0,                                          /* tp_new */
+    0,                                          /* tp_free */
+    0,                                          /* tp_is_gc */
+    0,                                          /* tp_bases */
+    0,                                          /* tp_mro */
+    0,                                          /* tp_cache */
+    0,                                          /* tp_subclasses */
+    0,                                          /* tp_weaklist */
+    gen_del,                                    /* tp_del */
 };
 
 PyObject *
 PyGen_New(PyFrameObject *f)
 {
-	PyGenObject *gen = PyObject_GC_New(PyGenObject, &PyGen_Type);
-	if (gen == NULL) {
-		Py_DECREF(f);
-		return NULL;
-	}
-	gen->gi_frame = f;
-	Py_INCREF(f->f_code);
-	gen->gi_code = (PyObject *)(f->f_code);
-	gen->gi_running = 0;
-	gen->gi_weakreflist = NULL;
-	_PyObject_GC_TRACK(gen);
-	return (PyObject *)gen;
+    PyGenObject *gen = PyObject_GC_New(PyGenObject, &PyGen_Type);
+    if (gen == NULL) {
+        Py_DECREF(f);
+        return NULL;
+    }
+    gen->gi_frame = f;
+    Py_INCREF(f->f_code);
+    gen->gi_code = (PyObject *)(f->f_code);
+    gen->gi_running = 0;
+    gen->gi_weakreflist = NULL;
+    _PyObject_GC_TRACK(gen);
+    return (PyObject *)gen;
 }
 
 int
 PyGen_NeedsFinalizing(PyGenObject *gen)
 {
-	int i;
-	PyFrameObject *f = gen->gi_frame;
+    int i;
+    PyFrameObject *f = gen->gi_frame;
 
-	if (f == NULL || f->f_stacktop == NULL || f->f_iblock <= 0)
-		return 0; /* no frame or empty blockstack == no finalization */
+    if (f == NULL || f->f_stacktop == NULL || f->f_iblock <= 0)
+        return 0; /* no frame or empty blockstack == no finalization */
 
-	/* Any block type besides a loop requires cleanup. */
-	i = f->f_iblock;
-	while (--i >= 0) {
-		if (f->f_blockstack[i].b_type != SETUP_LOOP)
-			return 1;
-	}
+    /* Any block type besides a loop requires cleanup. */
+    i = f->f_iblock;
+    while (--i >= 0) {
+        if (f->f_blockstack[i].b_type != SETUP_LOOP)
+            return 1;
+    }
 
-	/* No blocks except loops, it's safe to skip finalization. */
-	return 0;
+    /* No blocks except loops, it's safe to skip finalization. */
+    return 0;
 }
diff --git a/Objects/intobject.c b/Objects/intobject.c
index b302d2f..7d70bfb 100644
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -10,7 +10,7 @@
 long
 PyInt_GetMax(void)
 {
-	return LONG_MAX;	/* To initialize sys.maxint */
+    return LONG_MAX;            /* To initialize sys.maxint */
 }
 
 /* Integers are quite normal objects, to make object handling uniform.
@@ -30,13 +30,13 @@
    via abuse of their ob_type members.
 */
 
-#define BLOCK_SIZE	1000	/* 1K less typical malloc overhead */
-#define BHEAD_SIZE	8	/* Enough for a 64-bit pointer */
-#define N_INTOBJECTS	((BLOCK_SIZE - BHEAD_SIZE) / sizeof(PyIntObject))
+#define BLOCK_SIZE      1000    /* 1K less typical malloc overhead */
+#define BHEAD_SIZE      8       /* Enough for a 64-bit pointer */
+#define N_INTOBJECTS    ((BLOCK_SIZE - BHEAD_SIZE) / sizeof(PyIntObject))
 
 struct _intblock {
-	struct _intblock *next;
-	PyIntObject objects[N_INTOBJECTS];
+    struct _intblock *next;
+    PyIntObject objects[N_INTOBJECTS];
 };
 
 typedef struct _intblock PyIntBlock;
@@ -47,28 +47,28 @@
 static PyIntObject *
 fill_free_list(void)
 {
-	PyIntObject *p, *q;
-	/* Python's object allocator isn't appropriate for large blocks. */
-	p = (PyIntObject *) PyMem_MALLOC(sizeof(PyIntBlock));
-	if (p == NULL)
-		return (PyIntObject *) PyErr_NoMemory();
-	((PyIntBlock *)p)->next = block_list;
-	block_list = (PyIntBlock *)p;
-	/* Link the int objects together, from rear to front, then return
-	   the address of the last int object in the block. */
-	p = &((PyIntBlock *)p)->objects[0];
-	q = p + N_INTOBJECTS;
-	while (--q > p)
-		Py_TYPE(q) = (struct _typeobject *)(q-1);
-	Py_TYPE(q) = NULL;
-	return p + N_INTOBJECTS - 1;
+    PyIntObject *p, *q;
+    /* Python's object allocator isn't appropriate for large blocks. */
+    p = (PyIntObject *) PyMem_MALLOC(sizeof(PyIntBlock));
+    if (p == NULL)
+        return (PyIntObject *) PyErr_NoMemory();
+    ((PyIntBlock *)p)->next = block_list;
+    block_list = (PyIntBlock *)p;
+    /* Link the int objects together, from rear to front, then return
+       the address of the last int object in the block. */
+    p = &((PyIntBlock *)p)->objects[0];
+    q = p + N_INTOBJECTS;
+    while (--q > p)
+        Py_TYPE(q) = (struct _typeobject *)(q-1);
+    Py_TYPE(q) = NULL;
+    return p + N_INTOBJECTS - 1;
 }
 
 #ifndef NSMALLPOSINTS
-#define NSMALLPOSINTS		257
+#define NSMALLPOSINTS           257
 #endif
 #ifndef NSMALLNEGINTS
-#define NSMALLNEGINTS		5
+#define NSMALLNEGINTS           5
 #endif
 #if NSMALLNEGINTS + NSMALLPOSINTS > 0
 /* References to small integers are saved in this array so that they
@@ -86,326 +86,326 @@
 PyObject *
 PyInt_FromLong(long ival)
 {
-	register PyIntObject *v;
+    register PyIntObject *v;
 #if NSMALLNEGINTS + NSMALLPOSINTS > 0
-	if (-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS) {
-		v = small_ints[ival + NSMALLNEGINTS];
-		Py_INCREF(v);
+    if (-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS) {
+        v = small_ints[ival + NSMALLNEGINTS];
+        Py_INCREF(v);
 #ifdef COUNT_ALLOCS
-		if (ival >= 0)
-			quick_int_allocs++;
-		else
-			quick_neg_int_allocs++;
+        if (ival >= 0)
+            quick_int_allocs++;
+        else
+            quick_neg_int_allocs++;
 #endif
-		return (PyObject *) v;
-	}
+        return (PyObject *) v;
+    }
 #endif
-	if (free_list == NULL) {
-		if ((free_list = fill_free_list()) == NULL)
-			return NULL;
-	}
-	/* Inline PyObject_New */
-	v = free_list;
-	free_list = (PyIntObject *)Py_TYPE(v);
-	PyObject_INIT(v, &PyInt_Type);
-	v->ob_ival = ival;
-	return (PyObject *) v;
+    if (free_list == NULL) {
+        if ((free_list = fill_free_list()) == NULL)
+            return NULL;
+    }
+    /* Inline PyObject_New */
+    v = free_list;
+    free_list = (PyIntObject *)Py_TYPE(v);
+    PyObject_INIT(v, &PyInt_Type);
+    v->ob_ival = ival;
+    return (PyObject *) v;
 }
 
 PyObject *
 PyInt_FromSize_t(size_t ival)
 {
-	if (ival <= LONG_MAX)
-		return PyInt_FromLong((long)ival);
-	return _PyLong_FromSize_t(ival);
+    if (ival <= LONG_MAX)
+        return PyInt_FromLong((long)ival);
+    return _PyLong_FromSize_t(ival);
 }
 
 PyObject *
 PyInt_FromSsize_t(Py_ssize_t ival)
 {
-	if (ival >= LONG_MIN && ival <= LONG_MAX)
-		return PyInt_FromLong((long)ival);
-	return _PyLong_FromSsize_t(ival);
+    if (ival >= LONG_MIN && ival <= LONG_MAX)
+        return PyInt_FromLong((long)ival);
+    return _PyLong_FromSsize_t(ival);
 }
 
 static void
 int_dealloc(PyIntObject *v)
 {
-	if (PyInt_CheckExact(v)) {
-		Py_TYPE(v) = (struct _typeobject *)free_list;
-		free_list = v;
-	}
-	else
-		Py_TYPE(v)->tp_free((PyObject *)v);
+    if (PyInt_CheckExact(v)) {
+        Py_TYPE(v) = (struct _typeobject *)free_list;
+        free_list = v;
+    }
+    else
+        Py_TYPE(v)->tp_free((PyObject *)v);
 }
 
 static void
 int_free(PyIntObject *v)
 {
-	Py_TYPE(v) = (struct _typeobject *)free_list;
-	free_list = v;
+    Py_TYPE(v) = (struct _typeobject *)free_list;
+    free_list = v;
 }
 
 long
 PyInt_AsLong(register PyObject *op)
 {
-	PyNumberMethods *nb;
-	PyIntObject *io;
-	long val;
+    PyNumberMethods *nb;
+    PyIntObject *io;
+    long val;
 
-	if (op && PyInt_Check(op))
-		return PyInt_AS_LONG((PyIntObject*) op);
+    if (op && PyInt_Check(op))
+        return PyInt_AS_LONG((PyIntObject*) op);
 
-	if (op == NULL || (nb = Py_TYPE(op)->tp_as_number) == NULL ||
-	    nb->nb_int == NULL) {
-		PyErr_SetString(PyExc_TypeError, "an integer is required");
-		return -1;
-	}
+    if (op == NULL || (nb = Py_TYPE(op)->tp_as_number) == NULL ||
+        nb->nb_int == NULL) {
+        PyErr_SetString(PyExc_TypeError, "an integer is required");
+        return -1;
+    }
 
-	io = (PyIntObject*) (*nb->nb_int) (op);
-	if (io == NULL)
-		return -1;
-	if (!PyInt_Check(io)) {
-		if (PyLong_Check(io)) {
-			/* got a long? => retry int conversion */
-			val = PyLong_AsLong((PyObject *)io);
-			Py_DECREF(io);
-			if ((val == -1) && PyErr_Occurred())
-				return -1;
-			return val;
-		}
-		else
-		{
-			Py_DECREF(io);
-			PyErr_SetString(PyExc_TypeError,
-				    "__int__ method should return an integer");
-			return -1;
-		}
-	}
+    io = (PyIntObject*) (*nb->nb_int) (op);
+    if (io == NULL)
+        return -1;
+    if (!PyInt_Check(io)) {
+        if (PyLong_Check(io)) {
+            /* got a long? => retry int conversion */
+            val = PyLong_AsLong((PyObject *)io);
+            Py_DECREF(io);
+            if ((val == -1) && PyErr_Occurred())
+                return -1;
+            return val;
+        }
+        else
+        {
+            Py_DECREF(io);
+            PyErr_SetString(PyExc_TypeError,
+                        "__int__ method should return an integer");
+            return -1;
+        }
+    }
 
-	val = PyInt_AS_LONG(io);
-	Py_DECREF(io);
+    val = PyInt_AS_LONG(io);
+    Py_DECREF(io);
 
-	return val;
+    return val;
 }
 
 Py_ssize_t
 PyInt_AsSsize_t(register PyObject *op)
 {
 #if SIZEOF_SIZE_T != SIZEOF_LONG
-	PyNumberMethods *nb;
-	PyIntObject *io;
-	Py_ssize_t val;
+    PyNumberMethods *nb;
+    PyIntObject *io;
+    Py_ssize_t val;
 #endif
 
-	if (op == NULL) {
-		PyErr_SetString(PyExc_TypeError, "an integer is required");
-		return -1;
-	}
+    if (op == NULL) {
+        PyErr_SetString(PyExc_TypeError, "an integer is required");
+        return -1;
+    }
 
-	if (PyInt_Check(op))
-		return PyInt_AS_LONG((PyIntObject*) op);
-	if (PyLong_Check(op))
-		return _PyLong_AsSsize_t(op);
+    if (PyInt_Check(op))
+        return PyInt_AS_LONG((PyIntObject*) op);
+    if (PyLong_Check(op))
+        return _PyLong_AsSsize_t(op);
 #if SIZEOF_SIZE_T == SIZEOF_LONG
-	return PyInt_AsLong(op);
+    return PyInt_AsLong(op);
 #else
 
-	if ((nb = Py_TYPE(op)->tp_as_number) == NULL ||
-	    (nb->nb_int == NULL && nb->nb_long == 0)) {
-		PyErr_SetString(PyExc_TypeError, "an integer is required");
-		return -1;
-	}
+    if ((nb = Py_TYPE(op)->tp_as_number) == NULL ||
+        (nb->nb_int == NULL && nb->nb_long == 0)) {
+        PyErr_SetString(PyExc_TypeError, "an integer is required");
+        return -1;
+    }
 
-	if (nb->nb_long != 0)
-		io = (PyIntObject*) (*nb->nb_long) (op);
-	else
-		io = (PyIntObject*) (*nb->nb_int) (op);
-	if (io == NULL)
-		return -1;
-	if (!PyInt_Check(io)) {
-		if (PyLong_Check(io)) {
-			/* got a long? => retry int conversion */
-			val = _PyLong_AsSsize_t((PyObject *)io);
-			Py_DECREF(io);
-			if ((val == -1) && PyErr_Occurred())
-				return -1;
-			return val;
-		}
-		else
-		{
-			Py_DECREF(io);
-			PyErr_SetString(PyExc_TypeError,
-				    "__int__ method should return an integer");
-			return -1;
-		}
-	}
+    if (nb->nb_long != 0)
+        io = (PyIntObject*) (*nb->nb_long) (op);
+    else
+        io = (PyIntObject*) (*nb->nb_int) (op);
+    if (io == NULL)
+        return -1;
+    if (!PyInt_Check(io)) {
+        if (PyLong_Check(io)) {
+            /* got a long? => retry int conversion */
+            val = _PyLong_AsSsize_t((PyObject *)io);
+            Py_DECREF(io);
+            if ((val == -1) && PyErr_Occurred())
+                return -1;
+            return val;
+        }
+        else
+        {
+            Py_DECREF(io);
+            PyErr_SetString(PyExc_TypeError,
+                        "__int__ method should return an integer");
+            return -1;
+        }
+    }
 
-	val = PyInt_AS_LONG(io);
-	Py_DECREF(io);
+    val = PyInt_AS_LONG(io);
+    Py_DECREF(io);
 
-	return val;
+    return val;
 #endif
 }
 
 unsigned long
 PyInt_AsUnsignedLongMask(register PyObject *op)
 {
-	PyNumberMethods *nb;
-	PyIntObject *io;
-	unsigned long val;
+    PyNumberMethods *nb;
+    PyIntObject *io;
+    unsigned long val;
 
-	if (op && PyInt_Check(op))
-		return PyInt_AS_LONG((PyIntObject*) op);
-	if (op && PyLong_Check(op))
-		return PyLong_AsUnsignedLongMask(op);
+    if (op && PyInt_Check(op))
+        return PyInt_AS_LONG((PyIntObject*) op);
+    if (op && PyLong_Check(op))
+        return PyLong_AsUnsignedLongMask(op);
 
-	if (op == NULL || (nb = Py_TYPE(op)->tp_as_number) == NULL ||
-	    nb->nb_int == NULL) {
-		PyErr_SetString(PyExc_TypeError, "an integer is required");
-		return (unsigned long)-1;
-	}
+    if (op == NULL || (nb = Py_TYPE(op)->tp_as_number) == NULL ||
+        nb->nb_int == NULL) {
+        PyErr_SetString(PyExc_TypeError, "an integer is required");
+        return (unsigned long)-1;
+    }
 
-	io = (PyIntObject*) (*nb->nb_int) (op);
-	if (io == NULL)
-		return (unsigned long)-1;
-	if (!PyInt_Check(io)) {
-		if (PyLong_Check(io)) {
-			val = PyLong_AsUnsignedLongMask((PyObject *)io);
-			Py_DECREF(io);
-			if (PyErr_Occurred())
-				return (unsigned long)-1;
-			return val;
-		}
-		else
-		{
-			Py_DECREF(io);
-			PyErr_SetString(PyExc_TypeError,
-				    "__int__ method should return an integer");
-			return (unsigned long)-1;
-		}
-	}
+    io = (PyIntObject*) (*nb->nb_int) (op);
+    if (io == NULL)
+        return (unsigned long)-1;
+    if (!PyInt_Check(io)) {
+        if (PyLong_Check(io)) {
+            val = PyLong_AsUnsignedLongMask((PyObject *)io);
+            Py_DECREF(io);
+            if (PyErr_Occurred())
+                return (unsigned long)-1;
+            return val;
+        }
+        else
+        {
+            Py_DECREF(io);
+            PyErr_SetString(PyExc_TypeError,
+                        "__int__ method should return an integer");
+            return (unsigned long)-1;
+        }
+    }
 
-	val = PyInt_AS_LONG(io);
-	Py_DECREF(io);
+    val = PyInt_AS_LONG(io);
+    Py_DECREF(io);
 
-	return val;
+    return val;
 }
 
 #ifdef HAVE_LONG_LONG
 unsigned PY_LONG_LONG
 PyInt_AsUnsignedLongLongMask(register PyObject *op)
 {
-	PyNumberMethods *nb;
-	PyIntObject *io;
-	unsigned PY_LONG_LONG val;
+    PyNumberMethods *nb;
+    PyIntObject *io;
+    unsigned PY_LONG_LONG val;
 
-	if (op && PyInt_Check(op))
-		return PyInt_AS_LONG((PyIntObject*) op);
-	if (op && PyLong_Check(op))
-		return PyLong_AsUnsignedLongLongMask(op);
+    if (op && PyInt_Check(op))
+        return PyInt_AS_LONG((PyIntObject*) op);
+    if (op && PyLong_Check(op))
+        return PyLong_AsUnsignedLongLongMask(op);
 
-	if (op == NULL || (nb = Py_TYPE(op)->tp_as_number) == NULL ||
-	    nb->nb_int == NULL) {
-		PyErr_SetString(PyExc_TypeError, "an integer is required");
-		return (unsigned PY_LONG_LONG)-1;
-	}
+    if (op == NULL || (nb = Py_TYPE(op)->tp_as_number) == NULL ||
+        nb->nb_int == NULL) {
+        PyErr_SetString(PyExc_TypeError, "an integer is required");
+        return (unsigned PY_LONG_LONG)-1;
+    }
 
-	io = (PyIntObject*) (*nb->nb_int) (op);
-	if (io == NULL)
-		return (unsigned PY_LONG_LONG)-1;
-	if (!PyInt_Check(io)) {
-		if (PyLong_Check(io)) {
-			val = PyLong_AsUnsignedLongLongMask((PyObject *)io);
-			Py_DECREF(io);
-			if (PyErr_Occurred())
-				return (unsigned PY_LONG_LONG)-1;
-			return val;
-		}
-		else
-		{
-			Py_DECREF(io);
-			PyErr_SetString(PyExc_TypeError,
-				    "__int__ method should return an integer");
-			return (unsigned PY_LONG_LONG)-1;
-		}
-	}
+    io = (PyIntObject*) (*nb->nb_int) (op);
+    if (io == NULL)
+        return (unsigned PY_LONG_LONG)-1;
+    if (!PyInt_Check(io)) {
+        if (PyLong_Check(io)) {
+            val = PyLong_AsUnsignedLongLongMask((PyObject *)io);
+            Py_DECREF(io);
+            if (PyErr_Occurred())
+                return (unsigned PY_LONG_LONG)-1;
+            return val;
+        }
+        else
+        {
+            Py_DECREF(io);
+            PyErr_SetString(PyExc_TypeError,
+                        "__int__ method should return an integer");
+            return (unsigned PY_LONG_LONG)-1;
+        }
+    }
 
-	val = PyInt_AS_LONG(io);
-	Py_DECREF(io);
+    val = PyInt_AS_LONG(io);
+    Py_DECREF(io);
 
-	return val;
+    return val;
 }
 #endif
 
 PyObject *
 PyInt_FromString(char *s, char **pend, int base)
 {
-	char *end;
-	long x;
-	Py_ssize_t slen;
-	PyObject *sobj, *srepr;
+    char *end;
+    long x;
+    Py_ssize_t slen;
+    PyObject *sobj, *srepr;
 
-	if ((base != 0 && base < 2) || base > 36) {
-		PyErr_SetString(PyExc_ValueError,
-				"int() base must be >= 2 and <= 36");
-		return NULL;
-	}
+    if ((base != 0 && base < 2) || base > 36) {
+        PyErr_SetString(PyExc_ValueError,
+                        "int() base must be >= 2 and <= 36");
+        return NULL;
+    }
 
-	while (*s && isspace(Py_CHARMASK(*s)))
-		s++;
-	errno = 0;
-	if (base == 0 && s[0] == '0') {
-		x = (long) PyOS_strtoul(s, &end, base);
-		if (x < 0)
-			return PyLong_FromString(s, pend, base);
-	}
-	else
-		x = PyOS_strtol(s, &end, base);
-	if (end == s || !isalnum(Py_CHARMASK(end[-1])))
-		goto bad;
-	while (*end && isspace(Py_CHARMASK(*end)))
-		end++;
-	if (*end != '\0') {
+    while (*s && isspace(Py_CHARMASK(*s)))
+        s++;
+    errno = 0;
+    if (base == 0 && s[0] == '0') {
+        x = (long) PyOS_strtoul(s, &end, base);
+        if (x < 0)
+            return PyLong_FromString(s, pend, base);
+    }
+    else
+        x = PyOS_strtol(s, &end, base);
+    if (end == s || !isalnum(Py_CHARMASK(end[-1])))
+        goto bad;
+    while (*end && isspace(Py_CHARMASK(*end)))
+        end++;
+    if (*end != '\0') {
   bad:
-		slen = strlen(s) < 200 ? strlen(s) : 200;
-		sobj = PyString_FromStringAndSize(s, slen);
-		if (sobj == NULL)
-			return NULL;
-		srepr = PyObject_Repr(sobj);
-		Py_DECREF(sobj);
-		if (srepr == NULL)
-			return NULL;
-		PyErr_Format(PyExc_ValueError,
-			     "invalid literal for int() with base %d: %s",
-			     base, PyString_AS_STRING(srepr));
-		Py_DECREF(srepr);
-		return NULL;
-	}
-	else if (errno != 0)
-		return PyLong_FromString(s, pend, base);
-	if (pend)
-		*pend = end;
-	return PyInt_FromLong(x);
+        slen = strlen(s) < 200 ? strlen(s) : 200;
+        sobj = PyString_FromStringAndSize(s, slen);
+        if (sobj == NULL)
+            return NULL;
+        srepr = PyObject_Repr(sobj);
+        Py_DECREF(sobj);
+        if (srepr == NULL)
+            return NULL;
+        PyErr_Format(PyExc_ValueError,
+                     "invalid literal for int() with base %d: %s",
+                     base, PyString_AS_STRING(srepr));
+        Py_DECREF(srepr);
+        return NULL;
+    }
+    else if (errno != 0)
+        return PyLong_FromString(s, pend, base);
+    if (pend)
+        *pend = end;
+    return PyInt_FromLong(x);
 }
 
 #ifdef Py_USING_UNICODE
 PyObject *
 PyInt_FromUnicode(Py_UNICODE *s, Py_ssize_t length, int base)
 {
-	PyObject *result;
-	char *buffer = (char *)PyMem_MALLOC(length+1);
+    PyObject *result;
+    char *buffer = (char *)PyMem_MALLOC(length+1);
 
-	if (buffer == NULL)
-		return PyErr_NoMemory();
+    if (buffer == NULL)
+        return PyErr_NoMemory();
 
-	if (PyUnicode_EncodeDecimal(s, length, buffer, NULL)) {
-		PyMem_FREE(buffer);
-		return NULL;
-	}
-	result = PyInt_FromString(buffer, NULL, base);
-	PyMem_FREE(buffer);
-	return result;
+    if (PyUnicode_EncodeDecimal(s, length, buffer, NULL)) {
+        PyMem_FREE(buffer);
+        return NULL;
+    }
+    result = PyInt_FromString(buffer, NULL, base);
+    PyMem_FREE(buffer);
+    return result;
 }
 #endif
 
@@ -415,71 +415,71 @@
    don't have any knowledge about conversion of other types to
    integers. */
 
-#define CONVERT_TO_LONG(obj, lng)		\
-	if (PyInt_Check(obj)) {			\
-		lng = PyInt_AS_LONG(obj);	\
-	}					\
-	else {					\
-		Py_INCREF(Py_NotImplemented);	\
-		return Py_NotImplemented;	\
-	}
+#define CONVERT_TO_LONG(obj, lng)               \
+    if (PyInt_Check(obj)) {                     \
+        lng = PyInt_AS_LONG(obj);               \
+    }                                           \
+    else {                                      \
+        Py_INCREF(Py_NotImplemented);           \
+        return Py_NotImplemented;               \
+    }
 
 /* ARGSUSED */
 static int
 int_print(PyIntObject *v, FILE *fp, int flags)
      /* flags -- not used but required by interface */
 {
-	long int_val = v->ob_ival;
-	Py_BEGIN_ALLOW_THREADS
-	fprintf(fp, "%ld", int_val);
-	Py_END_ALLOW_THREADS
-	return 0;
+    long int_val = v->ob_ival;
+    Py_BEGIN_ALLOW_THREADS
+    fprintf(fp, "%ld", int_val);
+    Py_END_ALLOW_THREADS
+    return 0;
 }
 
 static int
 int_compare(PyIntObject *v, PyIntObject *w)
 {
-	register long i = v->ob_ival;
-	register long j = w->ob_ival;
-	return (i < j) ? -1 : (i > j) ? 1 : 0;
+    register long i = v->ob_ival;
+    register long j = w->ob_ival;
+    return (i < j) ? -1 : (i > j) ? 1 : 0;
 }
 
 static long
 int_hash(PyIntObject *v)
 {
-	/* XXX If this is changed, you also need to change the way
-	   Python's long, float and complex types are hashed. */
-	long x = v -> ob_ival;
-	if (x == -1)
-		x = -2;
-	return x;
+    /* XXX If this is changed, you also need to change the way
+       Python's long, float and complex types are hashed. */
+    long x = v -> ob_ival;
+    if (x == -1)
+        x = -2;
+    return x;
 }
 
 static PyObject *
 int_add(PyIntObject *v, PyIntObject *w)
 {
-	register long a, b, x;
-	CONVERT_TO_LONG(v, a);
-	CONVERT_TO_LONG(w, b);
-	/* casts in the line below avoid undefined behaviour on overflow */
-	x = (long)((unsigned long)a + b);
-	if ((x^a) >= 0 || (x^b) >= 0)
-		return PyInt_FromLong(x);
-	return PyLong_Type.tp_as_number->nb_add((PyObject *)v, (PyObject *)w);
+    register long a, b, x;
+    CONVERT_TO_LONG(v, a);
+    CONVERT_TO_LONG(w, b);
+    /* casts in the line below avoid undefined behaviour on overflow */
+    x = (long)((unsigned long)a + b);
+    if ((x^a) >= 0 || (x^b) >= 0)
+        return PyInt_FromLong(x);
+    return PyLong_Type.tp_as_number->nb_add((PyObject *)v, (PyObject *)w);
 }
 
 static PyObject *
 int_sub(PyIntObject *v, PyIntObject *w)
 {
-	register long a, b, x;
-	CONVERT_TO_LONG(v, a);
-	CONVERT_TO_LONG(w, b);
-	/* casts in the line below avoid undefined behaviour on overflow */
-	x = (long)((unsigned long)a - b);
-	if ((x^a) >= 0 || (x^~b) >= 0)
-		return PyInt_FromLong(x);
-	return PyLong_Type.tp_as_number->nb_subtract((PyObject *)v,
-						     (PyObject *)w);
+    register long a, b, x;
+    CONVERT_TO_LONG(v, a);
+    CONVERT_TO_LONG(w, b);
+    /* casts in the line below avoid undefined behaviour on overflow */
+    x = (long)((unsigned long)a - b);
+    if ((x^a) >= 0 || (x^~b) >= 0)
+        return PyInt_FromLong(x);
+    return PyLong_Type.tp_as_number->nb_subtract((PyObject *)v,
+                                                 (PyObject *)w);
 }
 
 /*
@@ -511,40 +511,40 @@
 static PyObject *
 int_mul(PyObject *v, PyObject *w)
 {
-	long a, b;
-	long longprod;			/* a*b in native long arithmetic */
-	double doubled_longprod;	/* (double)longprod */
-	double doubleprod;		/* (double)a * (double)b */
+    long a, b;
+    long longprod;                      /* a*b in native long arithmetic */
+    double doubled_longprod;            /* (double)longprod */
+    double doubleprod;                  /* (double)a * (double)b */
 
-	CONVERT_TO_LONG(v, a);
-	CONVERT_TO_LONG(w, b);
-	/* casts in the next line avoid undefined behaviour on overflow */
-	longprod = (long)((unsigned long)a * b);
-	doubleprod = (double)a * (double)b;
-	doubled_longprod = (double)longprod;
+    CONVERT_TO_LONG(v, a);
+    CONVERT_TO_LONG(w, b);
+    /* casts in the next line avoid undefined behaviour on overflow */
+    longprod = (long)((unsigned long)a * b);
+    doubleprod = (double)a * (double)b;
+    doubled_longprod = (double)longprod;
 
-	/* Fast path for normal case:  small multiplicands, and no info
-	   is lost in either method. */
-	if (doubled_longprod == doubleprod)
-		return PyInt_FromLong(longprod);
+    /* Fast path for normal case:  small multiplicands, and no info
+       is lost in either method. */
+    if (doubled_longprod == doubleprod)
+        return PyInt_FromLong(longprod);
 
-	/* Somebody somewhere lost info.  Close enough, or way off?  Note
-	   that a != 0 and b != 0 (else doubled_longprod == doubleprod == 0).
-	   The difference either is or isn't significant compared to the
-	   true value (of which doubleprod is a good approximation).
-	*/
-	{
-		const double diff = doubled_longprod - doubleprod;
-		const double absdiff = diff >= 0.0 ? diff : -diff;
-		const double absprod = doubleprod >= 0.0 ? doubleprod :
-							  -doubleprod;
-		/* absdiff/absprod <= 1/32 iff
-		   32 * absdiff <= absprod -- 5 good bits is "close enough" */
-		if (32.0 * absdiff <= absprod)
-			return PyInt_FromLong(longprod);
-		else
-			return PyLong_Type.tp_as_number->nb_multiply(v, w);
-	}
+    /* Somebody somewhere lost info.  Close enough, or way off?  Note
+       that a != 0 and b != 0 (else doubled_longprod == doubleprod == 0).
+       The difference either is or isn't significant compared to the
+       true value (of which doubleprod is a good approximation).
+    */
+    {
+        const double diff = doubled_longprod - doubleprod;
+        const double absdiff = diff >= 0.0 ? diff : -diff;
+        const double absprod = doubleprod >= 0.0 ? doubleprod :
+                              -doubleprod;
+        /* absdiff/absprod <= 1/32 iff
+           32 * absdiff <= absprod -- 5 good bits is "close enough" */
+        if (32.0 * absdiff <= absprod)
+            return PyInt_FromLong(longprod);
+        else
+            return PyLong_Type.tp_as_number->nb_multiply(v, w);
+    }
 }
 
 /* Integer overflow checking for unary negation: on a 2's-complement
@@ -555,420 +555,420 @@
  * warn about applying unary minus to an unsigned operand.  Hence the
  * weird "0-".
  */
-#define UNARY_NEG_WOULD_OVERFLOW(x)	\
-	((x) < 0 && (unsigned long)(x) == 0-(unsigned long)(x))
+#define UNARY_NEG_WOULD_OVERFLOW(x)     \
+    ((x) < 0 && (unsigned long)(x) == 0-(unsigned long)(x))
 
 /* Return type of i_divmod */
 enum divmod_result {
-	DIVMOD_OK,		/* Correct result */
-	DIVMOD_OVERFLOW,	/* Overflow, try again using longs */
-	DIVMOD_ERROR		/* Exception raised */
+    DIVMOD_OK,                  /* Correct result */
+    DIVMOD_OVERFLOW,            /* Overflow, try again using longs */
+    DIVMOD_ERROR                /* Exception raised */
 };
 
 static enum divmod_result
 i_divmod(register long x, register long y,
          long *p_xdivy, long *p_xmody)
 {
-	long xdivy, xmody;
+    long xdivy, xmody;
 
-	if (y == 0) {
-		PyErr_SetString(PyExc_ZeroDivisionError,
-				"integer division or modulo by zero");
-		return DIVMOD_ERROR;
-	}
-	/* (-sys.maxint-1)/-1 is the only overflow case. */
-	if (y == -1 && UNARY_NEG_WOULD_OVERFLOW(x))
-		return DIVMOD_OVERFLOW;
-	xdivy = x / y;
-	/* xdiv*y can overflow on platforms where x/y gives floor(x/y)
-	 * for x and y with differing signs. (This is unusual
-	 * behaviour, and C99 prohibits it, but it's allowed by C89;
-	 * for an example of overflow, take x = LONG_MIN, y = 5 or x =
-	 * LONG_MAX, y = -5.)  However, x - xdivy*y is always
-	 * representable as a long, since it lies strictly between
-	 * -abs(y) and abs(y).  We add casts to avoid intermediate
-	 * overflow.
-	 */
-	xmody = (long)(x - (unsigned long)xdivy * y);
-	/* If the signs of x and y differ, and the remainder is non-0,
-	 * C89 doesn't define whether xdivy is now the floor or the
-	 * ceiling of the infinitely precise quotient.  We want the floor,
-	 * and we have it iff the remainder's sign matches y's.
-	 */
-	if (xmody && ((y ^ xmody) < 0) /* i.e. and signs differ */) {
-		xmody += y;
-		--xdivy;
-		assert(xmody && ((y ^ xmody) >= 0));
-	}
-	*p_xdivy = xdivy;
-	*p_xmody = xmody;
-	return DIVMOD_OK;
+    if (y == 0) {
+        PyErr_SetString(PyExc_ZeroDivisionError,
+                        "integer division or modulo by zero");
+        return DIVMOD_ERROR;
+    }
+    /* (-sys.maxint-1)/-1 is the only overflow case. */
+    if (y == -1 && UNARY_NEG_WOULD_OVERFLOW(x))
+        return DIVMOD_OVERFLOW;
+    xdivy = x / y;
+    /* xdiv*y can overflow on platforms where x/y gives floor(x/y)
+     * for x and y with differing signs. (This is unusual
+     * behaviour, and C99 prohibits it, but it's allowed by C89;
+     * for an example of overflow, take x = LONG_MIN, y = 5 or x =
+     * LONG_MAX, y = -5.)  However, x - xdivy*y is always
+     * representable as a long, since it lies strictly between
+     * -abs(y) and abs(y).  We add casts to avoid intermediate
+     * overflow.
+     */
+    xmody = (long)(x - (unsigned long)xdivy * y);
+    /* If the signs of x and y differ, and the remainder is non-0,
+     * C89 doesn't define whether xdivy is now the floor or the
+     * ceiling of the infinitely precise quotient.  We want the floor,
+     * and we have it iff the remainder's sign matches y's.
+     */
+    if (xmody && ((y ^ xmody) < 0) /* i.e. and signs differ */) {
+        xmody += y;
+        --xdivy;
+        assert(xmody && ((y ^ xmody) >= 0));
+    }
+    *p_xdivy = xdivy;
+    *p_xmody = xmody;
+    return DIVMOD_OK;
 }
 
 static PyObject *
 int_div(PyIntObject *x, PyIntObject *y)
 {
-	long xi, yi;
-	long d, m;
-	CONVERT_TO_LONG(x, xi);
-	CONVERT_TO_LONG(y, yi);
-	switch (i_divmod(xi, yi, &d, &m)) {
-	case DIVMOD_OK:
-		return PyInt_FromLong(d);
-	case DIVMOD_OVERFLOW:
-		return PyLong_Type.tp_as_number->nb_divide((PyObject *)x,
-							   (PyObject *)y);
-	default:
-		return NULL;
-	}
+    long xi, yi;
+    long d, m;
+    CONVERT_TO_LONG(x, xi);
+    CONVERT_TO_LONG(y, yi);
+    switch (i_divmod(xi, yi, &d, &m)) {
+    case DIVMOD_OK:
+        return PyInt_FromLong(d);
+    case DIVMOD_OVERFLOW:
+        return PyLong_Type.tp_as_number->nb_divide((PyObject *)x,
+                                                   (PyObject *)y);
+    default:
+        return NULL;
+    }
 }
 
 static PyObject *
 int_classic_div(PyIntObject *x, PyIntObject *y)
 {
-	long xi, yi;
-	long d, m;
-	CONVERT_TO_LONG(x, xi);
-	CONVERT_TO_LONG(y, yi);
-	if (Py_DivisionWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning, "classic int division") < 0)
-		return NULL;
-	switch (i_divmod(xi, yi, &d, &m)) {
-	case DIVMOD_OK:
-		return PyInt_FromLong(d);
-	case DIVMOD_OVERFLOW:
-		return PyLong_Type.tp_as_number->nb_divide((PyObject *)x,
-							   (PyObject *)y);
-	default:
-		return NULL;
-	}
+    long xi, yi;
+    long d, m;
+    CONVERT_TO_LONG(x, xi);
+    CONVERT_TO_LONG(y, yi);
+    if (Py_DivisionWarningFlag &&
+        PyErr_Warn(PyExc_DeprecationWarning, "classic int division") < 0)
+        return NULL;
+    switch (i_divmod(xi, yi, &d, &m)) {
+    case DIVMOD_OK:
+        return PyInt_FromLong(d);
+    case DIVMOD_OVERFLOW:
+        return PyLong_Type.tp_as_number->nb_divide((PyObject *)x,
+                                                   (PyObject *)y);
+    default:
+        return NULL;
+    }
 }
 
 static PyObject *
 int_true_divide(PyIntObject *x, PyIntObject *y)
 {
-	long xi, yi;
-	/* If they aren't both ints, give someone else a chance.  In
-	   particular, this lets int/long get handled by longs, which
-	   underflows to 0 gracefully if the long is too big to convert
-	   to float. */
-	CONVERT_TO_LONG(x, xi);
-	CONVERT_TO_LONG(y, yi);
-	if (yi == 0) {
-		PyErr_SetString(PyExc_ZeroDivisionError,
-				"division by zero");
-		return NULL;
-	}
-	if (xi == 0)
-		return PyFloat_FromDouble(yi < 0 ? -0.0 : 0.0);
+    long xi, yi;
+    /* If they aren't both ints, give someone else a chance.  In
+       particular, this lets int/long get handled by longs, which
+       underflows to 0 gracefully if the long is too big to convert
+       to float. */
+    CONVERT_TO_LONG(x, xi);
+    CONVERT_TO_LONG(y, yi);
+    if (yi == 0) {
+        PyErr_SetString(PyExc_ZeroDivisionError,
+                        "division by zero");
+        return NULL;
+    }
+    if (xi == 0)
+        return PyFloat_FromDouble(yi < 0 ? -0.0 : 0.0);
 
 #define WIDTH_OF_ULONG (CHAR_BIT*SIZEOF_LONG)
 #if DBL_MANT_DIG < WIDTH_OF_ULONG
-	if ((xi >= 0 ? 0UL + xi : 0UL - xi) >> DBL_MANT_DIG ||
-	    (yi >= 0 ? 0UL + yi : 0UL - yi) >> DBL_MANT_DIG)
-		/* Large x or y.  Use long integer arithmetic. */
-		return PyLong_Type.tp_as_number->nb_true_divide(
-			(PyObject *)x, (PyObject *)y);
-	else
+    if ((xi >= 0 ? 0UL + xi : 0UL - xi) >> DBL_MANT_DIG ||
+        (yi >= 0 ? 0UL + yi : 0UL - yi) >> DBL_MANT_DIG)
+        /* Large x or y.  Use long integer arithmetic. */
+        return PyLong_Type.tp_as_number->nb_true_divide(
+            (PyObject *)x, (PyObject *)y);
+    else
 #endif
-		/* Both ints can be exactly represented as doubles.  Do a
-		   floating-point division. */
-		return PyFloat_FromDouble((double)xi / (double)yi);
+        /* Both ints can be exactly represented as doubles.  Do a
+           floating-point division. */
+        return PyFloat_FromDouble((double)xi / (double)yi);
 }
 
 static PyObject *
 int_mod(PyIntObject *x, PyIntObject *y)
 {
-	long xi, yi;
-	long d, m;
-	CONVERT_TO_LONG(x, xi);
-	CONVERT_TO_LONG(y, yi);
-	switch (i_divmod(xi, yi, &d, &m)) {
-	case DIVMOD_OK:
-		return PyInt_FromLong(m);
-	case DIVMOD_OVERFLOW:
-		return PyLong_Type.tp_as_number->nb_remainder((PyObject *)x,
-							      (PyObject *)y);
-	default:
-		return NULL;
-	}
+    long xi, yi;
+    long d, m;
+    CONVERT_TO_LONG(x, xi);
+    CONVERT_TO_LONG(y, yi);
+    switch (i_divmod(xi, yi, &d, &m)) {
+    case DIVMOD_OK:
+        return PyInt_FromLong(m);
+    case DIVMOD_OVERFLOW:
+        return PyLong_Type.tp_as_number->nb_remainder((PyObject *)x,
+                                                      (PyObject *)y);
+    default:
+        return NULL;
+    }
 }
 
 static PyObject *
 int_divmod(PyIntObject *x, PyIntObject *y)
 {
-	long xi, yi;
-	long d, m;
-	CONVERT_TO_LONG(x, xi);
-	CONVERT_TO_LONG(y, yi);
-	switch (i_divmod(xi, yi, &d, &m)) {
-	case DIVMOD_OK:
-		return Py_BuildValue("(ll)", d, m);
-	case DIVMOD_OVERFLOW:
-		return PyLong_Type.tp_as_number->nb_divmod((PyObject *)x,
-							   (PyObject *)y);
-	default:
-		return NULL;
-	}
+    long xi, yi;
+    long d, m;
+    CONVERT_TO_LONG(x, xi);
+    CONVERT_TO_LONG(y, yi);
+    switch (i_divmod(xi, yi, &d, &m)) {
+    case DIVMOD_OK:
+        return Py_BuildValue("(ll)", d, m);
+    case DIVMOD_OVERFLOW:
+        return PyLong_Type.tp_as_number->nb_divmod((PyObject *)x,
+                                                   (PyObject *)y);
+    default:
+        return NULL;
+    }
 }
 
 static PyObject *
 int_pow(PyIntObject *v, PyIntObject *w, PyIntObject *z)
 {
-	register long iv, iw, iz=0, ix, temp, prev;
-	CONVERT_TO_LONG(v, iv);
-	CONVERT_TO_LONG(w, iw);
-	if (iw < 0) {
-		if ((PyObject *)z != Py_None) {
-			PyErr_SetString(PyExc_TypeError, "pow() 2nd argument "
-			     "cannot be negative when 3rd argument specified");
-			return NULL;
-		}
-		/* Return a float.  This works because we know that
-		   this calls float_pow() which converts its
-		   arguments to double. */
-		return PyFloat_Type.tp_as_number->nb_power(
-			(PyObject *)v, (PyObject *)w, (PyObject *)z);
-	}
- 	if ((PyObject *)z != Py_None) {
-		CONVERT_TO_LONG(z, iz);
-		if (iz == 0) {
-			PyErr_SetString(PyExc_ValueError,
-					"pow() 3rd argument cannot be 0");
-			return NULL;
-		}
-	}
-	/*
-	 * XXX: The original exponentiation code stopped looping
-	 * when temp hit zero; this code will continue onwards
-	 * unnecessarily, but at least it won't cause any errors.
-	 * Hopefully the speed improvement from the fast exponentiation
-	 * will compensate for the slight inefficiency.
-	 * XXX: Better handling of overflows is desperately needed.
-	 */
- 	temp = iv;
-	ix = 1;
-	while (iw > 0) {
-	 	prev = ix;	/* Save value for overflow check */
-	 	if (iw & 1) {
-		 	ix = ix*temp;
-			if (temp == 0)
-				break; /* Avoid ix / 0 */
-			if (ix / temp != prev) {
-				return PyLong_Type.tp_as_number->nb_power(
-					(PyObject *)v,
-					(PyObject *)w,
-					(PyObject *)z);
-			}
-		}
-	 	iw >>= 1;	/* Shift exponent down by 1 bit */
-	        if (iw==0) break;
-	 	prev = temp;
-	 	temp *= temp;	/* Square the value of temp */
-	 	if (prev != 0 && temp / prev != prev) {
-			return PyLong_Type.tp_as_number->nb_power(
-				(PyObject *)v, (PyObject *)w, (PyObject *)z);
-		}
-	 	if (iz) {
-			/* If we did a multiplication, perform a modulo */
-		 	ix = ix % iz;
-		 	temp = temp % iz;
-		}
-	}
-	if (iz) {
-	 	long div, mod;
-		switch (i_divmod(ix, iz, &div, &mod)) {
-		case DIVMOD_OK:
-			ix = mod;
-			break;
-		case DIVMOD_OVERFLOW:
-			return PyLong_Type.tp_as_number->nb_power(
-				(PyObject *)v, (PyObject *)w, (PyObject *)z);
-		default:
-			return NULL;
-		}
-	}
-	return PyInt_FromLong(ix);
+    register long iv, iw, iz=0, ix, temp, prev;
+    CONVERT_TO_LONG(v, iv);
+    CONVERT_TO_LONG(w, iw);
+    if (iw < 0) {
+        if ((PyObject *)z != Py_None) {
+            PyErr_SetString(PyExc_TypeError, "pow() 2nd argument "
+                 "cannot be negative when 3rd argument specified");
+            return NULL;
+        }
+        /* Return a float.  This works because we know that
+           this calls float_pow() which converts its
+           arguments to double. */
+        return PyFloat_Type.tp_as_number->nb_power(
+            (PyObject *)v, (PyObject *)w, (PyObject *)z);
+    }
+    if ((PyObject *)z != Py_None) {
+        CONVERT_TO_LONG(z, iz);
+        if (iz == 0) {
+            PyErr_SetString(PyExc_ValueError,
+                            "pow() 3rd argument cannot be 0");
+            return NULL;
+        }
+    }
+    /*
+     * XXX: The original exponentiation code stopped looping
+     * when temp hit zero; this code will continue onwards
+     * unnecessarily, but at least it won't cause any errors.
+     * Hopefully the speed improvement from the fast exponentiation
+     * will compensate for the slight inefficiency.
+     * XXX: Better handling of overflows is desperately needed.
+     */
+    temp = iv;
+    ix = 1;
+    while (iw > 0) {
+        prev = ix;              /* Save value for overflow check */
+        if (iw & 1) {
+            ix = ix*temp;
+            if (temp == 0)
+                break; /* Avoid ix / 0 */
+            if (ix / temp != prev) {
+                return PyLong_Type.tp_as_number->nb_power(
+                    (PyObject *)v,
+                    (PyObject *)w,
+                    (PyObject *)z);
+            }
+        }
+        iw >>= 1;               /* Shift exponent down by 1 bit */
+        if (iw==0) break;
+        prev = temp;
+        temp *= temp;           /* Square the value of temp */
+        if (prev != 0 && temp / prev != prev) {
+            return PyLong_Type.tp_as_number->nb_power(
+                (PyObject *)v, (PyObject *)w, (PyObject *)z);
+        }
+        if (iz) {
+            /* If we did a multiplication, perform a modulo */
+            ix = ix % iz;
+            temp = temp % iz;
+        }
+    }
+    if (iz) {
+        long div, mod;
+        switch (i_divmod(ix, iz, &div, &mod)) {
+        case DIVMOD_OK:
+            ix = mod;
+            break;
+        case DIVMOD_OVERFLOW:
+            return PyLong_Type.tp_as_number->nb_power(
+                (PyObject *)v, (PyObject *)w, (PyObject *)z);
+        default:
+            return NULL;
+        }
+    }
+    return PyInt_FromLong(ix);
 }
 
 static PyObject *
 int_neg(PyIntObject *v)
 {
-	register long a;
-	a = v->ob_ival;
-        /* check for overflow */
-	if (UNARY_NEG_WOULD_OVERFLOW(a)) {
-		PyObject *o = PyLong_FromLong(a);
-		if (o != NULL) {
-			PyObject *result = PyNumber_Negative(o);
-			Py_DECREF(o);
-			return result;
-		}
-		return NULL;
-	}
-	return PyInt_FromLong(-a);
+    register long a;
+    a = v->ob_ival;
+    /* check for overflow */
+    if (UNARY_NEG_WOULD_OVERFLOW(a)) {
+        PyObject *o = PyLong_FromLong(a);
+        if (o != NULL) {
+            PyObject *result = PyNumber_Negative(o);
+            Py_DECREF(o);
+            return result;
+        }
+        return NULL;
+    }
+    return PyInt_FromLong(-a);
 }
 
 static PyObject *
 int_abs(PyIntObject *v)
 {
-	if (v->ob_ival >= 0)
-		return int_int(v);
-	else
-		return int_neg(v);
+    if (v->ob_ival >= 0)
+        return int_int(v);
+    else
+        return int_neg(v);
 }
 
 static int
 int_nonzero(PyIntObject *v)
 {
-	return v->ob_ival != 0;
+    return v->ob_ival != 0;
 }
 
 static PyObject *
 int_invert(PyIntObject *v)
 {
-	return PyInt_FromLong(~v->ob_ival);
+    return PyInt_FromLong(~v->ob_ival);
 }
 
 static PyObject *
 int_lshift(PyIntObject *v, PyIntObject *w)
 {
-	long a, b, c;
-	PyObject *vv, *ww, *result;
+    long a, b, c;
+    PyObject *vv, *ww, *result;
 
-	CONVERT_TO_LONG(v, a);
-	CONVERT_TO_LONG(w, b);
-	if (b < 0) {
-		PyErr_SetString(PyExc_ValueError, "negative shift count");
-		return NULL;
-	}
-	if (a == 0 || b == 0)
-		return int_int(v);
-	if (b >= LONG_BIT) {
-		vv = PyLong_FromLong(PyInt_AS_LONG(v));
-		if (vv == NULL)
-			return NULL;
-		ww = PyLong_FromLong(PyInt_AS_LONG(w));
-		if (ww == NULL) {
-			Py_DECREF(vv);
-			return NULL;
-		}
-		result = PyNumber_Lshift(vv, ww);
-		Py_DECREF(vv);
-		Py_DECREF(ww);
-		return result;
-	}
-	c = a << b;
-	if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
-		vv = PyLong_FromLong(PyInt_AS_LONG(v));
-		if (vv == NULL)
-			return NULL;
-		ww = PyLong_FromLong(PyInt_AS_LONG(w));
-		if (ww == NULL) {
-			Py_DECREF(vv);
-			return NULL;
-		}
-		result = PyNumber_Lshift(vv, ww);
-		Py_DECREF(vv);
-		Py_DECREF(ww);
-		return result;
-	}
-	return PyInt_FromLong(c);
+    CONVERT_TO_LONG(v, a);
+    CONVERT_TO_LONG(w, b);
+    if (b < 0) {
+        PyErr_SetString(PyExc_ValueError, "negative shift count");
+        return NULL;
+    }
+    if (a == 0 || b == 0)
+        return int_int(v);
+    if (b >= LONG_BIT) {
+        vv = PyLong_FromLong(PyInt_AS_LONG(v));
+        if (vv == NULL)
+            return NULL;
+        ww = PyLong_FromLong(PyInt_AS_LONG(w));
+        if (ww == NULL) {
+            Py_DECREF(vv);
+            return NULL;
+        }
+        result = PyNumber_Lshift(vv, ww);
+        Py_DECREF(vv);
+        Py_DECREF(ww);
+        return result;
+    }
+    c = a << b;
+    if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
+        vv = PyLong_FromLong(PyInt_AS_LONG(v));
+        if (vv == NULL)
+            return NULL;
+        ww = PyLong_FromLong(PyInt_AS_LONG(w));
+        if (ww == NULL) {
+            Py_DECREF(vv);
+            return NULL;
+        }
+        result = PyNumber_Lshift(vv, ww);
+        Py_DECREF(vv);
+        Py_DECREF(ww);
+        return result;
+    }
+    return PyInt_FromLong(c);
 }
 
 static PyObject *
 int_rshift(PyIntObject *v, PyIntObject *w)
 {
-	register long a, b;
-	CONVERT_TO_LONG(v, a);
-	CONVERT_TO_LONG(w, b);
-	if (b < 0) {
-		PyErr_SetString(PyExc_ValueError, "negative shift count");
-		return NULL;
-	}
-	if (a == 0 || b == 0)
-		return int_int(v);
-	if (b >= LONG_BIT) {
-		if (a < 0)
-			a = -1;
-		else
-			a = 0;
-	}
-	else {
-		a = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
-	}
-	return PyInt_FromLong(a);
+    register long a, b;
+    CONVERT_TO_LONG(v, a);
+    CONVERT_TO_LONG(w, b);
+    if (b < 0) {
+        PyErr_SetString(PyExc_ValueError, "negative shift count");
+        return NULL;
+    }
+    if (a == 0 || b == 0)
+        return int_int(v);
+    if (b >= LONG_BIT) {
+        if (a < 0)
+            a = -1;
+        else
+            a = 0;
+    }
+    else {
+        a = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
+    }
+    return PyInt_FromLong(a);
 }
 
 static PyObject *
 int_and(PyIntObject *v, PyIntObject *w)
 {
-	register long a, b;
-	CONVERT_TO_LONG(v, a);
-	CONVERT_TO_LONG(w, b);
-	return PyInt_FromLong(a & b);
+    register long a, b;
+    CONVERT_TO_LONG(v, a);
+    CONVERT_TO_LONG(w, b);
+    return PyInt_FromLong(a & b);
 }
 
 static PyObject *
 int_xor(PyIntObject *v, PyIntObject *w)
 {
-	register long a, b;
-	CONVERT_TO_LONG(v, a);
-	CONVERT_TO_LONG(w, b);
-	return PyInt_FromLong(a ^ b);
+    register long a, b;
+    CONVERT_TO_LONG(v, a);
+    CONVERT_TO_LONG(w, b);
+    return PyInt_FromLong(a ^ b);
 }
 
 static PyObject *
 int_or(PyIntObject *v, PyIntObject *w)
 {
-	register long a, b;
-	CONVERT_TO_LONG(v, a);
-	CONVERT_TO_LONG(w, b);
-	return PyInt_FromLong(a | b);
+    register long a, b;
+    CONVERT_TO_LONG(v, a);
+    CONVERT_TO_LONG(w, b);
+    return PyInt_FromLong(a | b);
 }
 
 static int
 int_coerce(PyObject **pv, PyObject **pw)
 {
-	if (PyInt_Check(*pw)) {
-		Py_INCREF(*pv);
-		Py_INCREF(*pw);
-		return 0;
-	}
-	return 1; /* Can't do it */
+    if (PyInt_Check(*pw)) {
+        Py_INCREF(*pv);
+        Py_INCREF(*pw);
+        return 0;
+    }
+    return 1; /* Can't do it */
 }
 
 static PyObject *
 int_int(PyIntObject *v)
 {
-	if (PyInt_CheckExact(v))
-		Py_INCREF(v);
-	else
-		v = (PyIntObject *)PyInt_FromLong(v->ob_ival);
-	return (PyObject *)v;
+    if (PyInt_CheckExact(v))
+        Py_INCREF(v);
+    else
+        v = (PyIntObject *)PyInt_FromLong(v->ob_ival);
+    return (PyObject *)v;
 }
 
 static PyObject *
 int_long(PyIntObject *v)
 {
-	return PyLong_FromLong((v -> ob_ival));
+    return PyLong_FromLong((v -> ob_ival));
 }
 
 static const unsigned char BitLengthTable[32] = {
-	0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
-	5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+    0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 };
 
 static int
 bits_in_ulong(unsigned long d)
 {
-	int d_bits = 0;
-	while (d >= 32) {
-		d_bits += 6;
-		d >>= 6;
-	}
-	d_bits += (int)BitLengthTable[d];
-	return d_bits;
+    int d_bits = 0;
+    while (d >= 32) {
+        d_bits += 6;
+        d >>= 6;
+    }
+    d_bits += (int)BitLengthTable[d];
+    return d_bits;
 }
 
 #if 8*SIZEOF_LONG-1 <= DBL_MANT_DIG
@@ -977,7 +977,7 @@
 static PyObject *
 int_float(PyIntObject *v)
 {
-	return PyFloat_FromDouble((double)(v -> ob_ival));
+    return PyFloat_FromDouble((double)(v -> ob_ival));
 }
 
 #else
@@ -988,40 +988,40 @@
 static PyObject *
 int_float(PyIntObject *v)
 {
-	unsigned long abs_ival, lsb;
-	int round_up;
+    unsigned long abs_ival, lsb;
+    int round_up;
 
-	if (v->ob_ival < 0)
-		abs_ival = 0U-(unsigned long)v->ob_ival;
-	else
-		abs_ival = (unsigned long)v->ob_ival;
-	if (abs_ival < (1L << DBL_MANT_DIG))
-		/* small integer;  no need to round */
-		return PyFloat_FromDouble((double)v->ob_ival);
+    if (v->ob_ival < 0)
+        abs_ival = 0U-(unsigned long)v->ob_ival;
+    else
+        abs_ival = (unsigned long)v->ob_ival;
+    if (abs_ival < (1L << DBL_MANT_DIG))
+        /* small integer;  no need to round */
+        return PyFloat_FromDouble((double)v->ob_ival);
 
-	/* Round abs_ival to MANT_DIG significant bits, using the
-	   round-half-to-even rule.  abs_ival & lsb picks out the 'rounding'
-	   bit: the first bit after the most significant MANT_DIG bits of
-	   abs_ival.  We round up if this bit is set, provided that either:
+    /* Round abs_ival to MANT_DIG significant bits, using the
+       round-half-to-even rule.  abs_ival & lsb picks out the 'rounding'
+       bit: the first bit after the most significant MANT_DIG bits of
+       abs_ival.  We round up if this bit is set, provided that either:
 
-	     (1) abs_ival isn't exactly halfway between two floats, in which
-	     case at least one of the bits following the rounding bit must be
-	     set; i.e., abs_ival & lsb-1 != 0, or:
+         (1) abs_ival isn't exactly halfway between two floats, in which
+         case at least one of the bits following the rounding bit must be
+         set; i.e., abs_ival & lsb-1 != 0, or:
 
-	     (2) the resulting rounded value has least significant bit 0; or
-	     in other words the bit above the rounding bit is set (this is the
-	     'to-even' bit of round-half-to-even); i.e., abs_ival & 2*lsb != 0
+         (2) the resulting rounded value has least significant bit 0; or
+         in other words the bit above the rounding bit is set (this is the
+         'to-even' bit of round-half-to-even); i.e., abs_ival & 2*lsb != 0
 
-	   The condition "(1) or (2)" equates to abs_ival & 3*lsb-1 != 0. */
+       The condition "(1) or (2)" equates to abs_ival & 3*lsb-1 != 0. */
 
-	lsb = 1L << (bits_in_ulong(abs_ival)-DBL_MANT_DIG-1);
-	round_up = (abs_ival & lsb) && (abs_ival & (3*lsb-1));
-	abs_ival &= -2*lsb;
-	if (round_up)
-		abs_ival += 2*lsb;
-	return PyFloat_FromDouble(v->ob_ival < 0 ?
-				  -(double)abs_ival :
-				  (double)abs_ival);
+    lsb = 1L << (bits_in_ulong(abs_ival)-DBL_MANT_DIG-1);
+    round_up = (abs_ival & lsb) && (abs_ival & (3*lsb-1));
+    abs_ival &= -2*lsb;
+    if (round_up)
+        abs_ival += 2*lsb;
+    return PyFloat_FromDouble(v->ob_ival < 0 ?
+                              -(double)abs_ival :
+                  (double)abs_ival);
 }
 
 #endif
@@ -1029,13 +1029,13 @@
 static PyObject *
 int_oct(PyIntObject *v)
 {
-	return _PyInt_Format(v, 8, 0);
+    return _PyInt_Format(v, 8, 0);
 }
 
 static PyObject *
 int_hex(PyIntObject *v)
 {
-	return _PyInt_Format(v, 16, 0);
+    return _PyInt_Format(v, 16, 0);
 }
 
 static PyObject *
@@ -1044,47 +1044,47 @@
 static PyObject *
 int_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *x = NULL;
-	int base = -909;
-	static char *kwlist[] = {"x", "base", 0};
+    PyObject *x = NULL;
+    int base = -909;
+    static char *kwlist[] = {"x", "base", 0};
 
-	if (type != &PyInt_Type)
-		return int_subtype_new(type, args, kwds); /* Wimp out */
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:int", kwlist,
-					 &x, &base))
-		return NULL;
-	if (x == NULL)
-		return PyInt_FromLong(0L);
-	if (base == -909)
-		return PyNumber_Int(x);
-	if (PyString_Check(x)) {
-		/* Since PyInt_FromString doesn't have a length parameter,
-		 * check here for possible NULs in the string. */
-		char *string = PyString_AS_STRING(x);
-		if (strlen(string) != PyString_Size(x)) {
-			/* create a repr() of the input string,
-			 * just like PyInt_FromString does */
-			PyObject *srepr;
-			srepr = PyObject_Repr(x);
-			if (srepr == NULL)
-				return NULL;
-			PyErr_Format(PyExc_ValueError,
-			     "invalid literal for int() with base %d: %s",
-			     base, PyString_AS_STRING(srepr));
-			Py_DECREF(srepr);
-			return NULL;
-		}
-		return PyInt_FromString(string, NULL, base);
-	}
+    if (type != &PyInt_Type)
+        return int_subtype_new(type, args, kwds); /* Wimp out */
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:int", kwlist,
+                                     &x, &base))
+        return NULL;
+    if (x == NULL)
+        return PyInt_FromLong(0L);
+    if (base == -909)
+        return PyNumber_Int(x);
+    if (PyString_Check(x)) {
+        /* Since PyInt_FromString doesn't have a length parameter,
+         * check here for possible NULs in the string. */
+        char *string = PyString_AS_STRING(x);
+        if (strlen(string) != PyString_Size(x)) {
+            /* create a repr() of the input string,
+             * just like PyInt_FromString does */
+            PyObject *srepr;
+            srepr = PyObject_Repr(x);
+            if (srepr == NULL)
+                return NULL;
+            PyErr_Format(PyExc_ValueError,
+                 "invalid literal for int() with base %d: %s",
+                 base, PyString_AS_STRING(srepr));
+            Py_DECREF(srepr);
+            return NULL;
+        }
+        return PyInt_FromString(string, NULL, base);
+    }
 #ifdef Py_USING_UNICODE
-	if (PyUnicode_Check(x))
-		return PyInt_FromUnicode(PyUnicode_AS_UNICODE(x),
-					 PyUnicode_GET_SIZE(x),
-					 base);
+    if (PyUnicode_Check(x))
+        return PyInt_FromUnicode(PyUnicode_AS_UNICODE(x),
+                                 PyUnicode_GET_SIZE(x),
+                                 base);
 #endif
-	PyErr_SetString(PyExc_TypeError,
-			"int() can't convert non-string with explicit base");
-	return NULL;
+    PyErr_SetString(PyExc_TypeError,
+                    "int() can't convert non-string with explicit base");
+    return NULL;
 }
 
 /* Wimpy, slow approach to tp_new calls for subtypes of int:
@@ -1095,47 +1095,47 @@
 static PyObject *
 int_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *tmp, *newobj;
-	long ival;
+    PyObject *tmp, *newobj;
+    long ival;
 
-	assert(PyType_IsSubtype(type, &PyInt_Type));
-	tmp = int_new(&PyInt_Type, args, kwds);
-	if (tmp == NULL)
-		return NULL;
-	if (!PyInt_Check(tmp)) {
-		ival = PyLong_AsLong(tmp);
-		if (ival == -1 && PyErr_Occurred()) {
-			Py_DECREF(tmp);
-			return NULL;
-		}
-	} else {
-		ival = ((PyIntObject *)tmp)->ob_ival;
-	}
+    assert(PyType_IsSubtype(type, &PyInt_Type));
+    tmp = int_new(&PyInt_Type, args, kwds);
+    if (tmp == NULL)
+        return NULL;
+    if (!PyInt_Check(tmp)) {
+        ival = PyLong_AsLong(tmp);
+        if (ival == -1 && PyErr_Occurred()) {
+            Py_DECREF(tmp);
+            return NULL;
+        }
+    } else {
+        ival = ((PyIntObject *)tmp)->ob_ival;
+    }
 
-	newobj = type->tp_alloc(type, 0);
-	if (newobj == NULL) {
-		Py_DECREF(tmp);
-		return NULL;
-	}
-	((PyIntObject *)newobj)->ob_ival = ival;
-	Py_DECREF(tmp);
-	return newobj;
+    newobj = type->tp_alloc(type, 0);
+    if (newobj == NULL) {
+        Py_DECREF(tmp);
+        return NULL;
+    }
+    ((PyIntObject *)newobj)->ob_ival = ival;
+    Py_DECREF(tmp);
+    return newobj;
 }
 
 static PyObject *
 int_getnewargs(PyIntObject *v)
 {
-	return Py_BuildValue("(l)", v->ob_ival);
+    return Py_BuildValue("(l)", v->ob_ival);
 }
 
 static PyObject *
 int_get0(PyIntObject *v, void *context) {
-	return PyInt_FromLong(0L);
+    return PyInt_FromLong(0L);
 }
 
 static PyObject *
 int_get1(PyIntObject *v, void *context) {
-	return PyInt_FromLong(1L);
+    return PyInt_FromLong(1L);
 }
 
 /* Convert an integer to a decimal string.  On many platforms, this
@@ -1144,18 +1144,18 @@
    opportunities offered by division by a compile-time constant. */
 static PyObject *
 int_to_decimal_string(PyIntObject *v) {
-	char buf[sizeof(long)*CHAR_BIT/3+6], *p, *bufend;
-	long n = v->ob_ival;
-	unsigned long absn;
-	p = bufend = buf + sizeof(buf);
-	absn = n < 0 ? 0UL - n : n;
-	do {
-		*--p = '0' + (char)(absn % 10);
-		absn /= 10;
-	} while (absn);
-	if (n < 0)
-		*--p = '-';
-	return PyString_FromStringAndSize(p, bufend - p);
+    char buf[sizeof(long)*CHAR_BIT/3+6], *p, *bufend;
+    long n = v->ob_ival;
+    unsigned long absn;
+    p = bufend = buf + sizeof(buf);
+    absn = n < 0 ? 0UL - n : n;
+    do {
+        *--p = '0' + (char)(absn % 10);
+        absn /= 10;
+    } while (absn);
+    if (n < 0)
+        *--p = '-';
+    return PyString_FromStringAndSize(p, bufend - p);
 }
 
 /* Convert an integer to the given base.  Returns a string.
@@ -1165,113 +1165,113 @@
 PyAPI_FUNC(PyObject*)
 _PyInt_Format(PyIntObject *v, int base, int newstyle)
 {
-	/* There are no doubt many, many ways to optimize this, using code
-	   similar to _PyLong_Format */
-	long n = v->ob_ival;
-	int  negative = n < 0;
-	int is_zero = n == 0;
+    /* There are no doubt many, many ways to optimize this, using code
+       similar to _PyLong_Format */
+    long n = v->ob_ival;
+    int  negative = n < 0;
+    int is_zero = n == 0;
 
-	/* For the reasoning behind this size, see
-	   http://c-faq.com/misc/hexio.html. Then, add a few bytes for
-	   the possible sign and prefix "0[box]" */
-	char buf[sizeof(n)*CHAR_BIT+6];
+    /* For the reasoning behind this size, see
+       http://c-faq.com/misc/hexio.html. Then, add a few bytes for
+       the possible sign and prefix "0[box]" */
+    char buf[sizeof(n)*CHAR_BIT+6];
 
-	/* Start by pointing to the end of the buffer.  We fill in from
-	   the back forward. */
-	char* p = &buf[sizeof(buf)];
+    /* Start by pointing to the end of the buffer.  We fill in from
+       the back forward. */
+    char* p = &buf[sizeof(buf)];
 
-	assert(base >= 2 && base <= 36);
+    assert(base >= 2 && base <= 36);
 
-	/* Special case base 10, for speed */
-	if (base == 10)
-		return int_to_decimal_string(v);
+    /* Special case base 10, for speed */
+    if (base == 10)
+        return int_to_decimal_string(v);
 
-	do {
-		/* I'd use i_divmod, except it doesn't produce the results
-		   I want when n is negative.  So just duplicate the salient
-		   part here. */
-		long div = n / base;
-		long mod = n - div * base;
+    do {
+        /* I'd use i_divmod, except it doesn't produce the results
+           I want when n is negative.  So just duplicate the salient
+           part here. */
+        long div = n / base;
+        long mod = n - div * base;
 
-		/* convert abs(mod) to the right character in [0-9, a-z] */
-		char cdigit = (char)(mod < 0 ? -mod : mod);
-		cdigit += (cdigit < 10) ? '0' : 'a'-10;
-		*--p = cdigit;
+        /* convert abs(mod) to the right character in [0-9, a-z] */
+        char cdigit = (char)(mod < 0 ? -mod : mod);
+        cdigit += (cdigit < 10) ? '0' : 'a'-10;
+        *--p = cdigit;
 
-		n = div;
-	} while(n);
+        n = div;
+    } while(n);
 
-	if (base == 2) {
-		*--p = 'b';
-		*--p = '0';
-	}
-	else if (base == 8) {
-		if (newstyle) {
-			*--p = 'o';
-			*--p = '0';
-		}
-		else
-			if (!is_zero)
-				*--p = '0';
-	}
-	else if (base == 16) {
-		*--p = 'x';
-		*--p = '0';
-	}
-	else {
-		*--p = '#';
-		*--p = '0' + base%10;
-		if (base > 10)
-			*--p = '0' + base/10;
-	}
-	if (negative)
-		*--p = '-';
+    if (base == 2) {
+        *--p = 'b';
+        *--p = '0';
+    }
+    else if (base == 8) {
+        if (newstyle) {
+            *--p = 'o';
+            *--p = '0';
+        }
+        else
+            if (!is_zero)
+                *--p = '0';
+    }
+    else if (base == 16) {
+        *--p = 'x';
+        *--p = '0';
+    }
+    else {
+        *--p = '#';
+        *--p = '0' + base%10;
+        if (base > 10)
+            *--p = '0' + base/10;
+    }
+    if (negative)
+        *--p = '-';
 
-	return PyString_FromStringAndSize(p, &buf[sizeof(buf)] - p);
+    return PyString_FromStringAndSize(p, &buf[sizeof(buf)] - p);
 }
 
 static PyObject *
 int__format__(PyObject *self, PyObject *args)
 {
-	PyObject *format_spec;
+    PyObject *format_spec;
 
-	if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
-		return NULL;
-	if (PyBytes_Check(format_spec))
-		return _PyInt_FormatAdvanced(self,
-					     PyBytes_AS_STRING(format_spec),
-					     PyBytes_GET_SIZE(format_spec));
-	if (PyUnicode_Check(format_spec)) {
-		/* Convert format_spec to a str */
-		PyObject *result;
-		PyObject *str_spec = PyObject_Str(format_spec);
+    if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
+        return NULL;
+    if (PyBytes_Check(format_spec))
+        return _PyInt_FormatAdvanced(self,
+                                     PyBytes_AS_STRING(format_spec),
+                                     PyBytes_GET_SIZE(format_spec));
+    if (PyUnicode_Check(format_spec)) {
+        /* Convert format_spec to a str */
+        PyObject *result;
+        PyObject *str_spec = PyObject_Str(format_spec);
 
-		if (str_spec == NULL)
-			return NULL;
+        if (str_spec == NULL)
+            return NULL;
 
-		result = _PyInt_FormatAdvanced(self,
-					       PyBytes_AS_STRING(str_spec),
-					       PyBytes_GET_SIZE(str_spec));
+        result = _PyInt_FormatAdvanced(self,
+                                       PyBytes_AS_STRING(str_spec),
+                                       PyBytes_GET_SIZE(str_spec));
 
-		Py_DECREF(str_spec);
-		return result;
-	}
-	PyErr_SetString(PyExc_TypeError, "__format__ requires str or unicode");
-	return NULL;
+        Py_DECREF(str_spec);
+        return result;
+    }
+    PyErr_SetString(PyExc_TypeError, "__format__ requires str or unicode");
+    return NULL;
 }
 
 static PyObject *
 int_bit_length(PyIntObject *v)
 {
-	unsigned long n;
+    unsigned long n;
 
-	if (v->ob_ival < 0)
-		/* avoid undefined behaviour when v->ob_ival == -LONG_MAX-1 */
-		n = 0U-(unsigned long)v->ob_ival;
-	else
-		n = (unsigned long)v->ob_ival;
+    if (v->ob_ival < 0)
+        /* avoid undefined behaviour when v->ob_ival == -LONG_MAX-1 */
+        n = 0U-(unsigned long)v->ob_ival;
+    else
+        n = (unsigned long)v->ob_ival;
 
-	return PyInt_FromLong(bits_in_ulong(n));
+    return PyInt_FromLong(bits_in_ulong(n));
 }
 
 PyDoc_STRVAR(int_bit_length_doc,
@@ -1287,44 +1287,44 @@
 static PyObject *
 int_is_finite(PyObject *v)
 {
-	Py_RETURN_TRUE;
+    Py_RETURN_TRUE;
 }
 #endif
 
 static PyMethodDef int_methods[] = {
-	{"conjugate",	(PyCFunction)int_int,	METH_NOARGS,
-	 "Returns self, the complex conjugate of any int."},
-	{"bit_length", (PyCFunction)int_bit_length, METH_NOARGS,
-	 int_bit_length_doc},
+    {"conjugate",       (PyCFunction)int_int,   METH_NOARGS,
+     "Returns self, the complex conjugate of any int."},
+    {"bit_length", (PyCFunction)int_bit_length, METH_NOARGS,
+     int_bit_length_doc},
 #if 0
-	{"is_finite",	(PyCFunction)int_is_finite,	METH_NOARGS,
-	 "Returns always True."},
+    {"is_finite",       (PyCFunction)int_is_finite,     METH_NOARGS,
+     "Returns always True."},
 #endif
-	{"__trunc__",	(PyCFunction)int_int,	METH_NOARGS,
-         "Truncating an Integral returns itself."},
-	{"__getnewargs__",	(PyCFunction)int_getnewargs,	METH_NOARGS},
-        {"__format__", (PyCFunction)int__format__, METH_VARARGS},
-	{NULL,		NULL}		/* sentinel */
+    {"__trunc__",       (PyCFunction)int_int,   METH_NOARGS,
+     "Truncating an Integral returns itself."},
+    {"__getnewargs__",          (PyCFunction)int_getnewargs,    METH_NOARGS},
+    {"__format__", (PyCFunction)int__format__, METH_VARARGS},
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyGetSetDef int_getset[] = {
-	{"real",
-	 (getter)int_int, (setter)NULL,
-	 "the real part of a complex number",
-	 NULL},
-	{"imag",
-	 (getter)int_get0, (setter)NULL,
-	 "the imaginary part of a complex number",
-	 NULL},
-	{"numerator",
-	 (getter)int_int, (setter)NULL,
-	 "the numerator of a rational number in lowest terms",
-	 NULL},
-	{"denominator",
-	 (getter)int_get1, (setter)NULL,
-	 "the denominator of a rational number in lowest terms",
-	 NULL},
-	{NULL}  /* Sentinel */
+    {"real",
+     (getter)int_int, (setter)NULL,
+     "the real part of a complex number",
+     NULL},
+    {"imag",
+     (getter)int_get0, (setter)NULL,
+     "the imaginary part of a complex number",
+     NULL},
+    {"numerator",
+     (getter)int_int, (setter)NULL,
+     "the numerator of a rational number in lowest terms",
+     NULL},
+    {"denominator",
+     (getter)int_get1, (setter)NULL,
+     "the denominator of a rational number in lowest terms",
+     NULL},
+    {NULL}  /* Sentinel */
 };
 
 PyDoc_STRVAR(int_doc,
@@ -1339,212 +1339,212 @@
 long object will be returned instead.");
 
 static PyNumberMethods int_as_number = {
-	(binaryfunc)int_add,	/*nb_add*/
-	(binaryfunc)int_sub,	/*nb_subtract*/
-	(binaryfunc)int_mul,	/*nb_multiply*/
-	(binaryfunc)int_classic_div, /*nb_divide*/
-	(binaryfunc)int_mod,	/*nb_remainder*/
-	(binaryfunc)int_divmod,	/*nb_divmod*/
-	(ternaryfunc)int_pow,	/*nb_power*/
-	(unaryfunc)int_neg,	/*nb_negative*/
-	(unaryfunc)int_int,	/*nb_positive*/
-	(unaryfunc)int_abs,	/*nb_absolute*/
-	(inquiry)int_nonzero,	/*nb_nonzero*/
-	(unaryfunc)int_invert,	/*nb_invert*/
-	(binaryfunc)int_lshift,	/*nb_lshift*/
-	(binaryfunc)int_rshift,	/*nb_rshift*/
-	(binaryfunc)int_and,	/*nb_and*/
-	(binaryfunc)int_xor,	/*nb_xor*/
-	(binaryfunc)int_or,	/*nb_or*/
-	int_coerce,		/*nb_coerce*/
-	(unaryfunc)int_int,	/*nb_int*/
-	(unaryfunc)int_long,	/*nb_long*/
-	(unaryfunc)int_float,	/*nb_float*/
-	(unaryfunc)int_oct,	/*nb_oct*/
-	(unaryfunc)int_hex, 	/*nb_hex*/
-	0,			/*nb_inplace_add*/
-	0,			/*nb_inplace_subtract*/
-	0,			/*nb_inplace_multiply*/
-	0,			/*nb_inplace_divide*/
-	0,			/*nb_inplace_remainder*/
-	0,			/*nb_inplace_power*/
-	0,			/*nb_inplace_lshift*/
-	0,			/*nb_inplace_rshift*/
-	0,			/*nb_inplace_and*/
-	0,			/*nb_inplace_xor*/
-	0,			/*nb_inplace_or*/
-	(binaryfunc)int_div,	/* nb_floor_divide */
-	(binaryfunc)int_true_divide, /* nb_true_divide */
-	0,			/* nb_inplace_floor_divide */
-	0,			/* nb_inplace_true_divide */
-	(unaryfunc)int_int,	/* nb_index */
+    (binaryfunc)int_add,        /*nb_add*/
+    (binaryfunc)int_sub,        /*nb_subtract*/
+    (binaryfunc)int_mul,        /*nb_multiply*/
+    (binaryfunc)int_classic_div, /*nb_divide*/
+    (binaryfunc)int_mod,        /*nb_remainder*/
+    (binaryfunc)int_divmod,     /*nb_divmod*/
+    (ternaryfunc)int_pow,       /*nb_power*/
+    (unaryfunc)int_neg,         /*nb_negative*/
+    (unaryfunc)int_int,         /*nb_positive*/
+    (unaryfunc)int_abs,         /*nb_absolute*/
+    (inquiry)int_nonzero,       /*nb_nonzero*/
+    (unaryfunc)int_invert,      /*nb_invert*/
+    (binaryfunc)int_lshift,     /*nb_lshift*/
+    (binaryfunc)int_rshift,     /*nb_rshift*/
+    (binaryfunc)int_and,        /*nb_and*/
+    (binaryfunc)int_xor,        /*nb_xor*/
+    (binaryfunc)int_or,         /*nb_or*/
+    int_coerce,                 /*nb_coerce*/
+    (unaryfunc)int_int,         /*nb_int*/
+    (unaryfunc)int_long,        /*nb_long*/
+    (unaryfunc)int_float,       /*nb_float*/
+    (unaryfunc)int_oct,         /*nb_oct*/
+    (unaryfunc)int_hex,         /*nb_hex*/
+    0,                          /*nb_inplace_add*/
+    0,                          /*nb_inplace_subtract*/
+    0,                          /*nb_inplace_multiply*/
+    0,                          /*nb_inplace_divide*/
+    0,                          /*nb_inplace_remainder*/
+    0,                          /*nb_inplace_power*/
+    0,                          /*nb_inplace_lshift*/
+    0,                          /*nb_inplace_rshift*/
+    0,                          /*nb_inplace_and*/
+    0,                          /*nb_inplace_xor*/
+    0,                          /*nb_inplace_or*/
+    (binaryfunc)int_div,        /* nb_floor_divide */
+    (binaryfunc)int_true_divide, /* nb_true_divide */
+    0,                          /* nb_inplace_floor_divide */
+    0,                          /* nb_inplace_true_divide */
+    (unaryfunc)int_int,         /* nb_index */
 };
 
 PyTypeObject PyInt_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"int",
-	sizeof(PyIntObject),
-	0,
-	(destructor)int_dealloc,		/* tp_dealloc */
-	(printfunc)int_print,			/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)int_compare,			/* tp_compare */
-	(reprfunc)int_to_decimal_string,	/* tp_repr */
-	&int_as_number,				/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	(hashfunc)int_hash,			/* tp_hash */
-	0,					/* tp_call */
-	(reprfunc)int_to_decimal_string,	/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
-		Py_TPFLAGS_BASETYPE | Py_TPFLAGS_INT_SUBCLASS,	/* tp_flags */
-	int_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	int_methods,				/* tp_methods */
-	0,					/* tp_members */
-	int_getset,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	int_new,				/* tp_new */
-	(freefunc)int_free,           		/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "int",
+    sizeof(PyIntObject),
+    0,
+    (destructor)int_dealloc,                    /* tp_dealloc */
+    (printfunc)int_print,                       /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)int_compare,                       /* tp_compare */
+    (reprfunc)int_to_decimal_string,            /* tp_repr */
+    &int_as_number,                             /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)int_hash,                         /* tp_hash */
+    0,                                          /* tp_call */
+    (reprfunc)int_to_decimal_string,            /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
+        Py_TPFLAGS_BASETYPE | Py_TPFLAGS_INT_SUBCLASS,          /* tp_flags */
+    int_doc,                                    /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    int_methods,                                /* tp_methods */
+    0,                                          /* tp_members */
+    int_getset,                                 /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    int_new,                                    /* tp_new */
+    (freefunc)int_free,                         /* tp_free */
 };
 
 int
 _PyInt_Init(void)
 {
-	PyIntObject *v;
-	int ival;
+    PyIntObject *v;
+    int ival;
 #if NSMALLNEGINTS + NSMALLPOSINTS > 0
-	for (ival = -NSMALLNEGINTS; ival < NSMALLPOSINTS; ival++) {
-              if (!free_list && (free_list = fill_free_list()) == NULL)
-			return 0;
-		/* PyObject_New is inlined */
-		v = free_list;
-		free_list = (PyIntObject *)Py_TYPE(v);
-		PyObject_INIT(v, &PyInt_Type);
-		v->ob_ival = ival;
-		small_ints[ival + NSMALLNEGINTS] = v;
-	}
+    for (ival = -NSMALLNEGINTS; ival < NSMALLPOSINTS; ival++) {
+          if (!free_list && (free_list = fill_free_list()) == NULL)
+                    return 0;
+        /* PyObject_New is inlined */
+        v = free_list;
+        free_list = (PyIntObject *)Py_TYPE(v);
+        PyObject_INIT(v, &PyInt_Type);
+        v->ob_ival = ival;
+        small_ints[ival + NSMALLNEGINTS] = v;
+    }
 #endif
-	return 1;
+    return 1;
 }
 
 int
 PyInt_ClearFreeList(void)
 {
-	PyIntObject *p;
-	PyIntBlock *list, *next;
-	int i;
-	int u;			/* remaining unfreed ints per block */
-	int freelist_size = 0;
+    PyIntObject *p;
+    PyIntBlock *list, *next;
+    int i;
+    int u;                      /* remaining unfreed ints per block */
+    int freelist_size = 0;
 
-	list = block_list;
-	block_list = NULL;
-	free_list = NULL;
-	while (list != NULL) {
-		u = 0;
-		for (i = 0, p = &list->objects[0];
-		     i < N_INTOBJECTS;
-		     i++, p++) {
-			if (PyInt_CheckExact(p) && p->ob_refcnt != 0)
-				u++;
-		}
-		next = list->next;
-		if (u) {
-			list->next = block_list;
-			block_list = list;
-			for (i = 0, p = &list->objects[0];
-			     i < N_INTOBJECTS;
-			     i++, p++) {
-				if (!PyInt_CheckExact(p) ||
-				    p->ob_refcnt == 0) {
-					Py_TYPE(p) = (struct _typeobject *)
-						free_list;
-					free_list = p;
-				}
+    list = block_list;
+    block_list = NULL;
+    free_list = NULL;
+    while (list != NULL) {
+        u = 0;
+        for (i = 0, p = &list->objects[0];
+             i < N_INTOBJECTS;
+             i++, p++) {
+            if (PyInt_CheckExact(p) && p->ob_refcnt != 0)
+                u++;
+        }
+        next = list->next;
+        if (u) {
+            list->next = block_list;
+            block_list = list;
+            for (i = 0, p = &list->objects[0];
+                 i < N_INTOBJECTS;
+                 i++, p++) {
+                if (!PyInt_CheckExact(p) ||
+                    p->ob_refcnt == 0) {
+                    Py_TYPE(p) = (struct _typeobject *)
+                        free_list;
+                    free_list = p;
+                }
 #if NSMALLNEGINTS + NSMALLPOSINTS > 0
-				else if (-NSMALLNEGINTS <= p->ob_ival &&
-					 p->ob_ival < NSMALLPOSINTS &&
-					 small_ints[p->ob_ival +
-						    NSMALLNEGINTS] == NULL) {
-					Py_INCREF(p);
-					small_ints[p->ob_ival +
-						   NSMALLNEGINTS] = p;
-				}
+                else if (-NSMALLNEGINTS <= p->ob_ival &&
+                         p->ob_ival < NSMALLPOSINTS &&
+                         small_ints[p->ob_ival +
+                                    NSMALLNEGINTS] == NULL) {
+                    Py_INCREF(p);
+                    small_ints[p->ob_ival +
+                               NSMALLNEGINTS] = p;
+                }
 #endif
-			}
-		}
-		else {
-			PyMem_FREE(list);
-		}
-		freelist_size += u;
-		list = next;
-	}
+            }
+        }
+        else {
+            PyMem_FREE(list);
+        }
+        freelist_size += u;
+        list = next;
+    }
 
-	return freelist_size;
+    return freelist_size;
 }
 
 void
 PyInt_Fini(void)
 {
-	PyIntObject *p;
-	PyIntBlock *list;
-	int i;
-	int u;			/* total unfreed ints per block */
+    PyIntObject *p;
+    PyIntBlock *list;
+    int i;
+    int u;                      /* total unfreed ints per block */
 
 #if NSMALLNEGINTS + NSMALLPOSINTS > 0
-	PyIntObject **q;
+    PyIntObject **q;
 
-	i = NSMALLNEGINTS + NSMALLPOSINTS;
-	q = small_ints;
-	while (--i >= 0) {
-		Py_XDECREF(*q);
-		*q++ = NULL;
-	}
+    i = NSMALLNEGINTS + NSMALLPOSINTS;
+    q = small_ints;
+    while (--i >= 0) {
+        Py_XDECREF(*q);
+        *q++ = NULL;
+    }
 #endif
-	u = PyInt_ClearFreeList();
-	if (!Py_VerboseFlag)
-		return;
-	fprintf(stderr, "# cleanup ints");
-	if (!u) {
-		fprintf(stderr, "\n");
-	}
-	else {
-		fprintf(stderr,
-			": %d unfreed int%s\n",
-			u, u == 1 ? "" : "s");
-	}
-	if (Py_VerboseFlag > 1) {
-		list = block_list;
-		while (list != NULL) {
-			for (i = 0, p = &list->objects[0];
-			     i < N_INTOBJECTS;
-			     i++, p++) {
-				if (PyInt_CheckExact(p) && p->ob_refcnt != 0)
-					/* XXX(twouters) cast refcount to
-					   long until %zd is universally
-					   available
-					 */
-					fprintf(stderr,
-				"#   <int at %p, refcnt=%ld, val=%ld>\n",
-						p, (long)p->ob_refcnt,
-						p->ob_ival);
-			}
-			list = list->next;
-		}
-	}
+    u = PyInt_ClearFreeList();
+    if (!Py_VerboseFlag)
+        return;
+    fprintf(stderr, "# cleanup ints");
+    if (!u) {
+        fprintf(stderr, "\n");
+    }
+    else {
+        fprintf(stderr,
+            ": %d unfreed int%s\n",
+            u, u == 1 ? "" : "s");
+    }
+    if (Py_VerboseFlag > 1) {
+        list = block_list;
+        while (list != NULL) {
+            for (i = 0, p = &list->objects[0];
+                 i < N_INTOBJECTS;
+                 i++, p++) {
+                if (PyInt_CheckExact(p) && p->ob_refcnt != 0)
+                    /* XXX(twouters) cast refcount to
+                       long until %zd is universally
+                       available
+                     */
+                    fprintf(stderr,
+                "#   <int at %p, refcnt=%ld, val=%ld>\n",
+                                p, (long)p->ob_refcnt,
+                                p->ob_ival);
+            }
+            list = list->next;
+        }
+    }
 }
diff --git a/Objects/iterobject.c b/Objects/iterobject.c
index 9cebac9..5a9a2dd 100644
--- a/Objects/iterobject.c
+++ b/Objects/iterobject.c
@@ -3,228 +3,228 @@
 #include "Python.h"
 
 typedef struct {
-	PyObject_HEAD
-	long      it_index;
-	PyObject *it_seq; /* Set to NULL when iterator is exhausted */
+    PyObject_HEAD
+    long      it_index;
+    PyObject *it_seq; /* Set to NULL when iterator is exhausted */
 } seqiterobject;
 
 PyObject *
 PySeqIter_New(PyObject *seq)
 {
-	seqiterobject *it;
+    seqiterobject *it;
 
-	if (!PySequence_Check(seq)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}	
-	it = PyObject_GC_New(seqiterobject, &PySeqIter_Type);
-	if (it == NULL)
-		return NULL;
-	it->it_index = 0;
-	Py_INCREF(seq);
-	it->it_seq = seq;
-	_PyObject_GC_TRACK(it);
-	return (PyObject *)it;
+    if (!PySequence_Check(seq)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    it = PyObject_GC_New(seqiterobject, &PySeqIter_Type);
+    if (it == NULL)
+        return NULL;
+    it->it_index = 0;
+    Py_INCREF(seq);
+    it->it_seq = seq;
+    _PyObject_GC_TRACK(it);
+    return (PyObject *)it;
 }
 
 static void
 iter_dealloc(seqiterobject *it)
 {
-	_PyObject_GC_UNTRACK(it);
-	Py_XDECREF(it->it_seq);
-	PyObject_GC_Del(it);
+    _PyObject_GC_UNTRACK(it);
+    Py_XDECREF(it->it_seq);
+    PyObject_GC_Del(it);
 }
 
 static int
 iter_traverse(seqiterobject *it, visitproc visit, void *arg)
 {
-	Py_VISIT(it->it_seq);
-	return 0;
+    Py_VISIT(it->it_seq);
+    return 0;
 }
 
 static PyObject *
 iter_iternext(PyObject *iterator)
 {
-	seqiterobject *it;
-	PyObject *seq;
-	PyObject *result;
+    seqiterobject *it;
+    PyObject *seq;
+    PyObject *result;
 
-	assert(PySeqIter_Check(iterator));
-	it = (seqiterobject *)iterator;
-	seq = it->it_seq;
-	if (seq == NULL)
-		return NULL;
+    assert(PySeqIter_Check(iterator));
+    it = (seqiterobject *)iterator;
+    seq = it->it_seq;
+    if (seq == NULL)
+        return NULL;
 
-	result = PySequence_GetItem(seq, it->it_index);
-	if (result != NULL) {
-		it->it_index++;
-		return result;
-	}
-	if (PyErr_ExceptionMatches(PyExc_IndexError) ||
-	    PyErr_ExceptionMatches(PyExc_StopIteration))
-	{
-		PyErr_Clear();
-		Py_DECREF(seq);
-		it->it_seq = NULL;
-	}
-	return NULL;
+    result = PySequence_GetItem(seq, it->it_index);
+    if (result != NULL) {
+        it->it_index++;
+        return result;
+    }
+    if (PyErr_ExceptionMatches(PyExc_IndexError) ||
+        PyErr_ExceptionMatches(PyExc_StopIteration))
+    {
+        PyErr_Clear();
+        Py_DECREF(seq);
+        it->it_seq = NULL;
+    }
+    return NULL;
 }
 
 static PyObject *
 iter_len(seqiterobject *it)
 {
-	Py_ssize_t seqsize, len;
+    Py_ssize_t seqsize, len;
 
-	if (it->it_seq) {
-		seqsize = PySequence_Size(it->it_seq);
-		if (seqsize == -1)
-			return NULL;
-		len = seqsize - it->it_index;
-		if (len >= 0)
-			return PyInt_FromSsize_t(len);
-	}
-	return PyInt_FromLong(0);
+    if (it->it_seq) {
+        seqsize = PySequence_Size(it->it_seq);
+        if (seqsize == -1)
+            return NULL;
+        len = seqsize - it->it_index;
+        if (len >= 0)
+            return PyInt_FromSsize_t(len);
+    }
+    return PyInt_FromLong(0);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
 
 static PyMethodDef seqiter_methods[] = {
-	{"__length_hint__", (PyCFunction)iter_len, METH_NOARGS, length_hint_doc},
- 	{NULL,		NULL}		/* sentinel */
+    {"__length_hint__", (PyCFunction)iter_len, METH_NOARGS, length_hint_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 PyTypeObject PySeqIter_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"iterator",				/* tp_name */
-	sizeof(seqiterobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)iter_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)iter_traverse,		/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	iter_iternext,				/* tp_iternext */
-	seqiter_methods,			/* tp_methods */
-	0,					/* tp_members */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "iterator",                                 /* tp_name */
+    sizeof(seqiterobject),                      /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)iter_dealloc,                   /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)iter_traverse,                /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    iter_iternext,                              /* tp_iternext */
+    seqiter_methods,                            /* tp_methods */
+    0,                                          /* tp_members */
 };
 
 /* -------------------------------------- */
 
 typedef struct {
-	PyObject_HEAD
-	PyObject *it_callable; /* Set to NULL when iterator is exhausted */
-	PyObject *it_sentinel; /* Set to NULL when iterator is exhausted */
+    PyObject_HEAD
+    PyObject *it_callable; /* Set to NULL when iterator is exhausted */
+    PyObject *it_sentinel; /* Set to NULL when iterator is exhausted */
 } calliterobject;
 
 PyObject *
 PyCallIter_New(PyObject *callable, PyObject *sentinel)
 {
-	calliterobject *it;
-	it = PyObject_GC_New(calliterobject, &PyCallIter_Type);
-	if (it == NULL)
-		return NULL;
-	Py_INCREF(callable);
-	it->it_callable = callable;
-	Py_INCREF(sentinel);
-	it->it_sentinel = sentinel;
-	_PyObject_GC_TRACK(it);
-	return (PyObject *)it;
+    calliterobject *it;
+    it = PyObject_GC_New(calliterobject, &PyCallIter_Type);
+    if (it == NULL)
+        return NULL;
+    Py_INCREF(callable);
+    it->it_callable = callable;
+    Py_INCREF(sentinel);
+    it->it_sentinel = sentinel;
+    _PyObject_GC_TRACK(it);
+    return (PyObject *)it;
 }
 static void
 calliter_dealloc(calliterobject *it)
 {
-	_PyObject_GC_UNTRACK(it);
-	Py_XDECREF(it->it_callable);
-	Py_XDECREF(it->it_sentinel);
-	PyObject_GC_Del(it);
+    _PyObject_GC_UNTRACK(it);
+    Py_XDECREF(it->it_callable);
+    Py_XDECREF(it->it_sentinel);
+    PyObject_GC_Del(it);
 }
 
 static int
 calliter_traverse(calliterobject *it, visitproc visit, void *arg)
 {
-	Py_VISIT(it->it_callable);
-	Py_VISIT(it->it_sentinel);
-	return 0;
+    Py_VISIT(it->it_callable);
+    Py_VISIT(it->it_sentinel);
+    return 0;
 }
 
 static PyObject *
 calliter_iternext(calliterobject *it)
 {
-	if (it->it_callable != NULL) {
-		PyObject *args = PyTuple_New(0);
-		PyObject *result;
-		if (args == NULL)
-			return NULL;
-		result = PyObject_Call(it->it_callable, args, NULL);
-		Py_DECREF(args);
-		if (result != NULL) {
-			int ok;
-			ok = PyObject_RichCompareBool(result,
-						      it->it_sentinel,
-						      Py_EQ);
-			if (ok == 0)
-				return result; /* Common case, fast path */
-			Py_DECREF(result);
-			if (ok > 0) {
-				Py_CLEAR(it->it_callable);
-				Py_CLEAR(it->it_sentinel);
-			}
-		}
-		else if (PyErr_ExceptionMatches(PyExc_StopIteration)) {
-			PyErr_Clear();
-			Py_CLEAR(it->it_callable);
-			Py_CLEAR(it->it_sentinel);
-		}
-	}
-	return NULL;
+    if (it->it_callable != NULL) {
+        PyObject *args = PyTuple_New(0);
+        PyObject *result;
+        if (args == NULL)
+            return NULL;
+        result = PyObject_Call(it->it_callable, args, NULL);
+        Py_DECREF(args);
+        if (result != NULL) {
+            int ok;
+            ok = PyObject_RichCompareBool(result,
+                                          it->it_sentinel,
+                                          Py_EQ);
+            if (ok == 0)
+                return result; /* Common case, fast path */
+            Py_DECREF(result);
+            if (ok > 0) {
+                Py_CLEAR(it->it_callable);
+                Py_CLEAR(it->it_sentinel);
+            }
+        }
+        else if (PyErr_ExceptionMatches(PyExc_StopIteration)) {
+            PyErr_Clear();
+            Py_CLEAR(it->it_callable);
+            Py_CLEAR(it->it_sentinel);
+        }
+    }
+    return NULL;
 }
 
 PyTypeObject PyCallIter_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"callable-iterator",			/* tp_name */
-	sizeof(calliterobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)calliter_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
-	0,					/* tp_doc */
-	(traverseproc)calliter_traverse,	/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)calliter_iternext,	/* tp_iternext */
-	0,					/* tp_methods */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "callable-iterator",                        /* tp_name */
+    sizeof(calliterobject),                     /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)calliter_dealloc,               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)calliter_traverse,            /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)calliter_iternext,            /* tp_iternext */
+    0,                                          /* tp_methods */
 };
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 8610085..9704d8d 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -5,7 +5,7 @@
 #ifdef STDC_HEADERS
 #include <stddef.h>
 #else
-#include <sys/types.h>		/* For size_t */
+#include <sys/types.h>          /* For size_t */
 #endif
 
 /* Ensure ob_item has room for at least newsize elements, and set
@@ -24,52 +24,52 @@
 static int
 list_resize(PyListObject *self, Py_ssize_t newsize)
 {
-	PyObject **items;
-	size_t new_allocated;
-	Py_ssize_t allocated = self->allocated;
+    PyObject **items;
+    size_t new_allocated;
+    Py_ssize_t allocated = self->allocated;
 
-	/* Bypass realloc() when a previous overallocation is large enough
-	   to accommodate the newsize.  If the newsize falls lower than half
-	   the allocated size, then proceed with the realloc() to shrink the list.
-	*/
-	if (allocated >= newsize && newsize >= (allocated >> 1)) {
-		assert(self->ob_item != NULL || newsize == 0);
-		Py_SIZE(self) = newsize;
-		return 0;
-	}
+    /* Bypass realloc() when a previous overallocation is large enough
+       to accommodate the newsize.  If the newsize falls lower than half
+       the allocated size, then proceed with the realloc() to shrink the list.
+    */
+    if (allocated >= newsize && newsize >= (allocated >> 1)) {
+        assert(self->ob_item != NULL || newsize == 0);
+        Py_SIZE(self) = newsize;
+        return 0;
+    }
 
-	/* This over-allocates proportional to the list size, making room
-	 * for additional growth.  The over-allocation is mild, but is
-	 * enough to give linear-time amortized behavior over a long
-	 * sequence of appends() in the presence of a poorly-performing
-	 * system realloc().
-	 * The growth pattern is:  0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ...
-	 */
-	new_allocated = (newsize >> 3) + (newsize < 9 ? 3 : 6);
+    /* This over-allocates proportional to the list size, making room
+     * for additional growth.  The over-allocation is mild, but is
+     * enough to give linear-time amortized behavior over a long
+     * sequence of appends() in the presence of a poorly-performing
+     * system realloc().
+     * The growth pattern is:  0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ...
+     */
+    new_allocated = (newsize >> 3) + (newsize < 9 ? 3 : 6);
 
-	/* check for integer overflow */
-	if (new_allocated > PY_SIZE_MAX - newsize) {
-		PyErr_NoMemory();
-		return -1;
-	} else {
-		new_allocated += newsize;
-	}
+    /* check for integer overflow */
+    if (new_allocated > PY_SIZE_MAX - newsize) {
+        PyErr_NoMemory();
+        return -1;
+    } else {
+        new_allocated += newsize;
+    }
 
-	if (newsize == 0)
-		new_allocated = 0;
-	items = self->ob_item;
-	if (new_allocated <= ((~(size_t)0) / sizeof(PyObject *)))
-		PyMem_RESIZE(items, PyObject *, new_allocated);
-	else
-		items = NULL;
-	if (items == NULL) {
-		PyErr_NoMemory();
-		return -1;
-	}
-	self->ob_item = items;
-	Py_SIZE(self) = newsize;
-	self->allocated = new_allocated;
-	return 0;
+    if (newsize == 0)
+        new_allocated = 0;
+    items = self->ob_item;
+    if (new_allocated <= ((~(size_t)0) / sizeof(PyObject *)))
+        PyMem_RESIZE(items, PyObject *, new_allocated);
+    else
+        items = NULL;
+    if (items == NULL) {
+        PyErr_NoMemory();
+        return -1;
+    }
+    self->ob_item = items;
+    Py_SIZE(self) = newsize;
+    self->allocated = new_allocated;
+    return 0;
 }
 
 /* Debug statistic to compare allocations with reuse through the free list */
@@ -81,12 +81,12 @@
 static void
 show_alloc(void)
 {
-	fprintf(stderr, "List allocations: %" PY_FORMAT_SIZE_T "d\n",
-		count_alloc);
-	fprintf(stderr, "List reuse through freelist: %" PY_FORMAT_SIZE_T
-		"d\n", count_reuse);
-	fprintf(stderr, "%.2f%% reuse rate\n\n",
-		(100.0*count_reuse/(count_alloc+count_reuse)));
+    fprintf(stderr, "List allocations: %" PY_FORMAT_SIZE_T "d\n",
+        count_alloc);
+    fprintf(stderr, "List reuse through freelist: %" PY_FORMAT_SIZE_T
+        "d\n", count_reuse);
+    fprintf(stderr, "%.2f%% reuse rate\n\n",
+        (100.0*count_reuse/(count_alloc+count_reuse)));
 }
 #endif
 
@@ -100,77 +100,77 @@
 void
 PyList_Fini(void)
 {
-	PyListObject *op;
+    PyListObject *op;
 
-	while (numfree) {
-		op = free_list[--numfree];
-		assert(PyList_CheckExact(op));
-		PyObject_GC_Del(op);
-	}
+    while (numfree) {
+        op = free_list[--numfree];
+        assert(PyList_CheckExact(op));
+        PyObject_GC_Del(op);
+    }
 }
 
 PyObject *
 PyList_New(Py_ssize_t size)
 {
-	PyListObject *op;
-	size_t nbytes;
+    PyListObject *op;
+    size_t nbytes;
 #ifdef SHOW_ALLOC_COUNT
-	static int initialized = 0;
-	if (!initialized) {
-		Py_AtExit(show_alloc);
-		initialized = 1;
-	}
+    static int initialized = 0;
+    if (!initialized) {
+        Py_AtExit(show_alloc);
+        initialized = 1;
+    }
 #endif
 
-	if (size < 0) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	/* Check for overflow without an actual overflow,
-	 *  which can cause compiler to optimise out */
-	if ((size_t)size > PY_SIZE_MAX / sizeof(PyObject *))
-		return PyErr_NoMemory();
-	nbytes = size * sizeof(PyObject *);
-	if (numfree) {
-		numfree--;
-		op = free_list[numfree];
-		_Py_NewReference((PyObject *)op);
+    if (size < 0) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    /* Check for overflow without an actual overflow,
+     *  which can cause compiler to optimise out */
+    if ((size_t)size > PY_SIZE_MAX / sizeof(PyObject *))
+        return PyErr_NoMemory();
+    nbytes = size * sizeof(PyObject *);
+    if (numfree) {
+        numfree--;
+        op = free_list[numfree];
+        _Py_NewReference((PyObject *)op);
 #ifdef SHOW_ALLOC_COUNT
-		count_reuse++;
+        count_reuse++;
 #endif
-	} else {
-		op = PyObject_GC_New(PyListObject, &PyList_Type);
-		if (op == NULL)
-			return NULL;
+    } else {
+        op = PyObject_GC_New(PyListObject, &PyList_Type);
+        if (op == NULL)
+            return NULL;
 #ifdef SHOW_ALLOC_COUNT
-		count_alloc++;
+        count_alloc++;
 #endif
-	}
-	if (size <= 0)
-		op->ob_item = NULL;
-	else {
-		op->ob_item = (PyObject **) PyMem_MALLOC(nbytes);
-		if (op->ob_item == NULL) {
-			Py_DECREF(op);
-			return PyErr_NoMemory();
-		}
-		memset(op->ob_item, 0, nbytes);
-	}
-	Py_SIZE(op) = size;
-	op->allocated = size;
-	_PyObject_GC_TRACK(op);
-	return (PyObject *) op;
+    }
+    if (size <= 0)
+        op->ob_item = NULL;
+    else {
+        op->ob_item = (PyObject **) PyMem_MALLOC(nbytes);
+        if (op->ob_item == NULL) {
+            Py_DECREF(op);
+            return PyErr_NoMemory();
+        }
+        memset(op->ob_item, 0, nbytes);
+    }
+    Py_SIZE(op) = size;
+    op->allocated = size;
+    _PyObject_GC_TRACK(op);
+    return (PyObject *) op;
 }
 
 Py_ssize_t
 PyList_Size(PyObject *op)
 {
-	if (!PyList_Check(op)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	else
-		return Py_SIZE(op);
+    if (!PyList_Check(op)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    else
+        return Py_SIZE(op);
 }
 
 static PyObject *indexerr = NULL;
@@ -178,117 +178,117 @@
 PyObject *
 PyList_GetItem(PyObject *op, Py_ssize_t i)
 {
-	if (!PyList_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	if (i < 0 || i >= Py_SIZE(op)) {
-		if (indexerr == NULL) {
-			indexerr = PyString_FromString(
-				"list index out of range");
-			if (indexerr == NULL)
-				return NULL;
-		}
-		PyErr_SetObject(PyExc_IndexError, indexerr);
-		return NULL;
-	}
-	return ((PyListObject *)op) -> ob_item[i];
+    if (!PyList_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    if (i < 0 || i >= Py_SIZE(op)) {
+        if (indexerr == NULL) {
+            indexerr = PyString_FromString(
+                "list index out of range");
+            if (indexerr == NULL)
+                return NULL;
+        }
+        PyErr_SetObject(PyExc_IndexError, indexerr);
+        return NULL;
+    }
+    return ((PyListObject *)op) -> ob_item[i];
 }
 
 int
 PyList_SetItem(register PyObject *op, register Py_ssize_t i,
                register PyObject *newitem)
 {
-	register PyObject *olditem;
-	register PyObject **p;
-	if (!PyList_Check(op)) {
-		Py_XDECREF(newitem);
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (i < 0 || i >= Py_SIZE(op)) {
-		Py_XDECREF(newitem);
-		PyErr_SetString(PyExc_IndexError,
-				"list assignment index out of range");
-		return -1;
-	}
-	p = ((PyListObject *)op) -> ob_item + i;
-	olditem = *p;
-	*p = newitem;
-	Py_XDECREF(olditem);
-	return 0;
+    register PyObject *olditem;
+    register PyObject **p;
+    if (!PyList_Check(op)) {
+        Py_XDECREF(newitem);
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (i < 0 || i >= Py_SIZE(op)) {
+        Py_XDECREF(newitem);
+        PyErr_SetString(PyExc_IndexError,
+                        "list assignment index out of range");
+        return -1;
+    }
+    p = ((PyListObject *)op) -> ob_item + i;
+    olditem = *p;
+    *p = newitem;
+    Py_XDECREF(olditem);
+    return 0;
 }
 
 static int
 ins1(PyListObject *self, Py_ssize_t where, PyObject *v)
 {
-	Py_ssize_t i, n = Py_SIZE(self);
-	PyObject **items;
-	if (v == NULL) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (n == PY_SSIZE_T_MAX) {
-		PyErr_SetString(PyExc_OverflowError,
-			"cannot add more objects to list");
-		return -1;
-	}
+    Py_ssize_t i, n = Py_SIZE(self);
+    PyObject **items;
+    if (v == NULL) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (n == PY_SSIZE_T_MAX) {
+        PyErr_SetString(PyExc_OverflowError,
+            "cannot add more objects to list");
+        return -1;
+    }
 
-	if (list_resize(self, n+1) == -1)
-		return -1;
+    if (list_resize(self, n+1) == -1)
+        return -1;
 
-	if (where < 0) {
-		where += n;
-		if (where < 0)
-			where = 0;
-	}
-	if (where > n)
-		where = n;
-	items = self->ob_item;
-	for (i = n; --i >= where; )
-		items[i+1] = items[i];
-	Py_INCREF(v);
-	items[where] = v;
-	return 0;
+    if (where < 0) {
+        where += n;
+        if (where < 0)
+            where = 0;
+    }
+    if (where > n)
+        where = n;
+    items = self->ob_item;
+    for (i = n; --i >= where; )
+        items[i+1] = items[i];
+    Py_INCREF(v);
+    items[where] = v;
+    return 0;
 }
 
 int
 PyList_Insert(PyObject *op, Py_ssize_t where, PyObject *newitem)
 {
-	if (!PyList_Check(op)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return ins1((PyListObject *)op, where, newitem);
+    if (!PyList_Check(op)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return ins1((PyListObject *)op, where, newitem);
 }
 
 static int
 app1(PyListObject *self, PyObject *v)
 {
-	Py_ssize_t n = PyList_GET_SIZE(self);
+    Py_ssize_t n = PyList_GET_SIZE(self);
 
-	assert (v != NULL);
-	if (n == PY_SSIZE_T_MAX) {
-		PyErr_SetString(PyExc_OverflowError,
-			"cannot add more objects to list");
-		return -1;
-	}
+    assert (v != NULL);
+    if (n == PY_SSIZE_T_MAX) {
+        PyErr_SetString(PyExc_OverflowError,
+            "cannot add more objects to list");
+        return -1;
+    }
 
-	if (list_resize(self, n+1) == -1)
-		return -1;
+    if (list_resize(self, n+1) == -1)
+        return -1;
 
-	Py_INCREF(v);
-	PyList_SET_ITEM(self, n, v);
-	return 0;
+    Py_INCREF(v);
+    PyList_SET_ITEM(self, n, v);
+    return 0;
 }
 
 int
 PyList_Append(PyObject *op, PyObject *newitem)
 {
-	if (PyList_Check(op) && (newitem != NULL))
-		return app1((PyListObject *)op, newitem);
-	PyErr_BadInternalCall();
-	return -1;
+    if (PyList_Check(op) && (newitem != NULL))
+        return app1((PyListObject *)op, newitem);
+    PyErr_BadInternalCall();
+    return -1;
 }
 
 /* Methods */
@@ -296,312 +296,312 @@
 static void
 list_dealloc(PyListObject *op)
 {
-	Py_ssize_t i;
-	PyObject_GC_UnTrack(op);
-	Py_TRASHCAN_SAFE_BEGIN(op)
-	if (op->ob_item != NULL) {
-		/* Do it backwards, for Christian Tismer.
-		   There's a simple test case where somehow this reduces
-		   thrashing when a *very* large list is created and
-		   immediately deleted. */
-		i = Py_SIZE(op);
-		while (--i >= 0) {
-			Py_XDECREF(op->ob_item[i]);
-		}
-		PyMem_FREE(op->ob_item);
-	}
-	if (numfree < PyList_MAXFREELIST && PyList_CheckExact(op))
-		free_list[numfree++] = op;
-	else
-		Py_TYPE(op)->tp_free((PyObject *)op);
-	Py_TRASHCAN_SAFE_END(op)
+    Py_ssize_t i;
+    PyObject_GC_UnTrack(op);
+    Py_TRASHCAN_SAFE_BEGIN(op)
+    if (op->ob_item != NULL) {
+        /* Do it backwards, for Christian Tismer.
+           There's a simple test case where somehow this reduces
+           thrashing when a *very* large list is created and
+           immediately deleted. */
+        i = Py_SIZE(op);
+        while (--i >= 0) {
+            Py_XDECREF(op->ob_item[i]);
+        }
+        PyMem_FREE(op->ob_item);
+    }
+    if (numfree < PyList_MAXFREELIST && PyList_CheckExact(op))
+        free_list[numfree++] = op;
+    else
+        Py_TYPE(op)->tp_free((PyObject *)op);
+    Py_TRASHCAN_SAFE_END(op)
 }
 
 static int
 list_print(PyListObject *op, FILE *fp, int flags)
 {
-	int rc;
-	Py_ssize_t i;
-	PyObject *item;
+    int rc;
+    Py_ssize_t i;
+    PyObject *item;
 
-	rc = Py_ReprEnter((PyObject*)op);
-	if (rc != 0) {
-		if (rc < 0)
-			return rc;
-		Py_BEGIN_ALLOW_THREADS
-		fprintf(fp, "[...]");
-		Py_END_ALLOW_THREADS
-		return 0;
-	}
-	Py_BEGIN_ALLOW_THREADS
-	fprintf(fp, "[");
-	Py_END_ALLOW_THREADS
-	for (i = 0; i < Py_SIZE(op); i++) {
-		item = op->ob_item[i];
-		Py_INCREF(item);
-		if (i > 0) {
-			Py_BEGIN_ALLOW_THREADS
-			fprintf(fp, ", ");
-			Py_END_ALLOW_THREADS
-		}
-		if (PyObject_Print(item, fp, 0) != 0) {
-			Py_DECREF(item);
-			Py_ReprLeave((PyObject *)op);
-			return -1;
-		}
-		Py_DECREF(item);
-	}
-	Py_BEGIN_ALLOW_THREADS
-	fprintf(fp, "]");
-	Py_END_ALLOW_THREADS
-	Py_ReprLeave((PyObject *)op);
-	return 0;
+    rc = Py_ReprEnter((PyObject*)op);
+    if (rc != 0) {
+        if (rc < 0)
+            return rc;
+        Py_BEGIN_ALLOW_THREADS
+        fprintf(fp, "[...]");
+        Py_END_ALLOW_THREADS
+        return 0;
+    }
+    Py_BEGIN_ALLOW_THREADS
+    fprintf(fp, "[");
+    Py_END_ALLOW_THREADS
+    for (i = 0; i < Py_SIZE(op); i++) {
+        item = op->ob_item[i];
+        Py_INCREF(item);
+        if (i > 0) {
+            Py_BEGIN_ALLOW_THREADS
+            fprintf(fp, ", ");
+            Py_END_ALLOW_THREADS
+        }
+        if (PyObject_Print(item, fp, 0) != 0) {
+            Py_DECREF(item);
+            Py_ReprLeave((PyObject *)op);
+            return -1;
+        }
+        Py_DECREF(item);
+    }
+    Py_BEGIN_ALLOW_THREADS
+    fprintf(fp, "]");
+    Py_END_ALLOW_THREADS
+    Py_ReprLeave((PyObject *)op);
+    return 0;
 }
 
 static PyObject *
 list_repr(PyListObject *v)
 {
-	Py_ssize_t i;
-	PyObject *s, *temp;
-	PyObject *pieces = NULL, *result = NULL;
+    Py_ssize_t i;
+    PyObject *s, *temp;
+    PyObject *pieces = NULL, *result = NULL;
 
-	i = Py_ReprEnter((PyObject*)v);
-	if (i != 0) {
-		return i > 0 ? PyString_FromString("[...]") : NULL;
-	}
+    i = Py_ReprEnter((PyObject*)v);
+    if (i != 0) {
+        return i > 0 ? PyString_FromString("[...]") : NULL;
+    }
 
-	if (Py_SIZE(v) == 0) {
-		result = PyString_FromString("[]");
-		goto Done;
-	}
+    if (Py_SIZE(v) == 0) {
+        result = PyString_FromString("[]");
+        goto Done;
+    }
 
-	pieces = PyList_New(0);
-	if (pieces == NULL)
-		goto Done;
+    pieces = PyList_New(0);
+    if (pieces == NULL)
+        goto Done;
 
-	/* Do repr() on each element.  Note that this may mutate the list,
-	   so must refetch the list size on each iteration. */
-	for (i = 0; i < Py_SIZE(v); ++i) {
-		int status;
-		if (Py_EnterRecursiveCall(" while getting the repr of a list"))
-			goto Done;
-		s = PyObject_Repr(v->ob_item[i]);
-		Py_LeaveRecursiveCall();
-		if (s == NULL)
-			goto Done;
-		status = PyList_Append(pieces, s);
-		Py_DECREF(s);  /* append created a new ref */
-		if (status < 0)
-			goto Done;
-	}
+    /* Do repr() on each element.  Note that this may mutate the list,
+       so must refetch the list size on each iteration. */
+    for (i = 0; i < Py_SIZE(v); ++i) {
+        int status;
+        if (Py_EnterRecursiveCall(" while getting the repr of a list"))
+            goto Done;
+        s = PyObject_Repr(v->ob_item[i]);
+        Py_LeaveRecursiveCall();
+        if (s == NULL)
+            goto Done;
+        status = PyList_Append(pieces, s);
+        Py_DECREF(s);  /* append created a new ref */
+        if (status < 0)
+            goto Done;
+    }
 
-	/* Add "[]" decorations to the first and last items. */
-	assert(PyList_GET_SIZE(pieces) > 0);
-	s = PyString_FromString("[");
-	if (s == NULL)
-		goto Done;
-	temp = PyList_GET_ITEM(pieces, 0);
-	PyString_ConcatAndDel(&s, temp);
-	PyList_SET_ITEM(pieces, 0, s);
-	if (s == NULL)
-		goto Done;
+    /* Add "[]" decorations to the first and last items. */
+    assert(PyList_GET_SIZE(pieces) > 0);
+    s = PyString_FromString("[");
+    if (s == NULL)
+        goto Done;
+    temp = PyList_GET_ITEM(pieces, 0);
+    PyString_ConcatAndDel(&s, temp);
+    PyList_SET_ITEM(pieces, 0, s);
+    if (s == NULL)
+        goto Done;
 
-	s = PyString_FromString("]");
-	if (s == NULL)
-		goto Done;
-	temp = PyList_GET_ITEM(pieces, PyList_GET_SIZE(pieces) - 1);
-	PyString_ConcatAndDel(&temp, s);
-	PyList_SET_ITEM(pieces, PyList_GET_SIZE(pieces) - 1, temp);
-	if (temp == NULL)
-		goto Done;
+    s = PyString_FromString("]");
+    if (s == NULL)
+        goto Done;
+    temp = PyList_GET_ITEM(pieces, PyList_GET_SIZE(pieces) - 1);
+    PyString_ConcatAndDel(&temp, s);
+    PyList_SET_ITEM(pieces, PyList_GET_SIZE(pieces) - 1, temp);
+    if (temp == NULL)
+        goto Done;
 
-	/* Paste them all together with ", " between. */
-	s = PyString_FromString(", ");
-	if (s == NULL)
-		goto Done;
-	result = _PyString_Join(s, pieces);
-	Py_DECREF(s);
+    /* Paste them all together with ", " between. */
+    s = PyString_FromString(", ");
+    if (s == NULL)
+        goto Done;
+    result = _PyString_Join(s, pieces);
+    Py_DECREF(s);
 
 Done:
-	Py_XDECREF(pieces);
-	Py_ReprLeave((PyObject *)v);
-	return result;
+    Py_XDECREF(pieces);
+    Py_ReprLeave((PyObject *)v);
+    return result;
 }
 
 static Py_ssize_t
 list_length(PyListObject *a)
 {
-	return Py_SIZE(a);
+    return Py_SIZE(a);
 }
 
 static int
 list_contains(PyListObject *a, PyObject *el)
 {
-	Py_ssize_t i;
-	int cmp;
+    Py_ssize_t i;
+    int cmp;
 
-	for (i = 0, cmp = 0 ; cmp == 0 && i < Py_SIZE(a); ++i)
-		cmp = PyObject_RichCompareBool(el, PyList_GET_ITEM(a, i),
-						   Py_EQ);
-	return cmp;
+    for (i = 0, cmp = 0 ; cmp == 0 && i < Py_SIZE(a); ++i)
+        cmp = PyObject_RichCompareBool(el, PyList_GET_ITEM(a, i),
+                                           Py_EQ);
+    return cmp;
 }
 
 static PyObject *
 list_item(PyListObject *a, Py_ssize_t i)
 {
-	if (i < 0 || i >= Py_SIZE(a)) {
-		if (indexerr == NULL) {
-			indexerr = PyString_FromString(
-				"list index out of range");
-			if (indexerr == NULL)
-				return NULL;
-		}
-		PyErr_SetObject(PyExc_IndexError, indexerr);
-		return NULL;
-	}
-	Py_INCREF(a->ob_item[i]);
-	return a->ob_item[i];
+    if (i < 0 || i >= Py_SIZE(a)) {
+        if (indexerr == NULL) {
+            indexerr = PyString_FromString(
+                "list index out of range");
+            if (indexerr == NULL)
+                return NULL;
+        }
+        PyErr_SetObject(PyExc_IndexError, indexerr);
+        return NULL;
+    }
+    Py_INCREF(a->ob_item[i]);
+    return a->ob_item[i];
 }
 
 static PyObject *
 list_slice(PyListObject *a, Py_ssize_t ilow, Py_ssize_t ihigh)
 {
-	PyListObject *np;
-	PyObject **src, **dest;
-	Py_ssize_t i, len;
-	if (ilow < 0)
-		ilow = 0;
-	else if (ilow > Py_SIZE(a))
-		ilow = Py_SIZE(a);
-	if (ihigh < ilow)
-		ihigh = ilow;
-	else if (ihigh > Py_SIZE(a))
-		ihigh = Py_SIZE(a);
-	len = ihigh - ilow;
-	np = (PyListObject *) PyList_New(len);
-	if (np == NULL)
-		return NULL;
+    PyListObject *np;
+    PyObject **src, **dest;
+    Py_ssize_t i, len;
+    if (ilow < 0)
+        ilow = 0;
+    else if (ilow > Py_SIZE(a))
+        ilow = Py_SIZE(a);
+    if (ihigh < ilow)
+        ihigh = ilow;
+    else if (ihigh > Py_SIZE(a))
+        ihigh = Py_SIZE(a);
+    len = ihigh - ilow;
+    np = (PyListObject *) PyList_New(len);
+    if (np == NULL)
+        return NULL;
 
-	src = a->ob_item + ilow;
-	dest = np->ob_item;
-	for (i = 0; i < len; i++) {
-		PyObject *v = src[i];
-		Py_INCREF(v);
-		dest[i] = v;
-	}
-	return (PyObject *)np;
+    src = a->ob_item + ilow;
+    dest = np->ob_item;
+    for (i = 0; i < len; i++) {
+        PyObject *v = src[i];
+        Py_INCREF(v);
+        dest[i] = v;
+    }
+    return (PyObject *)np;
 }
 
 PyObject *
 PyList_GetSlice(PyObject *a, Py_ssize_t ilow, Py_ssize_t ihigh)
 {
-	if (!PyList_Check(a)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return list_slice((PyListObject *)a, ilow, ihigh);
+    if (!PyList_Check(a)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return list_slice((PyListObject *)a, ilow, ihigh);
 }
 
 static PyObject *
 list_concat(PyListObject *a, PyObject *bb)
 {
-	Py_ssize_t size;
-	Py_ssize_t i;
-	PyObject **src, **dest;
-	PyListObject *np;
-	if (!PyList_Check(bb)) {
-		PyErr_Format(PyExc_TypeError,
-			  "can only concatenate list (not \"%.200s\") to list",
-			  bb->ob_type->tp_name);
-		return NULL;
-	}
+    Py_ssize_t size;
+    Py_ssize_t i;
+    PyObject **src, **dest;
+    PyListObject *np;
+    if (!PyList_Check(bb)) {
+        PyErr_Format(PyExc_TypeError,
+                  "can only concatenate list (not \"%.200s\") to list",
+                  bb->ob_type->tp_name);
+        return NULL;
+    }
 #define b ((PyListObject *)bb)
-	size = Py_SIZE(a) + Py_SIZE(b);
-	if (size < 0)
-		return PyErr_NoMemory();
-	np = (PyListObject *) PyList_New(size);
-	if (np == NULL) {
-		return NULL;
-	}
-	src = a->ob_item;
-	dest = np->ob_item;
-	for (i = 0; i < Py_SIZE(a); i++) {
-		PyObject *v = src[i];
-		Py_INCREF(v);
-		dest[i] = v;
-	}
-	src = b->ob_item;
-	dest = np->ob_item + Py_SIZE(a);
-	for (i = 0; i < Py_SIZE(b); i++) {
-		PyObject *v = src[i];
-		Py_INCREF(v);
-		dest[i] = v;
-	}
-	return (PyObject *)np;
+    size = Py_SIZE(a) + Py_SIZE(b);
+    if (size < 0)
+        return PyErr_NoMemory();
+    np = (PyListObject *) PyList_New(size);
+    if (np == NULL) {
+        return NULL;
+    }
+    src = a->ob_item;
+    dest = np->ob_item;
+    for (i = 0; i < Py_SIZE(a); i++) {
+        PyObject *v = src[i];
+        Py_INCREF(v);
+        dest[i] = v;
+    }
+    src = b->ob_item;
+    dest = np->ob_item + Py_SIZE(a);
+    for (i = 0; i < Py_SIZE(b); i++) {
+        PyObject *v = src[i];
+        Py_INCREF(v);
+        dest[i] = v;
+    }
+    return (PyObject *)np;
 #undef b
 }
 
 static PyObject *
 list_repeat(PyListObject *a, Py_ssize_t n)
 {
-	Py_ssize_t i, j;
-	Py_ssize_t size;
-	PyListObject *np;
-	PyObject **p, **items;
-	PyObject *elem;
-	if (n < 0)
-		n = 0;
-	size = Py_SIZE(a) * n;
-	if (n && size/n != Py_SIZE(a))
-		return PyErr_NoMemory();
-	if (size == 0)
-		return PyList_New(0);
-	np = (PyListObject *) PyList_New(size);
-	if (np == NULL)
-		return NULL;
+    Py_ssize_t i, j;
+    Py_ssize_t size;
+    PyListObject *np;
+    PyObject **p, **items;
+    PyObject *elem;
+    if (n < 0)
+        n = 0;
+    size = Py_SIZE(a) * n;
+    if (n && size/n != Py_SIZE(a))
+        return PyErr_NoMemory();
+    if (size == 0)
+        return PyList_New(0);
+    np = (PyListObject *) PyList_New(size);
+    if (np == NULL)
+        return NULL;
 
-	items = np->ob_item;
-	if (Py_SIZE(a) == 1) {
-		elem = a->ob_item[0];
-		for (i = 0; i < n; i++) {
-			items[i] = elem;
-			Py_INCREF(elem);
-		}
-		return (PyObject *) np;
-	}
-	p = np->ob_item;
-	items = a->ob_item;
-	for (i = 0; i < n; i++) {
-		for (j = 0; j < Py_SIZE(a); j++) {
-			*p = items[j];
-			Py_INCREF(*p);
-			p++;
-		}
-	}
-	return (PyObject *) np;
+    items = np->ob_item;
+    if (Py_SIZE(a) == 1) {
+        elem = a->ob_item[0];
+        for (i = 0; i < n; i++) {
+            items[i] = elem;
+            Py_INCREF(elem);
+        }
+        return (PyObject *) np;
+    }
+    p = np->ob_item;
+    items = a->ob_item;
+    for (i = 0; i < n; i++) {
+        for (j = 0; j < Py_SIZE(a); j++) {
+            *p = items[j];
+            Py_INCREF(*p);
+            p++;
+        }
+    }
+    return (PyObject *) np;
 }
 
 static int
 list_clear(PyListObject *a)
 {
-	Py_ssize_t i;
-	PyObject **item = a->ob_item;
-	if (item != NULL) {
-		/* Because XDECREF can recursively invoke operations on
-		   this list, we make it empty first. */
-		i = Py_SIZE(a);
-		Py_SIZE(a) = 0;
-		a->ob_item = NULL;
-		a->allocated = 0;
-		while (--i >= 0) {
-			Py_XDECREF(item[i]);
-		}
-		PyMem_FREE(item);
-	}
-	/* Never fails; the return value can be ignored.
-	   Note that there is no guarantee that the list is actually empty
-	   at this point, because XDECREF may have populated it again! */
-	return 0;
+    Py_ssize_t i;
+    PyObject **item = a->ob_item;
+    if (item != NULL) {
+        /* Because XDECREF can recursively invoke operations on
+           this list, we make it empty first. */
+        i = Py_SIZE(a);
+        Py_SIZE(a) = 0;
+        a->ob_item = NULL;
+        a->allocated = 0;
+        while (--i >= 0) {
+            Py_XDECREF(item[i]);
+        }
+        PyMem_FREE(item);
+    }
+    /* Never fails; the return value can be ignored.
+       Note that there is no guarantee that the list is actually empty
+       at this point, because XDECREF may have populated it again! */
+    return 0;
 }
 
 /* a[ilow:ihigh] = v if v != NULL.
@@ -613,368 +613,368 @@
 static int
 list_ass_slice(PyListObject *a, Py_ssize_t ilow, Py_ssize_t ihigh, PyObject *v)
 {
-	/* Because [X]DECREF can recursively invoke list operations on
-	   this list, we must postpone all [X]DECREF activity until
-	   after the list is back in its canonical shape.  Therefore
-	   we must allocate an additional array, 'recycle', into which
-	   we temporarily copy the items that are deleted from the
-	   list. :-( */
-	PyObject *recycle_on_stack[8];
-	PyObject **recycle = recycle_on_stack; /* will allocate more if needed */
-	PyObject **item;
-	PyObject **vitem = NULL;
-	PyObject *v_as_SF = NULL; /* PySequence_Fast(v) */
-	Py_ssize_t n; /* # of elements in replacement list */
-	Py_ssize_t norig; /* # of elements in list getting replaced */
-	Py_ssize_t d; /* Change in size */
-	Py_ssize_t k;
-	size_t s;
-	int result = -1;	/* guilty until proved innocent */
+    /* Because [X]DECREF can recursively invoke list operations on
+       this list, we must postpone all [X]DECREF activity until
+       after the list is back in its canonical shape.  Therefore
+       we must allocate an additional array, 'recycle', into which
+       we temporarily copy the items that are deleted from the
+       list. :-( */
+    PyObject *recycle_on_stack[8];
+    PyObject **recycle = recycle_on_stack; /* will allocate more if needed */
+    PyObject **item;
+    PyObject **vitem = NULL;
+    PyObject *v_as_SF = NULL; /* PySequence_Fast(v) */
+    Py_ssize_t n; /* # of elements in replacement list */
+    Py_ssize_t norig; /* # of elements in list getting replaced */
+    Py_ssize_t d; /* Change in size */
+    Py_ssize_t k;
+    size_t s;
+    int result = -1;            /* guilty until proved innocent */
 #define b ((PyListObject *)v)
-	if (v == NULL)
-		n = 0;
-	else {
-		if (a == b) {
-			/* Special case "a[i:j] = a" -- copy b first */
-			v = list_slice(b, 0, Py_SIZE(b));
-			if (v == NULL)
-				return result;
-			result = list_ass_slice(a, ilow, ihigh, v);
-			Py_DECREF(v);
-			return result;
-		}
-		v_as_SF = PySequence_Fast(v, "can only assign an iterable");
-		if(v_as_SF == NULL)
-			goto Error;
-		n = PySequence_Fast_GET_SIZE(v_as_SF);
-		vitem = PySequence_Fast_ITEMS(v_as_SF);
-	}
-	if (ilow < 0)
-		ilow = 0;
-	else if (ilow > Py_SIZE(a))
-		ilow = Py_SIZE(a);
+    if (v == NULL)
+        n = 0;
+    else {
+        if (a == b) {
+            /* Special case "a[i:j] = a" -- copy b first */
+            v = list_slice(b, 0, Py_SIZE(b));
+            if (v == NULL)
+                return result;
+            result = list_ass_slice(a, ilow, ihigh, v);
+            Py_DECREF(v);
+            return result;
+        }
+        v_as_SF = PySequence_Fast(v, "can only assign an iterable");
+        if(v_as_SF == NULL)
+            goto Error;
+        n = PySequence_Fast_GET_SIZE(v_as_SF);
+        vitem = PySequence_Fast_ITEMS(v_as_SF);
+    }
+    if (ilow < 0)
+        ilow = 0;
+    else if (ilow > Py_SIZE(a))
+        ilow = Py_SIZE(a);
 
-	if (ihigh < ilow)
-		ihigh = ilow;
-	else if (ihigh > Py_SIZE(a))
-		ihigh = Py_SIZE(a);
+    if (ihigh < ilow)
+        ihigh = ilow;
+    else if (ihigh > Py_SIZE(a))
+        ihigh = Py_SIZE(a);
 
-	norig = ihigh - ilow;
-	assert(norig >= 0);
-	d = n - norig;
-	if (Py_SIZE(a) + d == 0) {
-		Py_XDECREF(v_as_SF);
-		return list_clear(a);
-	}
-	item = a->ob_item;
-	/* recycle the items that we are about to remove */
-	s = norig * sizeof(PyObject *);
-	if (s > sizeof(recycle_on_stack)) {
-		recycle = (PyObject **)PyMem_MALLOC(s);
-		if (recycle == NULL) {
-			PyErr_NoMemory();
-			goto Error;
-		}
-	}
-	memcpy(recycle, &item[ilow], s);
+    norig = ihigh - ilow;
+    assert(norig >= 0);
+    d = n - norig;
+    if (Py_SIZE(a) + d == 0) {
+        Py_XDECREF(v_as_SF);
+        return list_clear(a);
+    }
+    item = a->ob_item;
+    /* recycle the items that we are about to remove */
+    s = norig * sizeof(PyObject *);
+    if (s > sizeof(recycle_on_stack)) {
+        recycle = (PyObject **)PyMem_MALLOC(s);
+        if (recycle == NULL) {
+            PyErr_NoMemory();
+            goto Error;
+        }
+    }
+    memcpy(recycle, &item[ilow], s);
 
-	if (d < 0) { /* Delete -d items */
-		memmove(&item[ihigh+d], &item[ihigh],
-			(Py_SIZE(a) - ihigh)*sizeof(PyObject *));
-		list_resize(a, Py_SIZE(a) + d);
-		item = a->ob_item;
-	}
-	else if (d > 0) { /* Insert d items */
-		k = Py_SIZE(a);
-		if (list_resize(a, k+d) < 0)
-			goto Error;
-		item = a->ob_item;
-		memmove(&item[ihigh+d], &item[ihigh],
-			(k - ihigh)*sizeof(PyObject *));
-	}
-	for (k = 0; k < n; k++, ilow++) {
-		PyObject *w = vitem[k];
-		Py_XINCREF(w);
-		item[ilow] = w;
-	}
-	for (k = norig - 1; k >= 0; --k)
-		Py_XDECREF(recycle[k]);
-	result = 0;
+    if (d < 0) { /* Delete -d items */
+        memmove(&item[ihigh+d], &item[ihigh],
+            (Py_SIZE(a) - ihigh)*sizeof(PyObject *));
+        list_resize(a, Py_SIZE(a) + d);
+        item = a->ob_item;
+    }
+    else if (d > 0) { /* Insert d items */
+        k = Py_SIZE(a);
+        if (list_resize(a, k+d) < 0)
+            goto Error;
+        item = a->ob_item;
+        memmove(&item[ihigh+d], &item[ihigh],
+            (k - ihigh)*sizeof(PyObject *));
+    }
+    for (k = 0; k < n; k++, ilow++) {
+        PyObject *w = vitem[k];
+        Py_XINCREF(w);
+        item[ilow] = w;
+    }
+    for (k = norig - 1; k >= 0; --k)
+        Py_XDECREF(recycle[k]);
+    result = 0;
  Error:
-	if (recycle != recycle_on_stack)
-		PyMem_FREE(recycle);
-	Py_XDECREF(v_as_SF);
-	return result;
+    if (recycle != recycle_on_stack)
+        PyMem_FREE(recycle);
+    Py_XDECREF(v_as_SF);
+    return result;
 #undef b
 }
 
 int
 PyList_SetSlice(PyObject *a, Py_ssize_t ilow, Py_ssize_t ihigh, PyObject *v)
 {
-	if (!PyList_Check(a)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return list_ass_slice((PyListObject *)a, ilow, ihigh, v);
+    if (!PyList_Check(a)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return list_ass_slice((PyListObject *)a, ilow, ihigh, v);
 }
 
 static PyObject *
 list_inplace_repeat(PyListObject *self, Py_ssize_t n)
 {
-	PyObject **items;
-	Py_ssize_t size, i, j, p;
+    PyObject **items;
+    Py_ssize_t size, i, j, p;
 
 
-	size = PyList_GET_SIZE(self);
-	if (size == 0 || n == 1) {
-		Py_INCREF(self);
-		return (PyObject *)self;
-	}
+    size = PyList_GET_SIZE(self);
+    if (size == 0 || n == 1) {
+        Py_INCREF(self);
+        return (PyObject *)self;
+    }
 
-	if (n < 1) {
-		(void)list_clear(self);
-		Py_INCREF(self);
-		return (PyObject *)self;
-	}
+    if (n < 1) {
+        (void)list_clear(self);
+        Py_INCREF(self);
+        return (PyObject *)self;
+    }
 
-	if (size > PY_SSIZE_T_MAX / n) {
-		return PyErr_NoMemory();
-	}
+    if (size > PY_SSIZE_T_MAX / n) {
+        return PyErr_NoMemory();
+    }
 
-	if (list_resize(self, size*n) == -1)
-		return NULL;
+    if (list_resize(self, size*n) == -1)
+        return NULL;
 
-	p = size;
-	items = self->ob_item;
-	for (i = 1; i < n; i++) { /* Start counting at 1, not 0 */
-		for (j = 0; j < size; j++) {
-			PyObject *o = items[j];
-			Py_INCREF(o);
-			items[p++] = o;
-		}
-	}
-	Py_INCREF(self);
-	return (PyObject *)self;
+    p = size;
+    items = self->ob_item;
+    for (i = 1; i < n; i++) { /* Start counting at 1, not 0 */
+        for (j = 0; j < size; j++) {
+            PyObject *o = items[j];
+            Py_INCREF(o);
+            items[p++] = o;
+        }
+    }
+    Py_INCREF(self);
+    return (PyObject *)self;
 }
 
 static int
 list_ass_item(PyListObject *a, Py_ssize_t i, PyObject *v)
 {
-	PyObject *old_value;
-	if (i < 0 || i >= Py_SIZE(a)) {
-		PyErr_SetString(PyExc_IndexError,
-				"list assignment index out of range");
-		return -1;
-	}
-	if (v == NULL)
-		return list_ass_slice(a, i, i+1, v);
-	Py_INCREF(v);
-	old_value = a->ob_item[i];
-	a->ob_item[i] = v;
-	Py_DECREF(old_value);
-	return 0;
+    PyObject *old_value;
+    if (i < 0 || i >= Py_SIZE(a)) {
+        PyErr_SetString(PyExc_IndexError,
+                        "list assignment index out of range");
+        return -1;
+    }
+    if (v == NULL)
+        return list_ass_slice(a, i, i+1, v);
+    Py_INCREF(v);
+    old_value = a->ob_item[i];
+    a->ob_item[i] = v;
+    Py_DECREF(old_value);
+    return 0;
 }
 
 static PyObject *
 listinsert(PyListObject *self, PyObject *args)
 {
-	Py_ssize_t i;
-	PyObject *v;
-	if (!PyArg_ParseTuple(args, "nO:insert", &i, &v))
-		return NULL;
-	if (ins1(self, i, v) == 0)
-		Py_RETURN_NONE;
-	return NULL;
+    Py_ssize_t i;
+    PyObject *v;
+    if (!PyArg_ParseTuple(args, "nO:insert", &i, &v))
+        return NULL;
+    if (ins1(self, i, v) == 0)
+        Py_RETURN_NONE;
+    return NULL;
 }
 
 static PyObject *
 listappend(PyListObject *self, PyObject *v)
 {
-	if (app1(self, v) == 0)
-		Py_RETURN_NONE;
-	return NULL;
+    if (app1(self, v) == 0)
+        Py_RETURN_NONE;
+    return NULL;
 }
 
 static PyObject *
 listextend(PyListObject *self, PyObject *b)
 {
-	PyObject *it;      /* iter(v) */
-	Py_ssize_t m;		   /* size of self */
-	Py_ssize_t n;		   /* guess for size of b */
-	Py_ssize_t mn;		   /* m + n */
-	Py_ssize_t i;
-	PyObject *(*iternext)(PyObject *);
+    PyObject *it;      /* iter(v) */
+    Py_ssize_t m;                  /* size of self */
+    Py_ssize_t n;                  /* guess for size of b */
+    Py_ssize_t mn;                 /* m + n */
+    Py_ssize_t i;
+    PyObject *(*iternext)(PyObject *);
 
-	/* Special cases:
-	   1) lists and tuples which can use PySequence_Fast ops
-	   2) extending self to self requires making a copy first
-	*/
-	if (PyList_CheckExact(b) || PyTuple_CheckExact(b) || (PyObject *)self == b) {
-		PyObject **src, **dest;
-		b = PySequence_Fast(b, "argument must be iterable");
-		if (!b)
-			return NULL;
-		n = PySequence_Fast_GET_SIZE(b);
-		if (n == 0) {
-			/* short circuit when b is empty */
-			Py_DECREF(b);
-			Py_RETURN_NONE;
-		}
-		m = Py_SIZE(self);
-		if (list_resize(self, m + n) == -1) {
-			Py_DECREF(b);
-			return NULL;
-		}
-		/* note that we may still have self == b here for the
-		 * situation a.extend(a), but the following code works
-		 * in that case too.  Just make sure to resize self
-		 * before calling PySequence_Fast_ITEMS.
-		 */
-		/* populate the end of self with b's items */
-		src = PySequence_Fast_ITEMS(b);
-		dest = self->ob_item + m;
-		for (i = 0; i < n; i++) {
-			PyObject *o = src[i];
-			Py_INCREF(o);
-			dest[i] = o;
-		}
-		Py_DECREF(b);
-		Py_RETURN_NONE;
-	}
+    /* Special cases:
+       1) lists and tuples which can use PySequence_Fast ops
+       2) extending self to self requires making a copy first
+    */
+    if (PyList_CheckExact(b) || PyTuple_CheckExact(b) || (PyObject *)self == b) {
+        PyObject **src, **dest;
+        b = PySequence_Fast(b, "argument must be iterable");
+        if (!b)
+            return NULL;
+        n = PySequence_Fast_GET_SIZE(b);
+        if (n == 0) {
+            /* short circuit when b is empty */
+            Py_DECREF(b);
+            Py_RETURN_NONE;
+        }
+        m = Py_SIZE(self);
+        if (list_resize(self, m + n) == -1) {
+            Py_DECREF(b);
+            return NULL;
+        }
+        /* note that we may still have self == b here for the
+         * situation a.extend(a), but the following code works
+         * in that case too.  Just make sure to resize self
+         * before calling PySequence_Fast_ITEMS.
+         */
+        /* populate the end of self with b's items */
+        src = PySequence_Fast_ITEMS(b);
+        dest = self->ob_item + m;
+        for (i = 0; i < n; i++) {
+            PyObject *o = src[i];
+            Py_INCREF(o);
+            dest[i] = o;
+        }
+        Py_DECREF(b);
+        Py_RETURN_NONE;
+    }
 
-	it = PyObject_GetIter(b);
-	if (it == NULL)
-		return NULL;
-	iternext = *it->ob_type->tp_iternext;
+    it = PyObject_GetIter(b);
+    if (it == NULL)
+        return NULL;
+    iternext = *it->ob_type->tp_iternext;
 
-	/* Guess a result list size. */
-	n = _PyObject_LengthHint(b, 8);
-	if (n == -1) {
-		Py_DECREF(it);
-		return NULL;
-	}
-	m = Py_SIZE(self);
-	mn = m + n;
-	if (mn >= m) {
-		/* Make room. */
-		if (list_resize(self, mn) == -1)
-			goto error;
-		/* Make the list sane again. */
-		Py_SIZE(self) = m;
-	}
-	/* Else m + n overflowed; on the chance that n lied, and there really
-	 * is enough room, ignore it.  If n was telling the truth, we'll
-	 * eventually run out of memory during the loop.
-	 */
+    /* Guess a result list size. */
+    n = _PyObject_LengthHint(b, 8);
+    if (n == -1) {
+        Py_DECREF(it);
+        return NULL;
+    }
+    m = Py_SIZE(self);
+    mn = m + n;
+    if (mn >= m) {
+        /* Make room. */
+        if (list_resize(self, mn) == -1)
+            goto error;
+        /* Make the list sane again. */
+        Py_SIZE(self) = m;
+    }
+    /* Else m + n overflowed; on the chance that n lied, and there really
+     * is enough room, ignore it.  If n was telling the truth, we'll
+     * eventually run out of memory during the loop.
+     */
 
-	/* Run iterator to exhaustion. */
-	for (;;) {
-		PyObject *item = iternext(it);
-		if (item == NULL) {
-			if (PyErr_Occurred()) {
-				if (PyErr_ExceptionMatches(PyExc_StopIteration))
-					PyErr_Clear();
-				else
-					goto error;
-			}
-			break;
-		}
-		if (Py_SIZE(self) < self->allocated) {
-			/* steals ref */
-			PyList_SET_ITEM(self, Py_SIZE(self), item);
-			++Py_SIZE(self);
-		}
-		else {
-			int status = app1(self, item);
-			Py_DECREF(item);  /* append creates a new ref */
-			if (status < 0)
-				goto error;
-		}
-	}
+    /* Run iterator to exhaustion. */
+    for (;;) {
+        PyObject *item = iternext(it);
+        if (item == NULL) {
+            if (PyErr_Occurred()) {
+                if (PyErr_ExceptionMatches(PyExc_StopIteration))
+                    PyErr_Clear();
+                else
+                    goto error;
+            }
+            break;
+        }
+        if (Py_SIZE(self) < self->allocated) {
+            /* steals ref */
+            PyList_SET_ITEM(self, Py_SIZE(self), item);
+            ++Py_SIZE(self);
+        }
+        else {
+            int status = app1(self, item);
+            Py_DECREF(item);  /* append creates a new ref */
+            if (status < 0)
+                goto error;
+        }
+    }
 
-	/* Cut back result list if initial guess was too large. */
-	if (Py_SIZE(self) < self->allocated)
-		list_resize(self, Py_SIZE(self));  /* shrinking can't fail */
+    /* Cut back result list if initial guess was too large. */
+    if (Py_SIZE(self) < self->allocated)
+        list_resize(self, Py_SIZE(self));  /* shrinking can't fail */
 
-	Py_DECREF(it);
-	Py_RETURN_NONE;
+    Py_DECREF(it);
+    Py_RETURN_NONE;
 
   error:
-	Py_DECREF(it);
-	return NULL;
+    Py_DECREF(it);
+    return NULL;
 }
 
 PyObject *
 _PyList_Extend(PyListObject *self, PyObject *b)
 {
-	return listextend(self, b);
+    return listextend(self, b);
 }
 
 static PyObject *
 list_inplace_concat(PyListObject *self, PyObject *other)
 {
-	PyObject *result;
+    PyObject *result;
 
-	result = listextend(self, other);
-	if (result == NULL)
-		return result;
-	Py_DECREF(result);
-	Py_INCREF(self);
-	return (PyObject *)self;
+    result = listextend(self, other);
+    if (result == NULL)
+        return result;
+    Py_DECREF(result);
+    Py_INCREF(self);
+    return (PyObject *)self;
 }
 
 static PyObject *
 listpop(PyListObject *self, PyObject *args)
 {
-	Py_ssize_t i = -1;
-	PyObject *v;
-	int status;
+    Py_ssize_t i = -1;
+    PyObject *v;
+    int status;
 
-	if (!PyArg_ParseTuple(args, "|n:pop", &i))
-		return NULL;
+    if (!PyArg_ParseTuple(args, "|n:pop", &i))
+        return NULL;
 
-	if (Py_SIZE(self) == 0) {
-		/* Special-case most common failure cause */
-		PyErr_SetString(PyExc_IndexError, "pop from empty list");
-		return NULL;
-	}
-	if (i < 0)
-		i += Py_SIZE(self);
-	if (i < 0 || i >= Py_SIZE(self)) {
-		PyErr_SetString(PyExc_IndexError, "pop index out of range");
-		return NULL;
-	}
-	v = self->ob_item[i];
-	if (i == Py_SIZE(self) - 1) {
-		status = list_resize(self, Py_SIZE(self) - 1);
-		assert(status >= 0);
-		return v; /* and v now owns the reference the list had */
-	}
-	Py_INCREF(v);
-	status = list_ass_slice(self, i, i+1, (PyObject *)NULL);
-	assert(status >= 0);
-	/* Use status, so that in a release build compilers don't
-	 * complain about the unused name.
-	 */
-	(void) status;
+    if (Py_SIZE(self) == 0) {
+        /* Special-case most common failure cause */
+        PyErr_SetString(PyExc_IndexError, "pop from empty list");
+        return NULL;
+    }
+    if (i < 0)
+        i += Py_SIZE(self);
+    if (i < 0 || i >= Py_SIZE(self)) {
+        PyErr_SetString(PyExc_IndexError, "pop index out of range");
+        return NULL;
+    }
+    v = self->ob_item[i];
+    if (i == Py_SIZE(self) - 1) {
+        status = list_resize(self, Py_SIZE(self) - 1);
+        assert(status >= 0);
+        return v; /* and v now owns the reference the list had */
+    }
+    Py_INCREF(v);
+    status = list_ass_slice(self, i, i+1, (PyObject *)NULL);
+    assert(status >= 0);
+    /* Use status, so that in a release build compilers don't
+     * complain about the unused name.
+     */
+    (void) status;
 
-	return v;
+    return v;
 }
 
 /* Reverse a slice of a list in place, from lo up to (exclusive) hi. */
 static void
 reverse_slice(PyObject **lo, PyObject **hi)
 {
-	assert(lo && hi);
+    assert(lo && hi);
 
-	--hi;
-	while (lo < hi) {
-		PyObject *t = *lo;
-		*lo = *hi;
-		*hi = t;
-		++lo;
-		--hi;
-	}
+    --hi;
+    while (lo < hi) {
+        PyObject *t = *lo;
+        *lo = *hi;
+        *hi = t;
+        ++lo;
+        --hi;
+    }
 }
 
 /* Lots of code for an adaptive, stable, natural mergesort.  There are many
@@ -990,35 +990,35 @@
 static int
 islt(PyObject *x, PyObject *y, PyObject *compare)
 {
-	PyObject *res;
-	PyObject *args;
-	Py_ssize_t i;
+    PyObject *res;
+    PyObject *args;
+    Py_ssize_t i;
 
-	assert(compare != NULL);
-	/* Call the user's comparison function and translate the 3-way
-	 * result into true or false (or error).
-	 */
-	args = PyTuple_New(2);
-	if (args == NULL)
-		return -1;
-	Py_INCREF(x);
-	Py_INCREF(y);
-	PyTuple_SET_ITEM(args, 0, x);
-	PyTuple_SET_ITEM(args, 1, y);
-	res = PyObject_Call(compare, args, NULL);
-	Py_DECREF(args);
-	if (res == NULL)
-		return -1;
-	if (!PyInt_Check(res)) {
-		PyErr_Format(PyExc_TypeError,
-			     "comparison function must return int, not %.200s",
-			     res->ob_type->tp_name);
-		Py_DECREF(res);
-		return -1;
-	}
-	i = PyInt_AsLong(res);
-	Py_DECREF(res);
-	return i < 0;
+    assert(compare != NULL);
+    /* Call the user's comparison function and translate the 3-way
+     * result into true or false (or error).
+     */
+    args = PyTuple_New(2);
+    if (args == NULL)
+        return -1;
+    Py_INCREF(x);
+    Py_INCREF(y);
+    PyTuple_SET_ITEM(args, 0, x);
+    PyTuple_SET_ITEM(args, 1, y);
+    res = PyObject_Call(compare, args, NULL);
+    Py_DECREF(args);
+    if (res == NULL)
+        return -1;
+    if (!PyInt_Check(res)) {
+        PyErr_Format(PyExc_TypeError,
+                     "comparison function must return int, not %.200s",
+                     res->ob_type->tp_name);
+        Py_DECREF(res);
+        return -1;
+    }
+    i = PyInt_AsLong(res);
+    Py_DECREF(res);
+    return i < 0;
 }
 
 /* If COMPARE is NULL, calls PyObject_RichCompareBool with Py_LT, else calls
@@ -1026,16 +1026,16 @@
  * sorting does many comparisons.
  * Returns -1 on error, 1 if x < y, 0 if x >= y.
  */
-#define ISLT(X, Y, COMPARE) ((COMPARE) == NULL ?			\
-			     PyObject_RichCompareBool(X, Y, Py_LT) :	\
-			     islt(X, Y, COMPARE))
+#define ISLT(X, Y, COMPARE) ((COMPARE) == NULL ?                        \
+                 PyObject_RichCompareBool(X, Y, Py_LT) :                \
+                 islt(X, Y, COMPARE))
 
 /* Compare X to Y via "<".  Goto "fail" if the comparison raises an
    error.  Else "k" is set to true iff X<Y, and an "if (k)" block is
    started.  It makes more sense in context <wink>.  X and Y are PyObject*s.
 */
 #define IFLT(X, Y) if ((k = ISLT(X, Y, compare)) < 0) goto fail;  \
-		   if (k)
+           if (k)
 
 /* binarysort is the best method for sorting small arrays: it does
    few compares, but can do data movement quadratic in the number of
@@ -1052,48 +1052,48 @@
 binarysort(PyObject **lo, PyObject **hi, PyObject **start, PyObject *compare)
      /* compare -- comparison function object, or NULL for default */
 {
-	register Py_ssize_t k;
-	register PyObject **l, **p, **r;
-	register PyObject *pivot;
+    register Py_ssize_t k;
+    register PyObject **l, **p, **r;
+    register PyObject *pivot;
 
-	assert(lo <= start && start <= hi);
-	/* assert [lo, start) is sorted */
-	if (lo == start)
-		++start;
-	for (; start < hi; ++start) {
-		/* set l to where *start belongs */
-		l = lo;
-		r = start;
-		pivot = *r;
-		/* Invariants:
-		 * pivot >= all in [lo, l).
-		 * pivot  < all in [r, start).
-		 * The second is vacuously true at the start.
-		 */
-		assert(l < r);
-		do {
-			p = l + ((r - l) >> 1);
-			IFLT(pivot, *p)
-				r = p;
-			else
-				l = p+1;
-		} while (l < r);
-		assert(l == r);
-		/* The invariants still hold, so pivot >= all in [lo, l) and
-		   pivot < all in [l, start), so pivot belongs at l.  Note
-		   that if there are elements equal to pivot, l points to the
-		   first slot after them -- that's why this sort is stable.
-		   Slide over to make room.
-		   Caution: using memmove is much slower under MSVC 5;
-		   we're not usually moving many slots. */
-		for (p = start; p > l; --p)
-			*p = *(p-1);
-		*l = pivot;
-	}
-	return 0;
+    assert(lo <= start && start <= hi);
+    /* assert [lo, start) is sorted */
+    if (lo == start)
+        ++start;
+    for (; start < hi; ++start) {
+        /* set l to where *start belongs */
+        l = lo;
+        r = start;
+        pivot = *r;
+        /* Invariants:
+         * pivot >= all in [lo, l).
+         * pivot  < all in [r, start).
+         * The second is vacuously true at the start.
+         */
+        assert(l < r);
+        do {
+            p = l + ((r - l) >> 1);
+            IFLT(pivot, *p)
+                r = p;
+            else
+                l = p+1;
+        } while (l < r);
+        assert(l == r);
+        /* The invariants still hold, so pivot >= all in [lo, l) and
+           pivot < all in [l, start), so pivot belongs at l.  Note
+           that if there are elements equal to pivot, l points to the
+           first slot after them -- that's why this sort is stable.
+           Slide over to make room.
+           Caution: using memmove is much slower under MSVC 5;
+           we're not usually moving many slots. */
+        for (p = start; p > l; --p)
+            *p = *(p-1);
+        *l = pivot;
+    }
+    return 0;
 
  fail:
-	return -1;
+    return -1;
 }
 
 /*
@@ -1117,35 +1117,35 @@
 static Py_ssize_t
 count_run(PyObject **lo, PyObject **hi, PyObject *compare, int *descending)
 {
-	Py_ssize_t k;
-	Py_ssize_t n;
+    Py_ssize_t k;
+    Py_ssize_t n;
 
-	assert(lo < hi);
-	*descending = 0;
-	++lo;
-	if (lo == hi)
-		return 1;
+    assert(lo < hi);
+    *descending = 0;
+    ++lo;
+    if (lo == hi)
+        return 1;
 
-	n = 2;
-	IFLT(*lo, *(lo-1)) {
-		*descending = 1;
-		for (lo = lo+1; lo < hi; ++lo, ++n) {
-			IFLT(*lo, *(lo-1))
-				;
-			else
-				break;
-		}
-	}
-	else {
-		for (lo = lo+1; lo < hi; ++lo, ++n) {
-			IFLT(*lo, *(lo-1))
-				break;
-		}
-	}
+    n = 2;
+    IFLT(*lo, *(lo-1)) {
+        *descending = 1;
+        for (lo = lo+1; lo < hi; ++lo, ++n) {
+            IFLT(*lo, *(lo-1))
+                ;
+            else
+                break;
+        }
+    }
+    else {
+        for (lo = lo+1; lo < hi; ++lo, ++n) {
+            IFLT(*lo, *(lo-1))
+                break;
+        }
+    }
 
-	return n;
+    return n;
 fail:
-	return -1;
+    return -1;
 }
 
 /*
@@ -1172,78 +1172,78 @@
 static Py_ssize_t
 gallop_left(PyObject *key, PyObject **a, Py_ssize_t n, Py_ssize_t hint, PyObject *compare)
 {
-	Py_ssize_t ofs;
-	Py_ssize_t lastofs;
-	Py_ssize_t k;
+    Py_ssize_t ofs;
+    Py_ssize_t lastofs;
+    Py_ssize_t k;
 
-	assert(key && a && n > 0 && hint >= 0 && hint < n);
+    assert(key && a && n > 0 && hint >= 0 && hint < n);
 
-	a += hint;
-	lastofs = 0;
-	ofs = 1;
-	IFLT(*a, key) {
-		/* a[hint] < key -- gallop right, until
-		 * a[hint + lastofs] < key <= a[hint + ofs]
-		 */
-		const Py_ssize_t maxofs = n - hint;	/* &a[n-1] is highest */
-		while (ofs < maxofs) {
-			IFLT(a[ofs], key) {
-				lastofs = ofs;
-				ofs = (ofs << 1) + 1;
-				if (ofs <= 0)	/* int overflow */
-					ofs = maxofs;
-			}
- 			else	/* key <= a[hint + ofs] */
-				break;
-		}
-		if (ofs > maxofs)
-			ofs = maxofs;
-		/* Translate back to offsets relative to &a[0]. */
-		lastofs += hint;
-		ofs += hint;
-	}
-	else {
-		/* key <= a[hint] -- gallop left, until
-		 * a[hint - ofs] < key <= a[hint - lastofs]
-		 */
-		const Py_ssize_t maxofs = hint + 1;	/* &a[0] is lowest */
-		while (ofs < maxofs) {
-			IFLT(*(a-ofs), key)
-				break;
-			/* key <= a[hint - ofs] */
-			lastofs = ofs;
-			ofs = (ofs << 1) + 1;
-			if (ofs <= 0)	/* int overflow */
-				ofs = maxofs;
-		}
-		if (ofs > maxofs)
-			ofs = maxofs;
-		/* Translate back to positive offsets relative to &a[0]. */
-		k = lastofs;
-		lastofs = hint - ofs;
-		ofs = hint - k;
-	}
-	a -= hint;
+    a += hint;
+    lastofs = 0;
+    ofs = 1;
+    IFLT(*a, key) {
+        /* a[hint] < key -- gallop right, until
+         * a[hint + lastofs] < key <= a[hint + ofs]
+         */
+        const Py_ssize_t maxofs = n - hint;             /* &a[n-1] is highest */
+        while (ofs < maxofs) {
+            IFLT(a[ofs], key) {
+                lastofs = ofs;
+                ofs = (ofs << 1) + 1;
+                if (ofs <= 0)                   /* int overflow */
+                    ofs = maxofs;
+            }
+            else                /* key <= a[hint + ofs] */
+                break;
+        }
+        if (ofs > maxofs)
+            ofs = maxofs;
+        /* Translate back to offsets relative to &a[0]. */
+        lastofs += hint;
+        ofs += hint;
+    }
+    else {
+        /* key <= a[hint] -- gallop left, until
+         * a[hint - ofs] < key <= a[hint - lastofs]
+         */
+        const Py_ssize_t maxofs = hint + 1;             /* &a[0] is lowest */
+        while (ofs < maxofs) {
+            IFLT(*(a-ofs), key)
+                break;
+            /* key <= a[hint - ofs] */
+            lastofs = ofs;
+            ofs = (ofs << 1) + 1;
+            if (ofs <= 0)               /* int overflow */
+                ofs = maxofs;
+        }
+        if (ofs > maxofs)
+            ofs = maxofs;
+        /* Translate back to positive offsets relative to &a[0]. */
+        k = lastofs;
+        lastofs = hint - ofs;
+        ofs = hint - k;
+    }
+    a -= hint;
 
-	assert(-1 <= lastofs && lastofs < ofs && ofs <= n);
-	/* Now a[lastofs] < key <= a[ofs], so key belongs somewhere to the
-	 * right of lastofs but no farther right than ofs.  Do a binary
-	 * search, with invariant a[lastofs-1] < key <= a[ofs].
-	 */
-	++lastofs;
-	while (lastofs < ofs) {
-		Py_ssize_t m = lastofs + ((ofs - lastofs) >> 1);
+    assert(-1 <= lastofs && lastofs < ofs && ofs <= n);
+    /* Now a[lastofs] < key <= a[ofs], so key belongs somewhere to the
+     * right of lastofs but no farther right than ofs.  Do a binary
+     * search, with invariant a[lastofs-1] < key <= a[ofs].
+     */
+    ++lastofs;
+    while (lastofs < ofs) {
+        Py_ssize_t m = lastofs + ((ofs - lastofs) >> 1);
 
-		IFLT(a[m], key)
-			lastofs = m+1;	/* a[m] < key */
-		else
-			ofs = m;	/* key <= a[m] */
-	}
-	assert(lastofs == ofs);		/* so a[ofs-1] < key <= a[ofs] */
-	return ofs;
+        IFLT(a[m], key)
+            lastofs = m+1;              /* a[m] < key */
+        else
+            ofs = m;                    /* key <= a[m] */
+    }
+    assert(lastofs == ofs);             /* so a[ofs-1] < key <= a[ofs] */
+    return ofs;
 
 fail:
-	return -1;
+    return -1;
 }
 
 /*
@@ -1263,78 +1263,78 @@
 static Py_ssize_t
 gallop_right(PyObject *key, PyObject **a, Py_ssize_t n, Py_ssize_t hint, PyObject *compare)
 {
-	Py_ssize_t ofs;
-	Py_ssize_t lastofs;
-	Py_ssize_t k;
+    Py_ssize_t ofs;
+    Py_ssize_t lastofs;
+    Py_ssize_t k;
 
-	assert(key && a && n > 0 && hint >= 0 && hint < n);
+    assert(key && a && n > 0 && hint >= 0 && hint < n);
 
-	a += hint;
-	lastofs = 0;
-	ofs = 1;
-	IFLT(key, *a) {
-		/* key < a[hint] -- gallop left, until
-		 * a[hint - ofs] <= key < a[hint - lastofs]
-		 */
-		const Py_ssize_t maxofs = hint + 1;	/* &a[0] is lowest */
-		while (ofs < maxofs) {
-			IFLT(key, *(a-ofs)) {
-				lastofs = ofs;
-				ofs = (ofs << 1) + 1;
-				if (ofs <= 0)	/* int overflow */
-					ofs = maxofs;
-			}
-			else	/* a[hint - ofs] <= key */
-				break;
-		}
-		if (ofs > maxofs)
-			ofs = maxofs;
-		/* Translate back to positive offsets relative to &a[0]. */
-		k = lastofs;
-		lastofs = hint - ofs;
-		ofs = hint - k;
-	}
-	else {
-		/* a[hint] <= key -- gallop right, until
-		 * a[hint + lastofs] <= key < a[hint + ofs]
-		*/
-		const Py_ssize_t maxofs = n - hint;	/* &a[n-1] is highest */
-		while (ofs < maxofs) {
-			IFLT(key, a[ofs])
-				break;
-			/* a[hint + ofs] <= key */
-			lastofs = ofs;
-			ofs = (ofs << 1) + 1;
-			if (ofs <= 0)	/* int overflow */
-				ofs = maxofs;
-		}
-		if (ofs > maxofs)
-			ofs = maxofs;
-		/* Translate back to offsets relative to &a[0]. */
-		lastofs += hint;
-		ofs += hint;
-	}
-	a -= hint;
+    a += hint;
+    lastofs = 0;
+    ofs = 1;
+    IFLT(key, *a) {
+        /* key < a[hint] -- gallop left, until
+         * a[hint - ofs] <= key < a[hint - lastofs]
+         */
+        const Py_ssize_t maxofs = hint + 1;             /* &a[0] is lowest */
+        while (ofs < maxofs) {
+            IFLT(key, *(a-ofs)) {
+                lastofs = ofs;
+                ofs = (ofs << 1) + 1;
+                if (ofs <= 0)                   /* int overflow */
+                    ofs = maxofs;
+            }
+            else                /* a[hint - ofs] <= key */
+                break;
+        }
+        if (ofs > maxofs)
+            ofs = maxofs;
+        /* Translate back to positive offsets relative to &a[0]. */
+        k = lastofs;
+        lastofs = hint - ofs;
+        ofs = hint - k;
+    }
+    else {
+        /* a[hint] <= key -- gallop right, until
+         * a[hint + lastofs] <= key < a[hint + ofs]
+        */
+        const Py_ssize_t maxofs = n - hint;             /* &a[n-1] is highest */
+        while (ofs < maxofs) {
+            IFLT(key, a[ofs])
+                break;
+            /* a[hint + ofs] <= key */
+            lastofs = ofs;
+            ofs = (ofs << 1) + 1;
+            if (ofs <= 0)               /* int overflow */
+                ofs = maxofs;
+        }
+        if (ofs > maxofs)
+            ofs = maxofs;
+        /* Translate back to offsets relative to &a[0]. */
+        lastofs += hint;
+        ofs += hint;
+    }
+    a -= hint;
 
-	assert(-1 <= lastofs && lastofs < ofs && ofs <= n);
-	/* Now a[lastofs] <= key < a[ofs], so key belongs somewhere to the
-	 * right of lastofs but no farther right than ofs.  Do a binary
-	 * search, with invariant a[lastofs-1] <= key < a[ofs].
-	 */
-	++lastofs;
-	while (lastofs < ofs) {
-		Py_ssize_t m = lastofs + ((ofs - lastofs) >> 1);
+    assert(-1 <= lastofs && lastofs < ofs && ofs <= n);
+    /* Now a[lastofs] <= key < a[ofs], so key belongs somewhere to the
+     * right of lastofs but no farther right than ofs.  Do a binary
+     * search, with invariant a[lastofs-1] <= key < a[ofs].
+     */
+    ++lastofs;
+    while (lastofs < ofs) {
+        Py_ssize_t m = lastofs + ((ofs - lastofs) >> 1);
 
-		IFLT(key, a[m])
-			ofs = m;	/* key < a[m] */
-		else
-			lastofs = m+1;	/* a[m] <= key */
-	}
-	assert(lastofs == ofs);		/* so a[ofs-1] <= key < a[ofs] */
-	return ofs;
+        IFLT(key, a[m])
+            ofs = m;                    /* key < a[m] */
+        else
+            lastofs = m+1;              /* a[m] <= key */
+    }
+    assert(lastofs == ofs);             /* so a[ofs-1] <= key < a[ofs] */
+    return ofs;
 
 fail:
-	return -1;
+    return -1;
 }
 
 /* The maximum number of entries in a MergeState's pending-runs stack.
@@ -1357,52 +1357,52 @@
  * a convenient way to pass state around among the helper functions.
  */
 struct s_slice {
-	PyObject **base;
-	Py_ssize_t len;
+    PyObject **base;
+    Py_ssize_t len;
 };
 
 typedef struct s_MergeState {
-	/* The user-supplied comparison function. or NULL if none given. */
-	PyObject *compare;
+    /* The user-supplied comparison function. or NULL if none given. */
+    PyObject *compare;
 
-	/* This controls when we get *into* galloping mode.  It's initialized
-	 * to MIN_GALLOP.  merge_lo and merge_hi tend to nudge it higher for
-	 * random data, and lower for highly structured data.
-	 */
-	Py_ssize_t min_gallop;
+    /* This controls when we get *into* galloping mode.  It's initialized
+     * to MIN_GALLOP.  merge_lo and merge_hi tend to nudge it higher for
+     * random data, and lower for highly structured data.
+     */
+    Py_ssize_t min_gallop;
 
-	/* 'a' is temp storage to help with merges.  It contains room for
-	 * alloced entries.
-	 */
-	PyObject **a;	/* may point to temparray below */
-	Py_ssize_t alloced;
+    /* 'a' is temp storage to help with merges.  It contains room for
+     * alloced entries.
+     */
+    PyObject **a;       /* may point to temparray below */
+    Py_ssize_t alloced;
 
-	/* A stack of n pending runs yet to be merged.  Run #i starts at
-	 * address base[i] and extends for len[i] elements.  It's always
-	 * true (so long as the indices are in bounds) that
-	 *
-	 *     pending[i].base + pending[i].len == pending[i+1].base
-	 *
-	 * so we could cut the storage for this, but it's a minor amount,
-	 * and keeping all the info explicit simplifies the code.
-	 */
-	int n;
-	struct s_slice pending[MAX_MERGE_PENDING];
+    /* A stack of n pending runs yet to be merged.  Run #i starts at
+     * address base[i] and extends for len[i] elements.  It's always
+     * true (so long as the indices are in bounds) that
+     *
+     *     pending[i].base + pending[i].len == pending[i+1].base
+     *
+     * so we could cut the storage for this, but it's a minor amount,
+     * and keeping all the info explicit simplifies the code.
+     */
+    int n;
+    struct s_slice pending[MAX_MERGE_PENDING];
 
-	/* 'a' points to this when possible, rather than muck with malloc. */
-	PyObject *temparray[MERGESTATE_TEMP_SIZE];
+    /* 'a' points to this when possible, rather than muck with malloc. */
+    PyObject *temparray[MERGESTATE_TEMP_SIZE];
 } MergeState;
 
 /* Conceptually a MergeState's constructor. */
 static void
 merge_init(MergeState *ms, PyObject *compare)
 {
-	assert(ms != NULL);
-	ms->compare = compare;
-	ms->a = ms->temparray;
-	ms->alloced = MERGESTATE_TEMP_SIZE;
-	ms->n = 0;
-	ms->min_gallop = MIN_GALLOP;
+    assert(ms != NULL);
+    ms->compare = compare;
+    ms->a = ms->temparray;
+    ms->alloced = MERGESTATE_TEMP_SIZE;
+    ms->n = 0;
+    ms->min_gallop = MIN_GALLOP;
 }
 
 /* Free all the temp memory owned by the MergeState.  This must be called
@@ -1412,11 +1412,11 @@
 static void
 merge_freemem(MergeState *ms)
 {
-	assert(ms != NULL);
-	if (ms->a != ms->temparray)
-		PyMem_Free(ms->a);
-	ms->a = ms->temparray;
-	ms->alloced = MERGESTATE_TEMP_SIZE;
+    assert(ms != NULL);
+    if (ms->a != ms->temparray)
+        PyMem_Free(ms->a);
+    ms->a = ms->temparray;
+    ms->alloced = MERGESTATE_TEMP_SIZE;
 }
 
 /* Ensure enough temp memory for 'need' array slots is available.
@@ -1425,28 +1425,28 @@
 static int
 merge_getmem(MergeState *ms, Py_ssize_t need)
 {
-	assert(ms != NULL);
-	if (need <= ms->alloced)
-		return 0;
-	/* Don't realloc!  That can cost cycles to copy the old data, but
-	 * we don't care what's in the block.
-	 */
-	merge_freemem(ms);
-	if ((size_t)need > PY_SSIZE_T_MAX / sizeof(PyObject*)) {
-		PyErr_NoMemory();
-		return -1;
-	}
-	ms->a = (PyObject **)PyMem_Malloc(need * sizeof(PyObject*));
-	if (ms->a) {
-		ms->alloced = need;
-		return 0;
-	}
-	PyErr_NoMemory();
-	merge_freemem(ms);	/* reset to sane state */
-	return -1;
+    assert(ms != NULL);
+    if (need <= ms->alloced)
+        return 0;
+    /* Don't realloc!  That can cost cycles to copy the old data, but
+     * we don't care what's in the block.
+     */
+    merge_freemem(ms);
+    if ((size_t)need > PY_SSIZE_T_MAX / sizeof(PyObject*)) {
+        PyErr_NoMemory();
+        return -1;
+    }
+    ms->a = (PyObject **)PyMem_Malloc(need * sizeof(PyObject*));
+    if (ms->a) {
+        ms->alloced = need;
+        return 0;
+    }
+    PyErr_NoMemory();
+    merge_freemem(ms);          /* reset to sane state */
+    return -1;
 }
-#define MERGE_GETMEM(MS, NEED) ((NEED) <= (MS)->alloced ? 0 :	\
-				merge_getmem(MS, NEED))
+#define MERGE_GETMEM(MS, NEED) ((NEED) <= (MS)->alloced ? 0 :   \
+                                merge_getmem(MS, NEED))
 
 /* Merge the na elements starting at pa with the nb elements starting at pb
  * in a stable way, in-place.  na and nb must be > 0, and pa + na == pb.
@@ -1458,127 +1458,127 @@
 merge_lo(MergeState *ms, PyObject **pa, Py_ssize_t na,
                          PyObject **pb, Py_ssize_t nb)
 {
-	Py_ssize_t k;
-	PyObject *compare;
-	PyObject **dest;
-	int result = -1;	/* guilty until proved innocent */
-	Py_ssize_t min_gallop;
+    Py_ssize_t k;
+    PyObject *compare;
+    PyObject **dest;
+    int result = -1;            /* guilty until proved innocent */
+    Py_ssize_t min_gallop;
 
-	assert(ms && pa && pb && na > 0 && nb > 0 && pa + na == pb);
-	if (MERGE_GETMEM(ms, na) < 0)
-		return -1;
-	memcpy(ms->a, pa, na * sizeof(PyObject*));
-	dest = pa;
-	pa = ms->a;
+    assert(ms && pa && pb && na > 0 && nb > 0 && pa + na == pb);
+    if (MERGE_GETMEM(ms, na) < 0)
+        return -1;
+    memcpy(ms->a, pa, na * sizeof(PyObject*));
+    dest = pa;
+    pa = ms->a;
 
-	*dest++ = *pb++;
-	--nb;
-	if (nb == 0)
-		goto Succeed;
-	if (na == 1)
-		goto CopyB;
+    *dest++ = *pb++;
+    --nb;
+    if (nb == 0)
+        goto Succeed;
+    if (na == 1)
+        goto CopyB;
 
-	min_gallop = ms->min_gallop;
-	compare = ms->compare;
-	for (;;) {
-		Py_ssize_t acount = 0;	/* # of times A won in a row */
-		Py_ssize_t bcount = 0;	/* # of times B won in a row */
+    min_gallop = ms->min_gallop;
+    compare = ms->compare;
+    for (;;) {
+        Py_ssize_t acount = 0;          /* # of times A won in a row */
+        Py_ssize_t bcount = 0;          /* # of times B won in a row */
 
-		/* Do the straightforward thing until (if ever) one run
-		 * appears to win consistently.
-		 */
- 		for (;;) {
- 			assert(na > 1 && nb > 0);
-	 		k = ISLT(*pb, *pa, compare);
-			if (k) {
-				if (k < 0)
-					goto Fail;
-				*dest++ = *pb++;
-				++bcount;
-				acount = 0;
-				--nb;
-				if (nb == 0)
-					goto Succeed;
-				if (bcount >= min_gallop)
-					break;
-			}
-			else {
-				*dest++ = *pa++;
-				++acount;
-				bcount = 0;
-				--na;
-				if (na == 1)
-					goto CopyB;
-				if (acount >= min_gallop)
-					break;
-			}
- 		}
+        /* Do the straightforward thing until (if ever) one run
+         * appears to win consistently.
+         */
+        for (;;) {
+            assert(na > 1 && nb > 0);
+            k = ISLT(*pb, *pa, compare);
+            if (k) {
+                if (k < 0)
+                    goto Fail;
+                *dest++ = *pb++;
+                ++bcount;
+                acount = 0;
+                --nb;
+                if (nb == 0)
+                    goto Succeed;
+                if (bcount >= min_gallop)
+                    break;
+            }
+            else {
+                *dest++ = *pa++;
+                ++acount;
+                bcount = 0;
+                --na;
+                if (na == 1)
+                    goto CopyB;
+                if (acount >= min_gallop)
+                    break;
+            }
+        }
 
-		/* One run is winning so consistently that galloping may
-		 * be a huge win.  So try that, and continue galloping until
-		 * (if ever) neither run appears to be winning consistently
-		 * anymore.
-		 */
-		++min_gallop;
-		do {
- 			assert(na > 1 && nb > 0);
-			min_gallop -= min_gallop > 1;
-	 		ms->min_gallop = min_gallop;
-			k = gallop_right(*pb, pa, na, 0, compare);
-			acount = k;
-			if (k) {
-				if (k < 0)
-					goto Fail;
-				memcpy(dest, pa, k * sizeof(PyObject *));
-				dest += k;
-				pa += k;
-				na -= k;
-				if (na == 1)
-					goto CopyB;
-				/* na==0 is impossible now if the comparison
-				 * function is consistent, but we can't assume
-				 * that it is.
-				 */
-				if (na == 0)
-					goto Succeed;
-			}
-			*dest++ = *pb++;
-			--nb;
-			if (nb == 0)
-				goto Succeed;
+        /* One run is winning so consistently that galloping may
+         * be a huge win.  So try that, and continue galloping until
+         * (if ever) neither run appears to be winning consistently
+         * anymore.
+         */
+        ++min_gallop;
+        do {
+            assert(na > 1 && nb > 0);
+            min_gallop -= min_gallop > 1;
+            ms->min_gallop = min_gallop;
+            k = gallop_right(*pb, pa, na, 0, compare);
+            acount = k;
+            if (k) {
+                if (k < 0)
+                    goto Fail;
+                memcpy(dest, pa, k * sizeof(PyObject *));
+                dest += k;
+                pa += k;
+                na -= k;
+                if (na == 1)
+                    goto CopyB;
+                /* na==0 is impossible now if the comparison
+                 * function is consistent, but we can't assume
+                 * that it is.
+                 */
+                if (na == 0)
+                    goto Succeed;
+            }
+            *dest++ = *pb++;
+            --nb;
+            if (nb == 0)
+                goto Succeed;
 
- 			k = gallop_left(*pa, pb, nb, 0, compare);
- 			bcount = k;
-			if (k) {
-				if (k < 0)
-					goto Fail;
-				memmove(dest, pb, k * sizeof(PyObject *));
-				dest += k;
-				pb += k;
-				nb -= k;
-				if (nb == 0)
-					goto Succeed;
-			}
-			*dest++ = *pa++;
-			--na;
-			if (na == 1)
-				goto CopyB;
- 		} while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);
- 		++min_gallop;	/* penalize it for leaving galloping mode */
- 		ms->min_gallop = min_gallop;
- 	}
+            k = gallop_left(*pa, pb, nb, 0, compare);
+            bcount = k;
+            if (k) {
+                if (k < 0)
+                    goto Fail;
+                memmove(dest, pb, k * sizeof(PyObject *));
+                dest += k;
+                pb += k;
+                nb -= k;
+                if (nb == 0)
+                    goto Succeed;
+            }
+            *dest++ = *pa++;
+            --na;
+            if (na == 1)
+                goto CopyB;
+        } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);
+        ++min_gallop;           /* penalize it for leaving galloping mode */
+        ms->min_gallop = min_gallop;
+    }
 Succeed:
-	result = 0;
+    result = 0;
 Fail:
-	if (na)
-		memcpy(dest, pa, na * sizeof(PyObject*));
-	return result;
+    if (na)
+        memcpy(dest, pa, na * sizeof(PyObject*));
+    return result;
 CopyB:
-	assert(na == 1 && nb > 0);
-	/* The last element of pa belongs at the end of the merge. */
-	memmove(dest, pb, nb * sizeof(PyObject *));
-	dest[nb] = *pa;
-	return 0;
+    assert(na == 1 && nb > 0);
+    /* The last element of pa belongs at the end of the merge. */
+    memmove(dest, pb, nb * sizeof(PyObject *));
+    dest[nb] = *pa;
+    return 0;
 }
 
 /* Merge the na elements starting at pa with the nb elements starting at pb
@@ -1590,136 +1590,136 @@
 static Py_ssize_t
 merge_hi(MergeState *ms, PyObject **pa, Py_ssize_t na, PyObject **pb, Py_ssize_t nb)
 {
-	Py_ssize_t k;
-	PyObject *compare;
-	PyObject **dest;
-	int result = -1;	/* guilty until proved innocent */
-	PyObject **basea;
-	PyObject **baseb;
-	Py_ssize_t min_gallop;
+    Py_ssize_t k;
+    PyObject *compare;
+    PyObject **dest;
+    int result = -1;            /* guilty until proved innocent */
+    PyObject **basea;
+    PyObject **baseb;
+    Py_ssize_t min_gallop;
 
-	assert(ms && pa && pb && na > 0 && nb > 0 && pa + na == pb);
-	if (MERGE_GETMEM(ms, nb) < 0)
-		return -1;
-	dest = pb + nb - 1;
-	memcpy(ms->a, pb, nb * sizeof(PyObject*));
-	basea = pa;
-	baseb = ms->a;
-	pb = ms->a + nb - 1;
-	pa += na - 1;
+    assert(ms && pa && pb && na > 0 && nb > 0 && pa + na == pb);
+    if (MERGE_GETMEM(ms, nb) < 0)
+        return -1;
+    dest = pb + nb - 1;
+    memcpy(ms->a, pb, nb * sizeof(PyObject*));
+    basea = pa;
+    baseb = ms->a;
+    pb = ms->a + nb - 1;
+    pa += na - 1;
 
-	*dest-- = *pa--;
-	--na;
-	if (na == 0)
-		goto Succeed;
-	if (nb == 1)
-		goto CopyA;
+    *dest-- = *pa--;
+    --na;
+    if (na == 0)
+        goto Succeed;
+    if (nb == 1)
+        goto CopyA;
 
-	min_gallop = ms->min_gallop;
-	compare = ms->compare;
-	for (;;) {
-		Py_ssize_t acount = 0;	/* # of times A won in a row */
-		Py_ssize_t bcount = 0;	/* # of times B won in a row */
+    min_gallop = ms->min_gallop;
+    compare = ms->compare;
+    for (;;) {
+        Py_ssize_t acount = 0;          /* # of times A won in a row */
+        Py_ssize_t bcount = 0;          /* # of times B won in a row */
 
-		/* Do the straightforward thing until (if ever) one run
-		 * appears to win consistently.
-		 */
- 		for (;;) {
- 			assert(na > 0 && nb > 1);
-	 		k = ISLT(*pb, *pa, compare);
-			if (k) {
-				if (k < 0)
-					goto Fail;
-				*dest-- = *pa--;
-				++acount;
-				bcount = 0;
-				--na;
-				if (na == 0)
-					goto Succeed;
-				if (acount >= min_gallop)
-					break;
-			}
-			else {
-				*dest-- = *pb--;
-				++bcount;
-				acount = 0;
-				--nb;
-				if (nb == 1)
-					goto CopyA;
-				if (bcount >= min_gallop)
-					break;
-			}
- 		}
+        /* Do the straightforward thing until (if ever) one run
+         * appears to win consistently.
+         */
+        for (;;) {
+            assert(na > 0 && nb > 1);
+            k = ISLT(*pb, *pa, compare);
+            if (k) {
+                if (k < 0)
+                    goto Fail;
+                *dest-- = *pa--;
+                ++acount;
+                bcount = 0;
+                --na;
+                if (na == 0)
+                    goto Succeed;
+                if (acount >= min_gallop)
+                    break;
+            }
+            else {
+                *dest-- = *pb--;
+                ++bcount;
+                acount = 0;
+                --nb;
+                if (nb == 1)
+                    goto CopyA;
+                if (bcount >= min_gallop)
+                    break;
+            }
+        }
 
-		/* One run is winning so consistently that galloping may
-		 * be a huge win.  So try that, and continue galloping until
-		 * (if ever) neither run appears to be winning consistently
-		 * anymore.
-		 */
-		++min_gallop;
-		do {
- 			assert(na > 0 && nb > 1);
-			min_gallop -= min_gallop > 1;
-	 		ms->min_gallop = min_gallop;
-			k = gallop_right(*pb, basea, na, na-1, compare);
-			if (k < 0)
-				goto Fail;
-			k = na - k;
-			acount = k;
-			if (k) {
-				dest -= k;
-				pa -= k;
-				memmove(dest+1, pa+1, k * sizeof(PyObject *));
-				na -= k;
-				if (na == 0)
-					goto Succeed;
-			}
-			*dest-- = *pb--;
-			--nb;
-			if (nb == 1)
-				goto CopyA;
+        /* One run is winning so consistently that galloping may
+         * be a huge win.  So try that, and continue galloping until
+         * (if ever) neither run appears to be winning consistently
+         * anymore.
+         */
+        ++min_gallop;
+        do {
+            assert(na > 0 && nb > 1);
+            min_gallop -= min_gallop > 1;
+            ms->min_gallop = min_gallop;
+            k = gallop_right(*pb, basea, na, na-1, compare);
+            if (k < 0)
+                goto Fail;
+            k = na - k;
+            acount = k;
+            if (k) {
+                dest -= k;
+                pa -= k;
+                memmove(dest+1, pa+1, k * sizeof(PyObject *));
+                na -= k;
+                if (na == 0)
+                    goto Succeed;
+            }
+            *dest-- = *pb--;
+            --nb;
+            if (nb == 1)
+                goto CopyA;
 
- 			k = gallop_left(*pa, baseb, nb, nb-1, compare);
-			if (k < 0)
-				goto Fail;
-			k = nb - k;
-			bcount = k;
-			if (k) {
-				dest -= k;
-				pb -= k;
-				memcpy(dest+1, pb+1, k * sizeof(PyObject *));
-				nb -= k;
-				if (nb == 1)
-					goto CopyA;
-				/* nb==0 is impossible now if the comparison
-				 * function is consistent, but we can't assume
-				 * that it is.
-				 */
-				if (nb == 0)
-					goto Succeed;
-			}
-			*dest-- = *pa--;
-			--na;
-			if (na == 0)
-				goto Succeed;
- 		} while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);
- 		++min_gallop;	/* penalize it for leaving galloping mode */
- 		ms->min_gallop = min_gallop;
- 	}
+            k = gallop_left(*pa, baseb, nb, nb-1, compare);
+            if (k < 0)
+                goto Fail;
+            k = nb - k;
+            bcount = k;
+            if (k) {
+                dest -= k;
+                pb -= k;
+                memcpy(dest+1, pb+1, k * sizeof(PyObject *));
+                nb -= k;
+                if (nb == 1)
+                    goto CopyA;
+                /* nb==0 is impossible now if the comparison
+                 * function is consistent, but we can't assume
+                 * that it is.
+                 */
+                if (nb == 0)
+                    goto Succeed;
+            }
+            *dest-- = *pa--;
+            --na;
+            if (na == 0)
+                goto Succeed;
+        } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP);
+        ++min_gallop;           /* penalize it for leaving galloping mode */
+        ms->min_gallop = min_gallop;
+    }
 Succeed:
-	result = 0;
+    result = 0;
 Fail:
-	if (nb)
-		memcpy(dest-(nb-1), baseb, nb * sizeof(PyObject*));
-	return result;
+    if (nb)
+        memcpy(dest-(nb-1), baseb, nb * sizeof(PyObject*));
+    return result;
 CopyA:
-	assert(nb == 1 && na > 0);
-	/* The first element of pb belongs at the front of the merge. */
-	dest -= na;
-	pa -= na;
-	memmove(dest+1, pa+1, na * sizeof(PyObject *));
-	*dest = *pb;
-	return 0;
+    assert(nb == 1 && na > 0);
+    /* The first element of pb belongs at the front of the merge. */
+    dest -= na;
+    pa -= na;
+    memmove(dest+1, pa+1, na * sizeof(PyObject *));
+    *dest = *pb;
+    return 0;
 }
 
 /* Merge the two runs at stack indices i and i+1.
@@ -1728,58 +1728,58 @@
 static Py_ssize_t
 merge_at(MergeState *ms, Py_ssize_t i)
 {
-	PyObject **pa, **pb;
-	Py_ssize_t na, nb;
-	Py_ssize_t k;
-	PyObject *compare;
+    PyObject **pa, **pb;
+    Py_ssize_t na, nb;
+    Py_ssize_t k;
+    PyObject *compare;
 
-	assert(ms != NULL);
-	assert(ms->n >= 2);
-	assert(i >= 0);
-	assert(i == ms->n - 2 || i == ms->n - 3);
+    assert(ms != NULL);
+    assert(ms->n >= 2);
+    assert(i >= 0);
+    assert(i == ms->n - 2 || i == ms->n - 3);
 
-	pa = ms->pending[i].base;
-	na = ms->pending[i].len;
-	pb = ms->pending[i+1].base;
-	nb = ms->pending[i+1].len;
-	assert(na > 0 && nb > 0);
-	assert(pa + na == pb);
+    pa = ms->pending[i].base;
+    na = ms->pending[i].len;
+    pb = ms->pending[i+1].base;
+    nb = ms->pending[i+1].len;
+    assert(na > 0 && nb > 0);
+    assert(pa + na == pb);
 
-	/* Record the length of the combined runs; if i is the 3rd-last
-	 * run now, also slide over the last run (which isn't involved
-	 * in this merge).  The current run i+1 goes away in any case.
-	 */
-	ms->pending[i].len = na + nb;
-	if (i == ms->n - 3)
-		ms->pending[i+1] = ms->pending[i+2];
-	--ms->n;
+    /* Record the length of the combined runs; if i is the 3rd-last
+     * run now, also slide over the last run (which isn't involved
+     * in this merge).  The current run i+1 goes away in any case.
+     */
+    ms->pending[i].len = na + nb;
+    if (i == ms->n - 3)
+        ms->pending[i+1] = ms->pending[i+2];
+    --ms->n;
 
-	/* Where does b start in a?  Elements in a before that can be
-	 * ignored (already in place).
-	 */
-	compare = ms->compare;
-	k = gallop_right(*pb, pa, na, 0, compare);
-	if (k < 0)
-		return -1;
-	pa += k;
-	na -= k;
-	if (na == 0)
-		return 0;
+    /* Where does b start in a?  Elements in a before that can be
+     * ignored (already in place).
+     */
+    compare = ms->compare;
+    k = gallop_right(*pb, pa, na, 0, compare);
+    if (k < 0)
+        return -1;
+    pa += k;
+    na -= k;
+    if (na == 0)
+        return 0;
 
-	/* Where does a end in b?  Elements in b after that can be
-	 * ignored (already in place).
-	 */
-	nb = gallop_left(pa[na-1], pb, nb, nb-1, compare);
-	if (nb <= 0)
-		return nb;
+    /* Where does a end in b?  Elements in b after that can be
+     * ignored (already in place).
+     */
+    nb = gallop_left(pa[na-1], pb, nb, nb-1, compare);
+    if (nb <= 0)
+        return nb;
 
-	/* Merge what remains of the runs, using a temp array with
-	 * min(na, nb) elements.
-	 */
-	if (na <= nb)
-		return merge_lo(ms, pa, na, pb, nb);
-	else
-		return merge_hi(ms, pa, na, pb, nb);
+    /* Merge what remains of the runs, using a temp array with
+     * min(na, nb) elements.
+     */
+    if (na <= nb)
+        return merge_lo(ms, pa, na, pb, nb);
+    else
+        return merge_hi(ms, pa, na, pb, nb);
 }
 
 /* Examine the stack of runs waiting to be merged, merging adjacent runs
@@ -1795,25 +1795,25 @@
 static int
 merge_collapse(MergeState *ms)
 {
-	struct s_slice *p = ms->pending;
+    struct s_slice *p = ms->pending;
 
-	assert(ms);
-	while (ms->n > 1) {
-		Py_ssize_t n = ms->n - 2;
-		if (n > 0 && p[n-1].len <= p[n].len + p[n+1].len) {
-		    	if (p[n-1].len < p[n+1].len)
-		    		--n;
-			if (merge_at(ms, n) < 0)
-				return -1;
-		}
-		else if (p[n].len <= p[n+1].len) {
-			 if (merge_at(ms, n) < 0)
-			 	return -1;
-		}
-		else
-			break;
-	}
-	return 0;
+    assert(ms);
+    while (ms->n > 1) {
+        Py_ssize_t n = ms->n - 2;
+        if (n > 0 && p[n-1].len <= p[n].len + p[n+1].len) {
+            if (p[n-1].len < p[n+1].len)
+                --n;
+            if (merge_at(ms, n) < 0)
+                return -1;
+        }
+        else if (p[n].len <= p[n+1].len) {
+                 if (merge_at(ms, n) < 0)
+                        return -1;
+        }
+        else
+            break;
+    }
+    return 0;
 }
 
 /* Regardless of invariants, merge all runs on the stack until only one
@@ -1824,17 +1824,17 @@
 static int
 merge_force_collapse(MergeState *ms)
 {
-	struct s_slice *p = ms->pending;
+    struct s_slice *p = ms->pending;
 
-	assert(ms);
-	while (ms->n > 1) {
-		Py_ssize_t n = ms->n - 2;
-		if (n > 0 && p[n-1].len < p[n+1].len)
-			--n;
-		if (merge_at(ms, n) < 0)
-			return -1;
-	}
-	return 0;
+    assert(ms);
+    while (ms->n > 1) {
+        Py_ssize_t n = ms->n - 2;
+        if (n > 0 && p[n-1].len < p[n+1].len)
+            --n;
+        if (merge_at(ms, n) < 0)
+            return -1;
+    }
+    return 0;
 }
 
 /* Compute a good value for the minimum run length; natural runs shorter
@@ -1850,14 +1850,14 @@
 static Py_ssize_t
 merge_compute_minrun(Py_ssize_t n)
 {
-	Py_ssize_t r = 0;	/* becomes 1 if any 1 bits are shifted off */
+    Py_ssize_t r = 0;           /* becomes 1 if any 1 bits are shifted off */
 
-	assert(n >= 0);
-	while (n >= 64) {
-		r |= n & 1;
-		n >>= 1;
-	}
-	return n + r;
+    assert(n >= 0);
+    while (n >= 64) {
+        r |= n & 1;
+        n >>= 1;
+    }
+    return n + r;
 }
 
 /* Special wrapper to support stable sorting using the decorate-sort-undecorate
@@ -1868,9 +1868,9 @@
    the key instead of a full record. */
 
 typedef struct {
-	PyObject_HEAD
-	PyObject *key;
-	PyObject *value;
+    PyObject_HEAD
+    PyObject *key;
+    PyObject *value;
 } sortwrapperobject;
 
 PyDoc_STRVAR(sortwrapper_doc, "Object wrapper with a custom sort key.");
@@ -1880,52 +1880,52 @@
 sortwrapper_dealloc(sortwrapperobject *);
 
 static PyTypeObject sortwrapper_type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"sortwrapper",				/* tp_name */
-	sizeof(sortwrapperobject),		/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)sortwrapper_dealloc,	/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT |
-	Py_TPFLAGS_HAVE_RICHCOMPARE, 		/* tp_flags */
-	sortwrapper_doc,			/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	(richcmpfunc)sortwrapper_richcompare,	/* tp_richcompare */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "sortwrapper",                              /* tp_name */
+    sizeof(sortwrapperobject),                  /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)sortwrapper_dealloc,            /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT |
+    Py_TPFLAGS_HAVE_RICHCOMPARE,                /* tp_flags */
+    sortwrapper_doc,                            /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    (richcmpfunc)sortwrapper_richcompare,       /* tp_richcompare */
 };
 
 
 static PyObject *
 sortwrapper_richcompare(sortwrapperobject *a, sortwrapperobject *b, int op)
 {
-	if (!PyObject_TypeCheck(b, &sortwrapper_type)) {
-		PyErr_SetString(PyExc_TypeError,
-			"expected a sortwrapperobject");
-		return NULL;
-	}
-	return PyObject_RichCompare(a->key, b->key, op);
+    if (!PyObject_TypeCheck(b, &sortwrapper_type)) {
+        PyErr_SetString(PyExc_TypeError,
+            "expected a sortwrapperobject");
+        return NULL;
+    }
+    return PyObject_RichCompare(a->key, b->key, op);
 }
 
 static void
 sortwrapper_dealloc(sortwrapperobject *so)
 {
-	Py_XDECREF(so->key);
-	Py_XDECREF(so->value);
-	PyObject_Del(so);
+    Py_XDECREF(so->key);
+    Py_XDECREF(so->value);
+    PyObject_Del(so);
 }
 
 /* Returns a new reference to a sortwrapper.
@@ -1934,30 +1934,30 @@
 static PyObject *
 build_sortwrapper(PyObject *key, PyObject *value)
 {
-	sortwrapperobject *so;
+    sortwrapperobject *so;
 
-	so = PyObject_New(sortwrapperobject, &sortwrapper_type);
-	if (so == NULL)
-		return NULL;
-	so->key = key;
-	so->value = value;
-	return (PyObject *)so;
+    so = PyObject_New(sortwrapperobject, &sortwrapper_type);
+    if (so == NULL)
+        return NULL;
+    so->key = key;
+    so->value = value;
+    return (PyObject *)so;
 }
 
 /* Returns a new reference to the value underlying the wrapper. */
 static PyObject *
 sortwrapper_getvalue(PyObject *so)
 {
-	PyObject *value;
+    PyObject *value;
 
-	if (!PyObject_TypeCheck(so, &sortwrapper_type)) {
-		PyErr_SetString(PyExc_TypeError,
-			"expected a sortwrapperobject");
-		return NULL;
-	}
-	value = ((sortwrapperobject *)so)->value;
-	Py_INCREF(value);
-	return value;
+    if (!PyObject_TypeCheck(so, &sortwrapper_type)) {
+        PyErr_SetString(PyExc_TypeError,
+            "expected a sortwrapperobject");
+        return NULL;
+    }
+    value = ((sortwrapperobject *)so)->value;
+    Py_INCREF(value);
+    return value;
 }
 
 /* Wrapper for user specified cmp functions in combination with a
@@ -1965,73 +1965,73 @@
    with the actual key instead of the sortwrapper */
 
 typedef struct {
-	PyObject_HEAD
-	PyObject *func;
+    PyObject_HEAD
+    PyObject *func;
 } cmpwrapperobject;
 
 static void
 cmpwrapper_dealloc(cmpwrapperobject *co)
 {
-	Py_XDECREF(co->func);
-	PyObject_Del(co);
+    Py_XDECREF(co->func);
+    PyObject_Del(co);
 }
 
 static PyObject *
 cmpwrapper_call(cmpwrapperobject *co, PyObject *args, PyObject *kwds)
 {
-	PyObject *x, *y, *xx, *yy;
+    PyObject *x, *y, *xx, *yy;
 
-	if (!PyArg_UnpackTuple(args, "", 2, 2, &x, &y))
-		return NULL;
-	if (!PyObject_TypeCheck(x, &sortwrapper_type) ||
-	    !PyObject_TypeCheck(y, &sortwrapper_type)) {
-		PyErr_SetString(PyExc_TypeError,
-			"expected a sortwrapperobject");
-		return NULL;
-	}
-	xx = ((sortwrapperobject *)x)->key;
-	yy = ((sortwrapperobject *)y)->key;
-	return PyObject_CallFunctionObjArgs(co->func, xx, yy, NULL);
+    if (!PyArg_UnpackTuple(args, "", 2, 2, &x, &y))
+        return NULL;
+    if (!PyObject_TypeCheck(x, &sortwrapper_type) ||
+        !PyObject_TypeCheck(y, &sortwrapper_type)) {
+        PyErr_SetString(PyExc_TypeError,
+            "expected a sortwrapperobject");
+        return NULL;
+    }
+    xx = ((sortwrapperobject *)x)->key;
+    yy = ((sortwrapperobject *)y)->key;
+    return PyObject_CallFunctionObjArgs(co->func, xx, yy, NULL);
 }
 
 PyDoc_STRVAR(cmpwrapper_doc, "cmp() wrapper for sort with custom keys.");
 
 static PyTypeObject cmpwrapper_type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"cmpwrapper",				/* tp_name */
-	sizeof(cmpwrapperobject),		/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)cmpwrapper_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	(ternaryfunc)cmpwrapper_call,		/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,			/* tp_flags */
-	cmpwrapper_doc,				/* tp_doc */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "cmpwrapper",                               /* tp_name */
+    sizeof(cmpwrapperobject),                   /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)cmpwrapper_dealloc,             /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    (ternaryfunc)cmpwrapper_call,               /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,                         /* tp_flags */
+    cmpwrapper_doc,                             /* tp_doc */
 };
 
 static PyObject *
 build_cmpwrapper(PyObject *cmpfunc)
 {
-	cmpwrapperobject *co;
+    cmpwrapperobject *co;
 
-	co = PyObject_New(cmpwrapperobject, &cmpwrapper_type);
-	if (co == NULL)
-		return NULL;
-	Py_INCREF(cmpfunc);
-	co->func = cmpfunc;
-	return (PyObject *)co;
+    co = PyObject_New(cmpwrapperobject, &cmpwrapper_type);
+    if (co == NULL)
+        return NULL;
+    Py_INCREF(cmpfunc);
+    co->func = cmpfunc;
+    return (PyObject *)co;
 }
 
 /* An adaptive, stable, natural mergesort.  See listsort.txt.
@@ -2042,171 +2042,171 @@
 static PyObject *
 listsort(PyListObject *self, PyObject *args, PyObject *kwds)
 {
-	MergeState ms;
-	PyObject **lo, **hi;
-	Py_ssize_t nremaining;
-	Py_ssize_t minrun;
-	Py_ssize_t saved_ob_size, saved_allocated;
-	PyObject **saved_ob_item;
-	PyObject **final_ob_item;
-	PyObject *compare = NULL;
-	PyObject *result = NULL;	/* guilty until proved innocent */
-	int reverse = 0;
-	PyObject *keyfunc = NULL;
-	Py_ssize_t i;
-	PyObject *key, *value, *kvpair;
-	static char *kwlist[] = {"cmp", "key", "reverse", 0};
+    MergeState ms;
+    PyObject **lo, **hi;
+    Py_ssize_t nremaining;
+    Py_ssize_t minrun;
+    Py_ssize_t saved_ob_size, saved_allocated;
+    PyObject **saved_ob_item;
+    PyObject **final_ob_item;
+    PyObject *compare = NULL;
+    PyObject *result = NULL;            /* guilty until proved innocent */
+    int reverse = 0;
+    PyObject *keyfunc = NULL;
+    Py_ssize_t i;
+    PyObject *key, *value, *kvpair;
+    static char *kwlist[] = {"cmp", "key", "reverse", 0};
 
-	assert(self != NULL);
-	assert (PyList_Check(self));
-	if (args != NULL) {
-		if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOi:sort",
-			kwlist, &compare, &keyfunc, &reverse))
-			return NULL;
-	}
-	if (compare == Py_None)
-		compare = NULL;
-	if (compare != NULL && 
-	    PyErr_WarnPy3k("the cmp argument is not supported in 3.x", 1) < 0)
-		return NULL;
-	if (keyfunc == Py_None)
-		keyfunc = NULL;
-	if (compare != NULL && keyfunc != NULL) {
-		compare = build_cmpwrapper(compare);
-		if (compare == NULL)
-			return NULL;
-	} else
-		Py_XINCREF(compare);
+    assert(self != NULL);
+    assert (PyList_Check(self));
+    if (args != NULL) {
+        if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOi:sort",
+            kwlist, &compare, &keyfunc, &reverse))
+            return NULL;
+    }
+    if (compare == Py_None)
+        compare = NULL;
+    if (compare != NULL &&
+        PyErr_WarnPy3k("the cmp argument is not supported in 3.x", 1) < 0)
+        return NULL;
+    if (keyfunc == Py_None)
+        keyfunc = NULL;
+    if (compare != NULL && keyfunc != NULL) {
+        compare = build_cmpwrapper(compare);
+        if (compare == NULL)
+            return NULL;
+    } else
+        Py_XINCREF(compare);
 
-	/* The list is temporarily made empty, so that mutations performed
-	 * by comparison functions can't affect the slice of memory we're
-	 * sorting (allowing mutations during sorting is a core-dump
-	 * factory, since ob_item may change).
-	 */
-	saved_ob_size = Py_SIZE(self);
-	saved_ob_item = self->ob_item;
-	saved_allocated = self->allocated;
-	Py_SIZE(self) = 0;
-	self->ob_item = NULL;
-	self->allocated = -1; /* any operation will reset it to >= 0 */
+    /* The list is temporarily made empty, so that mutations performed
+     * by comparison functions can't affect the slice of memory we're
+     * sorting (allowing mutations during sorting is a core-dump
+     * factory, since ob_item may change).
+     */
+    saved_ob_size = Py_SIZE(self);
+    saved_ob_item = self->ob_item;
+    saved_allocated = self->allocated;
+    Py_SIZE(self) = 0;
+    self->ob_item = NULL;
+    self->allocated = -1; /* any operation will reset it to >= 0 */
 
-	if (keyfunc != NULL) {
-		for (i=0 ; i < saved_ob_size ; i++) {
-			value = saved_ob_item[i];
-			key = PyObject_CallFunctionObjArgs(keyfunc, value,
-							   NULL);
-			if (key == NULL) {
-				for (i=i-1 ; i>=0 ; i--) {
-					kvpair = saved_ob_item[i];
-					value = sortwrapper_getvalue(kvpair);
-					saved_ob_item[i] = value;
-					Py_DECREF(kvpair);
-				}
-				goto dsu_fail;
-			}
-			kvpair = build_sortwrapper(key, value);
-			if (kvpair == NULL)
-				goto dsu_fail;
-			saved_ob_item[i] = kvpair;
-		}
-	}
+    if (keyfunc != NULL) {
+        for (i=0 ; i < saved_ob_size ; i++) {
+            value = saved_ob_item[i];
+            key = PyObject_CallFunctionObjArgs(keyfunc, value,
+                                               NULL);
+            if (key == NULL) {
+                for (i=i-1 ; i>=0 ; i--) {
+                    kvpair = saved_ob_item[i];
+                    value = sortwrapper_getvalue(kvpair);
+                    saved_ob_item[i] = value;
+                    Py_DECREF(kvpair);
+                }
+                goto dsu_fail;
+            }
+            kvpair = build_sortwrapper(key, value);
+            if (kvpair == NULL)
+                goto dsu_fail;
+            saved_ob_item[i] = kvpair;
+        }
+    }
 
-	/* Reverse sort stability achieved by initially reversing the list,
-	applying a stable forward sort, then reversing the final result. */
-	if (reverse && saved_ob_size > 1)
-		reverse_slice(saved_ob_item, saved_ob_item + saved_ob_size);
+    /* Reverse sort stability achieved by initially reversing the list,
+    applying a stable forward sort, then reversing the final result. */
+    if (reverse && saved_ob_size > 1)
+        reverse_slice(saved_ob_item, saved_ob_item + saved_ob_size);
 
-	merge_init(&ms, compare);
+    merge_init(&ms, compare);
 
-	nremaining = saved_ob_size;
-	if (nremaining < 2)
-		goto succeed;
+    nremaining = saved_ob_size;
+    if (nremaining < 2)
+        goto succeed;
 
-	/* March over the array once, left to right, finding natural runs,
-	 * and extending short natural runs to minrun elements.
-	 */
-	lo = saved_ob_item;
-	hi = lo + nremaining;
-	minrun = merge_compute_minrun(nremaining);
-	do {
-		int descending;
-		Py_ssize_t n;
+    /* March over the array once, left to right, finding natural runs,
+     * and extending short natural runs to minrun elements.
+     */
+    lo = saved_ob_item;
+    hi = lo + nremaining;
+    minrun = merge_compute_minrun(nremaining);
+    do {
+        int descending;
+        Py_ssize_t n;
 
-		/* Identify next run. */
-		n = count_run(lo, hi, compare, &descending);
-		if (n < 0)
-			goto fail;
-		if (descending)
-			reverse_slice(lo, lo + n);
-		/* If short, extend to min(minrun, nremaining). */
-		if (n < minrun) {
-			const Py_ssize_t force = nremaining <= minrun ?
-	 			  	  nremaining : minrun;
-			if (binarysort(lo, lo + force, lo + n, compare) < 0)
-				goto fail;
-			n = force;
-		}
-		/* Push run onto pending-runs stack, and maybe merge. */
-		assert(ms.n < MAX_MERGE_PENDING);
-		ms.pending[ms.n].base = lo;
-		ms.pending[ms.n].len = n;
-		++ms.n;
-		if (merge_collapse(&ms) < 0)
-			goto fail;
-		/* Advance to find next run. */
-		lo += n;
-		nremaining -= n;
-	} while (nremaining);
-	assert(lo == hi);
+        /* Identify next run. */
+        n = count_run(lo, hi, compare, &descending);
+        if (n < 0)
+            goto fail;
+        if (descending)
+            reverse_slice(lo, lo + n);
+        /* If short, extend to min(minrun, nremaining). */
+        if (n < minrun) {
+            const Py_ssize_t force = nremaining <= minrun ?
+                              nremaining : minrun;
+            if (binarysort(lo, lo + force, lo + n, compare) < 0)
+                goto fail;
+            n = force;
+        }
+        /* Push run onto pending-runs stack, and maybe merge. */
+        assert(ms.n < MAX_MERGE_PENDING);
+        ms.pending[ms.n].base = lo;
+        ms.pending[ms.n].len = n;
+        ++ms.n;
+        if (merge_collapse(&ms) < 0)
+            goto fail;
+        /* Advance to find next run. */
+        lo += n;
+        nremaining -= n;
+    } while (nremaining);
+    assert(lo == hi);
 
-	if (merge_force_collapse(&ms) < 0)
-		goto fail;
-	assert(ms.n == 1);
-	assert(ms.pending[0].base == saved_ob_item);
-	assert(ms.pending[0].len == saved_ob_size);
+    if (merge_force_collapse(&ms) < 0)
+        goto fail;
+    assert(ms.n == 1);
+    assert(ms.pending[0].base == saved_ob_item);
+    assert(ms.pending[0].len == saved_ob_size);
 
 succeed:
-	result = Py_None;
+    result = Py_None;
 fail:
-	if (keyfunc != NULL) {
-		for (i=0 ; i < saved_ob_size ; i++) {
-			kvpair = saved_ob_item[i];
-			value = sortwrapper_getvalue(kvpair);
-			saved_ob_item[i] = value;
-			Py_DECREF(kvpair);
-		}
-	}
+    if (keyfunc != NULL) {
+        for (i=0 ; i < saved_ob_size ; i++) {
+            kvpair = saved_ob_item[i];
+            value = sortwrapper_getvalue(kvpair);
+            saved_ob_item[i] = value;
+            Py_DECREF(kvpair);
+        }
+    }
 
-	if (self->allocated != -1 && result != NULL) {
-		/* The user mucked with the list during the sort,
-		 * and we don't already have another error to report.
-		 */
-		PyErr_SetString(PyExc_ValueError, "list modified during sort");
-		result = NULL;
-	}
+    if (self->allocated != -1 && result != NULL) {
+        /* The user mucked with the list during the sort,
+         * and we don't already have another error to report.
+         */
+        PyErr_SetString(PyExc_ValueError, "list modified during sort");
+        result = NULL;
+    }
 
-	if (reverse && saved_ob_size > 1)
-		reverse_slice(saved_ob_item, saved_ob_item + saved_ob_size);
+    if (reverse && saved_ob_size > 1)
+        reverse_slice(saved_ob_item, saved_ob_item + saved_ob_size);
 
-	merge_freemem(&ms);
+    merge_freemem(&ms);
 
 dsu_fail:
-	final_ob_item = self->ob_item;
-	i = Py_SIZE(self);
-	Py_SIZE(self) = saved_ob_size;
-	self->ob_item = saved_ob_item;
-	self->allocated = saved_allocated;
-	if (final_ob_item != NULL) {
-		/* we cannot use list_clear() for this because it does not
-		   guarantee that the list is really empty when it returns */
-		while (--i >= 0) {
-			Py_XDECREF(final_ob_item[i]);
-		}
-		PyMem_FREE(final_ob_item);
-	}
-	Py_XDECREF(compare);
-	Py_XINCREF(result);
-	return result;
+    final_ob_item = self->ob_item;
+    i = Py_SIZE(self);
+    Py_SIZE(self) = saved_ob_size;
+    self->ob_item = saved_ob_item;
+    self->allocated = saved_allocated;
+    if (final_ob_item != NULL) {
+        /* we cannot use list_clear() for this because it does not
+           guarantee that the list is really empty when it returns */
+        while (--i >= 0) {
+            Py_XDECREF(final_ob_item[i]);
+        }
+        PyMem_FREE(final_ob_item);
+    }
+    Py_XDECREF(compare);
+    Py_XINCREF(result);
+    return result;
 }
 #undef IFLT
 #undef ISLT
@@ -2214,262 +2214,262 @@
 int
 PyList_Sort(PyObject *v)
 {
-	if (v == NULL || !PyList_Check(v)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	v = listsort((PyListObject *)v, (PyObject *)NULL, (PyObject *)NULL);
-	if (v == NULL)
-		return -1;
-	Py_DECREF(v);
-	return 0;
+    if (v == NULL || !PyList_Check(v)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    v = listsort((PyListObject *)v, (PyObject *)NULL, (PyObject *)NULL);
+    if (v == NULL)
+        return -1;
+    Py_DECREF(v);
+    return 0;
 }
 
 static PyObject *
 listreverse(PyListObject *self)
 {
-	if (Py_SIZE(self) > 1)
-		reverse_slice(self->ob_item, self->ob_item + Py_SIZE(self));
-	Py_RETURN_NONE;
+    if (Py_SIZE(self) > 1)
+        reverse_slice(self->ob_item, self->ob_item + Py_SIZE(self));
+    Py_RETURN_NONE;
 }
 
 int
 PyList_Reverse(PyObject *v)
 {
-	PyListObject *self = (PyListObject *)v;
+    PyListObject *self = (PyListObject *)v;
 
-	if (v == NULL || !PyList_Check(v)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (Py_SIZE(self) > 1)
-		reverse_slice(self->ob_item, self->ob_item + Py_SIZE(self));
-	return 0;
+    if (v == NULL || !PyList_Check(v)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (Py_SIZE(self) > 1)
+        reverse_slice(self->ob_item, self->ob_item + Py_SIZE(self));
+    return 0;
 }
 
 PyObject *
 PyList_AsTuple(PyObject *v)
 {
-	PyObject *w;
-	PyObject **p, **q;
-	Py_ssize_t n;
-	if (v == NULL || !PyList_Check(v)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	n = Py_SIZE(v);
-	w = PyTuple_New(n);
-	if (w == NULL)
-		return NULL;
-	p = ((PyTupleObject *)w)->ob_item;
-	q = ((PyListObject *)v)->ob_item;
-	while (--n >= 0) {
-		Py_INCREF(*q);
-		*p = *q;
-		p++;
-		q++;
-	}
-	return w;
+    PyObject *w;
+    PyObject **p, **q;
+    Py_ssize_t n;
+    if (v == NULL || !PyList_Check(v)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    n = Py_SIZE(v);
+    w = PyTuple_New(n);
+    if (w == NULL)
+        return NULL;
+    p = ((PyTupleObject *)w)->ob_item;
+    q = ((PyListObject *)v)->ob_item;
+    while (--n >= 0) {
+        Py_INCREF(*q);
+        *p = *q;
+        p++;
+        q++;
+    }
+    return w;
 }
 
 static PyObject *
 listindex(PyListObject *self, PyObject *args)
 {
-	Py_ssize_t i, start=0, stop=Py_SIZE(self);
-	PyObject *v, *format_tuple, *err_string;
-	static PyObject *err_format = NULL;
+    Py_ssize_t i, start=0, stop=Py_SIZE(self);
+    PyObject *v, *format_tuple, *err_string;
+    static PyObject *err_format = NULL;
 
-	if (!PyArg_ParseTuple(args, "O|O&O&:index", &v,
-	                            _PyEval_SliceIndex, &start,
-	                            _PyEval_SliceIndex, &stop))
-		return NULL;
-	if (start < 0) {
-		start += Py_SIZE(self);
-		if (start < 0)
-			start = 0;
-	}
-	if (stop < 0) {
-		stop += Py_SIZE(self);
-		if (stop < 0)
-			stop = 0;
-	}
-	for (i = start; i < stop && i < Py_SIZE(self); i++) {
-		int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
-		if (cmp > 0)
-			return PyInt_FromSsize_t(i);
-		else if (cmp < 0)
-			return NULL;
-	}
-	if (err_format == NULL) {
-		err_format = PyString_FromString("%r is not in list");
-		if (err_format == NULL)
-			return NULL;
-	}
-	format_tuple = PyTuple_Pack(1, v);
-	if (format_tuple == NULL)
-		return NULL;
-	err_string = PyString_Format(err_format, format_tuple);
-	Py_DECREF(format_tuple);
-	if (err_string == NULL)
-		return NULL;
-	PyErr_SetObject(PyExc_ValueError, err_string);
-	Py_DECREF(err_string);
-	return NULL;
+    if (!PyArg_ParseTuple(args, "O|O&O&:index", &v,
+                                _PyEval_SliceIndex, &start,
+                                _PyEval_SliceIndex, &stop))
+        return NULL;
+    if (start < 0) {
+        start += Py_SIZE(self);
+        if (start < 0)
+            start = 0;
+    }
+    if (stop < 0) {
+        stop += Py_SIZE(self);
+        if (stop < 0)
+            stop = 0;
+    }
+    for (i = start; i < stop && i < Py_SIZE(self); i++) {
+        int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
+        if (cmp > 0)
+            return PyInt_FromSsize_t(i);
+        else if (cmp < 0)
+            return NULL;
+    }
+    if (err_format == NULL) {
+        err_format = PyString_FromString("%r is not in list");
+        if (err_format == NULL)
+            return NULL;
+    }
+    format_tuple = PyTuple_Pack(1, v);
+    if (format_tuple == NULL)
+        return NULL;
+    err_string = PyString_Format(err_format, format_tuple);
+    Py_DECREF(format_tuple);
+    if (err_string == NULL)
+        return NULL;
+    PyErr_SetObject(PyExc_ValueError, err_string);
+    Py_DECREF(err_string);
+    return NULL;
 }
 
 static PyObject *
 listcount(PyListObject *self, PyObject *v)
 {
-	Py_ssize_t count = 0;
-	Py_ssize_t i;
+    Py_ssize_t count = 0;
+    Py_ssize_t i;
 
-	for (i = 0; i < Py_SIZE(self); i++) {
-		int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
-		if (cmp > 0)
-			count++;
-		else if (cmp < 0)
-			return NULL;
-	}
-	return PyInt_FromSsize_t(count);
+    for (i = 0; i < Py_SIZE(self); i++) {
+        int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
+        if (cmp > 0)
+            count++;
+        else if (cmp < 0)
+            return NULL;
+    }
+    return PyInt_FromSsize_t(count);
 }
 
 static PyObject *
 listremove(PyListObject *self, PyObject *v)
 {
-	Py_ssize_t i;
+    Py_ssize_t i;
 
-	for (i = 0; i < Py_SIZE(self); i++) {
-		int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
-		if (cmp > 0) {
-			if (list_ass_slice(self, i, i+1,
-					   (PyObject *)NULL) == 0)
-				Py_RETURN_NONE;
-			return NULL;
-		}
-		else if (cmp < 0)
-			return NULL;
-	}
-	PyErr_SetString(PyExc_ValueError, "list.remove(x): x not in list");
-	return NULL;
+    for (i = 0; i < Py_SIZE(self); i++) {
+        int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
+        if (cmp > 0) {
+            if (list_ass_slice(self, i, i+1,
+                               (PyObject *)NULL) == 0)
+                Py_RETURN_NONE;
+            return NULL;
+        }
+        else if (cmp < 0)
+            return NULL;
+    }
+    PyErr_SetString(PyExc_ValueError, "list.remove(x): x not in list");
+    return NULL;
 }
 
 static int
 list_traverse(PyListObject *o, visitproc visit, void *arg)
 {
-	Py_ssize_t i;
+    Py_ssize_t i;
 
-	for (i = Py_SIZE(o); --i >= 0; )
-		Py_VISIT(o->ob_item[i]);
-	return 0;
+    for (i = Py_SIZE(o); --i >= 0; )
+        Py_VISIT(o->ob_item[i]);
+    return 0;
 }
 
 static PyObject *
 list_richcompare(PyObject *v, PyObject *w, int op)
 {
-	PyListObject *vl, *wl;
-	Py_ssize_t i;
+    PyListObject *vl, *wl;
+    Py_ssize_t i;
 
-	if (!PyList_Check(v) || !PyList_Check(w)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
+    if (!PyList_Check(v) || !PyList_Check(w)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 
-	vl = (PyListObject *)v;
-	wl = (PyListObject *)w;
+    vl = (PyListObject *)v;
+    wl = (PyListObject *)w;
 
-	if (Py_SIZE(vl) != Py_SIZE(wl) && (op == Py_EQ || op == Py_NE)) {
-		/* Shortcut: if the lengths differ, the lists differ */
-		PyObject *res;
-		if (op == Py_EQ)
-			res = Py_False;
-		else
-			res = Py_True;
-		Py_INCREF(res);
-		return res;
-	}
+    if (Py_SIZE(vl) != Py_SIZE(wl) && (op == Py_EQ || op == Py_NE)) {
+        /* Shortcut: if the lengths differ, the lists differ */
+        PyObject *res;
+        if (op == Py_EQ)
+            res = Py_False;
+        else
+            res = Py_True;
+        Py_INCREF(res);
+        return res;
+    }
 
-	/* Search for the first index where items are different */
-	for (i = 0; i < Py_SIZE(vl) && i < Py_SIZE(wl); i++) {
-		int k = PyObject_RichCompareBool(vl->ob_item[i],
-						 wl->ob_item[i], Py_EQ);
-		if (k < 0)
-			return NULL;
-		if (!k)
-			break;
-	}
+    /* Search for the first index where items are different */
+    for (i = 0; i < Py_SIZE(vl) && i < Py_SIZE(wl); i++) {
+        int k = PyObject_RichCompareBool(vl->ob_item[i],
+                                         wl->ob_item[i], Py_EQ);
+        if (k < 0)
+            return NULL;
+        if (!k)
+            break;
+    }
 
-	if (i >= Py_SIZE(vl) || i >= Py_SIZE(wl)) {
-		/* No more items to compare -- compare sizes */
-		Py_ssize_t vs = Py_SIZE(vl);
-		Py_ssize_t ws = Py_SIZE(wl);
-		int cmp;
-		PyObject *res;
-		switch (op) {
-		case Py_LT: cmp = vs <  ws; break;
-		case Py_LE: cmp = vs <= ws; break;
-		case Py_EQ: cmp = vs == ws; break;
-		case Py_NE: cmp = vs != ws; break;
-		case Py_GT: cmp = vs >  ws; break;
-		case Py_GE: cmp = vs >= ws; break;
-		default: return NULL; /* cannot happen */
-		}
-		if (cmp)
-			res = Py_True;
-		else
-			res = Py_False;
-		Py_INCREF(res);
-		return res;
-	}
+    if (i >= Py_SIZE(vl) || i >= Py_SIZE(wl)) {
+        /* No more items to compare -- compare sizes */
+        Py_ssize_t vs = Py_SIZE(vl);
+        Py_ssize_t ws = Py_SIZE(wl);
+        int cmp;
+        PyObject *res;
+        switch (op) {
+        case Py_LT: cmp = vs <  ws; break;
+        case Py_LE: cmp = vs <= ws; break;
+        case Py_EQ: cmp = vs == ws; break;
+        case Py_NE: cmp = vs != ws; break;
+        case Py_GT: cmp = vs >  ws; break;
+        case Py_GE: cmp = vs >= ws; break;
+        default: return NULL; /* cannot happen */
+        }
+        if (cmp)
+            res = Py_True;
+        else
+            res = Py_False;
+        Py_INCREF(res);
+        return res;
+    }
 
-	/* We have an item that differs -- shortcuts for EQ/NE */
-	if (op == Py_EQ) {
-		Py_INCREF(Py_False);
-		return Py_False;
-	}
-	if (op == Py_NE) {
-		Py_INCREF(Py_True);
-		return Py_True;
-	}
+    /* We have an item that differs -- shortcuts for EQ/NE */
+    if (op == Py_EQ) {
+        Py_INCREF(Py_False);
+        return Py_False;
+    }
+    if (op == Py_NE) {
+        Py_INCREF(Py_True);
+        return Py_True;
+    }
 
-	/* Compare the final item again using the proper operator */
-	return PyObject_RichCompare(vl->ob_item[i], wl->ob_item[i], op);
+    /* Compare the final item again using the proper operator */
+    return PyObject_RichCompare(vl->ob_item[i], wl->ob_item[i], op);
 }
 
 static int
 list_init(PyListObject *self, PyObject *args, PyObject *kw)
 {
-	PyObject *arg = NULL;
-	static char *kwlist[] = {"sequence", 0};
+    PyObject *arg = NULL;
+    static char *kwlist[] = {"sequence", 0};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:list", kwlist, &arg))
-		return -1;
+    if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:list", kwlist, &arg))
+        return -1;
 
-	/* Verify list invariants established by PyType_GenericAlloc() */
-	assert(0 <= Py_SIZE(self));
-	assert(Py_SIZE(self) <= self->allocated || self->allocated == -1);
-	assert(self->ob_item != NULL ||
-	       self->allocated == 0 || self->allocated == -1);
+    /* Verify list invariants established by PyType_GenericAlloc() */
+    assert(0 <= Py_SIZE(self));
+    assert(Py_SIZE(self) <= self->allocated || self->allocated == -1);
+    assert(self->ob_item != NULL ||
+           self->allocated == 0 || self->allocated == -1);
 
-	/* Empty previous contents */
-	if (self->ob_item != NULL) {
-		(void)list_clear(self);
-	}
-	if (arg != NULL) {
-		PyObject *rv = listextend(self, arg);
-		if (rv == NULL)
-			return -1;
-		Py_DECREF(rv);
-	}
-	return 0;
+    /* Empty previous contents */
+    if (self->ob_item != NULL) {
+        (void)list_clear(self);
+    }
+    if (arg != NULL) {
+        PyObject *rv = listextend(self, arg);
+        if (rv == NULL)
+            return -1;
+        Py_DECREF(rv);
+    }
+    return 0;
 }
 
 static PyObject *
 list_sizeof(PyListObject *self)
 {
-	Py_ssize_t res;
+    Py_ssize_t res;
 
-	res = sizeof(PyListObject) + self->allocated * sizeof(void*);
-	return PyInt_FromSsize_t(res);
+    res = sizeof(PyListObject) + self->allocated * sizeof(void*);
+    return PyInt_FromSsize_t(res);
 }
 
 static PyObject *list_iter(PyObject *seq);
@@ -2507,32 +2507,32 @@
 static PyObject *list_subscript(PyListObject*, PyObject*);
 
 static PyMethodDef list_methods[] = {
-	{"__getitem__", (PyCFunction)list_subscript, METH_O|METH_COEXIST, getitem_doc},
-	{"__reversed__",(PyCFunction)list_reversed, METH_NOARGS, reversed_doc},
-	{"__sizeof__",  (PyCFunction)list_sizeof, METH_NOARGS, sizeof_doc},
-	{"append",	(PyCFunction)listappend,  METH_O, append_doc},
-	{"insert",	(PyCFunction)listinsert,  METH_VARARGS, insert_doc},
-	{"extend",      (PyCFunction)listextend,  METH_O, extend_doc},
-	{"pop",		(PyCFunction)listpop, 	  METH_VARARGS, pop_doc},
-	{"remove",	(PyCFunction)listremove,  METH_O, remove_doc},
-	{"index",	(PyCFunction)listindex,   METH_VARARGS, index_doc},
-	{"count",	(PyCFunction)listcount,   METH_O, count_doc},
-	{"reverse",	(PyCFunction)listreverse, METH_NOARGS, reverse_doc},
-	{"sort",	(PyCFunction)listsort, 	  METH_VARARGS | METH_KEYWORDS, sort_doc},
- 	{NULL,		NULL}		/* sentinel */
+    {"__getitem__", (PyCFunction)list_subscript, METH_O|METH_COEXIST, getitem_doc},
+    {"__reversed__",(PyCFunction)list_reversed, METH_NOARGS, reversed_doc},
+    {"__sizeof__",  (PyCFunction)list_sizeof, METH_NOARGS, sizeof_doc},
+    {"append",          (PyCFunction)listappend,  METH_O, append_doc},
+    {"insert",          (PyCFunction)listinsert,  METH_VARARGS, insert_doc},
+    {"extend",      (PyCFunction)listextend,  METH_O, extend_doc},
+    {"pop",             (PyCFunction)listpop,     METH_VARARGS, pop_doc},
+    {"remove",          (PyCFunction)listremove,  METH_O, remove_doc},
+    {"index",           (PyCFunction)listindex,   METH_VARARGS, index_doc},
+    {"count",           (PyCFunction)listcount,   METH_O, count_doc},
+    {"reverse",         (PyCFunction)listreverse, METH_NOARGS, reverse_doc},
+    {"sort",            (PyCFunction)listsort,    METH_VARARGS | METH_KEYWORDS, sort_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PySequenceMethods list_as_sequence = {
-	(lenfunc)list_length,			/* sq_length */
-	(binaryfunc)list_concat,		/* sq_concat */
-	(ssizeargfunc)list_repeat,		/* sq_repeat */
-	(ssizeargfunc)list_item,		/* sq_item */
-	(ssizessizeargfunc)list_slice,		/* sq_slice */
-	(ssizeobjargproc)list_ass_item,		/* sq_ass_item */
-	(ssizessizeobjargproc)list_ass_slice,	/* sq_ass_slice */
-	(objobjproc)list_contains,		/* sq_contains */
-	(binaryfunc)list_inplace_concat,	/* sq_inplace_concat */
-	(ssizeargfunc)list_inplace_repeat,	/* sq_inplace_repeat */
+    (lenfunc)list_length,                       /* sq_length */
+    (binaryfunc)list_concat,                    /* sq_concat */
+    (ssizeargfunc)list_repeat,                  /* sq_repeat */
+    (ssizeargfunc)list_item,                    /* sq_item */
+    (ssizessizeargfunc)list_slice,              /* sq_slice */
+    (ssizeobjargproc)list_ass_item,             /* sq_ass_item */
+    (ssizessizeobjargproc)list_ass_slice,       /* sq_ass_slice */
+    (objobjproc)list_contains,                  /* sq_contains */
+    (binaryfunc)list_inplace_concat,            /* sq_inplace_concat */
+    (ssizeargfunc)list_inplace_repeat,          /* sq_inplace_repeat */
 };
 
 PyDoc_STRVAR(list_doc,
@@ -2543,275 +2543,275 @@
 static PyObject *
 list_subscript(PyListObject* self, PyObject* item)
 {
-	if (PyIndex_Check(item)) {
-		Py_ssize_t i;
-		i = PyNumber_AsSsize_t(item, PyExc_IndexError);
-		if (i == -1 && PyErr_Occurred())
-			return NULL;
-		if (i < 0)
-			i += PyList_GET_SIZE(self);
-		return list_item(self, i);
-	}
-	else if (PySlice_Check(item)) {
-		Py_ssize_t start, stop, step, slicelength, cur, i;
-		PyObject* result;
-		PyObject* it;
-		PyObject **src, **dest;
+    if (PyIndex_Check(item)) {
+        Py_ssize_t i;
+        i = PyNumber_AsSsize_t(item, PyExc_IndexError);
+        if (i == -1 && PyErr_Occurred())
+            return NULL;
+        if (i < 0)
+            i += PyList_GET_SIZE(self);
+        return list_item(self, i);
+    }
+    else if (PySlice_Check(item)) {
+        Py_ssize_t start, stop, step, slicelength, cur, i;
+        PyObject* result;
+        PyObject* it;
+        PyObject **src, **dest;
 
-		if (PySlice_GetIndicesEx((PySliceObject*)item, Py_SIZE(self),
-				 &start, &stop, &step, &slicelength) < 0) {
-			return NULL;
-		}
+        if (PySlice_GetIndicesEx((PySliceObject*)item, Py_SIZE(self),
+                         &start, &stop, &step, &slicelength) < 0) {
+            return NULL;
+        }
 
-		if (slicelength <= 0) {
-			return PyList_New(0);
-		}
-		else if (step == 1) {
-			return list_slice(self, start, stop);
-		}
-		else {
-			result = PyList_New(slicelength);
-			if (!result) return NULL;
+        if (slicelength <= 0) {
+            return PyList_New(0);
+        }
+        else if (step == 1) {
+            return list_slice(self, start, stop);
+        }
+        else {
+            result = PyList_New(slicelength);
+            if (!result) return NULL;
 
-			src = self->ob_item;
-			dest = ((PyListObject *)result)->ob_item;
-			for (cur = start, i = 0; i < slicelength;
-			     cur += step, i++) {
-				it = src[cur];
-				Py_INCREF(it);
-				dest[i] = it;
-			}
+            src = self->ob_item;
+            dest = ((PyListObject *)result)->ob_item;
+            for (cur = start, i = 0; i < slicelength;
+                 cur += step, i++) {
+                it = src[cur];
+                Py_INCREF(it);
+                dest[i] = it;
+            }
 
-			return result;
-		}
-	}
-	else {
-		PyErr_Format(PyExc_TypeError,
-			     "list indices must be integers, not %.200s",
-			     item->ob_type->tp_name);
-		return NULL;
-	}
+            return result;
+        }
+    }
+    else {
+        PyErr_Format(PyExc_TypeError,
+                     "list indices must be integers, not %.200s",
+                     item->ob_type->tp_name);
+        return NULL;
+    }
 }
 
 static int
 list_ass_subscript(PyListObject* self, PyObject* item, PyObject* value)
 {
-	if (PyIndex_Check(item)) {
-		Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
-		if (i == -1 && PyErr_Occurred())
-			return -1;
-		if (i < 0)
-			i += PyList_GET_SIZE(self);
-		return list_ass_item(self, i, value);
-	}
-	else if (PySlice_Check(item)) {
-		Py_ssize_t start, stop, step, slicelength;
+    if (PyIndex_Check(item)) {
+        Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
+        if (i == -1 && PyErr_Occurred())
+            return -1;
+        if (i < 0)
+            i += PyList_GET_SIZE(self);
+        return list_ass_item(self, i, value);
+    }
+    else if (PySlice_Check(item)) {
+        Py_ssize_t start, stop, step, slicelength;
 
-		if (PySlice_GetIndicesEx((PySliceObject*)item, Py_SIZE(self),
-				 &start, &stop, &step, &slicelength) < 0) {
-			return -1;
-		}
+        if (PySlice_GetIndicesEx((PySliceObject*)item, Py_SIZE(self),
+                         &start, &stop, &step, &slicelength) < 0) {
+            return -1;
+        }
 
-		if (step == 1)
-			return list_ass_slice(self, start, stop, value);
+        if (step == 1)
+            return list_ass_slice(self, start, stop, value);
 
-		/* Make sure s[5:2] = [..] inserts at the right place:
-		   before 5, not before 2. */
-		if ((step < 0 && start < stop) ||
-		    (step > 0 && start > stop))
-			stop = start;
+        /* Make sure s[5:2] = [..] inserts at the right place:
+           before 5, not before 2. */
+        if ((step < 0 && start < stop) ||
+            (step > 0 && start > stop))
+            stop = start;
 
-		if (value == NULL) {
-			/* delete slice */
-			PyObject **garbage;
-			size_t cur;
-			Py_ssize_t i;
+        if (value == NULL) {
+            /* delete slice */
+            PyObject **garbage;
+            size_t cur;
+            Py_ssize_t i;
 
-			if (slicelength <= 0)
-				return 0;
+            if (slicelength <= 0)
+                return 0;
 
-			if (step < 0) {
-				stop = start + 1;
-				start = stop + step*(slicelength - 1) - 1;
-				step = -step;
-			}
+            if (step < 0) {
+                stop = start + 1;
+                start = stop + step*(slicelength - 1) - 1;
+                step = -step;
+            }
 
-			assert((size_t)slicelength <=
-			       PY_SIZE_MAX / sizeof(PyObject*));
+            assert((size_t)slicelength <=
+                   PY_SIZE_MAX / sizeof(PyObject*));
 
-			garbage = (PyObject**)
-				PyMem_MALLOC(slicelength*sizeof(PyObject*));
-			if (!garbage) {
-				PyErr_NoMemory();
-				return -1;
-			}
+            garbage = (PyObject**)
+                PyMem_MALLOC(slicelength*sizeof(PyObject*));
+            if (!garbage) {
+                PyErr_NoMemory();
+                return -1;
+            }
 
-			/* drawing pictures might help understand these for
-			   loops. Basically, we memmove the parts of the
-			   list that are *not* part of the slice: step-1
-			   items for each item that is part of the slice,
-			   and then tail end of the list that was not
-			   covered by the slice */
-			for (cur = start, i = 0;
-			     cur < (size_t)stop;
-			     cur += step, i++) {
-				Py_ssize_t lim = step - 1;
+            /* drawing pictures might help understand these for
+               loops. Basically, we memmove the parts of the
+               list that are *not* part of the slice: step-1
+               items for each item that is part of the slice,
+               and then tail end of the list that was not
+               covered by the slice */
+            for (cur = start, i = 0;
+                 cur < (size_t)stop;
+                 cur += step, i++) {
+                Py_ssize_t lim = step - 1;
 
-				garbage[i] = PyList_GET_ITEM(self, cur);
+                garbage[i] = PyList_GET_ITEM(self, cur);
 
-				if (cur + step >= (size_t)Py_SIZE(self)) {
-					lim = Py_SIZE(self) - cur - 1;
-				}
+                if (cur + step >= (size_t)Py_SIZE(self)) {
+                    lim = Py_SIZE(self) - cur - 1;
+                }
 
-				memmove(self->ob_item + cur - i,
-					self->ob_item + cur + 1,
-					lim * sizeof(PyObject *));
-			}
-			cur = start + slicelength*step;
-			if (cur < (size_t)Py_SIZE(self)) {
-				memmove(self->ob_item + cur - slicelength,
-					self->ob_item + cur,
-					(Py_SIZE(self) - cur) * 
-					 sizeof(PyObject *));
-			}
+                memmove(self->ob_item + cur - i,
+                    self->ob_item + cur + 1,
+                    lim * sizeof(PyObject *));
+            }
+            cur = start + slicelength*step;
+            if (cur < (size_t)Py_SIZE(self)) {
+                memmove(self->ob_item + cur - slicelength,
+                    self->ob_item + cur,
+                    (Py_SIZE(self) - cur) *
+                     sizeof(PyObject *));
+            }
 
-			Py_SIZE(self) -= slicelength;
-			list_resize(self, Py_SIZE(self));
+            Py_SIZE(self) -= slicelength;
+            list_resize(self, Py_SIZE(self));
 
-			for (i = 0; i < slicelength; i++) {
-				Py_DECREF(garbage[i]);
-			}
-			PyMem_FREE(garbage);
+            for (i = 0; i < slicelength; i++) {
+                Py_DECREF(garbage[i]);
+            }
+            PyMem_FREE(garbage);
 
-			return 0;
-		}
-		else {
-			/* assign slice */
-			PyObject *ins, *seq;
-			PyObject **garbage, **seqitems, **selfitems;
-			Py_ssize_t cur, i;
+            return 0;
+        }
+        else {
+            /* assign slice */
+            PyObject *ins, *seq;
+            PyObject **garbage, **seqitems, **selfitems;
+            Py_ssize_t cur, i;
 
-			/* protect against a[::-1] = a */
-			if (self == (PyListObject*)value) {
-				seq = list_slice((PyListObject*)value, 0,
-						   PyList_GET_SIZE(value));
-			}
-			else {
-				seq = PySequence_Fast(value,
-						      "must assign iterable "
-						      "to extended slice");
-			}
-			if (!seq)
-				return -1;
+            /* protect against a[::-1] = a */
+            if (self == (PyListObject*)value) {
+                seq = list_slice((PyListObject*)value, 0,
+                                   PyList_GET_SIZE(value));
+            }
+            else {
+                seq = PySequence_Fast(value,
+                                      "must assign iterable "
+                                      "to extended slice");
+            }
+            if (!seq)
+                return -1;
 
-			if (PySequence_Fast_GET_SIZE(seq) != slicelength) {
-				PyErr_Format(PyExc_ValueError,
-					"attempt to assign sequence of "
-					"size %zd to extended slice of "
-					"size %zd",
-					     PySequence_Fast_GET_SIZE(seq),
-					     slicelength);
-				Py_DECREF(seq);
-				return -1;
-			}
+            if (PySequence_Fast_GET_SIZE(seq) != slicelength) {
+                PyErr_Format(PyExc_ValueError,
+                    "attempt to assign sequence of "
+                    "size %zd to extended slice of "
+                    "size %zd",
+                         PySequence_Fast_GET_SIZE(seq),
+                         slicelength);
+                Py_DECREF(seq);
+                return -1;
+            }
 
-			if (!slicelength) {
-				Py_DECREF(seq);
-				return 0;
-			}
+            if (!slicelength) {
+                Py_DECREF(seq);
+                return 0;
+            }
 
-			garbage = (PyObject**)
-				PyMem_MALLOC(slicelength*sizeof(PyObject*));
-			if (!garbage) {
-				Py_DECREF(seq);
-				PyErr_NoMemory();
-				return -1;
-			}
+            garbage = (PyObject**)
+                PyMem_MALLOC(slicelength*sizeof(PyObject*));
+            if (!garbage) {
+                Py_DECREF(seq);
+                PyErr_NoMemory();
+                return -1;
+            }
 
-			selfitems = self->ob_item;
-			seqitems = PySequence_Fast_ITEMS(seq);
-			for (cur = start, i = 0; i < slicelength;
-			     cur += step, i++) {
-				garbage[i] = selfitems[cur];
-				ins = seqitems[i];
-				Py_INCREF(ins);
-				selfitems[cur] = ins;
-			}
+            selfitems = self->ob_item;
+            seqitems = PySequence_Fast_ITEMS(seq);
+            for (cur = start, i = 0; i < slicelength;
+                 cur += step, i++) {
+                garbage[i] = selfitems[cur];
+                ins = seqitems[i];
+                Py_INCREF(ins);
+                selfitems[cur] = ins;
+            }
 
-			for (i = 0; i < slicelength; i++) {
-				Py_DECREF(garbage[i]);
-			}
+            for (i = 0; i < slicelength; i++) {
+                Py_DECREF(garbage[i]);
+            }
 
-			PyMem_FREE(garbage);
-			Py_DECREF(seq);
+            PyMem_FREE(garbage);
+            Py_DECREF(seq);
 
-			return 0;
-		}
-	}
-	else {
-		PyErr_Format(PyExc_TypeError,
-			     "list indices must be integers, not %.200s",
-			     item->ob_type->tp_name);
-		return -1;
-	}
+            return 0;
+        }
+    }
+    else {
+        PyErr_Format(PyExc_TypeError,
+                     "list indices must be integers, not %.200s",
+                     item->ob_type->tp_name);
+        return -1;
+    }
 }
 
 static PyMappingMethods list_as_mapping = {
-	(lenfunc)list_length,
-	(binaryfunc)list_subscript,
-	(objobjargproc)list_ass_subscript
+    (lenfunc)list_length,
+    (binaryfunc)list_subscript,
+    (objobjargproc)list_ass_subscript
 };
 
 PyTypeObject PyList_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"list",
-	sizeof(PyListObject),
-	0,
-	(destructor)list_dealloc,		/* tp_dealloc */
-	(printfunc)list_print,			/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)list_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	&list_as_sequence,			/* tp_as_sequence */
-	&list_as_mapping,			/* tp_as_mapping */
-	(hashfunc)PyObject_HashNotImplemented,	/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_BASETYPE | Py_TPFLAGS_LIST_SUBCLASS,	/* tp_flags */
- 	list_doc,				/* tp_doc */
- 	(traverseproc)list_traverse,		/* tp_traverse */
- 	(inquiry)list_clear,			/* tp_clear */
-	list_richcompare,			/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	list_iter,				/* tp_iter */
-	0,					/* tp_iternext */
-	list_methods,				/* tp_methods */
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	(initproc)list_init,			/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	PyType_GenericNew,			/* tp_new */
-	PyObject_GC_Del,			/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "list",
+    sizeof(PyListObject),
+    0,
+    (destructor)list_dealloc,                   /* tp_dealloc */
+    (printfunc)list_print,                      /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)list_repr,                        /* tp_repr */
+    0,                                          /* tp_as_number */
+    &list_as_sequence,                          /* tp_as_sequence */
+    &list_as_mapping,                           /* tp_as_mapping */
+    (hashfunc)PyObject_HashNotImplemented,      /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_BASETYPE | Py_TPFLAGS_LIST_SUBCLASS,         /* tp_flags */
+    list_doc,                                   /* tp_doc */
+    (traverseproc)list_traverse,                /* tp_traverse */
+    (inquiry)list_clear,                        /* tp_clear */
+    list_richcompare,                           /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    list_iter,                                  /* tp_iter */
+    0,                                          /* tp_iternext */
+    list_methods,                               /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    (initproc)list_init,                        /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    PyType_GenericNew,                          /* tp_new */
+    PyObject_GC_Del,                            /* tp_free */
 };
 
 
 /*********************** List Iterator **************************/
 
 typedef struct {
-	PyObject_HEAD
-	long it_index;
-	PyListObject *it_seq; /* Set to NULL when iterator is exhausted */
+    PyObject_HEAD
+    long it_index;
+    PyListObject *it_seq; /* Set to NULL when iterator is exhausted */
 } listiterobject;
 
 static PyObject *list_iter(PyObject *);
@@ -2823,119 +2823,119 @@
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
 
 static PyMethodDef listiter_methods[] = {
-	{"__length_hint__", (PyCFunction)listiter_len, METH_NOARGS, length_hint_doc},
- 	{NULL,		NULL}		/* sentinel */
+    {"__length_hint__", (PyCFunction)listiter_len, METH_NOARGS, length_hint_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 PyTypeObject PyListIter_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"listiterator",				/* tp_name */
-	sizeof(listiterobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)listiter_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
-	0,					/* tp_doc */
-	(traverseproc)listiter_traverse,	/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)listiter_next,		/* tp_iternext */
-	listiter_methods,			/* tp_methods */
-	0,					/* tp_members */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "listiterator",                             /* tp_name */
+    sizeof(listiterobject),                     /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)listiter_dealloc,               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)listiter_traverse,            /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)listiter_next,                /* tp_iternext */
+    listiter_methods,                           /* tp_methods */
+    0,                                          /* tp_members */
 };
 
 
 static PyObject *
 list_iter(PyObject *seq)
 {
-	listiterobject *it;
+    listiterobject *it;
 
-	if (!PyList_Check(seq)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	it = PyObject_GC_New(listiterobject, &PyListIter_Type);
-	if (it == NULL)
-		return NULL;
-	it->it_index = 0;
-	Py_INCREF(seq);
-	it->it_seq = (PyListObject *)seq;
-	_PyObject_GC_TRACK(it);
-	return (PyObject *)it;
+    if (!PyList_Check(seq)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    it = PyObject_GC_New(listiterobject, &PyListIter_Type);
+    if (it == NULL)
+        return NULL;
+    it->it_index = 0;
+    Py_INCREF(seq);
+    it->it_seq = (PyListObject *)seq;
+    _PyObject_GC_TRACK(it);
+    return (PyObject *)it;
 }
 
 static void
 listiter_dealloc(listiterobject *it)
 {
-	_PyObject_GC_UNTRACK(it);
-	Py_XDECREF(it->it_seq);
-	PyObject_GC_Del(it);
+    _PyObject_GC_UNTRACK(it);
+    Py_XDECREF(it->it_seq);
+    PyObject_GC_Del(it);
 }
 
 static int
 listiter_traverse(listiterobject *it, visitproc visit, void *arg)
 {
-	Py_VISIT(it->it_seq);
-	return 0;
+    Py_VISIT(it->it_seq);
+    return 0;
 }
 
 static PyObject *
 listiter_next(listiterobject *it)
 {
-	PyListObject *seq;
-	PyObject *item;
+    PyListObject *seq;
+    PyObject *item;
 
-	assert(it != NULL);
-	seq = it->it_seq;
-	if (seq == NULL)
-		return NULL;
-	assert(PyList_Check(seq));
+    assert(it != NULL);
+    seq = it->it_seq;
+    if (seq == NULL)
+        return NULL;
+    assert(PyList_Check(seq));
 
-	if (it->it_index < PyList_GET_SIZE(seq)) {
-		item = PyList_GET_ITEM(seq, it->it_index);
-		++it->it_index;
-		Py_INCREF(item);
-		return item;
-	}
+    if (it->it_index < PyList_GET_SIZE(seq)) {
+        item = PyList_GET_ITEM(seq, it->it_index);
+        ++it->it_index;
+        Py_INCREF(item);
+        return item;
+    }
 
-	Py_DECREF(seq);
-	it->it_seq = NULL;
-	return NULL;
+    Py_DECREF(seq);
+    it->it_seq = NULL;
+    return NULL;
 }
 
 static PyObject *
 listiter_len(listiterobject *it)
 {
-	Py_ssize_t len;
-	if (it->it_seq) {
-		len = PyList_GET_SIZE(it->it_seq) - it->it_index;
-		if (len >= 0)
-			return PyInt_FromSsize_t(len);
-	}
-	return PyInt_FromLong(0);
+    Py_ssize_t len;
+    if (it->it_seq) {
+        len = PyList_GET_SIZE(it->it_seq) - it->it_index;
+        if (len >= 0)
+            return PyInt_FromSsize_t(len);
+    }
+    return PyInt_FromLong(0);
 }
 /*********************** List Reverse Iterator **************************/
 
 typedef struct {
-	PyObject_HEAD
-	Py_ssize_t it_index;
-	PyListObject *it_seq; /* Set to NULL when iterator is exhausted */
+    PyObject_HEAD
+    Py_ssize_t it_index;
+    PyListObject *it_seq; /* Set to NULL when iterator is exhausted */
 } listreviterobject;
 
 static PyObject *list_reversed(PyListObject *, PyObject *);
@@ -2945,100 +2945,100 @@
 static PyObject *listreviter_len(listreviterobject *);
 
 static PyMethodDef listreviter_methods[] = {
-	{"__length_hint__", (PyCFunction)listreviter_len, METH_NOARGS, length_hint_doc},
- 	{NULL,		NULL}		/* sentinel */
+    {"__length_hint__", (PyCFunction)listreviter_len, METH_NOARGS, length_hint_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 PyTypeObject PyListRevIter_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"listreverseiterator",			/* tp_name */
-	sizeof(listreviterobject),		/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)listreviter_dealloc,	/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
-	0,					/* tp_doc */
-	(traverseproc)listreviter_traverse,	/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)listreviter_next,		/* tp_iternext */
-	listreviter_methods,		/* tp_methods */
-	0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "listreverseiterator",                      /* tp_name */
+    sizeof(listreviterobject),                  /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)listreviter_dealloc,            /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)listreviter_traverse,         /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)listreviter_next,             /* tp_iternext */
+    listreviter_methods,                /* tp_methods */
+    0,
 };
 
 static PyObject *
 list_reversed(PyListObject *seq, PyObject *unused)
 {
-	listreviterobject *it;
+    listreviterobject *it;
 
-	it = PyObject_GC_New(listreviterobject, &PyListRevIter_Type);
-	if (it == NULL)
-		return NULL;
-	assert(PyList_Check(seq));
-	it->it_index = PyList_GET_SIZE(seq) - 1;
-	Py_INCREF(seq);
-	it->it_seq = seq;
-	PyObject_GC_Track(it);
-	return (PyObject *)it;
+    it = PyObject_GC_New(listreviterobject, &PyListRevIter_Type);
+    if (it == NULL)
+        return NULL;
+    assert(PyList_Check(seq));
+    it->it_index = PyList_GET_SIZE(seq) - 1;
+    Py_INCREF(seq);
+    it->it_seq = seq;
+    PyObject_GC_Track(it);
+    return (PyObject *)it;
 }
 
 static void
 listreviter_dealloc(listreviterobject *it)
 {
-	PyObject_GC_UnTrack(it);
-	Py_XDECREF(it->it_seq);
-	PyObject_GC_Del(it);
+    PyObject_GC_UnTrack(it);
+    Py_XDECREF(it->it_seq);
+    PyObject_GC_Del(it);
 }
 
 static int
 listreviter_traverse(listreviterobject *it, visitproc visit, void *arg)
 {
-	Py_VISIT(it->it_seq);
-	return 0;
+    Py_VISIT(it->it_seq);
+    return 0;
 }
 
 static PyObject *
 listreviter_next(listreviterobject *it)
 {
-	PyObject *item;
-	Py_ssize_t index = it->it_index;
-	PyListObject *seq = it->it_seq;
+    PyObject *item;
+    Py_ssize_t index = it->it_index;
+    PyListObject *seq = it->it_seq;
 
-	if (index>=0 && index < PyList_GET_SIZE(seq)) {
-		item = PyList_GET_ITEM(seq, index);
-		it->it_index--;
-		Py_INCREF(item);
-		return item;
-	}
-	it->it_index = -1;
-	if (seq != NULL) {
-		it->it_seq = NULL;
-		Py_DECREF(seq);
-	}
-	return NULL;
+    if (index>=0 && index < PyList_GET_SIZE(seq)) {
+        item = PyList_GET_ITEM(seq, index);
+        it->it_index--;
+        Py_INCREF(item);
+        return item;
+    }
+    it->it_index = -1;
+    if (seq != NULL) {
+        it->it_seq = NULL;
+        Py_DECREF(seq);
+    }
+    return NULL;
 }
 
 static PyObject *
 listreviter_len(listreviterobject *it)
 {
-	Py_ssize_t len = it->it_index + 1;
-	if (it->it_seq == NULL || PyList_GET_SIZE(it->it_seq) < len)
-		len = 0;
-	return PyLong_FromSsize_t(len);
+    Py_ssize_t len = it->it_index + 1;
+    if (it->it_seq == NULL || PyList_GET_SIZE(it->it_seq) < len)
+        len = 0;
+    return PyLong_FromSsize_t(len);
 }
diff --git a/Objects/longobject.c b/Objects/longobject.c
index a41782a..698a6db 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -34,10 +34,10 @@
 #define MIN(x, y) ((x) > (y) ? (y) : (x))
 
 #define SIGCHECK(PyTryBlock) \
-	if (--_Py_Ticker < 0) { \
-		_Py_Ticker = _Py_CheckInterval; \
-		if (PyErr_CheckSignals()) PyTryBlock \
-	}
+    if (--_Py_Ticker < 0) { \
+        _Py_Ticker = _Py_CheckInterval; \
+        if (PyErr_CheckSignals()) PyTryBlock \
+    }
 
 /* Normalize (remove leading zeros from) a long int object.
    Doesn't attempt to free the storage--in most cases, due to the nature
@@ -46,53 +46,53 @@
 static PyLongObject *
 long_normalize(register PyLongObject *v)
 {
-	Py_ssize_t j = ABS(Py_SIZE(v));
-	Py_ssize_t i = j;
+    Py_ssize_t j = ABS(Py_SIZE(v));
+    Py_ssize_t i = j;
 
-	while (i > 0 && v->ob_digit[i-1] == 0)
-		--i;
-	if (i != j)
-		Py_SIZE(v) = (Py_SIZE(v) < 0) ? -(i) : i;
-	return v;
+    while (i > 0 && v->ob_digit[i-1] == 0)
+        --i;
+    if (i != j)
+        Py_SIZE(v) = (Py_SIZE(v) < 0) ? -(i) : i;
+    return v;
 }
 
 /* Allocate a new long int object with size digits.
    Return NULL and set exception if we run out of memory. */
 
 #define MAX_LONG_DIGITS \
-	((PY_SSIZE_T_MAX - offsetof(PyLongObject, ob_digit))/sizeof(digit))
+    ((PY_SSIZE_T_MAX - offsetof(PyLongObject, ob_digit))/sizeof(digit))
 
 PyLongObject *
 _PyLong_New(Py_ssize_t size)
 {
-	if (size > (Py_ssize_t)MAX_LONG_DIGITS) {
-		PyErr_SetString(PyExc_OverflowError,
-				"too many digits in integer");
-		return NULL;
-	}
-	/* coverity[ampersand_in_size] */
-	/* XXX(nnorwitz): PyObject_NEW_VAR / _PyObject_VAR_SIZE need to detect
-	   overflow */
-	return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size);
+    if (size > (Py_ssize_t)MAX_LONG_DIGITS) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "too many digits in integer");
+        return NULL;
+    }
+    /* coverity[ampersand_in_size] */
+    /* XXX(nnorwitz): PyObject_NEW_VAR / _PyObject_VAR_SIZE need to detect
+       overflow */
+    return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size);
 }
 
 PyObject *
 _PyLong_Copy(PyLongObject *src)
 {
-	PyLongObject *result;
-	Py_ssize_t i;
+    PyLongObject *result;
+    Py_ssize_t i;
 
-	assert(src != NULL);
-	i = src->ob_size;
-	if (i < 0)
-		i = -(i);
-	result = _PyLong_New(i);
-	if (result != NULL) {
-		result->ob_size = src->ob_size;
-		while (--i >= 0)
-			result->ob_digit[i] = src->ob_digit[i];
-	}
-	return (PyObject *)result;
+    assert(src != NULL);
+    i = src->ob_size;
+    if (i < 0)
+        i = -(i);
+    result = _PyLong_New(i);
+    if (result != NULL) {
+        result->ob_size = src->ob_size;
+        while (--i >= 0)
+            result->ob_digit[i] = src->ob_digit[i];
+    }
+    return (PyObject *)result;
 }
 
 /* Create a new long int object from a C long int */
@@ -100,43 +100,43 @@
 PyObject *
 PyLong_FromLong(long ival)
 {
-	PyLongObject *v;
-        unsigned long abs_ival;
-	unsigned long t;  /* unsigned so >> doesn't propagate sign bit */
-	int ndigits = 0;
-	int negative = 0;
+    PyLongObject *v;
+    unsigned long abs_ival;
+    unsigned long t;  /* unsigned so >> doesn't propagate sign bit */
+    int ndigits = 0;
+    int negative = 0;
 
-	if (ival < 0) {
-		/* if LONG_MIN == -LONG_MAX-1 (true on most platforms) then
-		   ANSI C says that the result of -ival is undefined when ival
-		   == LONG_MIN.  Hence the following workaround. */
-		abs_ival = (unsigned long)(-1-ival) + 1;
-		negative = 1;
-	}
-	else {
-		abs_ival = (unsigned long)ival;
-	}
+    if (ival < 0) {
+        /* if LONG_MIN == -LONG_MAX-1 (true on most platforms) then
+           ANSI C says that the result of -ival is undefined when ival
+           == LONG_MIN.  Hence the following workaround. */
+        abs_ival = (unsigned long)(-1-ival) + 1;
+        negative = 1;
+    }
+    else {
+        abs_ival = (unsigned long)ival;
+    }
 
-	/* Count the number of Python digits.
-	   We used to pick 5 ("big enough for anything"), but that's a
-	   waste of time and space given that 5*15 = 75 bits are rarely
-	   needed. */
-	t = abs_ival;
-	while (t) {
-		++ndigits;
-		t >>= PyLong_SHIFT;
-	}
-	v = _PyLong_New(ndigits);
-	if (v != NULL) {
-		digit *p = v->ob_digit;
-		v->ob_size = negative ? -ndigits : ndigits;
-		t = abs_ival;
-		while (t) {
-			*p++ = (digit)(t & PyLong_MASK);
-			t >>= PyLong_SHIFT;
-		}
-	}
-	return (PyObject *)v;
+    /* Count the number of Python digits.
+       We used to pick 5 ("big enough for anything"), but that's a
+       waste of time and space given that 5*15 = 75 bits are rarely
+       needed. */
+    t = abs_ival;
+    while (t) {
+        ++ndigits;
+        t >>= PyLong_SHIFT;
+    }
+    v = _PyLong_New(ndigits);
+    if (v != NULL) {
+        digit *p = v->ob_digit;
+        v->ob_size = negative ? -ndigits : ndigits;
+        t = abs_ival;
+        while (t) {
+            *p++ = (digit)(t & PyLong_MASK);
+            t >>= PyLong_SHIFT;
+        }
+    }
+    return (PyObject *)v;
 }
 
 /* Create a new long int object from a C unsigned long int */
@@ -144,26 +144,26 @@
 PyObject *
 PyLong_FromUnsignedLong(unsigned long ival)
 {
-	PyLongObject *v;
-	unsigned long t;
-	int ndigits = 0;
+    PyLongObject *v;
+    unsigned long t;
+    int ndigits = 0;
 
-	/* Count the number of Python digits. */
-	t = (unsigned long)ival;
-	while (t) {
-		++ndigits;
-		t >>= PyLong_SHIFT;
-	}
-	v = _PyLong_New(ndigits);
-	if (v != NULL) {
-		digit *p = v->ob_digit;
-		Py_SIZE(v) = ndigits;
-		while (ival) {
-			*p++ = (digit)(ival & PyLong_MASK);
-			ival >>= PyLong_SHIFT;
-		}
-	}
-	return (PyObject *)v;
+    /* Count the number of Python digits. */
+    t = (unsigned long)ival;
+    while (t) {
+        ++ndigits;
+        t >>= PyLong_SHIFT;
+    }
+    v = _PyLong_New(ndigits);
+    if (v != NULL) {
+        digit *p = v->ob_digit;
+        Py_SIZE(v) = ndigits;
+        while (ival) {
+            *p++ = (digit)(ival & PyLong_MASK);
+            ival >>= PyLong_SHIFT;
+        }
+    }
+    return (PyObject *)v;
 }
 
 /* Create a new long int object from a C double */
@@ -171,41 +171,41 @@
 PyObject *
 PyLong_FromDouble(double dval)
 {
-	PyLongObject *v;
-	double frac;
-	int i, ndig, expo, neg;
-	neg = 0;
-	if (Py_IS_INFINITY(dval)) {
-		PyErr_SetString(PyExc_OverflowError,
-			"cannot convert float infinity to integer");
-		return NULL;
-	}
-	if (Py_IS_NAN(dval)) {
-		PyErr_SetString(PyExc_ValueError,
-			"cannot convert float NaN to integer");
-		return NULL;
-	}
-	if (dval < 0.0) {
-		neg = 1;
-		dval = -dval;
-	}
-	frac = frexp(dval, &expo); /* dval = frac*2**expo; 0.0 <= frac < 1.0 */
-	if (expo <= 0)
-		return PyLong_FromLong(0L);
-	ndig = (expo-1) / PyLong_SHIFT + 1; /* Number of 'digits' in result */
-	v = _PyLong_New(ndig);
-	if (v == NULL)
-		return NULL;
-	frac = ldexp(frac, (expo-1) % PyLong_SHIFT + 1);
-	for (i = ndig; --i >= 0; ) {
-		digit bits = (digit)frac;
-		v->ob_digit[i] = bits;
-		frac = frac - (double)bits;
-		frac = ldexp(frac, PyLong_SHIFT);
-	}
-	if (neg)
-		Py_SIZE(v) = -(Py_SIZE(v));
-	return (PyObject *)v;
+    PyLongObject *v;
+    double frac;
+    int i, ndig, expo, neg;
+    neg = 0;
+    if (Py_IS_INFINITY(dval)) {
+        PyErr_SetString(PyExc_OverflowError,
+            "cannot convert float infinity to integer");
+        return NULL;
+    }
+    if (Py_IS_NAN(dval)) {
+        PyErr_SetString(PyExc_ValueError,
+            "cannot convert float NaN to integer");
+        return NULL;
+    }
+    if (dval < 0.0) {
+        neg = 1;
+        dval = -dval;
+    }
+    frac = frexp(dval, &expo); /* dval = frac*2**expo; 0.0 <= frac < 1.0 */
+    if (expo <= 0)
+        return PyLong_FromLong(0L);
+    ndig = (expo-1) / PyLong_SHIFT + 1; /* Number of 'digits' in result */
+    v = _PyLong_New(ndig);
+    if (v == NULL)
+        return NULL;
+    frac = ldexp(frac, (expo-1) % PyLong_SHIFT + 1);
+    for (i = ndig; --i >= 0; ) {
+        digit bits = (digit)frac;
+        v->ob_digit[i] = bits;
+        frac = frac - (double)bits;
+        frac = ldexp(frac, PyLong_SHIFT);
+    }
+    if (neg)
+        Py_SIZE(v) = -(Py_SIZE(v));
+    return (PyObject *)v;
 }
 
 /* Checking for overflow in PyLong_AsLong is a PITA since C doesn't define
@@ -217,8 +217,8 @@
  * However, some other compilers warn about applying unary minus to an
  * unsigned operand.  Hence the weird "0-".
  */
-#define PY_ABS_LONG_MIN		(0-(unsigned long)LONG_MIN)
-#define PY_ABS_SSIZE_T_MIN	(0-(size_t)PY_SSIZE_T_MIN)
+#define PY_ABS_LONG_MIN         (0-(unsigned long)LONG_MIN)
+#define PY_ABS_SSIZE_T_MIN      (0-(size_t)PY_SSIZE_T_MIN)
 
 /* Get a C long int from a Python long or Python int object.
    On overflow, returns -1 and sets *overflow to 1 or -1 depending
@@ -231,95 +231,95 @@
 long
 PyLong_AsLongAndOverflow(PyObject *vv, int *overflow)
 {
-	/* This version by Tim Peters */
-	register PyLongObject *v;
-	unsigned long x, prev;
-	long res;
-	Py_ssize_t i;
-	int sign;
-	int do_decref = 0; /* if nb_int was called */
+    /* This version by Tim Peters */
+    register PyLongObject *v;
+    unsigned long x, prev;
+    long res;
+    Py_ssize_t i;
+    int sign;
+    int do_decref = 0; /* if nb_int was called */
 
-	*overflow = 0;
-	if (vv == NULL) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
+    *overflow = 0;
+    if (vv == NULL) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
 
-	if(PyInt_Check(vv))
-		return PyInt_AsLong(vv);
+    if(PyInt_Check(vv))
+        return PyInt_AsLong(vv);
 
-	if (!PyLong_Check(vv)) {
-		PyNumberMethods *nb;
-		nb = vv->ob_type->tp_as_number;
-		if (nb == NULL || nb->nb_int == NULL) {
-			PyErr_SetString(PyExc_TypeError,
-					"an integer is required");
-			return -1;
-		}
-		vv = (*nb->nb_int) (vv);
-		if (vv == NULL)
-			return -1;
-		do_decref = 1;
-		if(PyInt_Check(vv)) {
-			res = PyInt_AsLong(vv);
-			goto exit;
-		}
-		if (!PyLong_Check(vv)) {
-			Py_DECREF(vv);
-			PyErr_SetString(PyExc_TypeError,
-					"nb_int should return int object");
-			return -1;
-		}
-	}
+    if (!PyLong_Check(vv)) {
+        PyNumberMethods *nb;
+        nb = vv->ob_type->tp_as_number;
+        if (nb == NULL || nb->nb_int == NULL) {
+            PyErr_SetString(PyExc_TypeError,
+                            "an integer is required");
+            return -1;
+        }
+        vv = (*nb->nb_int) (vv);
+        if (vv == NULL)
+            return -1;
+        do_decref = 1;
+        if(PyInt_Check(vv)) {
+            res = PyInt_AsLong(vv);
+            goto exit;
+        }
+        if (!PyLong_Check(vv)) {
+            Py_DECREF(vv);
+            PyErr_SetString(PyExc_TypeError,
+                            "nb_int should return int object");
+            return -1;
+        }
+    }
 
-	res = -1;
-	v = (PyLongObject *)vv;
-	i = Py_SIZE(v);
+    res = -1;
+    v = (PyLongObject *)vv;
+    i = Py_SIZE(v);
 
-	switch (i) {
-	case -1:
-		res = -(sdigit)v->ob_digit[0];
-		break;
-	case 0:
-		res = 0;
-		break;
-	case 1:
-		res = v->ob_digit[0];
-		break;
-	default:
-		sign = 1;
-		x = 0;
-		if (i < 0) {
-			sign = -1;
-			i = -(i);
-		}
-		while (--i >= 0) {
-			prev = x;
-			x = (x << PyLong_SHIFT) + v->ob_digit[i];
-			if ((x >> PyLong_SHIFT) != prev) {
-				*overflow = sign;
-				goto exit;
-			}
-		}
-		/* Haven't lost any bits, but casting to long requires extra
-		 * care (see comment above).
-		 */
-		if (x <= (unsigned long)LONG_MAX) {
-			res = (long)x * sign;
-		}
-		else if (sign < 0 && x == PY_ABS_LONG_MIN) {
-			res = LONG_MIN;
-		}
-		else {
-			*overflow = sign;
-			/* res is already set to -1 */
-		}
-	}
+    switch (i) {
+    case -1:
+        res = -(sdigit)v->ob_digit[0];
+        break;
+    case 0:
+        res = 0;
+        break;
+    case 1:
+        res = v->ob_digit[0];
+        break;
+    default:
+        sign = 1;
+        x = 0;
+        if (i < 0) {
+            sign = -1;
+            i = -(i);
+        }
+        while (--i >= 0) {
+            prev = x;
+            x = (x << PyLong_SHIFT) + v->ob_digit[i];
+            if ((x >> PyLong_SHIFT) != prev) {
+                *overflow = sign;
+                goto exit;
+            }
+        }
+        /* Haven't lost any bits, but casting to long requires extra
+         * care (see comment above).
+         */
+        if (x <= (unsigned long)LONG_MAX) {
+            res = (long)x * sign;
+        }
+        else if (sign < 0 && x == PY_ABS_LONG_MIN) {
+            res = LONG_MIN;
+        }
+        else {
+            *overflow = sign;
+            /* res is already set to -1 */
+        }
+    }
  exit:
-	if (do_decref) {
-		Py_DECREF(vv);
-	}
-	return res;
+    if (do_decref) {
+        Py_DECREF(vv);
+    }
+    return res;
 }
 
 /* Get a C long int from a long int object.
@@ -328,15 +328,15 @@
 long
 PyLong_AsLong(PyObject *obj)
 {
-	int overflow;
-	long result = PyLong_AsLongAndOverflow(obj, &overflow);
-	if (overflow) {
-		/* XXX: could be cute and give a different
-		   message for overflow == -1 */
-		PyErr_SetString(PyExc_OverflowError,
-				"Python int too large to convert to C long");
-	}
-	return result;
+    int overflow;
+    long result = PyLong_AsLongAndOverflow(obj, &overflow);
+    if (overflow) {
+        /* XXX: could be cute and give a different
+           message for overflow == -1 */
+        PyErr_SetString(PyExc_OverflowError,
+                        "Python int too large to convert to C long");
+    }
+    return result;
 }
 
 /* Get a Py_ssize_t from a long int object.
@@ -344,44 +344,44 @@
 
 Py_ssize_t
 PyLong_AsSsize_t(PyObject *vv) {
-	register PyLongObject *v;
-	size_t x, prev;
-	Py_ssize_t i;
-	int sign;
+    register PyLongObject *v;
+    size_t x, prev;
+    Py_ssize_t i;
+    int sign;
 
-	if (vv == NULL || !PyLong_Check(vv)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	v = (PyLongObject *)vv;
-	i = v->ob_size;
-	sign = 1;
-	x = 0;
-	if (i < 0) {
-		sign = -1;
-		i = -(i);
-	}
-	while (--i >= 0) {
-		prev = x;
-		x = (x << PyLong_SHIFT) | v->ob_digit[i];
-		if ((x >> PyLong_SHIFT) != prev)
-			goto overflow;
-	}
-	/* Haven't lost any bits, but casting to a signed type requires
-	 * extra care (see comment above).
-	 */
-	if (x <= (size_t)PY_SSIZE_T_MAX) {
-		return (Py_ssize_t)x * sign;
-	}
-	else if (sign < 0 && x == PY_ABS_SSIZE_T_MIN) {
-		return PY_SSIZE_T_MIN;
-	}
-	/* else overflow */
+    if (vv == NULL || !PyLong_Check(vv)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    v = (PyLongObject *)vv;
+    i = v->ob_size;
+    sign = 1;
+    x = 0;
+    if (i < 0) {
+        sign = -1;
+        i = -(i);
+    }
+    while (--i >= 0) {
+        prev = x;
+        x = (x << PyLong_SHIFT) | v->ob_digit[i];
+        if ((x >> PyLong_SHIFT) != prev)
+            goto overflow;
+    }
+    /* Haven't lost any bits, but casting to a signed type requires
+     * extra care (see comment above).
+     */
+    if (x <= (size_t)PY_SSIZE_T_MAX) {
+        return (Py_ssize_t)x * sign;
+    }
+    else if (sign < 0 && x == PY_ABS_SSIZE_T_MIN) {
+        return PY_SSIZE_T_MIN;
+    }
+    /* else overflow */
 
  overflow:
-	PyErr_SetString(PyExc_OverflowError,
-			"long int too large to convert to int");
-	return -1;
+    PyErr_SetString(PyExc_OverflowError,
+                    "long int too large to convert to int");
+    return -1;
 }
 
 /* Get a C unsigned long int from a long int object.
@@ -390,41 +390,41 @@
 unsigned long
 PyLong_AsUnsignedLong(PyObject *vv)
 {
-	register PyLongObject *v;
-	unsigned long x, prev;
-	Py_ssize_t i;
+    register PyLongObject *v;
+    unsigned long x, prev;
+    Py_ssize_t i;
 
-	if (vv == NULL || !PyLong_Check(vv)) {
-		if (vv != NULL && PyInt_Check(vv)) {
-			long val = PyInt_AsLong(vv);
-			if (val < 0) {
-				PyErr_SetString(PyExc_OverflowError,
-				"can't convert negative value to unsigned long");
-				return (unsigned long) -1;
-			}
-			return val;
-		}
-		PyErr_BadInternalCall();
-		return (unsigned long) -1;
-	}
-	v = (PyLongObject *)vv;
-	i = Py_SIZE(v);
-	x = 0;
-	if (i < 0) {
-		PyErr_SetString(PyExc_OverflowError,
-			   "can't convert negative value to unsigned long");
-		return (unsigned long) -1;
-	}
-	while (--i >= 0) {
-		prev = x;
-		x = (x << PyLong_SHIFT) | v->ob_digit[i];
-		if ((x >> PyLong_SHIFT) != prev) {
-			PyErr_SetString(PyExc_OverflowError,
-				"long int too large to convert");
-			return (unsigned long) -1;
-		}
-	}
-	return x;
+    if (vv == NULL || !PyLong_Check(vv)) {
+        if (vv != NULL && PyInt_Check(vv)) {
+            long val = PyInt_AsLong(vv);
+            if (val < 0) {
+                PyErr_SetString(PyExc_OverflowError,
+                "can't convert negative value to unsigned long");
+                return (unsigned long) -1;
+            }
+            return val;
+        }
+        PyErr_BadInternalCall();
+        return (unsigned long) -1;
+    }
+    v = (PyLongObject *)vv;
+    i = Py_SIZE(v);
+    x = 0;
+    if (i < 0) {
+        PyErr_SetString(PyExc_OverflowError,
+                   "can't convert negative value to unsigned long");
+        return (unsigned long) -1;
+    }
+    while (--i >= 0) {
+        prev = x;
+        x = (x << PyLong_SHIFT) | v->ob_digit[i];
+        if ((x >> PyLong_SHIFT) != prev) {
+            PyErr_SetString(PyExc_OverflowError,
+                "long int too large to convert");
+            return (unsigned long) -1;
+        }
+    }
+    return x;
 }
 
 /* Get a C unsigned long int from a long int object, ignoring the high bits.
@@ -433,317 +433,317 @@
 unsigned long
 PyLong_AsUnsignedLongMask(PyObject *vv)
 {
-	register PyLongObject *v;
-	unsigned long x;
-	Py_ssize_t i;
-	int sign;
+    register PyLongObject *v;
+    unsigned long x;
+    Py_ssize_t i;
+    int sign;
 
-	if (vv == NULL || !PyLong_Check(vv)) {
-		if (vv != NULL && PyInt_Check(vv))
-			return PyInt_AsUnsignedLongMask(vv);
-		PyErr_BadInternalCall();
-		return (unsigned long) -1;
-	}
-	v = (PyLongObject *)vv;
-	i = v->ob_size;
-	sign = 1;
-	x = 0;
-	if (i < 0) {
-		sign = -1;
-		i = -i;
-	}
-	while (--i >= 0) {
-		x = (x << PyLong_SHIFT) | v->ob_digit[i];
-	}
-	return x * sign;
+    if (vv == NULL || !PyLong_Check(vv)) {
+        if (vv != NULL && PyInt_Check(vv))
+            return PyInt_AsUnsignedLongMask(vv);
+        PyErr_BadInternalCall();
+        return (unsigned long) -1;
+    }
+    v = (PyLongObject *)vv;
+    i = v->ob_size;
+    sign = 1;
+    x = 0;
+    if (i < 0) {
+        sign = -1;
+        i = -i;
+    }
+    while (--i >= 0) {
+        x = (x << PyLong_SHIFT) | v->ob_digit[i];
+    }
+    return x * sign;
 }
 
 int
 _PyLong_Sign(PyObject *vv)
 {
-	PyLongObject *v = (PyLongObject *)vv;
+    PyLongObject *v = (PyLongObject *)vv;
 
-	assert(v != NULL);
-	assert(PyLong_Check(v));
+    assert(v != NULL);
+    assert(PyLong_Check(v));
 
-	return Py_SIZE(v) == 0 ? 0 : (Py_SIZE(v) < 0 ? -1 : 1);
+    return Py_SIZE(v) == 0 ? 0 : (Py_SIZE(v) < 0 ? -1 : 1);
 }
 
 size_t
 _PyLong_NumBits(PyObject *vv)
 {
-	PyLongObject *v = (PyLongObject *)vv;
-	size_t result = 0;
-	Py_ssize_t ndigits;
+    PyLongObject *v = (PyLongObject *)vv;
+    size_t result = 0;
+    Py_ssize_t ndigits;
 
-	assert(v != NULL);
-	assert(PyLong_Check(v));
-	ndigits = ABS(Py_SIZE(v));
-	assert(ndigits == 0 || v->ob_digit[ndigits - 1] != 0);
-	if (ndigits > 0) {
-		digit msd = v->ob_digit[ndigits - 1];
+    assert(v != NULL);
+    assert(PyLong_Check(v));
+    ndigits = ABS(Py_SIZE(v));
+    assert(ndigits == 0 || v->ob_digit[ndigits - 1] != 0);
+    if (ndigits > 0) {
+        digit msd = v->ob_digit[ndigits - 1];
 
-		result = (ndigits - 1) * PyLong_SHIFT;
-		if (result / PyLong_SHIFT != (size_t)(ndigits - 1))
-			goto Overflow;
-		do {
-			++result;
-			if (result == 0)
-				goto Overflow;
-			msd >>= 1;
-		} while (msd);
-	}
-	return result;
+        result = (ndigits - 1) * PyLong_SHIFT;
+        if (result / PyLong_SHIFT != (size_t)(ndigits - 1))
+            goto Overflow;
+        do {
+            ++result;
+            if (result == 0)
+                goto Overflow;
+            msd >>= 1;
+        } while (msd);
+    }
+    return result;
 
 Overflow:
-	PyErr_SetString(PyExc_OverflowError, "long has too many bits "
-			"to express in a platform size_t");
-	return (size_t)-1;
+    PyErr_SetString(PyExc_OverflowError, "long has too many bits "
+                    "to express in a platform size_t");
+    return (size_t)-1;
 }
 
 PyObject *
 _PyLong_FromByteArray(const unsigned char* bytes, size_t n,
-		      int little_endian, int is_signed)
+                      int little_endian, int is_signed)
 {
-	const unsigned char* pstartbyte;/* LSB of bytes */
-	int incr;			/* direction to move pstartbyte */
-	const unsigned char* pendbyte;	/* MSB of bytes */
-	size_t numsignificantbytes;	/* number of bytes that matter */
-	Py_ssize_t ndigits;		/* number of Python long digits */
-	PyLongObject* v;		/* result */
-	Py_ssize_t idigit = 0;		/* next free index in v->ob_digit */
+    const unsigned char* pstartbyte;/* LSB of bytes */
+    int incr;                           /* direction to move pstartbyte */
+    const unsigned char* pendbyte;      /* MSB of bytes */
+    size_t numsignificantbytes;         /* number of bytes that matter */
+    Py_ssize_t ndigits;                 /* number of Python long digits */
+    PyLongObject* v;                    /* result */
+    Py_ssize_t idigit = 0;              /* next free index in v->ob_digit */
 
-	if (n == 0)
-		return PyLong_FromLong(0L);
+    if (n == 0)
+        return PyLong_FromLong(0L);
 
-	if (little_endian) {
-		pstartbyte = bytes;
-		pendbyte = bytes + n - 1;
-		incr = 1;
-	}
-	else {
-		pstartbyte = bytes + n - 1;
-		pendbyte = bytes;
-		incr = -1;
-	}
+    if (little_endian) {
+        pstartbyte = bytes;
+        pendbyte = bytes + n - 1;
+        incr = 1;
+    }
+    else {
+        pstartbyte = bytes + n - 1;
+        pendbyte = bytes;
+        incr = -1;
+    }
 
-	if (is_signed)
-		is_signed = *pendbyte >= 0x80;
+    if (is_signed)
+        is_signed = *pendbyte >= 0x80;
 
-	/* Compute numsignificantbytes.  This consists of finding the most
-	   significant byte.  Leading 0 bytes are insignficant if the number
-	   is positive, and leading 0xff bytes if negative. */
-	{
-		size_t i;
-		const unsigned char* p = pendbyte;
-		const int pincr = -incr;  /* search MSB to LSB */
-		const unsigned char insignficant = is_signed ? 0xff : 0x00;
+    /* Compute numsignificantbytes.  This consists of finding the most
+       significant byte.  Leading 0 bytes are insignficant if the number
+       is positive, and leading 0xff bytes if negative. */
+    {
+        size_t i;
+        const unsigned char* p = pendbyte;
+        const int pincr = -incr;  /* search MSB to LSB */
+        const unsigned char insignficant = is_signed ? 0xff : 0x00;
 
-		for (i = 0; i < n; ++i, p += pincr) {
-			if (*p != insignficant)
-				break;
-		}
-		numsignificantbytes = n - i;
-		/* 2's-comp is a bit tricky here, e.g. 0xff00 == -0x0100, so
-		   actually has 2 significant bytes.  OTOH, 0xff0001 ==
-		   -0x00ffff, so we wouldn't *need* to bump it there; but we
-		   do for 0xffff = -0x0001.  To be safe without bothering to
-		   check every case, bump it regardless. */
-		if (is_signed && numsignificantbytes < n)
-			++numsignificantbytes;
-	}
+        for (i = 0; i < n; ++i, p += pincr) {
+            if (*p != insignficant)
+                break;
+        }
+        numsignificantbytes = n - i;
+        /* 2's-comp is a bit tricky here, e.g. 0xff00 == -0x0100, so
+           actually has 2 significant bytes.  OTOH, 0xff0001 ==
+           -0x00ffff, so we wouldn't *need* to bump it there; but we
+           do for 0xffff = -0x0001.  To be safe without bothering to
+           check every case, bump it regardless. */
+        if (is_signed && numsignificantbytes < n)
+            ++numsignificantbytes;
+    }
 
-	/* How many Python long digits do we need?  We have
-	   8*numsignificantbytes bits, and each Python long digit has
-	   PyLong_SHIFT bits, so it's the ceiling of the quotient. */
-	/* catch overflow before it happens */
-	if (numsignificantbytes > (PY_SSIZE_T_MAX - PyLong_SHIFT) / 8) {
-		PyErr_SetString(PyExc_OverflowError,
-				"byte array too long to convert to int");
-		return NULL;
-	}
-	ndigits = (numsignificantbytes * 8 + PyLong_SHIFT - 1) / PyLong_SHIFT;
-	v = _PyLong_New(ndigits);
-	if (v == NULL)
-		return NULL;
+    /* How many Python long digits do we need?  We have
+       8*numsignificantbytes bits, and each Python long digit has
+       PyLong_SHIFT bits, so it's the ceiling of the quotient. */
+    /* catch overflow before it happens */
+    if (numsignificantbytes > (PY_SSIZE_T_MAX - PyLong_SHIFT) / 8) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "byte array too long to convert to int");
+        return NULL;
+    }
+    ndigits = (numsignificantbytes * 8 + PyLong_SHIFT - 1) / PyLong_SHIFT;
+    v = _PyLong_New(ndigits);
+    if (v == NULL)
+        return NULL;
 
-	/* Copy the bits over.  The tricky parts are computing 2's-comp on
-	   the fly for signed numbers, and dealing with the mismatch between
-	   8-bit bytes and (probably) 15-bit Python digits.*/
-	{
-		size_t i;
-		twodigits carry = 1;		/* for 2's-comp calculation */
-		twodigits accum = 0;		/* sliding register */
-		unsigned int accumbits = 0; 	/* number of bits in accum */
-		const unsigned char* p = pstartbyte;
+    /* Copy the bits over.  The tricky parts are computing 2's-comp on
+       the fly for signed numbers, and dealing with the mismatch between
+       8-bit bytes and (probably) 15-bit Python digits.*/
+    {
+        size_t i;
+        twodigits carry = 1;                    /* for 2's-comp calculation */
+        twodigits accum = 0;                    /* sliding register */
+        unsigned int accumbits = 0;             /* number of bits in accum */
+        const unsigned char* p = pstartbyte;
 
-		for (i = 0; i < numsignificantbytes; ++i, p += incr) {
-			twodigits thisbyte = *p;
-			/* Compute correction for 2's comp, if needed. */
-			if (is_signed) {
-				thisbyte = (0xff ^ thisbyte) + carry;
-				carry = thisbyte >> 8;
-				thisbyte &= 0xff;
-			}
-			/* Because we're going LSB to MSB, thisbyte is
-			   more significant than what's already in accum,
-			   so needs to be prepended to accum. */
-			accum |= (twodigits)thisbyte << accumbits;
-			accumbits += 8;
-			if (accumbits >= PyLong_SHIFT) {
-				/* There's enough to fill a Python digit. */
-				assert(idigit < ndigits);
-				v->ob_digit[idigit] = (digit)(accum &
-							      PyLong_MASK);
-				++idigit;
-				accum >>= PyLong_SHIFT;
-				accumbits -= PyLong_SHIFT;
-				assert(accumbits < PyLong_SHIFT);
-			}
-		}
-		assert(accumbits < PyLong_SHIFT);
-		if (accumbits) {
-			assert(idigit < ndigits);
-			v->ob_digit[idigit] = (digit)accum;
-			++idigit;
-		}
-	}
+        for (i = 0; i < numsignificantbytes; ++i, p += incr) {
+            twodigits thisbyte = *p;
+            /* Compute correction for 2's comp, if needed. */
+            if (is_signed) {
+                thisbyte = (0xff ^ thisbyte) + carry;
+                carry = thisbyte >> 8;
+                thisbyte &= 0xff;
+            }
+            /* Because we're going LSB to MSB, thisbyte is
+               more significant than what's already in accum,
+               so needs to be prepended to accum. */
+            accum |= (twodigits)thisbyte << accumbits;
+            accumbits += 8;
+            if (accumbits >= PyLong_SHIFT) {
+                /* There's enough to fill a Python digit. */
+                assert(idigit < ndigits);
+                v->ob_digit[idigit] = (digit)(accum &
+                                              PyLong_MASK);
+                ++idigit;
+                accum >>= PyLong_SHIFT;
+                accumbits -= PyLong_SHIFT;
+                assert(accumbits < PyLong_SHIFT);
+            }
+        }
+        assert(accumbits < PyLong_SHIFT);
+        if (accumbits) {
+            assert(idigit < ndigits);
+            v->ob_digit[idigit] = (digit)accum;
+            ++idigit;
+        }
+    }
 
-	Py_SIZE(v) = is_signed ? -idigit : idigit;
-	return (PyObject *)long_normalize(v);
+    Py_SIZE(v) = is_signed ? -idigit : idigit;
+    return (PyObject *)long_normalize(v);
 }
 
 int
 _PyLong_AsByteArray(PyLongObject* v,
-		    unsigned char* bytes, size_t n,
-		    int little_endian, int is_signed)
+                    unsigned char* bytes, size_t n,
+                    int little_endian, int is_signed)
 {
-	Py_ssize_t i;		/* index into v->ob_digit */
-	Py_ssize_t ndigits;		/* |v->ob_size| */
-	twodigits accum;	/* sliding register */
-	unsigned int accumbits; /* # bits in accum */
-	int do_twos_comp;	/* store 2's-comp?  is_signed and v < 0 */
-	digit carry;		/* for computing 2's-comp */
-	size_t j;		/* # bytes filled */
-	unsigned char* p;	/* pointer to next byte in bytes */
-	int pincr;		/* direction to move p */
+    Py_ssize_t i;               /* index into v->ob_digit */
+    Py_ssize_t ndigits;                 /* |v->ob_size| */
+    twodigits accum;            /* sliding register */
+    unsigned int accumbits; /* # bits in accum */
+    int do_twos_comp;           /* store 2's-comp?  is_signed and v < 0 */
+    digit carry;                /* for computing 2's-comp */
+    size_t j;                   /* # bytes filled */
+    unsigned char* p;           /* pointer to next byte in bytes */
+    int pincr;                  /* direction to move p */
 
-	assert(v != NULL && PyLong_Check(v));
+    assert(v != NULL && PyLong_Check(v));
 
-	if (Py_SIZE(v) < 0) {
-		ndigits = -(Py_SIZE(v));
-		if (!is_signed) {
-			PyErr_SetString(PyExc_OverflowError,
-				"can't convert negative long to unsigned");
-			return -1;
-		}
-		do_twos_comp = 1;
-	}
-	else {
-		ndigits = Py_SIZE(v);
-		do_twos_comp = 0;
-	}
+    if (Py_SIZE(v) < 0) {
+        ndigits = -(Py_SIZE(v));
+        if (!is_signed) {
+            PyErr_SetString(PyExc_OverflowError,
+                "can't convert negative long to unsigned");
+            return -1;
+        }
+        do_twos_comp = 1;
+    }
+    else {
+        ndigits = Py_SIZE(v);
+        do_twos_comp = 0;
+    }
 
-	if (little_endian) {
-		p = bytes;
-		pincr = 1;
-	}
-	else {
-		p = bytes + n - 1;
-		pincr = -1;
-	}
+    if (little_endian) {
+        p = bytes;
+        pincr = 1;
+    }
+    else {
+        p = bytes + n - 1;
+        pincr = -1;
+    }
 
-	/* Copy over all the Python digits.
-	   It's crucial that every Python digit except for the MSD contribute
-	   exactly PyLong_SHIFT bits to the total, so first assert that the long is
-	   normalized. */
-	assert(ndigits == 0 || v->ob_digit[ndigits - 1] != 0);
-	j = 0;
-	accum = 0;
-	accumbits = 0;
-	carry = do_twos_comp ? 1 : 0;
-	for (i = 0; i < ndigits; ++i) {
-		digit thisdigit = v->ob_digit[i];
-		if (do_twos_comp) {
-			thisdigit = (thisdigit ^ PyLong_MASK) + carry;
-			carry = thisdigit >> PyLong_SHIFT;
-			thisdigit &= PyLong_MASK;
-		}
-		/* Because we're going LSB to MSB, thisdigit is more
-		   significant than what's already in accum, so needs to be
-		   prepended to accum. */
-		accum |= (twodigits)thisdigit << accumbits;
+    /* Copy over all the Python digits.
+       It's crucial that every Python digit except for the MSD contribute
+       exactly PyLong_SHIFT bits to the total, so first assert that the long is
+       normalized. */
+    assert(ndigits == 0 || v->ob_digit[ndigits - 1] != 0);
+    j = 0;
+    accum = 0;
+    accumbits = 0;
+    carry = do_twos_comp ? 1 : 0;
+    for (i = 0; i < ndigits; ++i) {
+        digit thisdigit = v->ob_digit[i];
+        if (do_twos_comp) {
+            thisdigit = (thisdigit ^ PyLong_MASK) + carry;
+            carry = thisdigit >> PyLong_SHIFT;
+            thisdigit &= PyLong_MASK;
+        }
+        /* Because we're going LSB to MSB, thisdigit is more
+           significant than what's already in accum, so needs to be
+           prepended to accum. */
+        accum |= (twodigits)thisdigit << accumbits;
 
-		/* The most-significant digit may be (probably is) at least
-		   partly empty. */
-		if (i == ndigits - 1) {
-			/* Count # of sign bits -- they needn't be stored,
-			 * although for signed conversion we need later to
-			 * make sure at least one sign bit gets stored. */
-			digit s = do_twos_comp ? thisdigit ^ PyLong_MASK :
-				                thisdigit;
-			while (s != 0) {
-				s >>= 1;
-				accumbits++;
-			}
-		}
-		else
-			accumbits += PyLong_SHIFT;
+        /* The most-significant digit may be (probably is) at least
+           partly empty. */
+        if (i == ndigits - 1) {
+            /* Count # of sign bits -- they needn't be stored,
+             * although for signed conversion we need later to
+             * make sure at least one sign bit gets stored. */
+            digit s = do_twos_comp ? thisdigit ^ PyLong_MASK :
+                        thisdigit;
+            while (s != 0) {
+                s >>= 1;
+                accumbits++;
+            }
+        }
+        else
+            accumbits += PyLong_SHIFT;
 
-		/* Store as many bytes as possible. */
-		while (accumbits >= 8) {
-			if (j >= n)
-				goto Overflow;
-			++j;
-			*p = (unsigned char)(accum & 0xff);
-			p += pincr;
-			accumbits -= 8;
-			accum >>= 8;
-		}
-	}
+        /* Store as many bytes as possible. */
+        while (accumbits >= 8) {
+            if (j >= n)
+                goto Overflow;
+            ++j;
+            *p = (unsigned char)(accum & 0xff);
+            p += pincr;
+            accumbits -= 8;
+            accum >>= 8;
+        }
+    }
 
-	/* Store the straggler (if any). */
-	assert(accumbits < 8);
-	assert(carry == 0);  /* else do_twos_comp and *every* digit was 0 */
-	if (accumbits > 0) {
-		if (j >= n)
-			goto Overflow;
-		++j;
-		if (do_twos_comp) {
-			/* Fill leading bits of the byte with sign bits
-			   (appropriately pretending that the long had an
-			   infinite supply of sign bits). */
-			accum |= (~(twodigits)0) << accumbits;
-		}
-		*p = (unsigned char)(accum & 0xff);
-		p += pincr;
-	}
-	else if (j == n && n > 0 && is_signed) {
-		/* The main loop filled the byte array exactly, so the code
-		   just above didn't get to ensure there's a sign bit, and the
-		   loop below wouldn't add one either.  Make sure a sign bit
-		   exists. */
-		unsigned char msb = *(p - pincr);
-		int sign_bit_set = msb >= 0x80;
-		assert(accumbits == 0);
-		if (sign_bit_set == do_twos_comp)
-			return 0;
-		else
-			goto Overflow;
-	}
+    /* Store the straggler (if any). */
+    assert(accumbits < 8);
+    assert(carry == 0);  /* else do_twos_comp and *every* digit was 0 */
+    if (accumbits > 0) {
+        if (j >= n)
+            goto Overflow;
+        ++j;
+        if (do_twos_comp) {
+            /* Fill leading bits of the byte with sign bits
+               (appropriately pretending that the long had an
+               infinite supply of sign bits). */
+            accum |= (~(twodigits)0) << accumbits;
+        }
+        *p = (unsigned char)(accum & 0xff);
+        p += pincr;
+    }
+    else if (j == n && n > 0 && is_signed) {
+        /* The main loop filled the byte array exactly, so the code
+           just above didn't get to ensure there's a sign bit, and the
+           loop below wouldn't add one either.  Make sure a sign bit
+           exists. */
+        unsigned char msb = *(p - pincr);
+        int sign_bit_set = msb >= 0x80;
+        assert(accumbits == 0);
+        if (sign_bit_set == do_twos_comp)
+            return 0;
+        else
+            goto Overflow;
+    }
 
-	/* Fill remaining bytes with copies of the sign bit. */
-	{
-		unsigned char signbyte = do_twos_comp ? 0xffU : 0U;
-		for ( ; j < n; ++j, p += pincr)
-			*p = signbyte;
-	}
+    /* Fill remaining bytes with copies of the sign bit. */
+    {
+        unsigned char signbyte = do_twos_comp ? 0xffU : 0U;
+        for ( ; j < n; ++j, p += pincr)
+            *p = signbyte;
+    }
 
-	return 0;
+    return 0;
 
 Overflow:
-	PyErr_SetString(PyExc_OverflowError, "long too big to convert");
-	return -1;
+    PyErr_SetString(PyExc_OverflowError, "long too big to convert");
+    return -1;
 
 }
 
@@ -753,9 +753,9 @@
 PyLong_FromVoidPtr(void *p)
 {
 #if SIZEOF_VOID_P <= SIZEOF_LONG
-	if ((long)p < 0)
-		return PyLong_FromUnsignedLong((unsigned long)p);
-	return PyInt_FromLong((long)p);
+    if ((long)p < 0)
+        return PyLong_FromUnsignedLong((unsigned long)p);
+    return PyInt_FromLong((long)p);
 #else
 
 #ifndef HAVE_LONG_LONG
@@ -764,10 +764,10 @@
 #if SIZEOF_LONG_LONG < SIZEOF_VOID_P
 #   error "PyLong_FromVoidPtr: sizeof(PY_LONG_LONG) < sizeof(void*)"
 #endif
-	/* optimize null pointers */
-	if (p == NULL)
-		return PyInt_FromLong(0);
-	return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)p);
+    /* optimize null pointers */
+    if (p == NULL)
+        return PyInt_FromLong(0);
+    return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)p);
 
 #endif /* SIZEOF_VOID_P <= SIZEOF_LONG */
 }
@@ -777,19 +777,19 @@
 void *
 PyLong_AsVoidPtr(PyObject *vv)
 {
-	/* This function will allow int or long objects. If vv is neither,
-	   then the PyLong_AsLong*() functions will raise the exception:
-	   PyExc_SystemError, "bad argument to internal function"
-	*/
+    /* This function will allow int or long objects. If vv is neither,
+       then the PyLong_AsLong*() functions will raise the exception:
+       PyExc_SystemError, "bad argument to internal function"
+    */
 #if SIZEOF_VOID_P <= SIZEOF_LONG
-	long x;
+    long x;
 
-	if (PyInt_Check(vv))
-		x = PyInt_AS_LONG(vv);
-	else if (PyLong_Check(vv) && _PyLong_Sign(vv) < 0)
-		x = PyLong_AsLong(vv);
-	else
-		x = PyLong_AsUnsignedLong(vv);
+    if (PyInt_Check(vv))
+        x = PyInt_AS_LONG(vv);
+    else if (PyLong_Check(vv) && _PyLong_Sign(vv) < 0)
+        x = PyLong_AsLong(vv);
+    else
+        x = PyLong_AsUnsignedLong(vv);
 #else
 
 #ifndef HAVE_LONG_LONG
@@ -798,20 +798,20 @@
 #if SIZEOF_LONG_LONG < SIZEOF_VOID_P
 #   error "PyLong_AsVoidPtr: sizeof(PY_LONG_LONG) < sizeof(void*)"
 #endif
-	PY_LONG_LONG x;
+    PY_LONG_LONG x;
 
-	if (PyInt_Check(vv))
-		x = PyInt_AS_LONG(vv);
-	else if (PyLong_Check(vv) && _PyLong_Sign(vv) < 0)
-		x = PyLong_AsLongLong(vv);
-	else
-		x = PyLong_AsUnsignedLongLong(vv);
+    if (PyInt_Check(vv))
+        x = PyInt_AS_LONG(vv);
+    else if (PyLong_Check(vv) && _PyLong_Sign(vv) < 0)
+        x = PyLong_AsLongLong(vv);
+    else
+        x = PyLong_AsUnsignedLongLong(vv);
 
 #endif /* SIZEOF_VOID_P <= SIZEOF_LONG */
 
-	if (x == -1 && PyErr_Occurred())
-		return NULL;
-	return (void *)x;
+    if (x == -1 && PyErr_Occurred())
+        return NULL;
+    return (void *)x;
 }
 
 #ifdef HAVE_LONG_LONG
@@ -821,49 +821,49 @@
  */
 
 #define IS_LITTLE_ENDIAN (int)*(unsigned char*)&one
-#define PY_ABS_LLONG_MIN	(0-(unsigned PY_LONG_LONG)PY_LLONG_MIN)
+#define PY_ABS_LLONG_MIN        (0-(unsigned PY_LONG_LONG)PY_LLONG_MIN)
 
 /* Create a new long int object from a C PY_LONG_LONG int. */
 
 PyObject *
 PyLong_FromLongLong(PY_LONG_LONG ival)
 {
-	PyLongObject *v;
-	unsigned PY_LONG_LONG abs_ival;
-	unsigned PY_LONG_LONG t;  /* unsigned so >> doesn't propagate sign bit */
-	int ndigits = 0;
-	int negative = 0;
+    PyLongObject *v;
+    unsigned PY_LONG_LONG abs_ival;
+    unsigned PY_LONG_LONG t;  /* unsigned so >> doesn't propagate sign bit */
+    int ndigits = 0;
+    int negative = 0;
 
-	if (ival < 0) {
-		/* avoid signed overflow on negation;  see comments
-		   in PyLong_FromLong above. */
-		abs_ival = (unsigned PY_LONG_LONG)(-1-ival) + 1;
-		negative = 1;
-	}
-	else {
-		abs_ival = (unsigned PY_LONG_LONG)ival;
-	}
+    if (ival < 0) {
+        /* avoid signed overflow on negation;  see comments
+           in PyLong_FromLong above. */
+        abs_ival = (unsigned PY_LONG_LONG)(-1-ival) + 1;
+        negative = 1;
+    }
+    else {
+        abs_ival = (unsigned PY_LONG_LONG)ival;
+    }
 
-	/* Count the number of Python digits.
-	   We used to pick 5 ("big enough for anything"), but that's a
-	   waste of time and space given that 5*15 = 75 bits are rarely
-	   needed. */
-	t = abs_ival;
-	while (t) {
-		++ndigits;
-		t >>= PyLong_SHIFT;
-	}
-	v = _PyLong_New(ndigits);
-	if (v != NULL) {
-		digit *p = v->ob_digit;
-		Py_SIZE(v) = negative ? -ndigits : ndigits;
-		t = abs_ival;
-		while (t) {
-			*p++ = (digit)(t & PyLong_MASK);
-			t >>= PyLong_SHIFT;
-		}
-	}
-	return (PyObject *)v;
+    /* Count the number of Python digits.
+       We used to pick 5 ("big enough for anything"), but that's a
+       waste of time and space given that 5*15 = 75 bits are rarely
+       needed. */
+    t = abs_ival;
+    while (t) {
+        ++ndigits;
+        t >>= PyLong_SHIFT;
+    }
+    v = _PyLong_New(ndigits);
+    if (v != NULL) {
+        digit *p = v->ob_digit;
+        Py_SIZE(v) = negative ? -ndigits : ndigits;
+        t = abs_ival;
+        while (t) {
+            *p++ = (digit)(t & PyLong_MASK);
+            t >>= PyLong_SHIFT;
+        }
+    }
+    return (PyObject *)v;
 }
 
 /* Create a new long int object from a C unsigned PY_LONG_LONG int. */
@@ -871,26 +871,26 @@
 PyObject *
 PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG ival)
 {
-	PyLongObject *v;
-	unsigned PY_LONG_LONG t;
-	int ndigits = 0;
+    PyLongObject *v;
+    unsigned PY_LONG_LONG t;
+    int ndigits = 0;
 
-	/* Count the number of Python digits. */
-	t = (unsigned PY_LONG_LONG)ival;
-	while (t) {
-		++ndigits;
-		t >>= PyLong_SHIFT;
-	}
-	v = _PyLong_New(ndigits);
-	if (v != NULL) {
-		digit *p = v->ob_digit;
-		Py_SIZE(v) = ndigits;
-		while (ival) {
-			*p++ = (digit)(ival & PyLong_MASK);
-			ival >>= PyLong_SHIFT;
-		}
-	}
-	return (PyObject *)v;
+    /* Count the number of Python digits. */
+    t = (unsigned PY_LONG_LONG)ival;
+    while (t) {
+        ++ndigits;
+        t >>= PyLong_SHIFT;
+    }
+    v = _PyLong_New(ndigits);
+    if (v != NULL) {
+        digit *p = v->ob_digit;
+        Py_SIZE(v) = ndigits;
+        while (ival) {
+            *p++ = (digit)(ival & PyLong_MASK);
+            ival >>= PyLong_SHIFT;
+        }
+    }
+    return (PyObject *)v;
 }
 
 /* Create a new long int object from a C Py_ssize_t. */
@@ -898,11 +898,11 @@
 PyObject *
 PyLong_FromSsize_t(Py_ssize_t ival)
 {
-	Py_ssize_t bytes = ival;
-	int one = 1;
-	return _PyLong_FromByteArray(
-			(unsigned char *)&bytes,
-			SIZEOF_SIZE_T, IS_LITTLE_ENDIAN, 1);
+    Py_ssize_t bytes = ival;
+    int one = 1;
+    return _PyLong_FromByteArray(
+                    (unsigned char *)&bytes,
+                    SIZEOF_SIZE_T, IS_LITTLE_ENDIAN, 1);
 }
 
 /* Create a new long int object from a C size_t. */
@@ -910,11 +910,11 @@
 PyObject *
 PyLong_FromSize_t(size_t ival)
 {
-	size_t bytes = ival;
-	int one = 1;
-	return _PyLong_FromByteArray(
-			(unsigned char *)&bytes,
-			SIZEOF_SIZE_T, IS_LITTLE_ENDIAN, 0);
+    size_t bytes = ival;
+    int one = 1;
+    return _PyLong_FromByteArray(
+                    (unsigned char *)&bytes,
+                    SIZEOF_SIZE_T, IS_LITTLE_ENDIAN, 0);
 }
 
 /* Get a C PY_LONG_LONG int from a long int object.
@@ -923,51 +923,51 @@
 PY_LONG_LONG
 PyLong_AsLongLong(PyObject *vv)
 {
-	PY_LONG_LONG bytes;
-	int one = 1;
-	int res;
+    PY_LONG_LONG bytes;
+    int one = 1;
+    int res;
 
-	if (vv == NULL) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (!PyLong_Check(vv)) {
-		PyNumberMethods *nb;
-		PyObject *io;
-		if (PyInt_Check(vv))
-			return (PY_LONG_LONG)PyInt_AsLong(vv);
-		if ((nb = vv->ob_type->tp_as_number) == NULL ||
-		    nb->nb_int == NULL) {
-			PyErr_SetString(PyExc_TypeError, "an integer is required");
-			return -1;
-		}
-		io = (*nb->nb_int) (vv);
-		if (io == NULL)
-			return -1;
-		if (PyInt_Check(io)) {
-			bytes = PyInt_AsLong(io);
-			Py_DECREF(io);
-			return bytes;
-		}
-		if (PyLong_Check(io)) {
-			bytes = PyLong_AsLongLong(io);
-			Py_DECREF(io);
-			return bytes;
-		}
-		Py_DECREF(io);
-		PyErr_SetString(PyExc_TypeError, "integer conversion failed");
-		return -1;
-	}
+    if (vv == NULL) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (!PyLong_Check(vv)) {
+        PyNumberMethods *nb;
+        PyObject *io;
+        if (PyInt_Check(vv))
+            return (PY_LONG_LONG)PyInt_AsLong(vv);
+        if ((nb = vv->ob_type->tp_as_number) == NULL ||
+            nb->nb_int == NULL) {
+            PyErr_SetString(PyExc_TypeError, "an integer is required");
+            return -1;
+        }
+        io = (*nb->nb_int) (vv);
+        if (io == NULL)
+            return -1;
+        if (PyInt_Check(io)) {
+            bytes = PyInt_AsLong(io);
+            Py_DECREF(io);
+            return bytes;
+        }
+        if (PyLong_Check(io)) {
+            bytes = PyLong_AsLongLong(io);
+            Py_DECREF(io);
+            return bytes;
+        }
+        Py_DECREF(io);
+        PyErr_SetString(PyExc_TypeError, "integer conversion failed");
+        return -1;
+    }
 
-	res = _PyLong_AsByteArray(
-			(PyLongObject *)vv, (unsigned char *)&bytes,
-			SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 1);
+    res = _PyLong_AsByteArray(
+                    (PyLongObject *)vv, (unsigned char *)&bytes,
+                    SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 1);
 
-	/* Plan 9 can't handle PY_LONG_LONG in ? : expressions */
-	if (res < 0)
-		return (PY_LONG_LONG)-1;
-	else
-		return bytes;
+    /* Plan 9 can't handle PY_LONG_LONG in ? : expressions */
+    if (res < 0)
+        return (PY_LONG_LONG)-1;
+    else
+        return bytes;
 }
 
 /* Get a C unsigned PY_LONG_LONG int from a long int object.
@@ -976,24 +976,24 @@
 unsigned PY_LONG_LONG
 PyLong_AsUnsignedLongLong(PyObject *vv)
 {
-	unsigned PY_LONG_LONG bytes;
-	int one = 1;
-	int res;
+    unsigned PY_LONG_LONG bytes;
+    int one = 1;
+    int res;
 
-	if (vv == NULL || !PyLong_Check(vv)) {
-		PyErr_BadInternalCall();
-		return (unsigned PY_LONG_LONG)-1;
-	}
+    if (vv == NULL || !PyLong_Check(vv)) {
+        PyErr_BadInternalCall();
+        return (unsigned PY_LONG_LONG)-1;
+    }
 
-	res = _PyLong_AsByteArray(
-			(PyLongObject *)vv, (unsigned char *)&bytes,
-			SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 0);
+    res = _PyLong_AsByteArray(
+                    (PyLongObject *)vv, (unsigned char *)&bytes,
+                    SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 0);
 
-	/* Plan 9 can't handle PY_LONG_LONG in ? : expressions */
-	if (res < 0)
-		return (unsigned PY_LONG_LONG)res;
-	else
-		return bytes;
+    /* Plan 9 can't handle PY_LONG_LONG in ? : expressions */
+    if (res < 0)
+        return (unsigned PY_LONG_LONG)res;
+    else
+        return bytes;
 }
 
 /* Get a C unsigned long int from a long int object, ignoring the high bits.
@@ -1002,27 +1002,27 @@
 unsigned PY_LONG_LONG
 PyLong_AsUnsignedLongLongMask(PyObject *vv)
 {
-	register PyLongObject *v;
-	unsigned PY_LONG_LONG x;
-	Py_ssize_t i;
-	int sign;
+    register PyLongObject *v;
+    unsigned PY_LONG_LONG x;
+    Py_ssize_t i;
+    int sign;
 
-	if (vv == NULL || !PyLong_Check(vv)) {
-		PyErr_BadInternalCall();
-		return (unsigned long) -1;
-	}
-	v = (PyLongObject *)vv;
-	i = v->ob_size;
-	sign = 1;
-	x = 0;
-	if (i < 0) {
-		sign = -1;
-		i = -i;
-	}
-	while (--i >= 0) {
-		x = (x << PyLong_SHIFT) | v->ob_digit[i];
-	}
-	return x * sign;
+    if (vv == NULL || !PyLong_Check(vv)) {
+        PyErr_BadInternalCall();
+        return (unsigned long) -1;
+    }
+    v = (PyLongObject *)vv;
+    i = v->ob_size;
+    sign = 1;
+    x = 0;
+    if (i < 0) {
+        sign = -1;
+        i = -i;
+    }
+    while (--i >= 0) {
+        x = (x << PyLong_SHIFT) | v->ob_digit[i];
+    }
+    return x * sign;
 }
 
 /* Get a C long long int from a Python long or Python int object.
@@ -1036,95 +1036,95 @@
 PY_LONG_LONG
 PyLong_AsLongLongAndOverflow(PyObject *vv, int *overflow)
 {
-	/* This version by Tim Peters */
-	register PyLongObject *v;
-	unsigned PY_LONG_LONG x, prev;
-	PY_LONG_LONG res;
-	Py_ssize_t i;
-	int sign;
-	int do_decref = 0; /* if nb_int was called */
+    /* This version by Tim Peters */
+    register PyLongObject *v;
+    unsigned PY_LONG_LONG x, prev;
+    PY_LONG_LONG res;
+    Py_ssize_t i;
+    int sign;
+    int do_decref = 0; /* if nb_int was called */
 
-	*overflow = 0;
-	if (vv == NULL) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
+    *overflow = 0;
+    if (vv == NULL) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
 
-	if (PyInt_Check(vv))
-		return PyInt_AsLong(vv);
+    if (PyInt_Check(vv))
+        return PyInt_AsLong(vv);
 
-	if (!PyLong_Check(vv)) {
-		PyNumberMethods *nb;
-		nb = vv->ob_type->tp_as_number;
-		if (nb == NULL || nb->nb_int == NULL) {
-			PyErr_SetString(PyExc_TypeError,
-					"an integer is required");
-			return -1;
-		}
-		vv = (*nb->nb_int) (vv);
-		if (vv == NULL)
-			return -1;
-		do_decref = 1;
-		if(PyInt_Check(vv)) {
-			res = PyInt_AsLong(vv);
-			goto exit;
-		}
-		if (!PyLong_Check(vv)) {
-			Py_DECREF(vv);
-			PyErr_SetString(PyExc_TypeError,
-					"nb_int should return int object");
-			return -1;
-		}
-	}
+    if (!PyLong_Check(vv)) {
+        PyNumberMethods *nb;
+        nb = vv->ob_type->tp_as_number;
+        if (nb == NULL || nb->nb_int == NULL) {
+            PyErr_SetString(PyExc_TypeError,
+                            "an integer is required");
+            return -1;
+        }
+        vv = (*nb->nb_int) (vv);
+        if (vv == NULL)
+            return -1;
+        do_decref = 1;
+        if(PyInt_Check(vv)) {
+            res = PyInt_AsLong(vv);
+            goto exit;
+        }
+        if (!PyLong_Check(vv)) {
+            Py_DECREF(vv);
+            PyErr_SetString(PyExc_TypeError,
+                            "nb_int should return int object");
+            return -1;
+        }
+    }
 
-	res = -1;
-	v = (PyLongObject *)vv;
-	i = Py_SIZE(v);
+    res = -1;
+    v = (PyLongObject *)vv;
+    i = Py_SIZE(v);
 
-	switch (i) {
-	case -1:
-		res = -(sdigit)v->ob_digit[0];
-		break;
-	case 0:
-		res = 0;
-		break;
-	case 1:
-		res = v->ob_digit[0];
-		break;
-	default:
-		sign = 1;
-		x = 0;
-		if (i < 0) {
-			sign = -1;
-			i = -(i);
-		}
-		while (--i >= 0) {
-			prev = x;
-			x = (x << PyLong_SHIFT) + v->ob_digit[i];
-			if ((x >> PyLong_SHIFT) != prev) {
-				*overflow = sign;
-				goto exit;
-			}
-		}
-		/* Haven't lost any bits, but casting to long requires extra
-		 * care (see comment above).
-		 */
-		if (x <= (unsigned PY_LONG_LONG)PY_LLONG_MAX) {
-			res = (PY_LONG_LONG)x * sign;
-		}
-		else if (sign < 0 && x == PY_ABS_LLONG_MIN) {
-			res = PY_LLONG_MIN;
-		}
-		else {
-			*overflow = sign;
-			/* res is already set to -1 */
-		}
-	}
+    switch (i) {
+    case -1:
+        res = -(sdigit)v->ob_digit[0];
+        break;
+    case 0:
+        res = 0;
+        break;
+    case 1:
+        res = v->ob_digit[0];
+        break;
+    default:
+        sign = 1;
+        x = 0;
+        if (i < 0) {
+            sign = -1;
+            i = -(i);
+        }
+        while (--i >= 0) {
+            prev = x;
+            x = (x << PyLong_SHIFT) + v->ob_digit[i];
+            if ((x >> PyLong_SHIFT) != prev) {
+                *overflow = sign;
+                goto exit;
+            }
+        }
+        /* Haven't lost any bits, but casting to long requires extra
+         * care (see comment above).
+         */
+        if (x <= (unsigned PY_LONG_LONG)PY_LLONG_MAX) {
+            res = (PY_LONG_LONG)x * sign;
+        }
+        else if (sign < 0 && x == PY_ABS_LLONG_MIN) {
+            res = PY_LLONG_MIN;
+        }
+        else {
+            *overflow = sign;
+            /* res is already set to -1 */
+        }
+    }
  exit:
-	if (do_decref) {
-		Py_DECREF(vv);
-	}
-	return res;
+    if (do_decref) {
+        Py_DECREF(vv);
+    }
+    return res;
 }
 
 #undef IS_LITTLE_ENDIAN
@@ -1134,54 +1134,54 @@
 
 static int
 convert_binop(PyObject *v, PyObject *w, PyLongObject **a, PyLongObject **b) {
-	if (PyLong_Check(v)) {
-		*a = (PyLongObject *) v;
-		Py_INCREF(v);
-	}
-	else if (PyInt_Check(v)) {
-		*a = (PyLongObject *) PyLong_FromLong(PyInt_AS_LONG(v));
-	}
-	else {
-		return 0;
-	}
-	if (PyLong_Check(w)) {
-		*b = (PyLongObject *) w;
-		Py_INCREF(w);
-	}
-	else if (PyInt_Check(w)) {
-		*b = (PyLongObject *) PyLong_FromLong(PyInt_AS_LONG(w));
-	}
-	else {
-		Py_DECREF(*a);
-		return 0;
-	}
-	return 1;
+    if (PyLong_Check(v)) {
+        *a = (PyLongObject *) v;
+        Py_INCREF(v);
+    }
+    else if (PyInt_Check(v)) {
+        *a = (PyLongObject *) PyLong_FromLong(PyInt_AS_LONG(v));
+    }
+    else {
+        return 0;
+    }
+    if (PyLong_Check(w)) {
+        *b = (PyLongObject *) w;
+        Py_INCREF(w);
+    }
+    else if (PyInt_Check(w)) {
+        *b = (PyLongObject *) PyLong_FromLong(PyInt_AS_LONG(w));
+    }
+    else {
+        Py_DECREF(*a);
+        return 0;
+    }
+    return 1;
 }
 
 #define CONVERT_BINOP(v, w, a, b) \
-	if (!convert_binop(v, w, a, b)) { \
-		Py_INCREF(Py_NotImplemented); \
-		return Py_NotImplemented; \
-	}
+    if (!convert_binop(v, w, a, b)) { \
+        Py_INCREF(Py_NotImplemented); \
+        return Py_NotImplemented; \
+    }
 
 /* bits_in_digit(d) returns the unique integer k such that 2**(k-1) <= d <
    2**k if d is nonzero, else 0. */
 
 static const unsigned char BitLengthTable[32] = {
-	0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
-	5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+    0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
 };
 
 static int
 bits_in_digit(digit d)
 {
-	int d_bits = 0;
-	while (d >= 32) {
-		d_bits += 6;
-		d >>= 6;
-	}
-	d_bits += (int)BitLengthTable[d];
-	return d_bits;
+    int d_bits = 0;
+    while (d >= 32) {
+        d_bits += 6;
+        d >>= 6;
+    }
+    d_bits += (int)BitLengthTable[d];
+    return d_bits;
 }
 
 /* x[0:m] and y[0:n] are digit vectors, LSD first, m >= n required.  x[0:n]
@@ -1191,23 +1191,23 @@
 static digit
 v_iadd(digit *x, Py_ssize_t m, digit *y, Py_ssize_t n)
 {
-	Py_ssize_t i;
-	digit carry = 0;
+    Py_ssize_t i;
+    digit carry = 0;
 
-	assert(m >= n);
-	for (i = 0; i < n; ++i) {
-		carry += x[i] + y[i];
-		x[i] = carry & PyLong_MASK;
-		carry >>= PyLong_SHIFT;
-		assert((carry & 1) == carry);
-	}
-	for (; carry && i < m; ++i) {
-		carry += x[i];
-		x[i] = carry & PyLong_MASK;
-		carry >>= PyLong_SHIFT;
-		assert((carry & 1) == carry);
-	}
-	return carry;
+    assert(m >= n);
+    for (i = 0; i < n; ++i) {
+        carry += x[i] + y[i];
+        x[i] = carry & PyLong_MASK;
+        carry >>= PyLong_SHIFT;
+        assert((carry & 1) == carry);
+    }
+    for (; carry && i < m; ++i) {
+        carry += x[i];
+        x[i] = carry & PyLong_MASK;
+        carry >>= PyLong_SHIFT;
+        assert((carry & 1) == carry);
+    }
+    return carry;
 }
 
 /* x[0:m] and y[0:n] are digit vectors, LSD first, m >= n required.  x[0:n]
@@ -1217,23 +1217,23 @@
 static digit
 v_isub(digit *x, Py_ssize_t m, digit *y, Py_ssize_t n)
 {
-	Py_ssize_t i;
-	digit borrow = 0;
+    Py_ssize_t i;
+    digit borrow = 0;
 
-	assert(m >= n);
-	for (i = 0; i < n; ++i) {
-		borrow = x[i] - y[i] - borrow;
-		x[i] = borrow & PyLong_MASK;
-		borrow >>= PyLong_SHIFT;
-		borrow &= 1;	/* keep only 1 sign bit */
-	}
-	for (; borrow && i < m; ++i) {
-		borrow = x[i] - borrow;
-		x[i] = borrow & PyLong_MASK;
-		borrow >>= PyLong_SHIFT;
-		borrow &= 1;
-	}
-	return borrow;
+    assert(m >= n);
+    for (i = 0; i < n; ++i) {
+        borrow = x[i] - y[i] - borrow;
+        x[i] = borrow & PyLong_MASK;
+        borrow >>= PyLong_SHIFT;
+        borrow &= 1;            /* keep only 1 sign bit */
+    }
+    for (; borrow && i < m; ++i) {
+        borrow = x[i] - borrow;
+        x[i] = borrow & PyLong_MASK;
+        borrow >>= PyLong_SHIFT;
+        borrow &= 1;
+    }
+    return borrow;
 }
 
 /* Shift digit vector a[0:m] d bits left, with 0 <= d < PyLong_SHIFT.  Put
@@ -1242,16 +1242,16 @@
 static digit
 v_lshift(digit *z, digit *a, Py_ssize_t m, int d)
 {
-	Py_ssize_t i;
-	digit carry = 0;
+    Py_ssize_t i;
+    digit carry = 0;
 
-	assert(0 <= d && d < PyLong_SHIFT);
-	for (i=0; i < m; i++) {
-		twodigits acc = (twodigits)a[i] << d | carry;
-		z[i] = (digit)acc & PyLong_MASK;
-		carry = (digit)(acc >> PyLong_SHIFT);
-	}
-	return carry;
+    assert(0 <= d && d < PyLong_SHIFT);
+    for (i=0; i < m; i++) {
+        twodigits acc = (twodigits)a[i] << d | carry;
+        z[i] = (digit)acc & PyLong_MASK;
+        carry = (digit)(acc >> PyLong_SHIFT);
+    }
+    return carry;
 }
 
 /* Shift digit vector a[0:m] d bits right, with 0 <= d < PyLong_SHIFT.  Put
@@ -1260,17 +1260,17 @@
 static digit
 v_rshift(digit *z, digit *a, Py_ssize_t m, int d)
 {
-	Py_ssize_t i;
-	digit carry = 0;
-	digit mask = ((digit)1 << d) - 1U;
+    Py_ssize_t i;
+    digit carry = 0;
+    digit mask = ((digit)1 << d) - 1U;
 
-	assert(0 <= d && d < PyLong_SHIFT);
-	for (i=m; i-- > 0;) {
-		twodigits acc = (twodigits)carry << PyLong_SHIFT | a[i];
-		carry = (digit)acc & mask;
-		z[i] = (digit)(acc >> d);
-	}
-	return carry;
+    assert(0 <= d && d < PyLong_SHIFT);
+    for (i=m; i-- > 0;) {
+        twodigits acc = (twodigits)carry << PyLong_SHIFT | a[i];
+        carry = (digit)acc & mask;
+        z[i] = (digit)(acc >> d);
+    }
+    return carry;
 }
 
 /* Divide long pin, w/ size digits, by non-zero digit n, storing quotient
@@ -1282,18 +1282,18 @@
 static digit
 inplace_divrem1(digit *pout, digit *pin, Py_ssize_t size, digit n)
 {
-	twodigits rem = 0;
+    twodigits rem = 0;
 
-	assert(n > 0 && n <= PyLong_MASK);
-	pin += size;
-	pout += size;
-	while (--size >= 0) {
-		digit hi;
-		rem = (rem << PyLong_SHIFT) | *--pin;
-		*--pout = hi = (digit)(rem / n);
-		rem -= (twodigits)hi * n;
-	}
-	return (digit)rem;
+    assert(n > 0 && n <= PyLong_MASK);
+    pin += size;
+    pout += size;
+    while (--size >= 0) {
+        digit hi;
+        rem = (rem << PyLong_SHIFT) | *--pin;
+        *--pout = hi = (digit)(rem / n);
+        rem -= (twodigits)hi * n;
+    }
+    return (digit)rem;
 }
 
 /* Divide a long integer by a digit, returning both the quotient
@@ -1303,15 +1303,15 @@
 static PyLongObject *
 divrem1(PyLongObject *a, digit n, digit *prem)
 {
-	const Py_ssize_t size = ABS(Py_SIZE(a));
-	PyLongObject *z;
+    const Py_ssize_t size = ABS(Py_SIZE(a));
+    PyLongObject *z;
 
-	assert(n > 0 && n <= PyLong_MASK);
-	z = _PyLong_New(size);
-	if (z == NULL)
-		return NULL;
-	*prem = inplace_divrem1(z->ob_digit, a->ob_digit, size, n);
-	return long_normalize(z);
+    assert(n > 0 && n <= PyLong_MASK);
+    z = _PyLong_New(size);
+    if (z == NULL)
+        return NULL;
+    *prem = inplace_divrem1(z->ob_digit, a->ob_digit, size, n);
+    return long_normalize(z);
 }
 
 /* Convert a long integer to a base 10 string.  Returns a new non-shared
@@ -1321,114 +1321,114 @@
 static PyObject *
 long_to_decimal_string(PyObject *aa, int addL)
 {
-	PyLongObject *scratch, *a;
-	PyObject *str;
-	Py_ssize_t size, strlen, size_a, i, j;
-	digit *pout, *pin, rem, tenpow;
-	char *p;
-	int negative;
+    PyLongObject *scratch, *a;
+    PyObject *str;
+    Py_ssize_t size, strlen, size_a, i, j;
+    digit *pout, *pin, rem, tenpow;
+    char *p;
+    int negative;
 
-	a = (PyLongObject *)aa;
-	if (a == NULL || !PyLong_Check(a)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	size_a = ABS(Py_SIZE(a));
-	negative = Py_SIZE(a) < 0;
+    a = (PyLongObject *)aa;
+    if (a == NULL || !PyLong_Check(a)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    size_a = ABS(Py_SIZE(a));
+    negative = Py_SIZE(a) < 0;
 
-	/* quick and dirty upper bound for the number of digits
-	   required to express a in base _PyLong_DECIMAL_BASE:
+    /* quick and dirty upper bound for the number of digits
+       required to express a in base _PyLong_DECIMAL_BASE:
 
-	     #digits = 1 + floor(log2(a) / log2(_PyLong_DECIMAL_BASE))
+         #digits = 1 + floor(log2(a) / log2(_PyLong_DECIMAL_BASE))
 
-	   But log2(a) < size_a * PyLong_SHIFT, and
-	   log2(_PyLong_DECIMAL_BASE) = log2(10) * _PyLong_DECIMAL_SHIFT
-				      > 3 * _PyLong_DECIMAL_SHIFT
-	*/
-	if (size_a > PY_SSIZE_T_MAX / PyLong_SHIFT) {
-		PyErr_SetString(PyExc_OverflowError,
-				"long is too large to format");
-		return NULL;
-	}
-	/* the expression size_a * PyLong_SHIFT is now safe from overflow */
-	size = 1 + size_a * PyLong_SHIFT / (3 * _PyLong_DECIMAL_SHIFT);
-	scratch = _PyLong_New(size);
-	if (scratch == NULL)
-		return NULL;
+       But log2(a) < size_a * PyLong_SHIFT, and
+       log2(_PyLong_DECIMAL_BASE) = log2(10) * _PyLong_DECIMAL_SHIFT
+                                  > 3 * _PyLong_DECIMAL_SHIFT
+    */
+    if (size_a > PY_SSIZE_T_MAX / PyLong_SHIFT) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "long is too large to format");
+        return NULL;
+    }
+    /* the expression size_a * PyLong_SHIFT is now safe from overflow */
+    size = 1 + size_a * PyLong_SHIFT / (3 * _PyLong_DECIMAL_SHIFT);
+    scratch = _PyLong_New(size);
+    if (scratch == NULL)
+        return NULL;
 
-	/* convert array of base _PyLong_BASE digits in pin to an array of
-	   base _PyLong_DECIMAL_BASE digits in pout, following Knuth (TAOCP,
-	   Volume 2 (3rd edn), section 4.4, Method 1b). */
-	pin = a->ob_digit;
-	pout = scratch->ob_digit;
-	size = 0;
-	for (i = size_a; --i >= 0; ) {
-		digit hi = pin[i];
-		for (j = 0; j < size; j++) {
-			twodigits z = (twodigits)pout[j] << PyLong_SHIFT | hi;
-			hi = (digit)(z / _PyLong_DECIMAL_BASE);
-			pout[j] = (digit)(z - (twodigits)hi *
-					  _PyLong_DECIMAL_BASE);
-		}
-		while (hi) {
-			pout[size++] = hi % _PyLong_DECIMAL_BASE;
-			hi /= _PyLong_DECIMAL_BASE;
-		}
-		/* check for keyboard interrupt */
-		SIGCHECK({
-			Py_DECREF(scratch);
-			return NULL;
-		})
-	}
-	/* pout should have at least one digit, so that the case when a = 0
-	   works correctly */
-	if (size == 0)
-		pout[size++] = 0;
+    /* convert array of base _PyLong_BASE digits in pin to an array of
+       base _PyLong_DECIMAL_BASE digits in pout, following Knuth (TAOCP,
+       Volume 2 (3rd edn), section 4.4, Method 1b). */
+    pin = a->ob_digit;
+    pout = scratch->ob_digit;
+    size = 0;
+    for (i = size_a; --i >= 0; ) {
+        digit hi = pin[i];
+        for (j = 0; j < size; j++) {
+            twodigits z = (twodigits)pout[j] << PyLong_SHIFT | hi;
+            hi = (digit)(z / _PyLong_DECIMAL_BASE);
+            pout[j] = (digit)(z - (twodigits)hi *
+                              _PyLong_DECIMAL_BASE);
+        }
+        while (hi) {
+            pout[size++] = hi % _PyLong_DECIMAL_BASE;
+            hi /= _PyLong_DECIMAL_BASE;
+        }
+        /* check for keyboard interrupt */
+        SIGCHECK({
+            Py_DECREF(scratch);
+            return NULL;
+        })
+    }
+    /* pout should have at least one digit, so that the case when a = 0
+       works correctly */
+    if (size == 0)
+        pout[size++] = 0;
 
-	/* calculate exact length of output string, and allocate */
-	strlen = (addL != 0) + negative +
-		1 + (size - 1) * _PyLong_DECIMAL_SHIFT;
-	tenpow = 10;
-	rem = pout[size-1];
-	while (rem >= tenpow) {
-		tenpow *= 10;
-		strlen++;
-	}
-	str = PyString_FromStringAndSize(NULL, strlen);
-	if (str == NULL) {
-		Py_DECREF(scratch);
-		return NULL;
-	}
+    /* calculate exact length of output string, and allocate */
+    strlen = (addL != 0) + negative +
+        1 + (size - 1) * _PyLong_DECIMAL_SHIFT;
+    tenpow = 10;
+    rem = pout[size-1];
+    while (rem >= tenpow) {
+        tenpow *= 10;
+        strlen++;
+    }
+    str = PyString_FromStringAndSize(NULL, strlen);
+    if (str == NULL) {
+        Py_DECREF(scratch);
+        return NULL;
+    }
 
-	/* fill the string right-to-left */
-	p = PyString_AS_STRING(str) + strlen;
-	*p = '\0';
-	if (addL)
-		*--p = 'L';
-	/* pout[0] through pout[size-2] contribute exactly
-	   _PyLong_DECIMAL_SHIFT digits each */
-	for (i=0; i < size - 1; i++) {
-		rem = pout[i];
-		for (j = 0; j < _PyLong_DECIMAL_SHIFT; j++) {
-			*--p = '0' + rem % 10;
-			rem /= 10;
-		}
-	}
-	/* pout[size-1]: always produce at least one decimal digit */
-	rem = pout[i];
-	do {
-		*--p = '0' + rem % 10;
-		rem /= 10;
-	} while (rem != 0);
+    /* fill the string right-to-left */
+    p = PyString_AS_STRING(str) + strlen;
+    *p = '\0';
+    if (addL)
+        *--p = 'L';
+    /* pout[0] through pout[size-2] contribute exactly
+       _PyLong_DECIMAL_SHIFT digits each */
+    for (i=0; i < size - 1; i++) {
+        rem = pout[i];
+        for (j = 0; j < _PyLong_DECIMAL_SHIFT; j++) {
+            *--p = '0' + rem % 10;
+            rem /= 10;
+        }
+    }
+    /* pout[size-1]: always produce at least one decimal digit */
+    rem = pout[i];
+    do {
+        *--p = '0' + rem % 10;
+        rem /= 10;
+    } while (rem != 0);
 
-	/* and sign */
-	if (negative)
-		*--p = '-';
+    /* and sign */
+    if (negative)
+        *--p = '-';
 
-	/* check we've counted correctly */
-	assert(p == PyString_AS_STRING(str));
-	Py_DECREF(scratch);
-	return (PyObject *)str;
+    /* check we've counted correctly */
+    assert(p == PyString_AS_STRING(str));
+    Py_DECREF(scratch);
+    return (PyObject *)str;
 }
 
 /* Convert the long to a string object with given base,
@@ -1439,170 +1439,170 @@
 PyAPI_FUNC(PyObject *)
 _PyLong_Format(PyObject *aa, int base, int addL, int newstyle)
 {
-	register PyLongObject *a = (PyLongObject *)aa;
-	PyStringObject *str;
-	Py_ssize_t i, sz;
-	Py_ssize_t size_a;
-	char *p;
-	int bits;
-	char sign = '\0';
+    register PyLongObject *a = (PyLongObject *)aa;
+    PyStringObject *str;
+    Py_ssize_t i, sz;
+    Py_ssize_t size_a;
+    char *p;
+    int bits;
+    char sign = '\0';
 
-	if (base == 10)
-		return long_to_decimal_string((PyObject *)a, addL);
+    if (base == 10)
+        return long_to_decimal_string((PyObject *)a, addL);
 
-	if (a == NULL || !PyLong_Check(a)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	assert(base >= 2 && base <= 36);
-	size_a = ABS(Py_SIZE(a));
+    if (a == NULL || !PyLong_Check(a)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    assert(base >= 2 && base <= 36);
+    size_a = ABS(Py_SIZE(a));
 
-	/* Compute a rough upper bound for the length of the string */
-	i = base;
-	bits = 0;
-	while (i > 1) {
-		++bits;
-		i >>= 1;
-	}
-	i = 5 + (addL ? 1 : 0);
-	/* ensure we don't get signed overflow in sz calculation */
-	if (size_a > (PY_SSIZE_T_MAX - i) / PyLong_SHIFT) {
-		PyErr_SetString(PyExc_OverflowError,
-				"long is too large to format");
-		return NULL;
-	}
-	sz = i + 1 + (size_a * PyLong_SHIFT - 1) / bits;
-	assert(sz >= 0);
-	str = (PyStringObject *) PyString_FromStringAndSize((char *)0, sz);
-	if (str == NULL)
-		return NULL;
-	p = PyString_AS_STRING(str) + sz;
-	*p = '\0';
-	if (addL)
-		*--p = 'L';
-	if (a->ob_size < 0)
-		sign = '-';
+    /* Compute a rough upper bound for the length of the string */
+    i = base;
+    bits = 0;
+    while (i > 1) {
+        ++bits;
+        i >>= 1;
+    }
+    i = 5 + (addL ? 1 : 0);
+    /* ensure we don't get signed overflow in sz calculation */
+    if (size_a > (PY_SSIZE_T_MAX - i) / PyLong_SHIFT) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "long is too large to format");
+        return NULL;
+    }
+    sz = i + 1 + (size_a * PyLong_SHIFT - 1) / bits;
+    assert(sz >= 0);
+    str = (PyStringObject *) PyString_FromStringAndSize((char *)0, sz);
+    if (str == NULL)
+        return NULL;
+    p = PyString_AS_STRING(str) + sz;
+    *p = '\0';
+    if (addL)
+        *--p = 'L';
+    if (a->ob_size < 0)
+        sign = '-';
 
-	if (a->ob_size == 0) {
-		*--p = '0';
-	}
-	else if ((base & (base - 1)) == 0) {
-		/* JRH: special case for power-of-2 bases */
-		twodigits accum = 0;
-		int accumbits = 0;	/* # of bits in accum */
-		int basebits = 1;	/* # of bits in base-1 */
-		i = base;
-		while ((i >>= 1) > 1)
-			++basebits;
+    if (a->ob_size == 0) {
+        *--p = '0';
+    }
+    else if ((base & (base - 1)) == 0) {
+        /* JRH: special case for power-of-2 bases */
+        twodigits accum = 0;
+        int accumbits = 0;              /* # of bits in accum */
+        int basebits = 1;               /* # of bits in base-1 */
+        i = base;
+        while ((i >>= 1) > 1)
+            ++basebits;
 
-		for (i = 0; i < size_a; ++i) {
-			accum |= (twodigits)a->ob_digit[i] << accumbits;
-			accumbits += PyLong_SHIFT;
-			assert(accumbits >= basebits);
-			do {
-				char cdigit = (char)(accum & (base - 1));
-				cdigit += (cdigit < 10) ? '0' : 'a'-10;
-				assert(p > PyString_AS_STRING(str));
-				*--p = cdigit;
-				accumbits -= basebits;
-				accum >>= basebits;
-			} while (i < size_a-1 ? accumbits >= basebits :
-						accum > 0);
-		}
-	}
-	else {
-		/* Not 0, and base not a power of 2.  Divide repeatedly by
-		   base, but for speed use the highest power of base that
-		   fits in a digit. */
-		Py_ssize_t size = size_a;
-		digit *pin = a->ob_digit;
-		PyLongObject *scratch;
-		/* powbasw <- largest power of base that fits in a digit. */
-		digit powbase = base;  /* powbase == base ** power */
-		int power = 1;
-		for (;;) {
-			twodigits newpow = powbase * (twodigits)base;
-			if (newpow >> PyLong_SHIFT)
-				/* doesn't fit in a digit */
-				break;
-			powbase = (digit)newpow;
-			++power;
-		}
+        for (i = 0; i < size_a; ++i) {
+            accum |= (twodigits)a->ob_digit[i] << accumbits;
+            accumbits += PyLong_SHIFT;
+            assert(accumbits >= basebits);
+            do {
+                char cdigit = (char)(accum & (base - 1));
+                cdigit += (cdigit < 10) ? '0' : 'a'-10;
+                assert(p > PyString_AS_STRING(str));
+                *--p = cdigit;
+                accumbits -= basebits;
+                accum >>= basebits;
+            } while (i < size_a-1 ? accumbits >= basebits :
+                        accum > 0);
+        }
+    }
+    else {
+        /* Not 0, and base not a power of 2.  Divide repeatedly by
+           base, but for speed use the highest power of base that
+           fits in a digit. */
+        Py_ssize_t size = size_a;
+        digit *pin = a->ob_digit;
+        PyLongObject *scratch;
+        /* powbasw <- largest power of base that fits in a digit. */
+        digit powbase = base;  /* powbase == base ** power */
+        int power = 1;
+        for (;;) {
+            twodigits newpow = powbase * (twodigits)base;
+            if (newpow >> PyLong_SHIFT)
+                /* doesn't fit in a digit */
+                break;
+            powbase = (digit)newpow;
+            ++power;
+        }
 
-		/* Get a scratch area for repeated division. */
-		scratch = _PyLong_New(size);
-		if (scratch == NULL) {
-			Py_DECREF(str);
-			return NULL;
-		}
+        /* Get a scratch area for repeated division. */
+        scratch = _PyLong_New(size);
+        if (scratch == NULL) {
+            Py_DECREF(str);
+            return NULL;
+        }
 
-		/* Repeatedly divide by powbase. */
-		do {
-			int ntostore = power;
-			digit rem = inplace_divrem1(scratch->ob_digit,
-						     pin, size, powbase);
-			pin = scratch->ob_digit; /* no need to use a again */
-			if (pin[size - 1] == 0)
-				--size;
-			SIGCHECK({
-				Py_DECREF(scratch);
-				Py_DECREF(str);
-				return NULL;
-			})
+        /* Repeatedly divide by powbase. */
+        do {
+            int ntostore = power;
+            digit rem = inplace_divrem1(scratch->ob_digit,
+                                         pin, size, powbase);
+            pin = scratch->ob_digit; /* no need to use a again */
+            if (pin[size - 1] == 0)
+                --size;
+            SIGCHECK({
+                Py_DECREF(scratch);
+                Py_DECREF(str);
+                return NULL;
+            })
 
-			/* Break rem into digits. */
-			assert(ntostore > 0);
-			do {
-				digit nextrem = (digit)(rem / base);
-				char c = (char)(rem - nextrem * base);
-				assert(p > PyString_AS_STRING(str));
-				c += (c < 10) ? '0' : 'a'-10;
-				*--p = c;
-				rem = nextrem;
-				--ntostore;
-				/* Termination is a bit delicate:  must not
-				   store leading zeroes, so must get out if
-				   remaining quotient and rem are both 0. */
-			} while (ntostore && (size || rem));
-		} while (size != 0);
-		Py_DECREF(scratch);
-	}
+            /* Break rem into digits. */
+            assert(ntostore > 0);
+            do {
+                digit nextrem = (digit)(rem / base);
+                char c = (char)(rem - nextrem * base);
+                assert(p > PyString_AS_STRING(str));
+                c += (c < 10) ? '0' : 'a'-10;
+                *--p = c;
+                rem = nextrem;
+                --ntostore;
+                /* Termination is a bit delicate:  must not
+                   store leading zeroes, so must get out if
+                   remaining quotient and rem are both 0. */
+            } while (ntostore && (size || rem));
+        } while (size != 0);
+        Py_DECREF(scratch);
+    }
 
-	if (base == 2) {
-		*--p = 'b';
-		*--p = '0';
-	}
-	else if (base == 8) {
-		if (newstyle) {
-			*--p = 'o';
-			*--p = '0';
-		}
-		else
-			if (size_a != 0)
-				*--p = '0';
-	}
-	else if (base == 16) {
-		*--p = 'x';
-		*--p = '0';
-	}
-	else if (base != 10) {
-		*--p = '#';
-		*--p = '0' + base%10;
-		if (base > 10)
-			*--p = '0' + base/10;
-	}
-	if (sign)
-		*--p = sign;
-	if (p != PyString_AS_STRING(str)) {
-		char *q = PyString_AS_STRING(str);
-		assert(p > q);
-		do {
-		} while ((*q++ = *p++) != '\0');
-		q--;
-		_PyString_Resize((PyObject **)&str,
-				 (Py_ssize_t) (q - PyString_AS_STRING(str)));
-	}
-	return (PyObject *)str;
+    if (base == 2) {
+        *--p = 'b';
+        *--p = '0';
+    }
+    else if (base == 8) {
+        if (newstyle) {
+            *--p = 'o';
+            *--p = '0';
+        }
+        else
+            if (size_a != 0)
+                *--p = '0';
+    }
+    else if (base == 16) {
+        *--p = 'x';
+        *--p = '0';
+    }
+    else if (base != 10) {
+        *--p = '#';
+        *--p = '0' + base%10;
+        if (base > 10)
+            *--p = '0' + base/10;
+    }
+    if (sign)
+        *--p = sign;
+    if (p != PyString_AS_STRING(str)) {
+        char *q = PyString_AS_STRING(str);
+        assert(p > q);
+        do {
+        } while ((*q++ = *p++) != '\0');
+        q--;
+        _PyString_Resize((PyObject **)&str,
+                         (Py_ssize_t) (q - PyString_AS_STRING(str)));
+    }
+    return (PyObject *)str;
 }
 
 /* Table of digit values for 8-bit string -> integer conversion.
@@ -1613,22 +1613,22 @@
  * base B digit iff _PyLong_DigitValue[Py_CHARMASK(c)] < B.
  */
 int _PyLong_DigitValue[256] = {
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  37, 37, 37, 37, 37, 37,
-	37, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
-	25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 37, 37, 37, 37,
-	37, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
-	25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
-	37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  37, 37, 37, 37, 37, 37,
+    37, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+    25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 37, 37, 37, 37,
+    37, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+    25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+    37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
 };
 
 /* *str points to the first digit in a string of base `base` digits.  base
@@ -1640,115 +1640,115 @@
 static PyLongObject *
 long_from_binary_base(char **str, int base)
 {
-	char *p = *str;
-	char *start = p;
-	int bits_per_char;
-	Py_ssize_t n;
-	PyLongObject *z;
-	twodigits accum;
-	int bits_in_accum;
-	digit *pdigit;
+    char *p = *str;
+    char *start = p;
+    int bits_per_char;
+    Py_ssize_t n;
+    PyLongObject *z;
+    twodigits accum;
+    int bits_in_accum;
+    digit *pdigit;
 
-	assert(base >= 2 && base <= 32 && (base & (base - 1)) == 0);
-	n = base;
-	for (bits_per_char = -1; n; ++bits_per_char)
-		n >>= 1;
-	/* n <- total # of bits needed, while setting p to end-of-string */
-	while (_PyLong_DigitValue[Py_CHARMASK(*p)] < base)
-		++p;
-	*str = p;
-	/* n <- # of Python digits needed, = ceiling(n/PyLong_SHIFT). */
-	n = (p - start) * bits_per_char + PyLong_SHIFT - 1;
-	if (n / bits_per_char < p - start) {
-		PyErr_SetString(PyExc_ValueError,
-				"long string too large to convert");
-		return NULL;
-	}
-	n = n / PyLong_SHIFT;
-	z = _PyLong_New(n);
-	if (z == NULL)
-		return NULL;
-	/* Read string from right, and fill in long from left; i.e.,
-	 * from least to most significant in both.
-	 */
-	accum = 0;
-	bits_in_accum = 0;
-	pdigit = z->ob_digit;
-	while (--p >= start) {
-		int k = _PyLong_DigitValue[Py_CHARMASK(*p)];
-		assert(k >= 0 && k < base);
-		accum |= (twodigits)k << bits_in_accum;
-		bits_in_accum += bits_per_char;
-		if (bits_in_accum >= PyLong_SHIFT) {
-			*pdigit++ = (digit)(accum & PyLong_MASK);
-			assert(pdigit - z->ob_digit <= n);
-			accum >>= PyLong_SHIFT;
-			bits_in_accum -= PyLong_SHIFT;
-			assert(bits_in_accum < PyLong_SHIFT);
-		}
-	}
-	if (bits_in_accum) {
-		assert(bits_in_accum <= PyLong_SHIFT);
-		*pdigit++ = (digit)accum;
-		assert(pdigit - z->ob_digit <= n);
-	}
-	while (pdigit - z->ob_digit < n)
-		*pdigit++ = 0;
-	return long_normalize(z);
+    assert(base >= 2 && base <= 32 && (base & (base - 1)) == 0);
+    n = base;
+    for (bits_per_char = -1; n; ++bits_per_char)
+        n >>= 1;
+    /* n <- total # of bits needed, while setting p to end-of-string */
+    while (_PyLong_DigitValue[Py_CHARMASK(*p)] < base)
+        ++p;
+    *str = p;
+    /* n <- # of Python digits needed, = ceiling(n/PyLong_SHIFT). */
+    n = (p - start) * bits_per_char + PyLong_SHIFT - 1;
+    if (n / bits_per_char < p - start) {
+        PyErr_SetString(PyExc_ValueError,
+                        "long string too large to convert");
+        return NULL;
+    }
+    n = n / PyLong_SHIFT;
+    z = _PyLong_New(n);
+    if (z == NULL)
+        return NULL;
+    /* Read string from right, and fill in long from left; i.e.,
+     * from least to most significant in both.
+     */
+    accum = 0;
+    bits_in_accum = 0;
+    pdigit = z->ob_digit;
+    while (--p >= start) {
+        int k = _PyLong_DigitValue[Py_CHARMASK(*p)];
+        assert(k >= 0 && k < base);
+        accum |= (twodigits)k << bits_in_accum;
+        bits_in_accum += bits_per_char;
+        if (bits_in_accum >= PyLong_SHIFT) {
+            *pdigit++ = (digit)(accum & PyLong_MASK);
+            assert(pdigit - z->ob_digit <= n);
+            accum >>= PyLong_SHIFT;
+            bits_in_accum -= PyLong_SHIFT;
+            assert(bits_in_accum < PyLong_SHIFT);
+        }
+    }
+    if (bits_in_accum) {
+        assert(bits_in_accum <= PyLong_SHIFT);
+        *pdigit++ = (digit)accum;
+        assert(pdigit - z->ob_digit <= n);
+    }
+    while (pdigit - z->ob_digit < n)
+        *pdigit++ = 0;
+    return long_normalize(z);
 }
 
 PyObject *
 PyLong_FromString(char *str, char **pend, int base)
 {
-	int sign = 1;
-	char *start, *orig_str = str;
-	PyLongObject *z;
-	PyObject *strobj, *strrepr;
-	Py_ssize_t slen;
+    int sign = 1;
+    char *start, *orig_str = str;
+    PyLongObject *z;
+    PyObject *strobj, *strrepr;
+    Py_ssize_t slen;
 
-	if ((base != 0 && base < 2) || base > 36) {
-		PyErr_SetString(PyExc_ValueError,
-				"long() arg 2 must be >= 2 and <= 36");
-		return NULL;
-	}
-	while (*str != '\0' && isspace(Py_CHARMASK(*str)))
-		str++;
-	if (*str == '+')
-		++str;
-	else if (*str == '-') {
-		++str;
-		sign = -1;
-	}
-	while (*str != '\0' && isspace(Py_CHARMASK(*str)))
-		str++;
-	if (base == 0) {
-		/* No base given.  Deduce the base from the contents
-		   of the string */
-		if (str[0] != '0')
-			base = 10;
-		else if (str[1] == 'x' || str[1] == 'X')
-			base = 16;
-		else if (str[1] == 'o' || str[1] == 'O')
-			base = 8;
-		else if (str[1] == 'b' || str[1] == 'B')
-			base = 2;
-		else
-			/* "old" (C-style) octal literal, still valid in
-			   2.x, although illegal in 3.x */
-			base = 8;
-	}
-	/* Whether or not we were deducing the base, skip leading chars
-	   as needed */
-	if (str[0] == '0' &&
-	    ((base == 16 && (str[1] == 'x' || str[1] == 'X')) ||
-	     (base == 8  && (str[1] == 'o' || str[1] == 'O')) ||
-	     (base == 2  && (str[1] == 'b' || str[1] == 'B'))))
-		str += 2;
+    if ((base != 0 && base < 2) || base > 36) {
+        PyErr_SetString(PyExc_ValueError,
+                        "long() arg 2 must be >= 2 and <= 36");
+        return NULL;
+    }
+    while (*str != '\0' && isspace(Py_CHARMASK(*str)))
+        str++;
+    if (*str == '+')
+        ++str;
+    else if (*str == '-') {
+        ++str;
+        sign = -1;
+    }
+    while (*str != '\0' && isspace(Py_CHARMASK(*str)))
+        str++;
+    if (base == 0) {
+        /* No base given.  Deduce the base from the contents
+           of the string */
+        if (str[0] != '0')
+            base = 10;
+        else if (str[1] == 'x' || str[1] == 'X')
+            base = 16;
+        else if (str[1] == 'o' || str[1] == 'O')
+            base = 8;
+        else if (str[1] == 'b' || str[1] == 'B')
+            base = 2;
+        else
+            /* "old" (C-style) octal literal, still valid in
+               2.x, although illegal in 3.x */
+            base = 8;
+    }
+    /* Whether or not we were deducing the base, skip leading chars
+       as needed */
+    if (str[0] == '0' &&
+        ((base == 16 && (str[1] == 'x' || str[1] == 'X')) ||
+         (base == 8  && (str[1] == 'o' || str[1] == 'O')) ||
+         (base == 2  && (str[1] == 'b' || str[1] == 'B'))))
+        str += 2;
 
-	start = str;
-	if ((base & (base - 1)) == 0)
-		z = long_from_binary_base(&str, base);
-	else {
+    start = str;
+    if ((base & (base - 1)) == 0)
+        z = long_from_binary_base(&str, base);
+    else {
 /***
 Binary bases can be converted in time linear in the number of digits, because
 Python's representation base is binary.  Other bases (including decimal!) use
@@ -1834,225 +1834,225 @@
 just 1 digit at the start, so that the copying code was exercised for every
 digit beyond the first.
 ***/
-		register twodigits c;	/* current input character */
-		Py_ssize_t size_z;
-		int i;
-		int convwidth;
-		twodigits convmultmax, convmult;
-		digit *pz, *pzstop;
-		char* scan;
+        register twodigits c;           /* current input character */
+        Py_ssize_t size_z;
+        int i;
+        int convwidth;
+        twodigits convmultmax, convmult;
+        digit *pz, *pzstop;
+        char* scan;
 
-		static double log_base_PyLong_BASE[37] = {0.0e0,};
-		static int convwidth_base[37] = {0,};
-		static twodigits convmultmax_base[37] = {0,};
+        static double log_base_PyLong_BASE[37] = {0.0e0,};
+        static int convwidth_base[37] = {0,};
+        static twodigits convmultmax_base[37] = {0,};
 
-		if (log_base_PyLong_BASE[base] == 0.0) {
-			twodigits convmax = base;
-			int i = 1;
+        if (log_base_PyLong_BASE[base] == 0.0) {
+            twodigits convmax = base;
+            int i = 1;
 
-			log_base_PyLong_BASE[base] = log((double)base) /
-						log((double)PyLong_BASE);
-			for (;;) {
-				twodigits next = convmax * base;
-				if (next > PyLong_BASE)
-					break;
-				convmax = next;
-				++i;
-			}
-			convmultmax_base[base] = convmax;
-			assert(i > 0);
-			convwidth_base[base] = i;
-		}
+            log_base_PyLong_BASE[base] = log((double)base) /
+                                    log((double)PyLong_BASE);
+            for (;;) {
+                twodigits next = convmax * base;
+                if (next > PyLong_BASE)
+                    break;
+                convmax = next;
+                ++i;
+            }
+            convmultmax_base[base] = convmax;
+            assert(i > 0);
+            convwidth_base[base] = i;
+        }
 
-		/* Find length of the string of numeric characters. */
-		scan = str;
-		while (_PyLong_DigitValue[Py_CHARMASK(*scan)] < base)
-			++scan;
+        /* Find length of the string of numeric characters. */
+        scan = str;
+        while (_PyLong_DigitValue[Py_CHARMASK(*scan)] < base)
+            ++scan;
 
-		/* Create a long object that can contain the largest possible
-		 * integer with this base and length.  Note that there's no
-		 * need to initialize z->ob_digit -- no slot is read up before
-		 * being stored into.
-		 */
-		size_z = (Py_ssize_t)((scan - str) * log_base_PyLong_BASE[base]) + 1;
-		/* Uncomment next line to test exceedingly rare copy code */
-		/* size_z = 1; */
-		assert(size_z > 0);
-		z = _PyLong_New(size_z);
-		if (z == NULL)
-			return NULL;
-		Py_SIZE(z) = 0;
+        /* Create a long object that can contain the largest possible
+         * integer with this base and length.  Note that there's no
+         * need to initialize z->ob_digit -- no slot is read up before
+         * being stored into.
+         */
+        size_z = (Py_ssize_t)((scan - str) * log_base_PyLong_BASE[base]) + 1;
+        /* Uncomment next line to test exceedingly rare copy code */
+        /* size_z = 1; */
+        assert(size_z > 0);
+        z = _PyLong_New(size_z);
+        if (z == NULL)
+            return NULL;
+        Py_SIZE(z) = 0;
 
-		/* `convwidth` consecutive input digits are treated as a single
-		 * digit in base `convmultmax`.
-		 */
-		convwidth = convwidth_base[base];
-		convmultmax = convmultmax_base[base];
+        /* `convwidth` consecutive input digits are treated as a single
+         * digit in base `convmultmax`.
+         */
+        convwidth = convwidth_base[base];
+        convmultmax = convmultmax_base[base];
 
-		/* Work ;-) */
-		while (str < scan) {
-			/* grab up to convwidth digits from the input string */
-			c = (digit)_PyLong_DigitValue[Py_CHARMASK(*str++)];
-			for (i = 1; i < convwidth && str != scan; ++i, ++str) {
-				c = (twodigits)(c *  base +
-					_PyLong_DigitValue[Py_CHARMASK(*str)]);
-				assert(c < PyLong_BASE);
-			}
+        /* Work ;-) */
+        while (str < scan) {
+            /* grab up to convwidth digits from the input string */
+            c = (digit)_PyLong_DigitValue[Py_CHARMASK(*str++)];
+            for (i = 1; i < convwidth && str != scan; ++i, ++str) {
+                c = (twodigits)(c *  base +
+                    _PyLong_DigitValue[Py_CHARMASK(*str)]);
+                assert(c < PyLong_BASE);
+            }
 
-			convmult = convmultmax;
-			/* Calculate the shift only if we couldn't get
-			 * convwidth digits.
-			 */
-			if (i != convwidth) {
-				convmult = base;
-				for ( ; i > 1; --i)
-					convmult *= base;
-			}
+            convmult = convmultmax;
+            /* Calculate the shift only if we couldn't get
+             * convwidth digits.
+             */
+            if (i != convwidth) {
+                convmult = base;
+                for ( ; i > 1; --i)
+                    convmult *= base;
+            }
 
-			/* Multiply z by convmult, and add c. */
-			pz = z->ob_digit;
-			pzstop = pz + Py_SIZE(z);
-			for (; pz < pzstop; ++pz) {
-				c += (twodigits)*pz * convmult;
-				*pz = (digit)(c & PyLong_MASK);
-				c >>= PyLong_SHIFT;
-			}
-			/* carry off the current end? */
-			if (c) {
-				assert(c < PyLong_BASE);
-				if (Py_SIZE(z) < size_z) {
-					*pz = (digit)c;
-					++Py_SIZE(z);
-				}
-				else {
-					PyLongObject *tmp;
-					/* Extremely rare.  Get more space. */
-					assert(Py_SIZE(z) == size_z);
-					tmp = _PyLong_New(size_z + 1);
-					if (tmp == NULL) {
-						Py_DECREF(z);
-						return NULL;
-					}
-					memcpy(tmp->ob_digit,
-					       z->ob_digit,
-					       sizeof(digit) * size_z);
-					Py_DECREF(z);
-					z = tmp;
-					z->ob_digit[size_z] = (digit)c;
-					++size_z;
-				}
-			}
-		}
-	}
-	if (z == NULL)
-		return NULL;
-	if (str == start)
-		goto onError;
-	if (sign < 0)
-		Py_SIZE(z) = -(Py_SIZE(z));
-	if (*str == 'L' || *str == 'l')
-		str++;
-	while (*str && isspace(Py_CHARMASK(*str)))
-		str++;
-	if (*str != '\0')
-		goto onError;
-	if (pend)
-		*pend = str;
-	return (PyObject *) z;
+            /* Multiply z by convmult, and add c. */
+            pz = z->ob_digit;
+            pzstop = pz + Py_SIZE(z);
+            for (; pz < pzstop; ++pz) {
+                c += (twodigits)*pz * convmult;
+                *pz = (digit)(c & PyLong_MASK);
+                c >>= PyLong_SHIFT;
+            }
+            /* carry off the current end? */
+            if (c) {
+                assert(c < PyLong_BASE);
+                if (Py_SIZE(z) < size_z) {
+                    *pz = (digit)c;
+                    ++Py_SIZE(z);
+                }
+                else {
+                    PyLongObject *tmp;
+                    /* Extremely rare.  Get more space. */
+                    assert(Py_SIZE(z) == size_z);
+                    tmp = _PyLong_New(size_z + 1);
+                    if (tmp == NULL) {
+                        Py_DECREF(z);
+                        return NULL;
+                    }
+                    memcpy(tmp->ob_digit,
+                           z->ob_digit,
+                           sizeof(digit) * size_z);
+                    Py_DECREF(z);
+                    z = tmp;
+                    z->ob_digit[size_z] = (digit)c;
+                    ++size_z;
+                }
+            }
+        }
+    }
+    if (z == NULL)
+        return NULL;
+    if (str == start)
+        goto onError;
+    if (sign < 0)
+        Py_SIZE(z) = -(Py_SIZE(z));
+    if (*str == 'L' || *str == 'l')
+        str++;
+    while (*str && isspace(Py_CHARMASK(*str)))
+        str++;
+    if (*str != '\0')
+        goto onError;
+    if (pend)
+        *pend = str;
+    return (PyObject *) z;
 
  onError:
-	Py_XDECREF(z);
-	slen = strlen(orig_str) < 200 ? strlen(orig_str) : 200;
-	strobj = PyString_FromStringAndSize(orig_str, slen);
-	if (strobj == NULL)
-		return NULL;
-	strrepr = PyObject_Repr(strobj);
-	Py_DECREF(strobj);
-	if (strrepr == NULL)
-		return NULL;
-	PyErr_Format(PyExc_ValueError,
-		     "invalid literal for long() with base %d: %s",
-		     base, PyString_AS_STRING(strrepr));
-	Py_DECREF(strrepr);
-	return NULL;
+    Py_XDECREF(z);
+    slen = strlen(orig_str) < 200 ? strlen(orig_str) : 200;
+    strobj = PyString_FromStringAndSize(orig_str, slen);
+    if (strobj == NULL)
+        return NULL;
+    strrepr = PyObject_Repr(strobj);
+    Py_DECREF(strobj);
+    if (strrepr == NULL)
+        return NULL;
+    PyErr_Format(PyExc_ValueError,
+                 "invalid literal for long() with base %d: %s",
+                 base, PyString_AS_STRING(strrepr));
+    Py_DECREF(strrepr);
+    return NULL;
 }
 
 #ifdef Py_USING_UNICODE
 PyObject *
 PyLong_FromUnicode(Py_UNICODE *u, Py_ssize_t length, int base)
 {
-	PyObject *result;
-	char *buffer = (char *)PyMem_MALLOC(length+1);
+    PyObject *result;
+    char *buffer = (char *)PyMem_MALLOC(length+1);
 
-	if (buffer == NULL)
-		return NULL;
+    if (buffer == NULL)
+        return NULL;
 
-	if (PyUnicode_EncodeDecimal(u, length, buffer, NULL)) {
-		PyMem_FREE(buffer);
-		return NULL;
-	}
-	result = PyLong_FromString(buffer, NULL, base);
-	PyMem_FREE(buffer);
-	return result;
+    if (PyUnicode_EncodeDecimal(u, length, buffer, NULL)) {
+        PyMem_FREE(buffer);
+        return NULL;
+    }
+    result = PyLong_FromString(buffer, NULL, base);
+    PyMem_FREE(buffer);
+    return result;
 }
 #endif
 
 /* forward */
 static PyLongObject *x_divrem
-	(PyLongObject *, PyLongObject *, PyLongObject **);
+    (PyLongObject *, PyLongObject *, PyLongObject **);
 static PyObject *long_long(PyObject *v);
 
 /* Long division with remainder, top-level routine */
 
 static int
 long_divrem(PyLongObject *a, PyLongObject *b,
-	    PyLongObject **pdiv, PyLongObject **prem)
+            PyLongObject **pdiv, PyLongObject **prem)
 {
-	Py_ssize_t size_a = ABS(Py_SIZE(a)), size_b = ABS(Py_SIZE(b));
-	PyLongObject *z;
+    Py_ssize_t size_a = ABS(Py_SIZE(a)), size_b = ABS(Py_SIZE(b));
+    PyLongObject *z;
 
-	if (size_b == 0) {
-		PyErr_SetString(PyExc_ZeroDivisionError,
-				"long division or modulo by zero");
-		return -1;
-	}
-	if (size_a < size_b ||
-	    (size_a == size_b &&
-	     a->ob_digit[size_a-1] < b->ob_digit[size_b-1])) {
-		/* |a| < |b|. */
-		*pdiv = _PyLong_New(0);
-		if (*pdiv == NULL)
-			return -1;
-		Py_INCREF(a);
-		*prem = (PyLongObject *) a;
-		return 0;
-	}
-	if (size_b == 1) {
-		digit rem = 0;
-		z = divrem1(a, b->ob_digit[0], &rem);
-		if (z == NULL)
-			return -1;
-		*prem = (PyLongObject *) PyLong_FromLong((long)rem);
-		if (*prem == NULL) {
-			Py_DECREF(z);
-			return -1;
-		}
-	}
-	else {
-		z = x_divrem(a, b, prem);
-		if (z == NULL)
-			return -1;
-	}
-	/* Set the signs.
-	   The quotient z has the sign of a*b;
-	   the remainder r has the sign of a,
-	   so a = b*z + r. */
-	if ((a->ob_size < 0) != (b->ob_size < 0))
-		z->ob_size = -(z->ob_size);
-	if (a->ob_size < 0 && (*prem)->ob_size != 0)
-		(*prem)->ob_size = -((*prem)->ob_size);
-	*pdiv = z;
-	return 0;
+    if (size_b == 0) {
+        PyErr_SetString(PyExc_ZeroDivisionError,
+                        "long division or modulo by zero");
+        return -1;
+    }
+    if (size_a < size_b ||
+        (size_a == size_b &&
+         a->ob_digit[size_a-1] < b->ob_digit[size_b-1])) {
+        /* |a| < |b|. */
+        *pdiv = _PyLong_New(0);
+        if (*pdiv == NULL)
+            return -1;
+        Py_INCREF(a);
+        *prem = (PyLongObject *) a;
+        return 0;
+    }
+    if (size_b == 1) {
+        digit rem = 0;
+        z = divrem1(a, b->ob_digit[0], &rem);
+        if (z == NULL)
+            return -1;
+        *prem = (PyLongObject *) PyLong_FromLong((long)rem);
+        if (*prem == NULL) {
+            Py_DECREF(z);
+            return -1;
+        }
+    }
+    else {
+        z = x_divrem(a, b, prem);
+        if (z == NULL)
+            return -1;
+    }
+    /* Set the signs.
+       The quotient z has the sign of a*b;
+       the remainder r has the sign of a,
+       so a = b*z + r. */
+    if ((a->ob_size < 0) != (b->ob_size < 0))
+        z->ob_size = -(z->ob_size);
+    if (a->ob_size < 0 && (*prem)->ob_size != 0)
+        (*prem)->ob_size = -((*prem)->ob_size);
+    *pdiv = z;
+    return 0;
 }
 
 /* Unsigned long division with remainder -- the algorithm.  The arguments v1
@@ -2061,125 +2061,125 @@
 static PyLongObject *
 x_divrem(PyLongObject *v1, PyLongObject *w1, PyLongObject **prem)
 {
-	PyLongObject *v, *w, *a;
-	Py_ssize_t i, k, size_v, size_w;
-	int d;
-	digit wm1, wm2, carry, q, r, vtop, *v0, *vk, *w0, *ak;
-	twodigits vv;
-	sdigit zhi;
-	stwodigits z;
+    PyLongObject *v, *w, *a;
+    Py_ssize_t i, k, size_v, size_w;
+    int d;
+    digit wm1, wm2, carry, q, r, vtop, *v0, *vk, *w0, *ak;
+    twodigits vv;
+    sdigit zhi;
+    stwodigits z;
 
-	/* We follow Knuth [The Art of Computer Programming, Vol. 2 (3rd
-	   edn.), section 4.3.1, Algorithm D], except that we don't explicitly
-	   handle the special case when the initial estimate q for a quotient
-	   digit is >= PyLong_BASE: the max value for q is PyLong_BASE+1, and
-	   that won't overflow a digit. */
+    /* We follow Knuth [The Art of Computer Programming, Vol. 2 (3rd
+       edn.), section 4.3.1, Algorithm D], except that we don't explicitly
+       handle the special case when the initial estimate q for a quotient
+       digit is >= PyLong_BASE: the max value for q is PyLong_BASE+1, and
+       that won't overflow a digit. */
 
-	/* allocate space; w will also be used to hold the final remainder */
-	size_v = ABS(Py_SIZE(v1));
-	size_w = ABS(Py_SIZE(w1));
-	assert(size_v >= size_w && size_w >= 2); /* Assert checks by div() */
-	v = _PyLong_New(size_v+1);
-	if (v == NULL) {
-		*prem = NULL;
-		return NULL;
-	}
-	w = _PyLong_New(size_w);
-	if (w == NULL) {
-		Py_DECREF(v);
-		*prem = NULL;
-		return NULL;
-	}
+    /* allocate space; w will also be used to hold the final remainder */
+    size_v = ABS(Py_SIZE(v1));
+    size_w = ABS(Py_SIZE(w1));
+    assert(size_v >= size_w && size_w >= 2); /* Assert checks by div() */
+    v = _PyLong_New(size_v+1);
+    if (v == NULL) {
+        *prem = NULL;
+        return NULL;
+    }
+    w = _PyLong_New(size_w);
+    if (w == NULL) {
+        Py_DECREF(v);
+        *prem = NULL;
+        return NULL;
+    }
 
-	/* normalize: shift w1 left so that its top digit is >= PyLong_BASE/2.
-	   shift v1 left by the same amount.  Results go into w and v. */
-	d = PyLong_SHIFT - bits_in_digit(w1->ob_digit[size_w-1]);
-	carry = v_lshift(w->ob_digit, w1->ob_digit, size_w, d);
-	assert(carry == 0);
-	carry = v_lshift(v->ob_digit, v1->ob_digit, size_v, d);
-	if (carry != 0 || v->ob_digit[size_v-1] >= w->ob_digit[size_w-1]) {
-		v->ob_digit[size_v] = carry;
-		size_v++;
-	}
+    /* normalize: shift w1 left so that its top digit is >= PyLong_BASE/2.
+       shift v1 left by the same amount.  Results go into w and v. */
+    d = PyLong_SHIFT - bits_in_digit(w1->ob_digit[size_w-1]);
+    carry = v_lshift(w->ob_digit, w1->ob_digit, size_w, d);
+    assert(carry == 0);
+    carry = v_lshift(v->ob_digit, v1->ob_digit, size_v, d);
+    if (carry != 0 || v->ob_digit[size_v-1] >= w->ob_digit[size_w-1]) {
+        v->ob_digit[size_v] = carry;
+        size_v++;
+    }
 
-	/* Now v->ob_digit[size_v-1] < w->ob_digit[size_w-1], so quotient has
-	   at most (and usually exactly) k = size_v - size_w digits. */
-	k = size_v - size_w;
-	assert(k >= 0);
-	a = _PyLong_New(k);
-	if (a == NULL) {
-		Py_DECREF(w);
-		Py_DECREF(v);
-		*prem = NULL;
-		return NULL;
-	}
-	v0 = v->ob_digit;
-	w0 = w->ob_digit;
-	wm1 = w0[size_w-1];
-	wm2 = w0[size_w-2];
-	for (vk = v0+k, ak = a->ob_digit + k; vk-- > v0;) {
-		/* inner loop: divide vk[0:size_w+1] by w0[0:size_w], giving
-		   single-digit quotient q, remainder in vk[0:size_w]. */
+    /* Now v->ob_digit[size_v-1] < w->ob_digit[size_w-1], so quotient has
+       at most (and usually exactly) k = size_v - size_w digits. */
+    k = size_v - size_w;
+    assert(k >= 0);
+    a = _PyLong_New(k);
+    if (a == NULL) {
+        Py_DECREF(w);
+        Py_DECREF(v);
+        *prem = NULL;
+        return NULL;
+    }
+    v0 = v->ob_digit;
+    w0 = w->ob_digit;
+    wm1 = w0[size_w-1];
+    wm2 = w0[size_w-2];
+    for (vk = v0+k, ak = a->ob_digit + k; vk-- > v0;) {
+        /* inner loop: divide vk[0:size_w+1] by w0[0:size_w], giving
+           single-digit quotient q, remainder in vk[0:size_w]. */
 
-		SIGCHECK({
-			Py_DECREF(a);
-			Py_DECREF(w);
-			Py_DECREF(v);
-			*prem = NULL;
-			return NULL;
-		})
+        SIGCHECK({
+            Py_DECREF(a);
+            Py_DECREF(w);
+            Py_DECREF(v);
+            *prem = NULL;
+            return NULL;
+        })
 
-		/* estimate quotient digit q; may overestimate by 1 (rare) */
-		vtop = vk[size_w];
-		assert(vtop <= wm1);
-		vv = ((twodigits)vtop << PyLong_SHIFT) | vk[size_w-1];
-		q = (digit)(vv / wm1);
-		r = (digit)(vv - (twodigits)wm1 * q); /* r = vv % wm1 */
-		while ((twodigits)wm2 * q > (((twodigits)r << PyLong_SHIFT)
-					     | vk[size_w-2])) {
-			--q;
-			r += wm1;
-			if (r >= PyLong_BASE)
-				break;
-		}
-		assert(q <= PyLong_BASE);
+        /* estimate quotient digit q; may overestimate by 1 (rare) */
+        vtop = vk[size_w];
+        assert(vtop <= wm1);
+        vv = ((twodigits)vtop << PyLong_SHIFT) | vk[size_w-1];
+        q = (digit)(vv / wm1);
+        r = (digit)(vv - (twodigits)wm1 * q); /* r = vv % wm1 */
+        while ((twodigits)wm2 * q > (((twodigits)r << PyLong_SHIFT)
+                                     | vk[size_w-2])) {
+            --q;
+            r += wm1;
+            if (r >= PyLong_BASE)
+                break;
+        }
+        assert(q <= PyLong_BASE);
 
-		/* subtract q*w0[0:size_w] from vk[0:size_w+1] */
-		zhi = 0;
-		for (i = 0; i < size_w; ++i) {
-			/* invariants: -PyLong_BASE <= -q <= zhi <= 0;
-			   -PyLong_BASE * q <= z < PyLong_BASE */
-			z = (sdigit)vk[i] + zhi -
-				(stwodigits)q * (stwodigits)w0[i];
-			vk[i] = (digit)z & PyLong_MASK;
-			zhi = (sdigit)Py_ARITHMETIC_RIGHT_SHIFT(stwodigits,
-							z, PyLong_SHIFT);
-		}
+        /* subtract q*w0[0:size_w] from vk[0:size_w+1] */
+        zhi = 0;
+        for (i = 0; i < size_w; ++i) {
+            /* invariants: -PyLong_BASE <= -q <= zhi <= 0;
+               -PyLong_BASE * q <= z < PyLong_BASE */
+            z = (sdigit)vk[i] + zhi -
+                (stwodigits)q * (stwodigits)w0[i];
+            vk[i] = (digit)z & PyLong_MASK;
+            zhi = (sdigit)Py_ARITHMETIC_RIGHT_SHIFT(stwodigits,
+                                            z, PyLong_SHIFT);
+        }
 
-		/* add w back if q was too large (this branch taken rarely) */
-		assert((sdigit)vtop + zhi == -1 || (sdigit)vtop + zhi == 0);
-		if ((sdigit)vtop + zhi < 0) {
-			carry = 0;
-			for (i = 0; i < size_w; ++i) {
-				carry += vk[i] + w0[i];
-				vk[i] = carry & PyLong_MASK;
-				carry >>= PyLong_SHIFT;
-			}
-			--q;
-		}
+        /* add w back if q was too large (this branch taken rarely) */
+        assert((sdigit)vtop + zhi == -1 || (sdigit)vtop + zhi == 0);
+        if ((sdigit)vtop + zhi < 0) {
+            carry = 0;
+            for (i = 0; i < size_w; ++i) {
+                carry += vk[i] + w0[i];
+                vk[i] = carry & PyLong_MASK;
+                carry >>= PyLong_SHIFT;
+            }
+            --q;
+        }
 
-		/* store quotient digit */
-		assert(q < PyLong_BASE);
-		*--ak = q;
-	}
+        /* store quotient digit */
+        assert(q < PyLong_BASE);
+        *--ak = q;
+    }
 
-	/* unshift remainder; we reuse w to store the result */
-	carry = v_rshift(w0, v0, size_w, d);
-	assert(carry==0);
-	Py_DECREF(v);
+    /* unshift remainder; we reuse w to store the result */
+    carry = v_rshift(w0, v0, size_w, d);
+    assert(carry==0);
+    Py_DECREF(v);
 
-	*prem = long_normalize(w);
-	return long_normalize(a);
+    *prem = long_normalize(w);
+    return long_normalize(a);
 }
 
 /* For a nonzero PyLong a, express a in the form x * 2**e, with 0.5 <=
@@ -2199,111 +2199,111 @@
 double
 _PyLong_Frexp(PyLongObject *a, Py_ssize_t *e)
 {
-	Py_ssize_t a_size, a_bits, shift_digits, shift_bits, x_size;
-	/* See below for why x_digits is always large enough. */
-	digit rem, x_digits[2 + (DBL_MANT_DIG + 1) / PyLong_SHIFT];
-	double dx;
-	/* Correction term for round-half-to-even rounding.  For a digit x,
-	   "x + half_even_correction[x & 7]" gives x rounded to the nearest
-	   multiple of 4, rounding ties to a multiple of 8. */
-	static const int half_even_correction[8] = {0, -1, -2, 1, 0, -1, 2, 1};
+    Py_ssize_t a_size, a_bits, shift_digits, shift_bits, x_size;
+    /* See below for why x_digits is always large enough. */
+    digit rem, x_digits[2 + (DBL_MANT_DIG + 1) / PyLong_SHIFT];
+    double dx;
+    /* Correction term for round-half-to-even rounding.  For a digit x,
+       "x + half_even_correction[x & 7]" gives x rounded to the nearest
+       multiple of 4, rounding ties to a multiple of 8. */
+    static const int half_even_correction[8] = {0, -1, -2, 1, 0, -1, 2, 1};
 
-	a_size = ABS(Py_SIZE(a));
-	if (a_size == 0) {
-		/* Special case for 0: significand 0.0, exponent 0. */
-		*e = 0;
-		return 0.0;
-	}
-	a_bits = bits_in_digit(a->ob_digit[a_size-1]);
-	/* The following is an overflow-free version of the check
-	   "if ((a_size - 1) * PyLong_SHIFT + a_bits > PY_SSIZE_T_MAX) ..." */
-	if (a_size >= (PY_SSIZE_T_MAX - 1) / PyLong_SHIFT + 1 &&
-	    (a_size > (PY_SSIZE_T_MAX - 1) / PyLong_SHIFT + 1 ||
-	     a_bits > (PY_SSIZE_T_MAX - 1) % PyLong_SHIFT + 1))
-		 goto overflow;
-	a_bits = (a_size - 1) * PyLong_SHIFT + a_bits;
+    a_size = ABS(Py_SIZE(a));
+    if (a_size == 0) {
+        /* Special case for 0: significand 0.0, exponent 0. */
+        *e = 0;
+        return 0.0;
+    }
+    a_bits = bits_in_digit(a->ob_digit[a_size-1]);
+    /* The following is an overflow-free version of the check
+       "if ((a_size - 1) * PyLong_SHIFT + a_bits > PY_SSIZE_T_MAX) ..." */
+    if (a_size >= (PY_SSIZE_T_MAX - 1) / PyLong_SHIFT + 1 &&
+        (a_size > (PY_SSIZE_T_MAX - 1) / PyLong_SHIFT + 1 ||
+         a_bits > (PY_SSIZE_T_MAX - 1) % PyLong_SHIFT + 1))
+         goto overflow;
+    a_bits = (a_size - 1) * PyLong_SHIFT + a_bits;
 
-	/* Shift the first DBL_MANT_DIG + 2 bits of a into x_digits[0:x_size]
-	   (shifting left if a_bits <= DBL_MANT_DIG + 2).
+    /* Shift the first DBL_MANT_DIG + 2 bits of a into x_digits[0:x_size]
+       (shifting left if a_bits <= DBL_MANT_DIG + 2).
 
-	   Number of digits needed for result: write // for floor division.
-	   Then if shifting left, we end up using
+       Number of digits needed for result: write // for floor division.
+       Then if shifting left, we end up using
 
-	     1 + a_size + (DBL_MANT_DIG + 2 - a_bits) // PyLong_SHIFT
+         1 + a_size + (DBL_MANT_DIG + 2 - a_bits) // PyLong_SHIFT
 
-	   digits.  If shifting right, we use
+       digits.  If shifting right, we use
 
-	     a_size - (a_bits - DBL_MANT_DIG - 2) // PyLong_SHIFT
+         a_size - (a_bits - DBL_MANT_DIG - 2) // PyLong_SHIFT
 
-	   digits.  Using a_size = 1 + (a_bits - 1) // PyLong_SHIFT along with
-	   the inequalities
+       digits.  Using a_size = 1 + (a_bits - 1) // PyLong_SHIFT along with
+       the inequalities
 
-	     m // PyLong_SHIFT + n // PyLong_SHIFT <= (m + n) // PyLong_SHIFT
-	     m // PyLong_SHIFT - n // PyLong_SHIFT <=
-	                                      1 + (m - n - 1) // PyLong_SHIFT,
+         m // PyLong_SHIFT + n // PyLong_SHIFT <= (m + n) // PyLong_SHIFT
+         m // PyLong_SHIFT - n // PyLong_SHIFT <=
+                                          1 + (m - n - 1) // PyLong_SHIFT,
 
-	   valid for any integers m and n, we find that x_size satisfies
+       valid for any integers m and n, we find that x_size satisfies
 
-	     x_size <= 2 + (DBL_MANT_DIG + 1) // PyLong_SHIFT
+         x_size <= 2 + (DBL_MANT_DIG + 1) // PyLong_SHIFT
 
-	   in both cases.
-	*/
-	if (a_bits <= DBL_MANT_DIG + 2) {
-		shift_digits = (DBL_MANT_DIG + 2 - a_bits) / PyLong_SHIFT;
-		shift_bits = (DBL_MANT_DIG + 2 - a_bits) % PyLong_SHIFT;
-		x_size = 0;
-		while (x_size < shift_digits)
-			x_digits[x_size++] = 0;
-		rem = v_lshift(x_digits + x_size, a->ob_digit, a_size,
-			       (int)shift_bits);
-		x_size += a_size;
-		x_digits[x_size++] = rem;
-	}
-	else {
-		shift_digits = (a_bits - DBL_MANT_DIG - 2) / PyLong_SHIFT;
-		shift_bits = (a_bits - DBL_MANT_DIG - 2) % PyLong_SHIFT;
-		rem = v_rshift(x_digits, a->ob_digit + shift_digits,
-			       a_size - shift_digits, (int)shift_bits);
-		x_size = a_size - shift_digits;
-		/* For correct rounding below, we need the least significant
-		   bit of x to be 'sticky' for this shift: if any of the bits
-		   shifted out was nonzero, we set the least significant bit
-		   of x. */
-		if (rem)
-			x_digits[0] |= 1;
-		else
-			while (shift_digits > 0)
-				if (a->ob_digit[--shift_digits]) {
-					x_digits[0] |= 1;
-					break;
-				}
-	}
-	assert(1 <= x_size && x_size <= (Py_ssize_t)(sizeof(x_digits)/sizeof(digit)));
+       in both cases.
+    */
+    if (a_bits <= DBL_MANT_DIG + 2) {
+        shift_digits = (DBL_MANT_DIG + 2 - a_bits) / PyLong_SHIFT;
+        shift_bits = (DBL_MANT_DIG + 2 - a_bits) % PyLong_SHIFT;
+        x_size = 0;
+        while (x_size < shift_digits)
+            x_digits[x_size++] = 0;
+        rem = v_lshift(x_digits + x_size, a->ob_digit, a_size,
+                       (int)shift_bits);
+        x_size += a_size;
+        x_digits[x_size++] = rem;
+    }
+    else {
+        shift_digits = (a_bits - DBL_MANT_DIG - 2) / PyLong_SHIFT;
+        shift_bits = (a_bits - DBL_MANT_DIG - 2) % PyLong_SHIFT;
+        rem = v_rshift(x_digits, a->ob_digit + shift_digits,
+                       a_size - shift_digits, (int)shift_bits);
+        x_size = a_size - shift_digits;
+        /* For correct rounding below, we need the least significant
+           bit of x to be 'sticky' for this shift: if any of the bits
+           shifted out was nonzero, we set the least significant bit
+           of x. */
+        if (rem)
+            x_digits[0] |= 1;
+        else
+            while (shift_digits > 0)
+                if (a->ob_digit[--shift_digits]) {
+                    x_digits[0] |= 1;
+                    break;
+                }
+    }
+    assert(1 <= x_size && x_size <= (Py_ssize_t)(sizeof(x_digits)/sizeof(digit)));
 
-	/* Round, and convert to double. */
-	x_digits[0] += half_even_correction[x_digits[0] & 7];
-	dx = x_digits[--x_size];
-	while (x_size > 0)
-		dx = dx * PyLong_BASE + x_digits[--x_size];
+    /* Round, and convert to double. */
+    x_digits[0] += half_even_correction[x_digits[0] & 7];
+    dx = x_digits[--x_size];
+    while (x_size > 0)
+        dx = dx * PyLong_BASE + x_digits[--x_size];
 
-	/* Rescale;  make correction if result is 1.0. */
-	dx /= 4.0 * EXP2_DBL_MANT_DIG;
-	if (dx == 1.0) {
-		if (a_bits == PY_SSIZE_T_MAX)
-			goto overflow;
-		dx = 0.5;
-		a_bits += 1;
-	}
+    /* Rescale;  make correction if result is 1.0. */
+    dx /= 4.0 * EXP2_DBL_MANT_DIG;
+    if (dx == 1.0) {
+        if (a_bits == PY_SSIZE_T_MAX)
+            goto overflow;
+        dx = 0.5;
+        a_bits += 1;
+    }
 
-	*e = a_bits;
-	return Py_SIZE(a) < 0 ? -dx : dx;
+    *e = a_bits;
+    return Py_SIZE(a) < 0 ? -dx : dx;
 
   overflow:
-	/* exponent > PY_SSIZE_T_MAX */
-	PyErr_SetString(PyExc_OverflowError,
-			"huge integer: number of bits overflows a Py_ssize_t");
-	*e = 0;
-	return -1.0;
+    /* exponent > PY_SSIZE_T_MAX */
+    PyErr_SetString(PyExc_OverflowError,
+                    "huge integer: number of bits overflows a Py_ssize_t");
+    *e = 0;
+    return -1.0;
 }
 
 /* Get a C double from a long int object.  Rounds to the nearest double,
@@ -2312,20 +2312,20 @@
 double
 PyLong_AsDouble(PyObject *v)
 {
-	Py_ssize_t exponent;
-	double x;
+    Py_ssize_t exponent;
+    double x;
 
-	if (v == NULL || !PyLong_Check(v)) {
-		PyErr_BadInternalCall();
-		return -1.0;
-	}
-	x = _PyLong_Frexp((PyLongObject *)v, &exponent);
-	if ((x == -1.0 && PyErr_Occurred()) || exponent > DBL_MAX_EXP) {
-		PyErr_SetString(PyExc_OverflowError,
-				"long int too large to convert to float");
-		return -1.0;
-	}
-	return ldexp(x, (int)exponent);
+    if (v == NULL || !PyLong_Check(v)) {
+        PyErr_BadInternalCall();
+        return -1.0;
+    }
+    x = _PyLong_Frexp((PyLongObject *)v, &exponent);
+    if ((x == -1.0 && PyErr_Occurred()) || exponent > DBL_MAX_EXP) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "long int too large to convert to float");
+        return -1.0;
+    }
+    return ldexp(x, (int)exponent);
 }
 
 /* Methods */
@@ -2333,78 +2333,78 @@
 static void
 long_dealloc(PyObject *v)
 {
-	Py_TYPE(v)->tp_free(v);
+    Py_TYPE(v)->tp_free(v);
 }
 
 static PyObject *
 long_repr(PyObject *v)
 {
-	return _PyLong_Format(v, 10, 1, 0);
+    return _PyLong_Format(v, 10, 1, 0);
 }
 
 static PyObject *
 long_str(PyObject *v)
 {
-	return _PyLong_Format(v, 10, 0, 0);
+    return _PyLong_Format(v, 10, 0, 0);
 }
 
 static int
 long_compare(PyLongObject *a, PyLongObject *b)
 {
-	Py_ssize_t sign;
+    Py_ssize_t sign;
 
-	if (Py_SIZE(a) != Py_SIZE(b)) {
-		sign = Py_SIZE(a) - Py_SIZE(b);
-	}
-	else {
-		Py_ssize_t i = ABS(Py_SIZE(a));
-		while (--i >= 0 && a->ob_digit[i] == b->ob_digit[i])
-			;
-		if (i < 0)
-			sign = 0;
-		else {
-			sign = (sdigit)a->ob_digit[i] - (sdigit)b->ob_digit[i];
-			if (Py_SIZE(a) < 0)
-				sign = -sign;
-		}
-	}
-	return sign < 0 ? -1 : sign > 0 ? 1 : 0;
+    if (Py_SIZE(a) != Py_SIZE(b)) {
+        sign = Py_SIZE(a) - Py_SIZE(b);
+    }
+    else {
+        Py_ssize_t i = ABS(Py_SIZE(a));
+        while (--i >= 0 && a->ob_digit[i] == b->ob_digit[i])
+            ;
+        if (i < 0)
+            sign = 0;
+        else {
+            sign = (sdigit)a->ob_digit[i] - (sdigit)b->ob_digit[i];
+            if (Py_SIZE(a) < 0)
+                sign = -sign;
+        }
+    }
+    return sign < 0 ? -1 : sign > 0 ? 1 : 0;
 }
 
 static long
 long_hash(PyLongObject *v)
 {
-	unsigned long x;
-	Py_ssize_t i;
-	int sign;
+    unsigned long x;
+    Py_ssize_t i;
+    int sign;
 
-	/* This is designed so that Python ints and longs with the
-	   same value hash to the same value, otherwise comparisons
-	   of mapping keys will turn out weird */
-	i = v->ob_size;
-	sign = 1;
-	x = 0;
-	if (i < 0) {
-		sign = -1;
-		i = -(i);
-	}
-	/* The following loop produces a C unsigned long x such that x is
-	   congruent to the absolute value of v modulo ULONG_MAX.  The
-	   resulting x is nonzero if and only if v is. */
-	while (--i >= 0) {
-		/* Force a native long #-bits (32 or 64) circular shift */
-		x = (x >> (8*SIZEOF_LONG-PyLong_SHIFT)) | (x << PyLong_SHIFT);
-		x += v->ob_digit[i];
-		/* If the addition above overflowed we compensate by
-		   incrementing.  This preserves the value modulo
-		   ULONG_MAX. */
-		if (x < v->ob_digit[i])
-			x++;
-	}
-	x = x * sign;
-	if (x == (unsigned long)-1)
-		x = (unsigned long)-2;
-	return (long)x;
+    /* This is designed so that Python ints and longs with the
+       same value hash to the same value, otherwise comparisons
+       of mapping keys will turn out weird */
+    i = v->ob_size;
+    sign = 1;
+    x = 0;
+    if (i < 0) {
+        sign = -1;
+        i = -(i);
+    }
+    /* The following loop produces a C unsigned long x such that x is
+       congruent to the absolute value of v modulo ULONG_MAX.  The
+       resulting x is nonzero if and only if v is. */
+    while (--i >= 0) {
+        /* Force a native long #-bits (32 or 64) circular shift */
+        x = (x >> (8*SIZEOF_LONG-PyLong_SHIFT)) | (x << PyLong_SHIFT);
+        x += v->ob_digit[i];
+        /* If the addition above overflowed we compensate by
+           incrementing.  This preserves the value modulo
+           ULONG_MAX. */
+        if (x < v->ob_digit[i])
+            x++;
+    }
+    x = x * sign;
+    if (x == (unsigned long)-1)
+        x = (unsigned long)-2;
+    return (long)x;
 }
 
 
@@ -2413,33 +2413,33 @@
 static PyLongObject *
 x_add(PyLongObject *a, PyLongObject *b)
 {
-	Py_ssize_t size_a = ABS(Py_SIZE(a)), size_b = ABS(Py_SIZE(b));
-	PyLongObject *z;
-	Py_ssize_t i;
-	digit carry = 0;
+    Py_ssize_t size_a = ABS(Py_SIZE(a)), size_b = ABS(Py_SIZE(b));
+    PyLongObject *z;
+    Py_ssize_t i;
+    digit carry = 0;
 
-	/* Ensure a is the larger of the two: */
-	if (size_a < size_b) {
-		{ PyLongObject *temp = a; a = b; b = temp; }
-		{ Py_ssize_t size_temp = size_a;
-		  size_a = size_b;
-		  size_b = size_temp; }
-	}
-	z = _PyLong_New(size_a+1);
-	if (z == NULL)
-		return NULL;
-	for (i = 0; i < size_b; ++i) {
-		carry += a->ob_digit[i] + b->ob_digit[i];
-		z->ob_digit[i] = carry & PyLong_MASK;
-		carry >>= PyLong_SHIFT;
-	}
-	for (; i < size_a; ++i) {
-		carry += a->ob_digit[i];
-		z->ob_digit[i] = carry & PyLong_MASK;
-		carry >>= PyLong_SHIFT;
-	}
-	z->ob_digit[i] = carry;
-	return long_normalize(z);
+    /* Ensure a is the larger of the two: */
+    if (size_a < size_b) {
+        { PyLongObject *temp = a; a = b; b = temp; }
+        { Py_ssize_t size_temp = size_a;
+          size_a = size_b;
+          size_b = size_temp; }
+    }
+    z = _PyLong_New(size_a+1);
+    if (z == NULL)
+        return NULL;
+    for (i = 0; i < size_b; ++i) {
+        carry += a->ob_digit[i] + b->ob_digit[i];
+        z->ob_digit[i] = carry & PyLong_MASK;
+        carry >>= PyLong_SHIFT;
+    }
+    for (; i < size_a; ++i) {
+        carry += a->ob_digit[i];
+        z->ob_digit[i] = carry & PyLong_MASK;
+        carry >>= PyLong_SHIFT;
+    }
+    z->ob_digit[i] = carry;
+    return long_normalize(z);
 }
 
 /* Subtract the absolute values of two integers. */
@@ -2447,107 +2447,107 @@
 static PyLongObject *
 x_sub(PyLongObject *a, PyLongObject *b)
 {
-	Py_ssize_t size_a = ABS(Py_SIZE(a)), size_b = ABS(Py_SIZE(b));
-	PyLongObject *z;
-	Py_ssize_t i;
-	int sign = 1;
-	digit borrow = 0;
+    Py_ssize_t size_a = ABS(Py_SIZE(a)), size_b = ABS(Py_SIZE(b));
+    PyLongObject *z;
+    Py_ssize_t i;
+    int sign = 1;
+    digit borrow = 0;
 
-	/* Ensure a is the larger of the two: */
-	if (size_a < size_b) {
-		sign = -1;
-		{ PyLongObject *temp = a; a = b; b = temp; }
-		{ Py_ssize_t size_temp = size_a;
-		  size_a = size_b;
-		  size_b = size_temp; }
-	}
-	else if (size_a == size_b) {
-		/* Find highest digit where a and b differ: */
-		i = size_a;
-		while (--i >= 0 && a->ob_digit[i] == b->ob_digit[i])
-			;
-		if (i < 0)
-			return _PyLong_New(0);
-		if (a->ob_digit[i] < b->ob_digit[i]) {
-			sign = -1;
-			{ PyLongObject *temp = a; a = b; b = temp; }
-		}
-		size_a = size_b = i+1;
-	}
-	z = _PyLong_New(size_a);
-	if (z == NULL)
-		return NULL;
-	for (i = 0; i < size_b; ++i) {
-		/* The following assumes unsigned arithmetic
-		   works module 2**N for some N>PyLong_SHIFT. */
-		borrow = a->ob_digit[i] - b->ob_digit[i] - borrow;
-		z->ob_digit[i] = borrow & PyLong_MASK;
-		borrow >>= PyLong_SHIFT;
-		borrow &= 1; /* Keep only one sign bit */
-	}
-	for (; i < size_a; ++i) {
-		borrow = a->ob_digit[i] - borrow;
-		z->ob_digit[i] = borrow & PyLong_MASK;
-		borrow >>= PyLong_SHIFT;
-		borrow &= 1; /* Keep only one sign bit */
-	}
-	assert(borrow == 0);
-	if (sign < 0)
-		z->ob_size = -(z->ob_size);
-	return long_normalize(z);
+    /* Ensure a is the larger of the two: */
+    if (size_a < size_b) {
+        sign = -1;
+        { PyLongObject *temp = a; a = b; b = temp; }
+        { Py_ssize_t size_temp = size_a;
+          size_a = size_b;
+          size_b = size_temp; }
+    }
+    else if (size_a == size_b) {
+        /* Find highest digit where a and b differ: */
+        i = size_a;
+        while (--i >= 0 && a->ob_digit[i] == b->ob_digit[i])
+            ;
+        if (i < 0)
+            return _PyLong_New(0);
+        if (a->ob_digit[i] < b->ob_digit[i]) {
+            sign = -1;
+            { PyLongObject *temp = a; a = b; b = temp; }
+        }
+        size_a = size_b = i+1;
+    }
+    z = _PyLong_New(size_a);
+    if (z == NULL)
+        return NULL;
+    for (i = 0; i < size_b; ++i) {
+        /* The following assumes unsigned arithmetic
+           works module 2**N for some N>PyLong_SHIFT. */
+        borrow = a->ob_digit[i] - b->ob_digit[i] - borrow;
+        z->ob_digit[i] = borrow & PyLong_MASK;
+        borrow >>= PyLong_SHIFT;
+        borrow &= 1; /* Keep only one sign bit */
+    }
+    for (; i < size_a; ++i) {
+        borrow = a->ob_digit[i] - borrow;
+        z->ob_digit[i] = borrow & PyLong_MASK;
+        borrow >>= PyLong_SHIFT;
+        borrow &= 1; /* Keep only one sign bit */
+    }
+    assert(borrow == 0);
+    if (sign < 0)
+        z->ob_size = -(z->ob_size);
+    return long_normalize(z);
 }
 
 static PyObject *
 long_add(PyLongObject *v, PyLongObject *w)
 {
-	PyLongObject *a, *b, *z;
+    PyLongObject *a, *b, *z;
 
-	CONVERT_BINOP((PyObject *)v, (PyObject *)w, &a, &b);
+    CONVERT_BINOP((PyObject *)v, (PyObject *)w, &a, &b);
 
-	if (a->ob_size < 0) {
-		if (b->ob_size < 0) {
-			z = x_add(a, b);
-			if (z != NULL && z->ob_size != 0)
-				z->ob_size = -(z->ob_size);
-		}
-		else
-			z = x_sub(b, a);
-	}
-	else {
-		if (b->ob_size < 0)
-			z = x_sub(a, b);
-		else
-			z = x_add(a, b);
-	}
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return (PyObject *)z;
+    if (a->ob_size < 0) {
+        if (b->ob_size < 0) {
+            z = x_add(a, b);
+            if (z != NULL && z->ob_size != 0)
+                z->ob_size = -(z->ob_size);
+        }
+        else
+            z = x_sub(b, a);
+    }
+    else {
+        if (b->ob_size < 0)
+            z = x_sub(a, b);
+        else
+            z = x_add(a, b);
+    }
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return (PyObject *)z;
 }
 
 static PyObject *
 long_sub(PyLongObject *v, PyLongObject *w)
 {
-	PyLongObject *a, *b, *z;
+    PyLongObject *a, *b, *z;
 
-	CONVERT_BINOP((PyObject *)v, (PyObject *)w, &a, &b);
+    CONVERT_BINOP((PyObject *)v, (PyObject *)w, &a, &b);
 
-	if (a->ob_size < 0) {
-		if (b->ob_size < 0)
-			z = x_sub(a, b);
-		else
-			z = x_add(a, b);
-		if (z != NULL && z->ob_size != 0)
-			z->ob_size = -(z->ob_size);
-	}
-	else {
-		if (b->ob_size < 0)
-			z = x_add(a, b);
-		else
-			z = x_sub(a, b);
-	}
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return (PyObject *)z;
+    if (a->ob_size < 0) {
+        if (b->ob_size < 0)
+            z = x_sub(a, b);
+        else
+            z = x_add(a, b);
+        if (z != NULL && z->ob_size != 0)
+            z->ob_size = -(z->ob_size);
+    }
+    else {
+        if (b->ob_size < 0)
+            z = x_add(a, b);
+        else
+            z = x_sub(a, b);
+    }
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return (PyObject *)z;
 }
 
 /* Grade school multiplication, ignoring the signs.
@@ -2556,85 +2556,85 @@
 static PyLongObject *
 x_mul(PyLongObject *a, PyLongObject *b)
 {
-	PyLongObject *z;
-	Py_ssize_t size_a = ABS(Py_SIZE(a));
-	Py_ssize_t size_b = ABS(Py_SIZE(b));
-	Py_ssize_t i;
+    PyLongObject *z;
+    Py_ssize_t size_a = ABS(Py_SIZE(a));
+    Py_ssize_t size_b = ABS(Py_SIZE(b));
+    Py_ssize_t i;
 
-     	z = _PyLong_New(size_a + size_b);
-	if (z == NULL)
-		return NULL;
+    z = _PyLong_New(size_a + size_b);
+    if (z == NULL)
+        return NULL;
 
-	memset(z->ob_digit, 0, Py_SIZE(z) * sizeof(digit));
-	if (a == b) {
-		/* Efficient squaring per HAC, Algorithm 14.16:
-		 * http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf
-		 * Gives slightly less than a 2x speedup when a == b,
-		 * via exploiting that each entry in the multiplication
-		 * pyramid appears twice (except for the size_a squares).
-		 */
-		for (i = 0; i < size_a; ++i) {
-			twodigits carry;
-			twodigits f = a->ob_digit[i];
-			digit *pz = z->ob_digit + (i << 1);
-			digit *pa = a->ob_digit + i + 1;
-			digit *paend = a->ob_digit + size_a;
+    memset(z->ob_digit, 0, Py_SIZE(z) * sizeof(digit));
+    if (a == b) {
+        /* Efficient squaring per HAC, Algorithm 14.16:
+         * http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf
+         * Gives slightly less than a 2x speedup when a == b,
+         * via exploiting that each entry in the multiplication
+         * pyramid appears twice (except for the size_a squares).
+         */
+        for (i = 0; i < size_a; ++i) {
+            twodigits carry;
+            twodigits f = a->ob_digit[i];
+            digit *pz = z->ob_digit + (i << 1);
+            digit *pa = a->ob_digit + i + 1;
+            digit *paend = a->ob_digit + size_a;
 
-			SIGCHECK({
-				Py_DECREF(z);
-				return NULL;
-			})
+            SIGCHECK({
+                Py_DECREF(z);
+                return NULL;
+            })
 
-			carry = *pz + f * f;
-			*pz++ = (digit)(carry & PyLong_MASK);
-			carry >>= PyLong_SHIFT;
-			assert(carry <= PyLong_MASK);
+            carry = *pz + f * f;
+            *pz++ = (digit)(carry & PyLong_MASK);
+            carry >>= PyLong_SHIFT;
+            assert(carry <= PyLong_MASK);
 
-			/* Now f is added in twice in each column of the
-			 * pyramid it appears.  Same as adding f<<1 once.
-			 */
-			f <<= 1;
-			while (pa < paend) {
-				carry += *pz + *pa++ * f;
-				*pz++ = (digit)(carry & PyLong_MASK);
-				carry >>= PyLong_SHIFT;
-				assert(carry <= (PyLong_MASK << 1));
-			}
-			if (carry) {
-				carry += *pz;
-				*pz++ = (digit)(carry & PyLong_MASK);
-				carry >>= PyLong_SHIFT;
-			}
-			if (carry)
-				*pz += (digit)(carry & PyLong_MASK);
-			assert((carry >> PyLong_SHIFT) == 0);
-		}
-	}
-	else {	/* a is not the same as b -- gradeschool long mult */
-		for (i = 0; i < size_a; ++i) {
-			twodigits carry = 0;
-			twodigits f = a->ob_digit[i];
-			digit *pz = z->ob_digit + i;
-			digit *pb = b->ob_digit;
-			digit *pbend = b->ob_digit + size_b;
+            /* Now f is added in twice in each column of the
+             * pyramid it appears.  Same as adding f<<1 once.
+             */
+            f <<= 1;
+            while (pa < paend) {
+                carry += *pz + *pa++ * f;
+                *pz++ = (digit)(carry & PyLong_MASK);
+                carry >>= PyLong_SHIFT;
+                assert(carry <= (PyLong_MASK << 1));
+            }
+            if (carry) {
+                carry += *pz;
+                *pz++ = (digit)(carry & PyLong_MASK);
+                carry >>= PyLong_SHIFT;
+            }
+            if (carry)
+                *pz += (digit)(carry & PyLong_MASK);
+            assert((carry >> PyLong_SHIFT) == 0);
+        }
+    }
+    else {      /* a is not the same as b -- gradeschool long mult */
+        for (i = 0; i < size_a; ++i) {
+            twodigits carry = 0;
+            twodigits f = a->ob_digit[i];
+            digit *pz = z->ob_digit + i;
+            digit *pb = b->ob_digit;
+            digit *pbend = b->ob_digit + size_b;
 
-			SIGCHECK({
-				Py_DECREF(z);
-				return NULL;
-			})
+            SIGCHECK({
+                Py_DECREF(z);
+                return NULL;
+            })
 
-			while (pb < pbend) {
-				carry += *pz + *pb++ * f;
-				*pz++ = (digit)(carry & PyLong_MASK);
-				carry >>= PyLong_SHIFT;
-				assert(carry <= PyLong_MASK);
-			}
-			if (carry)
-				*pz += (digit)(carry & PyLong_MASK);
-			assert((carry >> PyLong_SHIFT) == 0);
-		}
-	}
-	return long_normalize(z);
+            while (pb < pbend) {
+                carry += *pz + *pb++ * f;
+                *pz++ = (digit)(carry & PyLong_MASK);
+                carry >>= PyLong_SHIFT;
+                assert(carry <= PyLong_MASK);
+            }
+            if (carry)
+                *pz += (digit)(carry & PyLong_MASK);
+            assert((carry >> PyLong_SHIFT) == 0);
+        }
+    }
+    return long_normalize(z);
 }
 
 /* A helper for Karatsuba multiplication (k_mul).
@@ -2647,26 +2647,26 @@
 static int
 kmul_split(PyLongObject *n, Py_ssize_t size, PyLongObject **high, PyLongObject **low)
 {
-	PyLongObject *hi, *lo;
-	Py_ssize_t size_lo, size_hi;
-	const Py_ssize_t size_n = ABS(Py_SIZE(n));
+    PyLongObject *hi, *lo;
+    Py_ssize_t size_lo, size_hi;
+    const Py_ssize_t size_n = ABS(Py_SIZE(n));
 
-	size_lo = MIN(size_n, size);
-	size_hi = size_n - size_lo;
+    size_lo = MIN(size_n, size);
+    size_hi = size_n - size_lo;
 
-	if ((hi = _PyLong_New(size_hi)) == NULL)
-		return -1;
-	if ((lo = _PyLong_New(size_lo)) == NULL) {
-		Py_DECREF(hi);
-		return -1;
-	}
+    if ((hi = _PyLong_New(size_hi)) == NULL)
+        return -1;
+    if ((lo = _PyLong_New(size_lo)) == NULL) {
+        Py_DECREF(hi);
+        return -1;
+    }
 
-	memcpy(lo->ob_digit, n->ob_digit, size_lo * sizeof(digit));
-	memcpy(hi->ob_digit, n->ob_digit + size_lo, size_hi * sizeof(digit));
+    memcpy(lo->ob_digit, n->ob_digit, size_lo * sizeof(digit));
+    memcpy(hi->ob_digit, n->ob_digit + size_lo, size_hi * sizeof(digit));
 
-	*high = long_normalize(hi);
-	*low = long_normalize(lo);
-	return 0;
+    *high = long_normalize(hi);
+    *low = long_normalize(lo);
+    return 0;
 }
 
 static PyLongObject *k_lopsided_mul(PyLongObject *a, PyLongObject *b);
@@ -2678,169 +2678,169 @@
 static PyLongObject *
 k_mul(PyLongObject *a, PyLongObject *b)
 {
-	Py_ssize_t asize = ABS(Py_SIZE(a));
-	Py_ssize_t bsize = ABS(Py_SIZE(b));
-	PyLongObject *ah = NULL;
-	PyLongObject *al = NULL;
-	PyLongObject *bh = NULL;
-	PyLongObject *bl = NULL;
-	PyLongObject *ret = NULL;
-	PyLongObject *t1, *t2, *t3;
-	Py_ssize_t shift;	/* the number of digits we split off */
-	Py_ssize_t i;
+    Py_ssize_t asize = ABS(Py_SIZE(a));
+    Py_ssize_t bsize = ABS(Py_SIZE(b));
+    PyLongObject *ah = NULL;
+    PyLongObject *al = NULL;
+    PyLongObject *bh = NULL;
+    PyLongObject *bl = NULL;
+    PyLongObject *ret = NULL;
+    PyLongObject *t1, *t2, *t3;
+    Py_ssize_t shift;           /* the number of digits we split off */
+    Py_ssize_t i;
 
-	/* (ah*X+al)(bh*X+bl) = ah*bh*X*X + (ah*bl + al*bh)*X + al*bl
-	 * Let k = (ah+al)*(bh+bl) = ah*bl + al*bh  + ah*bh + al*bl
-	 * Then the original product is
-	 *     ah*bh*X*X + (k - ah*bh - al*bl)*X + al*bl
-	 * By picking X to be a power of 2, "*X" is just shifting, and it's
-	 * been reduced to 3 multiplies on numbers half the size.
-	 */
+    /* (ah*X+al)(bh*X+bl) = ah*bh*X*X + (ah*bl + al*bh)*X + al*bl
+     * Let k = (ah+al)*(bh+bl) = ah*bl + al*bh  + ah*bh + al*bl
+     * Then the original product is
+     *     ah*bh*X*X + (k - ah*bh - al*bl)*X + al*bl
+     * By picking X to be a power of 2, "*X" is just shifting, and it's
+     * been reduced to 3 multiplies on numbers half the size.
+     */
 
-	/* We want to split based on the larger number; fiddle so that b
-	 * is largest.
-	 */
-	if (asize > bsize) {
-		t1 = a;
-		a = b;
-		b = t1;
+    /* We want to split based on the larger number; fiddle so that b
+     * is largest.
+     */
+    if (asize > bsize) {
+        t1 = a;
+        a = b;
+        b = t1;
 
-		i = asize;
-		asize = bsize;
-		bsize = i;
-	}
+        i = asize;
+        asize = bsize;
+        bsize = i;
+    }
 
-	/* Use gradeschool math when either number is too small. */
-	i = a == b ? KARATSUBA_SQUARE_CUTOFF : KARATSUBA_CUTOFF;
-	if (asize <= i) {
-		if (asize == 0)
-			return _PyLong_New(0);
-		else
-			return x_mul(a, b);
-	}
+    /* Use gradeschool math when either number is too small. */
+    i = a == b ? KARATSUBA_SQUARE_CUTOFF : KARATSUBA_CUTOFF;
+    if (asize <= i) {
+        if (asize == 0)
+            return _PyLong_New(0);
+        else
+            return x_mul(a, b);
+    }
 
-	/* If a is small compared to b, splitting on b gives a degenerate
-	 * case with ah==0, and Karatsuba may be (even much) less efficient
-	 * than "grade school" then.  However, we can still win, by viewing
-	 * b as a string of "big digits", each of width a->ob_size.  That
-	 * leads to a sequence of balanced calls to k_mul.
-	 */
-	if (2 * asize <= bsize)
-		return k_lopsided_mul(a, b);
+    /* If a is small compared to b, splitting on b gives a degenerate
+     * case with ah==0, and Karatsuba may be (even much) less efficient
+     * than "grade school" then.  However, we can still win, by viewing
+     * b as a string of "big digits", each of width a->ob_size.  That
+     * leads to a sequence of balanced calls to k_mul.
+     */
+    if (2 * asize <= bsize)
+        return k_lopsided_mul(a, b);
 
-	/* Split a & b into hi & lo pieces. */
-	shift = bsize >> 1;
-	if (kmul_split(a, shift, &ah, &al) < 0) goto fail;
-	assert(Py_SIZE(ah) > 0);	/* the split isn't degenerate */
+    /* Split a & b into hi & lo pieces. */
+    shift = bsize >> 1;
+    if (kmul_split(a, shift, &ah, &al) < 0) goto fail;
+    assert(Py_SIZE(ah) > 0);            /* the split isn't degenerate */
 
-	if (a == b) {
-		bh = ah;
-		bl = al;
-		Py_INCREF(bh);
-		Py_INCREF(bl);
-	}
-	else if (kmul_split(b, shift, &bh, &bl) < 0) goto fail;
+    if (a == b) {
+        bh = ah;
+        bl = al;
+        Py_INCREF(bh);
+        Py_INCREF(bl);
+    }
+    else if (kmul_split(b, shift, &bh, &bl) < 0) goto fail;
 
-	/* The plan:
-	 * 1. Allocate result space (asize + bsize digits:  that's always
-	 *    enough).
-	 * 2. Compute ah*bh, and copy into result at 2*shift.
-	 * 3. Compute al*bl, and copy into result at 0.  Note that this
-	 *    can't overlap with #2.
-	 * 4. Subtract al*bl from the result, starting at shift.  This may
-	 *    underflow (borrow out of the high digit), but we don't care:
-	 *    we're effectively doing unsigned arithmetic mod
-	 *    PyLong_BASE**(sizea + sizeb), and so long as the *final* result fits,
-	 *    borrows and carries out of the high digit can be ignored.
-	 * 5. Subtract ah*bh from the result, starting at shift.
-	 * 6. Compute (ah+al)*(bh+bl), and add it into the result starting
-	 *    at shift.
-	 */
+    /* The plan:
+     * 1. Allocate result space (asize + bsize digits:  that's always
+     *    enough).
+     * 2. Compute ah*bh, and copy into result at 2*shift.
+     * 3. Compute al*bl, and copy into result at 0.  Note that this
+     *    can't overlap with #2.
+     * 4. Subtract al*bl from the result, starting at shift.  This may
+     *    underflow (borrow out of the high digit), but we don't care:
+     *    we're effectively doing unsigned arithmetic mod
+     *    PyLong_BASE**(sizea + sizeb), and so long as the *final* result fits,
+     *    borrows and carries out of the high digit can be ignored.
+     * 5. Subtract ah*bh from the result, starting at shift.
+     * 6. Compute (ah+al)*(bh+bl), and add it into the result starting
+     *    at shift.
+     */
 
-	/* 1. Allocate result space. */
-	ret = _PyLong_New(asize + bsize);
-	if (ret == NULL) goto fail;
+    /* 1. Allocate result space. */
+    ret = _PyLong_New(asize + bsize);
+    if (ret == NULL) goto fail;
 #ifdef Py_DEBUG
-	/* Fill with trash, to catch reference to uninitialized digits. */
-	memset(ret->ob_digit, 0xDF, Py_SIZE(ret) * sizeof(digit));
+    /* Fill with trash, to catch reference to uninitialized digits. */
+    memset(ret->ob_digit, 0xDF, Py_SIZE(ret) * sizeof(digit));
 #endif
 
-	/* 2. t1 <- ah*bh, and copy into high digits of result. */
-	if ((t1 = k_mul(ah, bh)) == NULL) goto fail;
-	assert(Py_SIZE(t1) >= 0);
-	assert(2*shift + Py_SIZE(t1) <= Py_SIZE(ret));
-	memcpy(ret->ob_digit + 2*shift, t1->ob_digit,
-	       Py_SIZE(t1) * sizeof(digit));
+    /* 2. t1 <- ah*bh, and copy into high digits of result. */
+    if ((t1 = k_mul(ah, bh)) == NULL) goto fail;
+    assert(Py_SIZE(t1) >= 0);
+    assert(2*shift + Py_SIZE(t1) <= Py_SIZE(ret));
+    memcpy(ret->ob_digit + 2*shift, t1->ob_digit,
+           Py_SIZE(t1) * sizeof(digit));
 
-	/* Zero-out the digits higher than the ah*bh copy. */
-	i = Py_SIZE(ret) - 2*shift - Py_SIZE(t1);
-	if (i)
-		memset(ret->ob_digit + 2*shift + Py_SIZE(t1), 0,
-		       i * sizeof(digit));
+    /* Zero-out the digits higher than the ah*bh copy. */
+    i = Py_SIZE(ret) - 2*shift - Py_SIZE(t1);
+    if (i)
+        memset(ret->ob_digit + 2*shift + Py_SIZE(t1), 0,
+               i * sizeof(digit));
 
-	/* 3. t2 <- al*bl, and copy into the low digits. */
-	if ((t2 = k_mul(al, bl)) == NULL) {
-		Py_DECREF(t1);
-		goto fail;
-	}
-	assert(Py_SIZE(t2) >= 0);
-	assert(Py_SIZE(t2) <= 2*shift); /* no overlap with high digits */
-	memcpy(ret->ob_digit, t2->ob_digit, Py_SIZE(t2) * sizeof(digit));
+    /* 3. t2 <- al*bl, and copy into the low digits. */
+    if ((t2 = k_mul(al, bl)) == NULL) {
+        Py_DECREF(t1);
+        goto fail;
+    }
+    assert(Py_SIZE(t2) >= 0);
+    assert(Py_SIZE(t2) <= 2*shift); /* no overlap with high digits */
+    memcpy(ret->ob_digit, t2->ob_digit, Py_SIZE(t2) * sizeof(digit));
 
-	/* Zero out remaining digits. */
-	i = 2*shift - Py_SIZE(t2);	/* number of uninitialized digits */
-	if (i)
-		memset(ret->ob_digit + Py_SIZE(t2), 0, i * sizeof(digit));
+    /* Zero out remaining digits. */
+    i = 2*shift - Py_SIZE(t2);          /* number of uninitialized digits */
+    if (i)
+        memset(ret->ob_digit + Py_SIZE(t2), 0, i * sizeof(digit));
 
-	/* 4 & 5. Subtract ah*bh (t1) and al*bl (t2).  We do al*bl first
-	 * because it's fresher in cache.
-	 */
-	i = Py_SIZE(ret) - shift;  /* # digits after shift */
-	(void)v_isub(ret->ob_digit + shift, i, t2->ob_digit, Py_SIZE(t2));
-	Py_DECREF(t2);
+    /* 4 & 5. Subtract ah*bh (t1) and al*bl (t2).  We do al*bl first
+     * because it's fresher in cache.
+     */
+    i = Py_SIZE(ret) - shift;  /* # digits after shift */
+    (void)v_isub(ret->ob_digit + shift, i, t2->ob_digit, Py_SIZE(t2));
+    Py_DECREF(t2);
 
-	(void)v_isub(ret->ob_digit + shift, i, t1->ob_digit, Py_SIZE(t1));
-	Py_DECREF(t1);
+    (void)v_isub(ret->ob_digit + shift, i, t1->ob_digit, Py_SIZE(t1));
+    Py_DECREF(t1);
 
-	/* 6. t3 <- (ah+al)(bh+bl), and add into result. */
-	if ((t1 = x_add(ah, al)) == NULL) goto fail;
-	Py_DECREF(ah);
-	Py_DECREF(al);
-	ah = al = NULL;
+    /* 6. t3 <- (ah+al)(bh+bl), and add into result. */
+    if ((t1 = x_add(ah, al)) == NULL) goto fail;
+    Py_DECREF(ah);
+    Py_DECREF(al);
+    ah = al = NULL;
 
-	if (a == b) {
-		t2 = t1;
-		Py_INCREF(t2);
-	}
-	else if ((t2 = x_add(bh, bl)) == NULL) {
-		Py_DECREF(t1);
-		goto fail;
-	}
-	Py_DECREF(bh);
-	Py_DECREF(bl);
-	bh = bl = NULL;
+    if (a == b) {
+        t2 = t1;
+        Py_INCREF(t2);
+    }
+    else if ((t2 = x_add(bh, bl)) == NULL) {
+        Py_DECREF(t1);
+        goto fail;
+    }
+    Py_DECREF(bh);
+    Py_DECREF(bl);
+    bh = bl = NULL;
 
-	t3 = k_mul(t1, t2);
-	Py_DECREF(t1);
-	Py_DECREF(t2);
-	if (t3 == NULL) goto fail;
-	assert(Py_SIZE(t3) >= 0);
+    t3 = k_mul(t1, t2);
+    Py_DECREF(t1);
+    Py_DECREF(t2);
+    if (t3 == NULL) goto fail;
+    assert(Py_SIZE(t3) >= 0);
 
-	/* Add t3.  It's not obvious why we can't run out of room here.
-	 * See the (*) comment after this function.
-	 */
-	(void)v_iadd(ret->ob_digit + shift, i, t3->ob_digit, Py_SIZE(t3));
-	Py_DECREF(t3);
+    /* Add t3.  It's not obvious why we can't run out of room here.
+     * See the (*) comment after this function.
+     */
+    (void)v_iadd(ret->ob_digit + shift, i, t3->ob_digit, Py_SIZE(t3));
+    Py_DECREF(t3);
 
-	return long_normalize(ret);
+    return long_normalize(ret);
 
  fail:
- 	Py_XDECREF(ret);
-	Py_XDECREF(ah);
-	Py_XDECREF(al);
-	Py_XDECREF(bh);
-	Py_XDECREF(bl);
-	return NULL;
+    Py_XDECREF(ret);
+    Py_XDECREF(ah);
+    Py_XDECREF(al);
+    Py_XDECREF(bh);
+    Py_XDECREF(bl);
+    return NULL;
 }
 
 /* (*) Why adding t3 can't "run out of room" above.
@@ -2899,74 +2899,74 @@
 static PyLongObject *
 k_lopsided_mul(PyLongObject *a, PyLongObject *b)
 {
-	const Py_ssize_t asize = ABS(Py_SIZE(a));
-	Py_ssize_t bsize = ABS(Py_SIZE(b));
-	Py_ssize_t nbdone;	/* # of b digits already multiplied */
-	PyLongObject *ret;
-	PyLongObject *bslice = NULL;
+    const Py_ssize_t asize = ABS(Py_SIZE(a));
+    Py_ssize_t bsize = ABS(Py_SIZE(b));
+    Py_ssize_t nbdone;          /* # of b digits already multiplied */
+    PyLongObject *ret;
+    PyLongObject *bslice = NULL;
 
-	assert(asize > KARATSUBA_CUTOFF);
-	assert(2 * asize <= bsize);
+    assert(asize > KARATSUBA_CUTOFF);
+    assert(2 * asize <= bsize);
 
-	/* Allocate result space, and zero it out. */
-	ret = _PyLong_New(asize + bsize);
-	if (ret == NULL)
-		return NULL;
-	memset(ret->ob_digit, 0, Py_SIZE(ret) * sizeof(digit));
+    /* Allocate result space, and zero it out. */
+    ret = _PyLong_New(asize + bsize);
+    if (ret == NULL)
+        return NULL;
+    memset(ret->ob_digit, 0, Py_SIZE(ret) * sizeof(digit));
 
-	/* Successive slices of b are copied into bslice. */
-	bslice = _PyLong_New(asize);
-	if (bslice == NULL)
-		goto fail;
+    /* Successive slices of b are copied into bslice. */
+    bslice = _PyLong_New(asize);
+    if (bslice == NULL)
+        goto fail;
 
-	nbdone = 0;
-	while (bsize > 0) {
-		PyLongObject *product;
-		const Py_ssize_t nbtouse = MIN(bsize, asize);
+    nbdone = 0;
+    while (bsize > 0) {
+        PyLongObject *product;
+        const Py_ssize_t nbtouse = MIN(bsize, asize);
 
-		/* Multiply the next slice of b by a. */
-		memcpy(bslice->ob_digit, b->ob_digit + nbdone,
-		       nbtouse * sizeof(digit));
-		Py_SIZE(bslice) = nbtouse;
-		product = k_mul(a, bslice);
-		if (product == NULL)
-			goto fail;
+        /* Multiply the next slice of b by a. */
+        memcpy(bslice->ob_digit, b->ob_digit + nbdone,
+               nbtouse * sizeof(digit));
+        Py_SIZE(bslice) = nbtouse;
+        product = k_mul(a, bslice);
+        if (product == NULL)
+            goto fail;
 
-		/* Add into result. */
-		(void)v_iadd(ret->ob_digit + nbdone, Py_SIZE(ret) - nbdone,
-			     product->ob_digit, Py_SIZE(product));
-		Py_DECREF(product);
+        /* Add into result. */
+        (void)v_iadd(ret->ob_digit + nbdone, Py_SIZE(ret) - nbdone,
+                     product->ob_digit, Py_SIZE(product));
+        Py_DECREF(product);
 
-		bsize -= nbtouse;
-		nbdone += nbtouse;
-	}
+        bsize -= nbtouse;
+        nbdone += nbtouse;
+    }
 
-	Py_DECREF(bslice);
-	return long_normalize(ret);
+    Py_DECREF(bslice);
+    return long_normalize(ret);
 
  fail:
-	Py_DECREF(ret);
-	Py_XDECREF(bslice);
-	return NULL;
+    Py_DECREF(ret);
+    Py_XDECREF(bslice);
+    return NULL;
 }
 
 static PyObject *
 long_mul(PyLongObject *v, PyLongObject *w)
 {
-	PyLongObject *a, *b, *z;
+    PyLongObject *a, *b, *z;
 
-	if (!convert_binop((PyObject *)v, (PyObject *)w, &a, &b)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
+    if (!convert_binop((PyObject *)v, (PyObject *)w, &a, &b)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 
-	z = k_mul(a, b);
-	/* Negate if exactly one of the inputs is negative. */
-	if (((a->ob_size ^ b->ob_size) < 0) && z)
-		z->ob_size = -(z->ob_size);
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return (PyObject *)z;
+    z = k_mul(a, b);
+    /* Negate if exactly one of the inputs is negative. */
+    if (((a->ob_size ^ b->ob_size) < 0) && z)
+        z->ob_size = -(z->ob_size);
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return (PyObject *)z;
 }
 
 /* The / and % operators are now defined in terms of divmod().
@@ -2975,11 +2975,11 @@
    |a| by |b|, with the sign of a.  This is also expressed
    as a - b*trunc(a/b), if trunc truncates towards zero.
    Some examples:
-   	 a	 b	a rem b		a mod b
-   	 13	 10	 3		 3
-   	-13	 10	-3		 7
-   	 13	-10	 3		-7
-   	-13	-10	-3		-3
+     a           b      a rem b         a mod b
+     13          10      3               3
+    -13          10     -3               7
+     13         -10      3              -7
+    -13         -10     -3              -3
    So, to get from rem to mod, we have to add b if a and b
    have different signs.  We then subtract one from the 'div'
    part of the outcome to keep the invariant intact. */
@@ -2992,75 +2992,75 @@
  */
 static int
 l_divmod(PyLongObject *v, PyLongObject *w,
-	 PyLongObject **pdiv, PyLongObject **pmod)
+         PyLongObject **pdiv, PyLongObject **pmod)
 {
-	PyLongObject *div, *mod;
+    PyLongObject *div, *mod;
 
-	if (long_divrem(v, w, &div, &mod) < 0)
-		return -1;
-	if ((Py_SIZE(mod) < 0 && Py_SIZE(w) > 0) ||
-	    (Py_SIZE(mod) > 0 && Py_SIZE(w) < 0)) {
-		PyLongObject *temp;
-		PyLongObject *one;
-		temp = (PyLongObject *) long_add(mod, w);
-		Py_DECREF(mod);
-		mod = temp;
-		if (mod == NULL) {
-			Py_DECREF(div);
-			return -1;
-		}
-		one = (PyLongObject *) PyLong_FromLong(1L);
-		if (one == NULL ||
-		    (temp = (PyLongObject *) long_sub(div, one)) == NULL) {
-			Py_DECREF(mod);
-			Py_DECREF(div);
-			Py_XDECREF(one);
-			return -1;
-		}
-		Py_DECREF(one);
-		Py_DECREF(div);
-		div = temp;
-	}
-	if (pdiv != NULL)
-		*pdiv = div;
-	else
-		Py_DECREF(div);
+    if (long_divrem(v, w, &div, &mod) < 0)
+        return -1;
+    if ((Py_SIZE(mod) < 0 && Py_SIZE(w) > 0) ||
+        (Py_SIZE(mod) > 0 && Py_SIZE(w) < 0)) {
+        PyLongObject *temp;
+        PyLongObject *one;
+        temp = (PyLongObject *) long_add(mod, w);
+        Py_DECREF(mod);
+        mod = temp;
+        if (mod == NULL) {
+            Py_DECREF(div);
+            return -1;
+        }
+        one = (PyLongObject *) PyLong_FromLong(1L);
+        if (one == NULL ||
+            (temp = (PyLongObject *) long_sub(div, one)) == NULL) {
+            Py_DECREF(mod);
+            Py_DECREF(div);
+            Py_XDECREF(one);
+            return -1;
+        }
+        Py_DECREF(one);
+        Py_DECREF(div);
+        div = temp;
+    }
+    if (pdiv != NULL)
+        *pdiv = div;
+    else
+        Py_DECREF(div);
 
-	if (pmod != NULL)
-		*pmod = mod;
-	else
-		Py_DECREF(mod);
+    if (pmod != NULL)
+        *pmod = mod;
+    else
+        Py_DECREF(mod);
 
-	return 0;
+    return 0;
 }
 
 static PyObject *
 long_div(PyObject *v, PyObject *w)
 {
-	PyLongObject *a, *b, *div;
+    PyLongObject *a, *b, *div;
 
-	CONVERT_BINOP(v, w, &a, &b);
-	if (l_divmod(a, b, &div, NULL) < 0)
-		div = NULL;
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return (PyObject *)div;
+    CONVERT_BINOP(v, w, &a, &b);
+    if (l_divmod(a, b, &div, NULL) < 0)
+        div = NULL;
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return (PyObject *)div;
 }
 
 static PyObject *
 long_classic_div(PyObject *v, PyObject *w)
 {
-	PyLongObject *a, *b, *div;
+    PyLongObject *a, *b, *div;
 
-	CONVERT_BINOP(v, w, &a, &b);
-	if (Py_DivisionWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning, "classic long division") < 0)
-		div = NULL;
-	else if (l_divmod(a, b, &div, NULL) < 0)
-		div = NULL;
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return (PyObject *)div;
+    CONVERT_BINOP(v, w, &a, &b);
+    if (Py_DivisionWarningFlag &&
+        PyErr_Warn(PyExc_DeprecationWarning, "classic long division") < 0)
+        div = NULL;
+    else if (l_divmod(a, b, &div, NULL) < 0)
+        div = NULL;
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return (PyObject *)div;
 }
 
 /* PyLong/PyLong -> float, with correctly rounded result. */
@@ -3071,653 +3071,653 @@
 static PyObject *
 long_true_divide(PyObject *v, PyObject *w)
 {
-	PyLongObject *a, *b, *x;
-	Py_ssize_t a_size, b_size, shift, extra_bits, diff, x_size, x_bits;
-	digit mask, low;
-	int inexact, negate, a_is_small, b_is_small;
-	double dx, result;
+    PyLongObject *a, *b, *x;
+    Py_ssize_t a_size, b_size, shift, extra_bits, diff, x_size, x_bits;
+    digit mask, low;
+    int inexact, negate, a_is_small, b_is_small;
+    double dx, result;
 
-	CONVERT_BINOP(v, w, &a, &b);
+    CONVERT_BINOP(v, w, &a, &b);
 
-	/*
-	   Method in a nutshell:
+    /*
+       Method in a nutshell:
 
-	     0. reduce to case a, b > 0; filter out obvious underflow/overflow
-	     1. choose a suitable integer 'shift'
-	     2. use integer arithmetic to compute x = floor(2**-shift*a/b)
-	     3. adjust x for correct rounding
-	     4. convert x to a double dx with the same value
-	     5. return ldexp(dx, shift).
+         0. reduce to case a, b > 0; filter out obvious underflow/overflow
+         1. choose a suitable integer 'shift'
+         2. use integer arithmetic to compute x = floor(2**-shift*a/b)
+         3. adjust x for correct rounding
+         4. convert x to a double dx with the same value
+         5. return ldexp(dx, shift).
 
-	   In more detail:
+       In more detail:
 
-	   0. For any a, a/0 raises ZeroDivisionError; for nonzero b, 0/b
-	   returns either 0.0 or -0.0, depending on the sign of b.  For a and
-	   b both nonzero, ignore signs of a and b, and add the sign back in
-	   at the end.  Now write a_bits and b_bits for the bit lengths of a
-	   and b respectively (that is, a_bits = 1 + floor(log_2(a)); likewise
-	   for b).  Then
+       0. For any a, a/0 raises ZeroDivisionError; for nonzero b, 0/b
+       returns either 0.0 or -0.0, depending on the sign of b.  For a and
+       b both nonzero, ignore signs of a and b, and add the sign back in
+       at the end.  Now write a_bits and b_bits for the bit lengths of a
+       and b respectively (that is, a_bits = 1 + floor(log_2(a)); likewise
+       for b).  Then
 
-	      2**(a_bits - b_bits - 1) < a/b < 2**(a_bits - b_bits + 1).
+          2**(a_bits - b_bits - 1) < a/b < 2**(a_bits - b_bits + 1).
 
-	   So if a_bits - b_bits > DBL_MAX_EXP then a/b > 2**DBL_MAX_EXP and
-	   so overflows.  Similarly, if a_bits - b_bits < DBL_MIN_EXP -
-	   DBL_MANT_DIG - 1 then a/b underflows to 0.  With these cases out of
-	   the way, we can assume that
+       So if a_bits - b_bits > DBL_MAX_EXP then a/b > 2**DBL_MAX_EXP and
+       so overflows.  Similarly, if a_bits - b_bits < DBL_MIN_EXP -
+       DBL_MANT_DIG - 1 then a/b underflows to 0.  With these cases out of
+       the way, we can assume that
 
-	      DBL_MIN_EXP - DBL_MANT_DIG - 1 <= a_bits - b_bits <= DBL_MAX_EXP.
+          DBL_MIN_EXP - DBL_MANT_DIG - 1 <= a_bits - b_bits <= DBL_MAX_EXP.
 
-	   1. The integer 'shift' is chosen so that x has the right number of
-	   bits for a double, plus two or three extra bits that will be used
-	   in the rounding decisions.  Writing a_bits and b_bits for the
-	   number of significant bits in a and b respectively, a
-	   straightforward formula for shift is:
+       1. The integer 'shift' is chosen so that x has the right number of
+       bits for a double, plus two or three extra bits that will be used
+       in the rounding decisions.  Writing a_bits and b_bits for the
+       number of significant bits in a and b respectively, a
+       straightforward formula for shift is:
 
-	      shift = a_bits - b_bits - DBL_MANT_DIG - 2
+          shift = a_bits - b_bits - DBL_MANT_DIG - 2
 
-	   This is fine in the usual case, but if a/b is smaller than the
-	   smallest normal float then it can lead to double rounding on an
-	   IEEE 754 platform, giving incorrectly rounded results.  So we
-	   adjust the formula slightly.  The actual formula used is:
+       This is fine in the usual case, but if a/b is smaller than the
+       smallest normal float then it can lead to double rounding on an
+       IEEE 754 platform, giving incorrectly rounded results.  So we
+       adjust the formula slightly.  The actual formula used is:
 
-	       shift = MAX(a_bits - b_bits, DBL_MIN_EXP) - DBL_MANT_DIG - 2
+           shift = MAX(a_bits - b_bits, DBL_MIN_EXP) - DBL_MANT_DIG - 2
 
-	   2. The quantity x is computed by first shifting a (left -shift bits
-	   if shift <= 0, right shift bits if shift > 0) and then dividing by
-	   b.  For both the shift and the division, we keep track of whether
-	   the result is inexact, in a flag 'inexact'; this information is
-	   needed at the rounding stage.
+       2. The quantity x is computed by first shifting a (left -shift bits
+       if shift <= 0, right shift bits if shift > 0) and then dividing by
+       b.  For both the shift and the division, we keep track of whether
+       the result is inexact, in a flag 'inexact'; this information is
+       needed at the rounding stage.
 
-	   With the choice of shift above, together with our assumption that
-	   a_bits - b_bits >= DBL_MIN_EXP - DBL_MANT_DIG - 1, it follows
-	   that x >= 1.
+       With the choice of shift above, together with our assumption that
+       a_bits - b_bits >= DBL_MIN_EXP - DBL_MANT_DIG - 1, it follows
+       that x >= 1.
 
-	   3. Now x * 2**shift <= a/b < (x+1) * 2**shift.  We want to replace
-	   this with an exactly representable float of the form
+       3. Now x * 2**shift <= a/b < (x+1) * 2**shift.  We want to replace
+       this with an exactly representable float of the form
 
-	      round(x/2**extra_bits) * 2**(extra_bits+shift).
+          round(x/2**extra_bits) * 2**(extra_bits+shift).
 
-	   For float representability, we need x/2**extra_bits <
-	   2**DBL_MANT_DIG and extra_bits + shift >= DBL_MIN_EXP -
-	   DBL_MANT_DIG.  This translates to the condition:
+       For float representability, we need x/2**extra_bits <
+       2**DBL_MANT_DIG and extra_bits + shift >= DBL_MIN_EXP -
+       DBL_MANT_DIG.  This translates to the condition:
 
-	      extra_bits >= MAX(x_bits, DBL_MIN_EXP - shift) - DBL_MANT_DIG
+          extra_bits >= MAX(x_bits, DBL_MIN_EXP - shift) - DBL_MANT_DIG
 
-	   To round, we just modify the bottom digit of x in-place; this can
-	   end up giving a digit with value > PyLONG_MASK, but that's not a
-	   problem since digits can hold values up to 2*PyLONG_MASK+1.
+       To round, we just modify the bottom digit of x in-place; this can
+       end up giving a digit with value > PyLONG_MASK, but that's not a
+       problem since digits can hold values up to 2*PyLONG_MASK+1.
 
-	   With the original choices for shift above, extra_bits will always
-	   be 2 or 3.  Then rounding under the round-half-to-even rule, we
-	   round up iff the most significant of the extra bits is 1, and
-	   either: (a) the computation of x in step 2 had an inexact result,
-	   or (b) at least one other of the extra bits is 1, or (c) the least
-	   significant bit of x (above those to be rounded) is 1.
+       With the original choices for shift above, extra_bits will always
+       be 2 or 3.  Then rounding under the round-half-to-even rule, we
+       round up iff the most significant of the extra bits is 1, and
+       either: (a) the computation of x in step 2 had an inexact result,
+       or (b) at least one other of the extra bits is 1, or (c) the least
+       significant bit of x (above those to be rounded) is 1.
 
-	   4. Conversion to a double is straightforward; all floating-point
-	   operations involved in the conversion are exact, so there's no
-	   danger of rounding errors.
+       4. Conversion to a double is straightforward; all floating-point
+       operations involved in the conversion are exact, so there's no
+       danger of rounding errors.
 
-	   5. Use ldexp(x, shift) to compute x*2**shift, the final result.
-	   The result will always be exactly representable as a double, except
-	   in the case that it overflows.  To avoid dependence on the exact
-	   behaviour of ldexp on overflow, we check for overflow before
-	   applying ldexp.  The result of ldexp is adjusted for sign before
-	   returning.
-	*/
+       5. Use ldexp(x, shift) to compute x*2**shift, the final result.
+       The result will always be exactly representable as a double, except
+       in the case that it overflows.  To avoid dependence on the exact
+       behaviour of ldexp on overflow, we check for overflow before
+       applying ldexp.  The result of ldexp is adjusted for sign before
+       returning.
+    */
 
-	/* Reduce to case where a and b are both positive. */
-	a_size = ABS(Py_SIZE(a));
-	b_size = ABS(Py_SIZE(b));
-	negate = (Py_SIZE(a) < 0) ^ (Py_SIZE(b) < 0);
-	if (b_size == 0) {
-		PyErr_SetString(PyExc_ZeroDivisionError,
-				"division by zero");
-		goto error;
-	}
-	if (a_size == 0)
-		goto underflow_or_zero;
+    /* Reduce to case where a and b are both positive. */
+    a_size = ABS(Py_SIZE(a));
+    b_size = ABS(Py_SIZE(b));
+    negate = (Py_SIZE(a) < 0) ^ (Py_SIZE(b) < 0);
+    if (b_size == 0) {
+        PyErr_SetString(PyExc_ZeroDivisionError,
+                        "division by zero");
+        goto error;
+    }
+    if (a_size == 0)
+        goto underflow_or_zero;
 
-	/* Fast path for a and b small (exactly representable in a double).
-	   Relies on floating-point division being correctly rounded; results
-	   may be subject to double rounding on x86 machines that operate with
-	   the x87 FPU set to 64-bit precision. */
-	a_is_small = a_size <= MANT_DIG_DIGITS ||
-		(a_size == MANT_DIG_DIGITS+1 &&
-		 a->ob_digit[MANT_DIG_DIGITS] >> MANT_DIG_BITS == 0);
-	b_is_small = b_size <= MANT_DIG_DIGITS ||
-		(b_size == MANT_DIG_DIGITS+1 &&
-		 b->ob_digit[MANT_DIG_DIGITS] >> MANT_DIG_BITS == 0);
-	if (a_is_small && b_is_small) {
-		double da, db;
-		da = a->ob_digit[--a_size];
-		while (a_size > 0)
-			da = da * PyLong_BASE + a->ob_digit[--a_size];
-		db = b->ob_digit[--b_size];
-		while (b_size > 0)
-			db = db * PyLong_BASE + b->ob_digit[--b_size];
-		result = da / db;
-		goto success;
-	}
+    /* Fast path for a and b small (exactly representable in a double).
+       Relies on floating-point division being correctly rounded; results
+       may be subject to double rounding on x86 machines that operate with
+       the x87 FPU set to 64-bit precision. */
+    a_is_small = a_size <= MANT_DIG_DIGITS ||
+        (a_size == MANT_DIG_DIGITS+1 &&
+         a->ob_digit[MANT_DIG_DIGITS] >> MANT_DIG_BITS == 0);
+    b_is_small = b_size <= MANT_DIG_DIGITS ||
+        (b_size == MANT_DIG_DIGITS+1 &&
+         b->ob_digit[MANT_DIG_DIGITS] >> MANT_DIG_BITS == 0);
+    if (a_is_small && b_is_small) {
+        double da, db;
+        da = a->ob_digit[--a_size];
+        while (a_size > 0)
+            da = da * PyLong_BASE + a->ob_digit[--a_size];
+        db = b->ob_digit[--b_size];
+        while (b_size > 0)
+            db = db * PyLong_BASE + b->ob_digit[--b_size];
+        result = da / db;
+        goto success;
+    }
 
-	/* Catch obvious cases of underflow and overflow */
-	diff = a_size - b_size;
-	if (diff > PY_SSIZE_T_MAX/PyLong_SHIFT - 1)
-		/* Extreme overflow */
-		goto overflow;
-	else if (diff < 1 - PY_SSIZE_T_MAX/PyLong_SHIFT)
-		/* Extreme underflow */
-		goto underflow_or_zero;
-	/* Next line is now safe from overflowing a Py_ssize_t */
-	diff = diff * PyLong_SHIFT + bits_in_digit(a->ob_digit[a_size - 1]) -
-		bits_in_digit(b->ob_digit[b_size - 1]);
-	/* Now diff = a_bits - b_bits. */
-	if (diff > DBL_MAX_EXP)
-		goto overflow;
-	else if (diff < DBL_MIN_EXP - DBL_MANT_DIG - 1)
-		goto underflow_or_zero;
+    /* Catch obvious cases of underflow and overflow */
+    diff = a_size - b_size;
+    if (diff > PY_SSIZE_T_MAX/PyLong_SHIFT - 1)
+        /* Extreme overflow */
+        goto overflow;
+    else if (diff < 1 - PY_SSIZE_T_MAX/PyLong_SHIFT)
+        /* Extreme underflow */
+        goto underflow_or_zero;
+    /* Next line is now safe from overflowing a Py_ssize_t */
+    diff = diff * PyLong_SHIFT + bits_in_digit(a->ob_digit[a_size - 1]) -
+        bits_in_digit(b->ob_digit[b_size - 1]);
+    /* Now diff = a_bits - b_bits. */
+    if (diff > DBL_MAX_EXP)
+        goto overflow;
+    else if (diff < DBL_MIN_EXP - DBL_MANT_DIG - 1)
+        goto underflow_or_zero;
 
-	/* Choose value for shift; see comments for step 1 above. */
-	shift = MAX(diff, DBL_MIN_EXP) - DBL_MANT_DIG - 2;
+    /* Choose value for shift; see comments for step 1 above. */
+    shift = MAX(diff, DBL_MIN_EXP) - DBL_MANT_DIG - 2;
 
-	inexact = 0;
+    inexact = 0;
 
-	/* x = abs(a * 2**-shift) */
-	if (shift <= 0) {
-		Py_ssize_t i, shift_digits = -shift / PyLong_SHIFT;
-		digit rem;
-		/* x = a << -shift */
-		if (a_size >= PY_SSIZE_T_MAX - 1 - shift_digits) {
-			/* In practice, it's probably impossible to end up
-			   here.  Both a and b would have to be enormous,
-			   using close to SIZE_T_MAX bytes of memory each. */
-			PyErr_SetString(PyExc_OverflowError,
-				    "intermediate overflow during division");
-			goto error;
-		}
-		x = _PyLong_New(a_size + shift_digits + 1);
-		if (x == NULL)
-			goto error;
-		for (i = 0; i < shift_digits; i++)
-			x->ob_digit[i] = 0;
-		rem = v_lshift(x->ob_digit + shift_digits, a->ob_digit,
-			       a_size, -shift % PyLong_SHIFT);
-		x->ob_digit[a_size + shift_digits] = rem;
-	}
-	else {
-		Py_ssize_t shift_digits = shift / PyLong_SHIFT;
-		digit rem;
-		/* x = a >> shift */
-		assert(a_size >= shift_digits);
-		x = _PyLong_New(a_size - shift_digits);
-		if (x == NULL)
-			goto error;
-		rem = v_rshift(x->ob_digit, a->ob_digit + shift_digits,
-			       a_size - shift_digits, shift % PyLong_SHIFT);
-		/* set inexact if any of the bits shifted out is nonzero */
-		if (rem)
-			inexact = 1;
-		while (!inexact && shift_digits > 0)
-			if (a->ob_digit[--shift_digits])
-				inexact = 1;
-	}
-	long_normalize(x);
-	x_size = Py_SIZE(x);
+    /* x = abs(a * 2**-shift) */
+    if (shift <= 0) {
+        Py_ssize_t i, shift_digits = -shift / PyLong_SHIFT;
+        digit rem;
+        /* x = a << -shift */
+        if (a_size >= PY_SSIZE_T_MAX - 1 - shift_digits) {
+            /* In practice, it's probably impossible to end up
+               here.  Both a and b would have to be enormous,
+               using close to SIZE_T_MAX bytes of memory each. */
+            PyErr_SetString(PyExc_OverflowError,
+                        "intermediate overflow during division");
+            goto error;
+        }
+        x = _PyLong_New(a_size + shift_digits + 1);
+        if (x == NULL)
+            goto error;
+        for (i = 0; i < shift_digits; i++)
+            x->ob_digit[i] = 0;
+        rem = v_lshift(x->ob_digit + shift_digits, a->ob_digit,
+                       a_size, -shift % PyLong_SHIFT);
+        x->ob_digit[a_size + shift_digits] = rem;
+    }
+    else {
+        Py_ssize_t shift_digits = shift / PyLong_SHIFT;
+        digit rem;
+        /* x = a >> shift */
+        assert(a_size >= shift_digits);
+        x = _PyLong_New(a_size - shift_digits);
+        if (x == NULL)
+            goto error;
+        rem = v_rshift(x->ob_digit, a->ob_digit + shift_digits,
+                       a_size - shift_digits, shift % PyLong_SHIFT);
+        /* set inexact if any of the bits shifted out is nonzero */
+        if (rem)
+            inexact = 1;
+        while (!inexact && shift_digits > 0)
+            if (a->ob_digit[--shift_digits])
+                inexact = 1;
+    }
+    long_normalize(x);
+    x_size = Py_SIZE(x);
 
-	/* x //= b. If the remainder is nonzero, set inexact.  We own the only
-	   reference to x, so it's safe to modify it in-place. */
-	if (b_size == 1) {
-		digit rem = inplace_divrem1(x->ob_digit, x->ob_digit, x_size,
-				      b->ob_digit[0]);
-		long_normalize(x);
-		if (rem)
-			inexact = 1;
-	}
-	else {
-		PyLongObject *div, *rem;
-		div = x_divrem(x, b, &rem);
-		Py_DECREF(x);
-		x = div;
-		if (x == NULL)
-			goto error;
-		if (Py_SIZE(rem))
-			inexact = 1;
-		Py_DECREF(rem);
-	}
-	x_size = ABS(Py_SIZE(x));
-	assert(x_size > 0); /* result of division is never zero */
-	x_bits = (x_size-1)*PyLong_SHIFT+bits_in_digit(x->ob_digit[x_size-1]);
+    /* x //= b. If the remainder is nonzero, set inexact.  We own the only
+       reference to x, so it's safe to modify it in-place. */
+    if (b_size == 1) {
+        digit rem = inplace_divrem1(x->ob_digit, x->ob_digit, x_size,
+                              b->ob_digit[0]);
+        long_normalize(x);
+        if (rem)
+            inexact = 1;
+    }
+    else {
+        PyLongObject *div, *rem;
+        div = x_divrem(x, b, &rem);
+        Py_DECREF(x);
+        x = div;
+        if (x == NULL)
+            goto error;
+        if (Py_SIZE(rem))
+            inexact = 1;
+        Py_DECREF(rem);
+    }
+    x_size = ABS(Py_SIZE(x));
+    assert(x_size > 0); /* result of division is never zero */
+    x_bits = (x_size-1)*PyLong_SHIFT+bits_in_digit(x->ob_digit[x_size-1]);
 
-	/* The number of extra bits that have to be rounded away. */
-	extra_bits = MAX(x_bits, DBL_MIN_EXP - shift) - DBL_MANT_DIG;
-	assert(extra_bits == 2 || extra_bits == 3);
+    /* The number of extra bits that have to be rounded away. */
+    extra_bits = MAX(x_bits, DBL_MIN_EXP - shift) - DBL_MANT_DIG;
+    assert(extra_bits == 2 || extra_bits == 3);
 
-	/* Round by directly modifying the low digit of x. */
-	mask = (digit)1 << (extra_bits - 1);
-	low = x->ob_digit[0] | inexact;
-	if (low & mask && low & (3*mask-1))
-		low += mask;
-	x->ob_digit[0] = low & ~(mask-1U);
+    /* Round by directly modifying the low digit of x. */
+    mask = (digit)1 << (extra_bits - 1);
+    low = x->ob_digit[0] | inexact;
+    if (low & mask && low & (3*mask-1))
+        low += mask;
+    x->ob_digit[0] = low & ~(mask-1U);
 
-	/* Convert x to a double dx; the conversion is exact. */
-	dx = x->ob_digit[--x_size];
-	while (x_size > 0)
-		dx = dx * PyLong_BASE + x->ob_digit[--x_size];
-	Py_DECREF(x);
+    /* Convert x to a double dx; the conversion is exact. */
+    dx = x->ob_digit[--x_size];
+    while (x_size > 0)
+        dx = dx * PyLong_BASE + x->ob_digit[--x_size];
+    Py_DECREF(x);
 
-	/* Check whether ldexp result will overflow a double. */
-	if (shift + x_bits >= DBL_MAX_EXP &&
-	    (shift + x_bits > DBL_MAX_EXP || dx == ldexp(1.0, (int)x_bits)))
-		goto overflow;
-	result = ldexp(dx, (int)shift);
+    /* Check whether ldexp result will overflow a double. */
+    if (shift + x_bits >= DBL_MAX_EXP &&
+        (shift + x_bits > DBL_MAX_EXP || dx == ldexp(1.0, (int)x_bits)))
+        goto overflow;
+    result = ldexp(dx, (int)shift);
 
   success:
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return PyFloat_FromDouble(negate ? -result : result);
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return PyFloat_FromDouble(negate ? -result : result);
 
   underflow_or_zero:
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return PyFloat_FromDouble(negate ? -0.0 : 0.0);
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return PyFloat_FromDouble(negate ? -0.0 : 0.0);
 
   overflow:
-	PyErr_SetString(PyExc_OverflowError,
-			"integer division result too large for a float");
+    PyErr_SetString(PyExc_OverflowError,
+                    "integer division result too large for a float");
   error:
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return NULL;
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return NULL;
 }
 
 static PyObject *
 long_mod(PyObject *v, PyObject *w)
 {
-	PyLongObject *a, *b, *mod;
+    PyLongObject *a, *b, *mod;
 
-	CONVERT_BINOP(v, w, &a, &b);
+    CONVERT_BINOP(v, w, &a, &b);
 
-	if (l_divmod(a, b, NULL, &mod) < 0)
-		mod = NULL;
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return (PyObject *)mod;
+    if (l_divmod(a, b, NULL, &mod) < 0)
+        mod = NULL;
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return (PyObject *)mod;
 }
 
 static PyObject *
 long_divmod(PyObject *v, PyObject *w)
 {
-	PyLongObject *a, *b, *div, *mod;
-	PyObject *z;
+    PyLongObject *a, *b, *div, *mod;
+    PyObject *z;
 
-	CONVERT_BINOP(v, w, &a, &b);
+    CONVERT_BINOP(v, w, &a, &b);
 
-	if (l_divmod(a, b, &div, &mod) < 0) {
-		Py_DECREF(a);
-		Py_DECREF(b);
-		return NULL;
-	}
-	z = PyTuple_New(2);
-	if (z != NULL) {
-		PyTuple_SetItem(z, 0, (PyObject *) div);
-		PyTuple_SetItem(z, 1, (PyObject *) mod);
-	}
-	else {
-		Py_DECREF(div);
-		Py_DECREF(mod);
-	}
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return z;
+    if (l_divmod(a, b, &div, &mod) < 0) {
+        Py_DECREF(a);
+        Py_DECREF(b);
+        return NULL;
+    }
+    z = PyTuple_New(2);
+    if (z != NULL) {
+        PyTuple_SetItem(z, 0, (PyObject *) div);
+        PyTuple_SetItem(z, 1, (PyObject *) mod);
+    }
+    else {
+        Py_DECREF(div);
+        Py_DECREF(mod);
+    }
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return z;
 }
 
 /* pow(v, w, x) */
 static PyObject *
 long_pow(PyObject *v, PyObject *w, PyObject *x)
 {
-	PyLongObject *a, *b, *c; /* a,b,c = v,w,x */
-	int negativeOutput = 0;  /* if x<0 return negative output */
+    PyLongObject *a, *b, *c; /* a,b,c = v,w,x */
+    int negativeOutput = 0;  /* if x<0 return negative output */
 
-	PyLongObject *z = NULL;  /* accumulated result */
-	Py_ssize_t i, j, k;             /* counters */
-	PyLongObject *temp = NULL;
+    PyLongObject *z = NULL;  /* accumulated result */
+    Py_ssize_t i, j, k;             /* counters */
+    PyLongObject *temp = NULL;
 
-	/* 5-ary values.  If the exponent is large enough, table is
-	 * precomputed so that table[i] == a**i % c for i in range(32).
-	 */
-	PyLongObject *table[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-				   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+    /* 5-ary values.  If the exponent is large enough, table is
+     * precomputed so that table[i] == a**i % c for i in range(32).
+     */
+    PyLongObject *table[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                               0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
 
-	/* a, b, c = v, w, x */
-	CONVERT_BINOP(v, w, &a, &b);
-	if (PyLong_Check(x)) {
-		c = (PyLongObject *)x;
-		Py_INCREF(x);
-	}
-	else if (PyInt_Check(x)) {
-		c = (PyLongObject *)PyLong_FromLong(PyInt_AS_LONG(x));
-		if (c == NULL)
-			goto Error;
-	}
-	else if (x == Py_None)
-		c = NULL;
-	else {
-		Py_DECREF(a);
-		Py_DECREF(b);
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
+    /* a, b, c = v, w, x */
+    CONVERT_BINOP(v, w, &a, &b);
+    if (PyLong_Check(x)) {
+        c = (PyLongObject *)x;
+        Py_INCREF(x);
+    }
+    else if (PyInt_Check(x)) {
+        c = (PyLongObject *)PyLong_FromLong(PyInt_AS_LONG(x));
+        if (c == NULL)
+            goto Error;
+    }
+    else if (x == Py_None)
+        c = NULL;
+    else {
+        Py_DECREF(a);
+        Py_DECREF(b);
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 
-	if (Py_SIZE(b) < 0) {  /* if exponent is negative */
-		if (c) {
-			PyErr_SetString(PyExc_TypeError, "pow() 2nd argument "
-			    "cannot be negative when 3rd argument specified");
-			goto Error;
-		}
-		else {
-			/* else return a float.  This works because we know
-			   that this calls float_pow() which converts its
-			   arguments to double. */
-			Py_DECREF(a);
-			Py_DECREF(b);
-			return PyFloat_Type.tp_as_number->nb_power(v, w, x);
-		}
-	}
+    if (Py_SIZE(b) < 0) {  /* if exponent is negative */
+        if (c) {
+            PyErr_SetString(PyExc_TypeError, "pow() 2nd argument "
+                "cannot be negative when 3rd argument specified");
+            goto Error;
+        }
+        else {
+            /* else return a float.  This works because we know
+               that this calls float_pow() which converts its
+               arguments to double. */
+            Py_DECREF(a);
+            Py_DECREF(b);
+            return PyFloat_Type.tp_as_number->nb_power(v, w, x);
+        }
+    }
 
-	if (c) {
-		/* if modulus == 0:
-		       raise ValueError() */
-		if (Py_SIZE(c) == 0) {
-			PyErr_SetString(PyExc_ValueError,
-					"pow() 3rd argument cannot be 0");
-			goto Error;
-		}
+    if (c) {
+        /* if modulus == 0:
+               raise ValueError() */
+        if (Py_SIZE(c) == 0) {
+            PyErr_SetString(PyExc_ValueError,
+                            "pow() 3rd argument cannot be 0");
+            goto Error;
+        }
 
-		/* if modulus < 0:
-		       negativeOutput = True
-		       modulus = -modulus */
-		if (Py_SIZE(c) < 0) {
-			negativeOutput = 1;
-			temp = (PyLongObject *)_PyLong_Copy(c);
-			if (temp == NULL)
-				goto Error;
-			Py_DECREF(c);
-			c = temp;
-			temp = NULL;
-			c->ob_size = - c->ob_size;
-		}
+        /* if modulus < 0:
+               negativeOutput = True
+               modulus = -modulus */
+        if (Py_SIZE(c) < 0) {
+            negativeOutput = 1;
+            temp = (PyLongObject *)_PyLong_Copy(c);
+            if (temp == NULL)
+                goto Error;
+            Py_DECREF(c);
+            c = temp;
+            temp = NULL;
+            c->ob_size = - c->ob_size;
+        }
 
-		/* if modulus == 1:
-		       return 0 */
-		if ((Py_SIZE(c) == 1) && (c->ob_digit[0] == 1)) {
-			z = (PyLongObject *)PyLong_FromLong(0L);
-			goto Done;
-		}
+        /* if modulus == 1:
+               return 0 */
+        if ((Py_SIZE(c) == 1) && (c->ob_digit[0] == 1)) {
+            z = (PyLongObject *)PyLong_FromLong(0L);
+            goto Done;
+        }
 
-		/* if base < 0:
-		       base = base % modulus
-		   Having the base positive just makes things easier. */
-		if (Py_SIZE(a) < 0) {
-			if (l_divmod(a, c, NULL, &temp) < 0)
-				goto Error;
-			Py_DECREF(a);
-			a = temp;
-			temp = NULL;
-		}
-	}
+        /* if base < 0:
+               base = base % modulus
+           Having the base positive just makes things easier. */
+        if (Py_SIZE(a) < 0) {
+            if (l_divmod(a, c, NULL, &temp) < 0)
+                goto Error;
+            Py_DECREF(a);
+            a = temp;
+            temp = NULL;
+        }
+    }
 
-	/* At this point a, b, and c are guaranteed non-negative UNLESS
-	   c is NULL, in which case a may be negative. */
+    /* At this point a, b, and c are guaranteed non-negative UNLESS
+       c is NULL, in which case a may be negative. */
 
-	z = (PyLongObject *)PyLong_FromLong(1L);
-	if (z == NULL)
-		goto Error;
+    z = (PyLongObject *)PyLong_FromLong(1L);
+    if (z == NULL)
+        goto Error;
 
-	/* Perform a modular reduction, X = X % c, but leave X alone if c
-	 * is NULL.
-	 */
-#define REDUCE(X)					\
-	if (c != NULL) {				\
-		if (l_divmod(X, c, NULL, &temp) < 0)	\
-			goto Error;			\
-		Py_XDECREF(X);				\
-		X = temp;				\
-		temp = NULL;				\
-	}
+    /* Perform a modular reduction, X = X % c, but leave X alone if c
+     * is NULL.
+     */
+#define REDUCE(X)                                       \
+    if (c != NULL) {                                    \
+        if (l_divmod(X, c, NULL, &temp) < 0)            \
+            goto Error;                                 \
+        Py_XDECREF(X);                                  \
+        X = temp;                                       \
+        temp = NULL;                                    \
+    }
 
-	/* Multiply two values, then reduce the result:
-	   result = X*Y % c.  If c is NULL, skip the mod. */
-#define MULT(X, Y, result)				\
-{							\
-	temp = (PyLongObject *)long_mul(X, Y);		\
-	if (temp == NULL)				\
-		goto Error;				\
-	Py_XDECREF(result);				\
-	result = temp;					\
-	temp = NULL;					\
-	REDUCE(result)					\
+    /* Multiply two values, then reduce the result:
+       result = X*Y % c.  If c is NULL, skip the mod. */
+#define MULT(X, Y, result)                              \
+{                                                       \
+    temp = (PyLongObject *)long_mul(X, Y);              \
+    if (temp == NULL)                                   \
+        goto Error;                                     \
+    Py_XDECREF(result);                                 \
+    result = temp;                                      \
+    temp = NULL;                                        \
+    REDUCE(result)                                      \
 }
 
-	if (Py_SIZE(b) <= FIVEARY_CUTOFF) {
-		/* Left-to-right binary exponentiation (HAC Algorithm 14.79) */
-		/* http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf    */
-		for (i = Py_SIZE(b) - 1; i >= 0; --i) {
-			digit bi = b->ob_digit[i];
+    if (Py_SIZE(b) <= FIVEARY_CUTOFF) {
+        /* Left-to-right binary exponentiation (HAC Algorithm 14.79) */
+        /* http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf    */
+        for (i = Py_SIZE(b) - 1; i >= 0; --i) {
+            digit bi = b->ob_digit[i];
 
-			for (j = (digit)1 << (PyLong_SHIFT-1); j != 0; j >>= 1) {
-				MULT(z, z, z)
-				if (bi & j)
-					MULT(z, a, z)
-			}
-		}
-	}
-	else {
-		/* Left-to-right 5-ary exponentiation (HAC Algorithm 14.82) */
-		Py_INCREF(z);	/* still holds 1L */
-		table[0] = z;
-		for (i = 1; i < 32; ++i)
-			MULT(table[i-1], a, table[i])
+            for (j = (digit)1 << (PyLong_SHIFT-1); j != 0; j >>= 1) {
+                MULT(z, z, z)
+                if (bi & j)
+                    MULT(z, a, z)
+            }
+        }
+    }
+    else {
+        /* Left-to-right 5-ary exponentiation (HAC Algorithm 14.82) */
+        Py_INCREF(z);           /* still holds 1L */
+        table[0] = z;
+        for (i = 1; i < 32; ++i)
+            MULT(table[i-1], a, table[i])
 
-		for (i = Py_SIZE(b) - 1; i >= 0; --i) {
-			const digit bi = b->ob_digit[i];
+        for (i = Py_SIZE(b) - 1; i >= 0; --i) {
+            const digit bi = b->ob_digit[i];
 
-			for (j = PyLong_SHIFT - 5; j >= 0; j -= 5) {
-				const int index = (bi >> j) & 0x1f;
-				for (k = 0; k < 5; ++k)
-					MULT(z, z, z)
-				if (index)
-					MULT(z, table[index], z)
-			}
-		}
-	}
+            for (j = PyLong_SHIFT - 5; j >= 0; j -= 5) {
+                const int index = (bi >> j) & 0x1f;
+                for (k = 0; k < 5; ++k)
+                    MULT(z, z, z)
+                if (index)
+                    MULT(z, table[index], z)
+            }
+        }
+    }
 
-	if (negativeOutput && (Py_SIZE(z) != 0)) {
-		temp = (PyLongObject *)long_sub(z, c);
-		if (temp == NULL)
-			goto Error;
-		Py_DECREF(z);
-		z = temp;
-		temp = NULL;
-	}
-	goto Done;
+    if (negativeOutput && (Py_SIZE(z) != 0)) {
+        temp = (PyLongObject *)long_sub(z, c);
+        if (temp == NULL)
+            goto Error;
+        Py_DECREF(z);
+        z = temp;
+        temp = NULL;
+    }
+    goto Done;
 
  Error:
- 	if (z != NULL) {
- 		Py_DECREF(z);
- 		z = NULL;
- 	}
-	/* fall through */
+    if (z != NULL) {
+        Py_DECREF(z);
+        z = NULL;
+    }
+    /* fall through */
  Done:
-	if (Py_SIZE(b) > FIVEARY_CUTOFF) {
-		for (i = 0; i < 32; ++i)
-			Py_XDECREF(table[i]);
-	}
-	Py_DECREF(a);
-	Py_DECREF(b);
-	Py_XDECREF(c);
-	Py_XDECREF(temp);
-	return (PyObject *)z;
+    if (Py_SIZE(b) > FIVEARY_CUTOFF) {
+        for (i = 0; i < 32; ++i)
+            Py_XDECREF(table[i]);
+    }
+    Py_DECREF(a);
+    Py_DECREF(b);
+    Py_XDECREF(c);
+    Py_XDECREF(temp);
+    return (PyObject *)z;
 }
 
 static PyObject *
 long_invert(PyLongObject *v)
 {
-	/* Implement ~x as -(x+1) */
-	PyLongObject *x;
-	PyLongObject *w;
-	w = (PyLongObject *)PyLong_FromLong(1L);
-	if (w == NULL)
-		return NULL;
-	x = (PyLongObject *) long_add(v, w);
-	Py_DECREF(w);
-	if (x == NULL)
-		return NULL;
-	Py_SIZE(x) = -(Py_SIZE(x));
-	return (PyObject *)x;
+    /* Implement ~x as -(x+1) */
+    PyLongObject *x;
+    PyLongObject *w;
+    w = (PyLongObject *)PyLong_FromLong(1L);
+    if (w == NULL)
+        return NULL;
+    x = (PyLongObject *) long_add(v, w);
+    Py_DECREF(w);
+    if (x == NULL)
+        return NULL;
+    Py_SIZE(x) = -(Py_SIZE(x));
+    return (PyObject *)x;
 }
 
 static PyObject *
 long_neg(PyLongObject *v)
 {
-	PyLongObject *z;
-	if (v->ob_size == 0 && PyLong_CheckExact(v)) {
-		/* -0 == 0 */
-		Py_INCREF(v);
-		return (PyObject *) v;
-	}
-	z = (PyLongObject *)_PyLong_Copy(v);
-	if (z != NULL)
-		z->ob_size = -(v->ob_size);
-	return (PyObject *)z;
+    PyLongObject *z;
+    if (v->ob_size == 0 && PyLong_CheckExact(v)) {
+        /* -0 == 0 */
+        Py_INCREF(v);
+        return (PyObject *) v;
+    }
+    z = (PyLongObject *)_PyLong_Copy(v);
+    if (z != NULL)
+        z->ob_size = -(v->ob_size);
+    return (PyObject *)z;
 }
 
 static PyObject *
 long_abs(PyLongObject *v)
 {
-	if (v->ob_size < 0)
-		return long_neg(v);
-	else
-		return long_long((PyObject *)v);
+    if (v->ob_size < 0)
+        return long_neg(v);
+    else
+        return long_long((PyObject *)v);
 }
 
 static int
 long_nonzero(PyLongObject *v)
 {
-	return Py_SIZE(v) != 0;
+    return Py_SIZE(v) != 0;
 }
 
 static PyObject *
 long_rshift(PyLongObject *v, PyLongObject *w)
 {
-	PyLongObject *a, *b;
-	PyLongObject *z = NULL;
-	Py_ssize_t shiftby, newsize, wordshift, loshift, hishift, i, j;
-	digit lomask, himask;
+    PyLongObject *a, *b;
+    PyLongObject *z = NULL;
+    Py_ssize_t shiftby, newsize, wordshift, loshift, hishift, i, j;
+    digit lomask, himask;
 
-	CONVERT_BINOP((PyObject *)v, (PyObject *)w, &a, &b);
+    CONVERT_BINOP((PyObject *)v, (PyObject *)w, &a, &b);
 
-	if (Py_SIZE(a) < 0) {
-		/* Right shifting negative numbers is harder */
-		PyLongObject *a1, *a2;
-		a1 = (PyLongObject *) long_invert(a);
-		if (a1 == NULL)
-			goto rshift_error;
-		a2 = (PyLongObject *) long_rshift(a1, b);
-		Py_DECREF(a1);
-		if (a2 == NULL)
-			goto rshift_error;
-		z = (PyLongObject *) long_invert(a2);
-		Py_DECREF(a2);
-	}
-	else {
-		shiftby = PyLong_AsSsize_t((PyObject *)b);
-		if (shiftby == -1L && PyErr_Occurred())
-			goto rshift_error;
-		if (shiftby < 0) {
-			PyErr_SetString(PyExc_ValueError,
-					"negative shift count");
-			goto rshift_error;
-		}
-		wordshift = shiftby / PyLong_SHIFT;
-		newsize = ABS(Py_SIZE(a)) - wordshift;
-		if (newsize <= 0) {
-			z = _PyLong_New(0);
-			Py_DECREF(a);
-			Py_DECREF(b);
-			return (PyObject *)z;
-		}
-		loshift = shiftby % PyLong_SHIFT;
-		hishift = PyLong_SHIFT - loshift;
-		lomask = ((digit)1 << hishift) - 1;
-		himask = PyLong_MASK ^ lomask;
-		z = _PyLong_New(newsize);
-		if (z == NULL)
-			goto rshift_error;
-		if (Py_SIZE(a) < 0)
-			Py_SIZE(z) = -(Py_SIZE(z));
-		for (i = 0, j = wordshift; i < newsize; i++, j++) {
-			z->ob_digit[i] = (a->ob_digit[j] >> loshift) & lomask;
-			if (i+1 < newsize)
-				z->ob_digit[i] |=
-				  (a->ob_digit[j+1] << hishift) & himask;
-		}
-		z = long_normalize(z);
-	}
+    if (Py_SIZE(a) < 0) {
+        /* Right shifting negative numbers is harder */
+        PyLongObject *a1, *a2;
+        a1 = (PyLongObject *) long_invert(a);
+        if (a1 == NULL)
+            goto rshift_error;
+        a2 = (PyLongObject *) long_rshift(a1, b);
+        Py_DECREF(a1);
+        if (a2 == NULL)
+            goto rshift_error;
+        z = (PyLongObject *) long_invert(a2);
+        Py_DECREF(a2);
+    }
+    else {
+        shiftby = PyLong_AsSsize_t((PyObject *)b);
+        if (shiftby == -1L && PyErr_Occurred())
+            goto rshift_error;
+        if (shiftby < 0) {
+            PyErr_SetString(PyExc_ValueError,
+                            "negative shift count");
+            goto rshift_error;
+        }
+        wordshift = shiftby / PyLong_SHIFT;
+        newsize = ABS(Py_SIZE(a)) - wordshift;
+        if (newsize <= 0) {
+            z = _PyLong_New(0);
+            Py_DECREF(a);
+            Py_DECREF(b);
+            return (PyObject *)z;
+        }
+        loshift = shiftby % PyLong_SHIFT;
+        hishift = PyLong_SHIFT - loshift;
+        lomask = ((digit)1 << hishift) - 1;
+        himask = PyLong_MASK ^ lomask;
+        z = _PyLong_New(newsize);
+        if (z == NULL)
+            goto rshift_error;
+        if (Py_SIZE(a) < 0)
+            Py_SIZE(z) = -(Py_SIZE(z));
+        for (i = 0, j = wordshift; i < newsize; i++, j++) {
+            z->ob_digit[i] = (a->ob_digit[j] >> loshift) & lomask;
+            if (i+1 < newsize)
+                z->ob_digit[i] |=
+                  (a->ob_digit[j+1] << hishift) & himask;
+        }
+        z = long_normalize(z);
+    }
 rshift_error:
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return (PyObject *) z;
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return (PyObject *) z;
 
 }
 
 static PyObject *
 long_lshift(PyObject *v, PyObject *w)
 {
-	/* This version due to Tim Peters */
-	PyLongObject *a, *b;
-	PyLongObject *z = NULL;
-	Py_ssize_t shiftby, oldsize, newsize, wordshift, remshift, i, j;
-	twodigits accum;
+    /* This version due to Tim Peters */
+    PyLongObject *a, *b;
+    PyLongObject *z = NULL;
+    Py_ssize_t shiftby, oldsize, newsize, wordshift, remshift, i, j;
+    twodigits accum;
 
-	CONVERT_BINOP(v, w, &a, &b);
+    CONVERT_BINOP(v, w, &a, &b);
 
-	shiftby = PyLong_AsSsize_t((PyObject *)b);
-	if (shiftby == -1L && PyErr_Occurred())
-		goto lshift_error;
-	if (shiftby < 0) {
-		PyErr_SetString(PyExc_ValueError, "negative shift count");
-		goto lshift_error;
-	}
-	/* wordshift, remshift = divmod(shiftby, PyLong_SHIFT) */
-	wordshift = shiftby / PyLong_SHIFT;
-	remshift  = shiftby - wordshift * PyLong_SHIFT;
+    shiftby = PyLong_AsSsize_t((PyObject *)b);
+    if (shiftby == -1L && PyErr_Occurred())
+        goto lshift_error;
+    if (shiftby < 0) {
+        PyErr_SetString(PyExc_ValueError, "negative shift count");
+        goto lshift_error;
+    }
+    /* wordshift, remshift = divmod(shiftby, PyLong_SHIFT) */
+    wordshift = shiftby / PyLong_SHIFT;
+    remshift  = shiftby - wordshift * PyLong_SHIFT;
 
-	oldsize = ABS(a->ob_size);
-	newsize = oldsize + wordshift;
-	if (remshift)
-		++newsize;
-	z = _PyLong_New(newsize);
-	if (z == NULL)
-		goto lshift_error;
-	if (a->ob_size < 0)
-		z->ob_size = -(z->ob_size);
-	for (i = 0; i < wordshift; i++)
-		z->ob_digit[i] = 0;
-	accum = 0;
-	for (i = wordshift, j = 0; j < oldsize; i++, j++) {
-		accum |= (twodigits)a->ob_digit[j] << remshift;
-		z->ob_digit[i] = (digit)(accum & PyLong_MASK);
-		accum >>= PyLong_SHIFT;
-	}
-	if (remshift)
-		z->ob_digit[newsize-1] = (digit)accum;
-	else
-		assert(!accum);
-	z = long_normalize(z);
+    oldsize = ABS(a->ob_size);
+    newsize = oldsize + wordshift;
+    if (remshift)
+        ++newsize;
+    z = _PyLong_New(newsize);
+    if (z == NULL)
+        goto lshift_error;
+    if (a->ob_size < 0)
+        z->ob_size = -(z->ob_size);
+    for (i = 0; i < wordshift; i++)
+        z->ob_digit[i] = 0;
+    accum = 0;
+    for (i = wordshift, j = 0; j < oldsize; i++, j++) {
+        accum |= (twodigits)a->ob_digit[j] << remshift;
+        z->ob_digit[i] = (digit)(accum & PyLong_MASK);
+        accum >>= PyLong_SHIFT;
+    }
+    if (remshift)
+        z->ob_digit[newsize-1] = (digit)accum;
+    else
+        assert(!accum);
+    z = long_normalize(z);
 lshift_error:
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return (PyObject *) z;
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return (PyObject *) z;
 }
 
 /* Compute two's complement of digit vector a[0:m], writing result to
@@ -3727,246 +3727,246 @@
 static void
 v_complement(digit *z, digit *a, Py_ssize_t m)
 {
-	Py_ssize_t i;
-	digit carry = 1;
-	for (i = 0; i < m; ++i) {
-		carry += a[i] ^ PyLong_MASK;
-		z[i] = carry & PyLong_MASK;
-		carry >>= PyLong_SHIFT;
-	}
-	assert(carry == 0);
+    Py_ssize_t i;
+    digit carry = 1;
+    for (i = 0; i < m; ++i) {
+        carry += a[i] ^ PyLong_MASK;
+        z[i] = carry & PyLong_MASK;
+        carry >>= PyLong_SHIFT;
+    }
+    assert(carry == 0);
 }
 
 /* Bitwise and/xor/or operations */
 
 static PyObject *
 long_bitwise(PyLongObject *a,
-	     int op,  /* '&', '|', '^' */
-	     PyLongObject *b)
+             int op,  /* '&', '|', '^' */
+         PyLongObject *b)
 {
-	int nega, negb, negz;
-	Py_ssize_t size_a, size_b, size_z, i;
-	PyLongObject *z;
+    int nega, negb, negz;
+    Py_ssize_t size_a, size_b, size_z, i;
+    PyLongObject *z;
 
-	/* Bitwise operations for negative numbers operate as though
-	   on a two's complement representation.  So convert arguments
-	   from sign-magnitude to two's complement, and convert the
-	   result back to sign-magnitude at the end. */
+    /* Bitwise operations for negative numbers operate as though
+       on a two's complement representation.  So convert arguments
+       from sign-magnitude to two's complement, and convert the
+       result back to sign-magnitude at the end. */
 
-	/* If a is negative, replace it by its two's complement. */
-	size_a = ABS(Py_SIZE(a));
-	nega = Py_SIZE(a) < 0;
-	if (nega) {
-		z = _PyLong_New(size_a);
-		if (z == NULL)
-			return NULL;
-		v_complement(z->ob_digit, a->ob_digit, size_a);
-		a = z;
-	}
-	else
-		/* Keep reference count consistent. */
-		Py_INCREF(a);
+    /* If a is negative, replace it by its two's complement. */
+    size_a = ABS(Py_SIZE(a));
+    nega = Py_SIZE(a) < 0;
+    if (nega) {
+        z = _PyLong_New(size_a);
+        if (z == NULL)
+            return NULL;
+        v_complement(z->ob_digit, a->ob_digit, size_a);
+        a = z;
+    }
+    else
+        /* Keep reference count consistent. */
+        Py_INCREF(a);
 
-	/* Same for b. */
-	size_b = ABS(Py_SIZE(b));
-	negb = Py_SIZE(b) < 0;
-	if (negb) {
-		z = _PyLong_New(size_b);
-		if (z == NULL) {
-			Py_DECREF(a);
-			return NULL;
-		}
-		v_complement(z->ob_digit, b->ob_digit, size_b);
-		b = z;
-	}
-	else
-		Py_INCREF(b);
+    /* Same for b. */
+    size_b = ABS(Py_SIZE(b));
+    negb = Py_SIZE(b) < 0;
+    if (negb) {
+        z = _PyLong_New(size_b);
+        if (z == NULL) {
+            Py_DECREF(a);
+            return NULL;
+        }
+        v_complement(z->ob_digit, b->ob_digit, size_b);
+        b = z;
+    }
+    else
+        Py_INCREF(b);
 
-	/* Swap a and b if necessary to ensure size_a >= size_b. */
-	if (size_a < size_b) {
-		z = a; a = b; b = z;
-		size_z = size_a; size_a = size_b; size_b = size_z;
-		negz = nega; nega = negb; negb = negz;
-	}
+    /* Swap a and b if necessary to ensure size_a >= size_b. */
+    if (size_a < size_b) {
+        z = a; a = b; b = z;
+        size_z = size_a; size_a = size_b; size_b = size_z;
+        negz = nega; nega = negb; negb = negz;
+    }
 
-	/* JRH: The original logic here was to allocate the result value (z)
-	   as the longer of the two operands.  However, there are some cases
-	   where the result is guaranteed to be shorter than that: AND of two
-	   positives, OR of two negatives: use the shorter number.  AND with
-	   mixed signs: use the positive number.  OR with mixed signs: use the
-	   negative number.
-	*/
-	switch (op) {
-	case '^':
-		negz = nega ^ negb;
-		size_z = size_a;
-		break;
-	case '&':
-		negz = nega & negb;
-		size_z = negb ? size_a : size_b;
-		break;
-	case '|':
-		negz = nega | negb;
-		size_z = negb ? size_b : size_a;
-		break;
-	default:
-		PyErr_BadArgument();
-		return NULL;
-	}
+    /* JRH: The original logic here was to allocate the result value (z)
+       as the longer of the two operands.  However, there are some cases
+       where the result is guaranteed to be shorter than that: AND of two
+       positives, OR of two negatives: use the shorter number.  AND with
+       mixed signs: use the positive number.  OR with mixed signs: use the
+       negative number.
+    */
+    switch (op) {
+    case '^':
+        negz = nega ^ negb;
+        size_z = size_a;
+        break;
+    case '&':
+        negz = nega & negb;
+        size_z = negb ? size_a : size_b;
+        break;
+    case '|':
+        negz = nega | negb;
+        size_z = negb ? size_b : size_a;
+        break;
+    default:
+        PyErr_BadArgument();
+        return NULL;
+    }
 
-	/* We allow an extra digit if z is negative, to make sure that
-	   the final two's complement of z doesn't overflow. */
-	z = _PyLong_New(size_z + negz);
-	if (z == NULL) {
-		Py_DECREF(a);
-		Py_DECREF(b);
-		return NULL;
-	}
+    /* We allow an extra digit if z is negative, to make sure that
+       the final two's complement of z doesn't overflow. */
+    z = _PyLong_New(size_z + negz);
+    if (z == NULL) {
+        Py_DECREF(a);
+        Py_DECREF(b);
+        return NULL;
+    }
 
-	/* Compute digits for overlap of a and b. */
-	switch(op) {
-	case '&':
-		for (i = 0; i < size_b; ++i)
-			z->ob_digit[i] = a->ob_digit[i] & b->ob_digit[i];
-		break;
-	case '|':
-		for (i = 0; i < size_b; ++i)
-			z->ob_digit[i] = a->ob_digit[i] | b->ob_digit[i];
-		break;
-	case '^':
-		for (i = 0; i < size_b; ++i)
-			z->ob_digit[i] = a->ob_digit[i] ^ b->ob_digit[i];
-		break;
-	default:
-		PyErr_BadArgument();
-		return NULL;
-	}
+    /* Compute digits for overlap of a and b. */
+    switch(op) {
+    case '&':
+        for (i = 0; i < size_b; ++i)
+            z->ob_digit[i] = a->ob_digit[i] & b->ob_digit[i];
+        break;
+    case '|':
+        for (i = 0; i < size_b; ++i)
+            z->ob_digit[i] = a->ob_digit[i] | b->ob_digit[i];
+        break;
+    case '^':
+        for (i = 0; i < size_b; ++i)
+            z->ob_digit[i] = a->ob_digit[i] ^ b->ob_digit[i];
+        break;
+    default:
+        PyErr_BadArgument();
+        return NULL;
+    }
 
-	/* Copy any remaining digits of a, inverting if necessary. */
-	if (op == '^' && negb)
-		for (; i < size_z; ++i)
-			z->ob_digit[i] = a->ob_digit[i] ^ PyLong_MASK;
-	else if (i < size_z)
-		memcpy(&z->ob_digit[i], &a->ob_digit[i],
-		       (size_z-i)*sizeof(digit));
+    /* Copy any remaining digits of a, inverting if necessary. */
+    if (op == '^' && negb)
+        for (; i < size_z; ++i)
+            z->ob_digit[i] = a->ob_digit[i] ^ PyLong_MASK;
+    else if (i < size_z)
+        memcpy(&z->ob_digit[i], &a->ob_digit[i],
+               (size_z-i)*sizeof(digit));
 
-	/* Complement result if negative. */
-	if (negz) {
-		Py_SIZE(z) = -(Py_SIZE(z));
-		z->ob_digit[size_z] = PyLong_MASK;
-		v_complement(z->ob_digit, z->ob_digit, size_z+1);
-	}
+    /* Complement result if negative. */
+    if (negz) {
+        Py_SIZE(z) = -(Py_SIZE(z));
+        z->ob_digit[size_z] = PyLong_MASK;
+        v_complement(z->ob_digit, z->ob_digit, size_z+1);
+    }
 
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return (PyObject *)long_normalize(z);
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return (PyObject *)long_normalize(z);
 }
 
 static PyObject *
 long_and(PyObject *v, PyObject *w)
 {
-	PyLongObject *a, *b;
-	PyObject *c;
-	CONVERT_BINOP(v, w, &a, &b);
-	c = long_bitwise(a, '&', b);
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return c;
+    PyLongObject *a, *b;
+    PyObject *c;
+    CONVERT_BINOP(v, w, &a, &b);
+    c = long_bitwise(a, '&', b);
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return c;
 }
 
 static PyObject *
 long_xor(PyObject *v, PyObject *w)
 {
-	PyLongObject *a, *b;
-	PyObject *c;
-	CONVERT_BINOP(v, w, &a, &b);
-	c = long_bitwise(a, '^', b);
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return c;
+    PyLongObject *a, *b;
+    PyObject *c;
+    CONVERT_BINOP(v, w, &a, &b);
+    c = long_bitwise(a, '^', b);
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return c;
 }
 
 static PyObject *
 long_or(PyObject *v, PyObject *w)
 {
-	PyLongObject *a, *b;
-	PyObject *c;
-	CONVERT_BINOP(v, w, &a, &b);
-	c = long_bitwise(a, '|', b);
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return c;
+    PyLongObject *a, *b;
+    PyObject *c;
+    CONVERT_BINOP(v, w, &a, &b);
+    c = long_bitwise(a, '|', b);
+    Py_DECREF(a);
+    Py_DECREF(b);
+    return c;
 }
 
 static int
 long_coerce(PyObject **pv, PyObject **pw)
 {
-	if (PyInt_Check(*pw)) {
-		*pw = PyLong_FromLong(PyInt_AS_LONG(*pw));
-		if (*pw == NULL)
-			return -1;
-		Py_INCREF(*pv);
-		return 0;
-	}
-	else if (PyLong_Check(*pw)) {
-		Py_INCREF(*pv);
-		Py_INCREF(*pw);
-		return 0;
-	}
-	return 1; /* Can't do it */
+    if (PyInt_Check(*pw)) {
+        *pw = PyLong_FromLong(PyInt_AS_LONG(*pw));
+        if (*pw == NULL)
+            return -1;
+        Py_INCREF(*pv);
+        return 0;
+    }
+    else if (PyLong_Check(*pw)) {
+        Py_INCREF(*pv);
+        Py_INCREF(*pw);
+        return 0;
+    }
+    return 1; /* Can't do it */
 }
 
 static PyObject *
 long_long(PyObject *v)
 {
-	if (PyLong_CheckExact(v))
-		Py_INCREF(v);
-	else
-		v = _PyLong_Copy((PyLongObject *)v);
-	return v;
+    if (PyLong_CheckExact(v))
+        Py_INCREF(v);
+    else
+        v = _PyLong_Copy((PyLongObject *)v);
+    return v;
 }
 
 static PyObject *
 long_int(PyObject *v)
 {
-	long x;
-	x = PyLong_AsLong(v);
-	if (PyErr_Occurred()) {
-		if (PyErr_ExceptionMatches(PyExc_OverflowError)) {
-				PyErr_Clear();
-				if (PyLong_CheckExact(v)) {
-					Py_INCREF(v);
-					return v;
-				}
-				else
-					return _PyLong_Copy((PyLongObject *)v);
-		}
-		else
-			return NULL;
-	}
-	return PyInt_FromLong(x);
+    long x;
+    x = PyLong_AsLong(v);
+    if (PyErr_Occurred()) {
+        if (PyErr_ExceptionMatches(PyExc_OverflowError)) {
+                        PyErr_Clear();
+                        if (PyLong_CheckExact(v)) {
+                                Py_INCREF(v);
+                                return v;
+                        }
+                        else
+                                return _PyLong_Copy((PyLongObject *)v);
+        }
+        else
+            return NULL;
+    }
+    return PyInt_FromLong(x);
 }
 
 static PyObject *
 long_float(PyObject *v)
 {
-	double result;
-	result = PyLong_AsDouble(v);
-	if (result == -1.0 && PyErr_Occurred())
-		return NULL;
-	return PyFloat_FromDouble(result);
+    double result;
+    result = PyLong_AsDouble(v);
+    if (result == -1.0 && PyErr_Occurred())
+        return NULL;
+    return PyFloat_FromDouble(result);
 }
 
 static PyObject *
 long_oct(PyObject *v)
 {
-	return _PyLong_Format(v, 8, 1, 0);
+    return _PyLong_Format(v, 8, 1, 0);
 }
 
 static PyObject *
 long_hex(PyObject *v)
 {
-	return _PyLong_Format(v, 16, 1, 0);
+    return _PyLong_Format(v, 16, 1, 0);
 }
 
 static PyObject *
@@ -3975,49 +3975,49 @@
 static PyObject *
 long_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *x = NULL;
-	int base = -909;		     /* unlikely! */
-	static char *kwlist[] = {"x", "base", 0};
+    PyObject *x = NULL;
+    int base = -909;                         /* unlikely! */
+    static char *kwlist[] = {"x", "base", 0};
 
-	if (type != &PyLong_Type)
-		return long_subtype_new(type, args, kwds); /* Wimp out */
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:long", kwlist,
-					 &x, &base))
-		return NULL;
-	if (x == NULL)
-		return PyLong_FromLong(0L);
-	if (base == -909)
-		return PyNumber_Long(x);
-	else if (PyString_Check(x)) {
-		/* Since PyLong_FromString doesn't have a length parameter,
-		 * check here for possible NULs in the string. */
-		char *string = PyString_AS_STRING(x);
-		if (strlen(string) != (size_t)PyString_Size(x)) {
-			/* create a repr() of the input string,
-			 * just like PyLong_FromString does. */
-			PyObject *srepr;
-			srepr = PyObject_Repr(x);
-			if (srepr == NULL)
-				return NULL;
-			PyErr_Format(PyExc_ValueError,
-			     "invalid literal for long() with base %d: %s",
-			     base, PyString_AS_STRING(srepr));
-			Py_DECREF(srepr);
-			return NULL;
-		}
-		return PyLong_FromString(PyString_AS_STRING(x), NULL, base);
-	}
+    if (type != &PyLong_Type)
+        return long_subtype_new(type, args, kwds); /* Wimp out */
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:long", kwlist,
+                                     &x, &base))
+        return NULL;
+    if (x == NULL)
+        return PyLong_FromLong(0L);
+    if (base == -909)
+        return PyNumber_Long(x);
+    else if (PyString_Check(x)) {
+        /* Since PyLong_FromString doesn't have a length parameter,
+         * check here for possible NULs in the string. */
+        char *string = PyString_AS_STRING(x);
+        if (strlen(string) != (size_t)PyString_Size(x)) {
+            /* create a repr() of the input string,
+             * just like PyLong_FromString does. */
+            PyObject *srepr;
+            srepr = PyObject_Repr(x);
+            if (srepr == NULL)
+                return NULL;
+            PyErr_Format(PyExc_ValueError,
+                 "invalid literal for long() with base %d: %s",
+                 base, PyString_AS_STRING(srepr));
+            Py_DECREF(srepr);
+            return NULL;
+        }
+        return PyLong_FromString(PyString_AS_STRING(x), NULL, base);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(x))
-		return PyLong_FromUnicode(PyUnicode_AS_UNICODE(x),
-					  PyUnicode_GET_SIZE(x),
-					  base);
+    else if (PyUnicode_Check(x))
+        return PyLong_FromUnicode(PyUnicode_AS_UNICODE(x),
+                                  PyUnicode_GET_SIZE(x),
+                                  base);
 #endif
-	else {
-		PyErr_SetString(PyExc_TypeError,
-			"long() can't convert non-string with explicit base");
-		return NULL;
-	}
+    else {
+        PyErr_SetString(PyExc_TypeError,
+            "long() can't convert non-string with explicit base");
+        return NULL;
+    }
 }
 
 /* Wimpy, slow approach to tp_new calls for subtypes of long:
@@ -4028,138 +4028,138 @@
 static PyObject *
 long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyLongObject *tmp, *newobj;
-	Py_ssize_t i, n;
+    PyLongObject *tmp, *newobj;
+    Py_ssize_t i, n;
 
-	assert(PyType_IsSubtype(type, &PyLong_Type));
-	tmp = (PyLongObject *)long_new(&PyLong_Type, args, kwds);
-	if (tmp == NULL)
-		return NULL;
-	assert(PyLong_CheckExact(tmp));
-	n = Py_SIZE(tmp);
-	if (n < 0)
-		n = -n;
-	newobj = (PyLongObject *)type->tp_alloc(type, n);
-	if (newobj == NULL) {
-		Py_DECREF(tmp);
-		return NULL;
-	}
-	assert(PyLong_Check(newobj));
-	Py_SIZE(newobj) = Py_SIZE(tmp);
-	for (i = 0; i < n; i++)
-		newobj->ob_digit[i] = tmp->ob_digit[i];
-	Py_DECREF(tmp);
-	return (PyObject *)newobj;
+    assert(PyType_IsSubtype(type, &PyLong_Type));
+    tmp = (PyLongObject *)long_new(&PyLong_Type, args, kwds);
+    if (tmp == NULL)
+        return NULL;
+    assert(PyLong_CheckExact(tmp));
+    n = Py_SIZE(tmp);
+    if (n < 0)
+        n = -n;
+    newobj = (PyLongObject *)type->tp_alloc(type, n);
+    if (newobj == NULL) {
+        Py_DECREF(tmp);
+        return NULL;
+    }
+    assert(PyLong_Check(newobj));
+    Py_SIZE(newobj) = Py_SIZE(tmp);
+    for (i = 0; i < n; i++)
+        newobj->ob_digit[i] = tmp->ob_digit[i];
+    Py_DECREF(tmp);
+    return (PyObject *)newobj;
 }
 
 static PyObject *
 long_getnewargs(PyLongObject *v)
 {
-	return Py_BuildValue("(N)", _PyLong_Copy(v));
+    return Py_BuildValue("(N)", _PyLong_Copy(v));
 }
 
 static PyObject *
 long_get0(PyLongObject *v, void *context) {
-	return PyLong_FromLong(0L);
+    return PyLong_FromLong(0L);
 }
 
 static PyObject *
 long_get1(PyLongObject *v, void *context) {
-	return PyLong_FromLong(1L);
+    return PyLong_FromLong(1L);
 }
 
 static PyObject *
 long__format__(PyObject *self, PyObject *args)
 {
-	PyObject *format_spec;
+    PyObject *format_spec;
 
-	if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
-		return NULL;
-	if (PyBytes_Check(format_spec))
-		return _PyLong_FormatAdvanced(self,
-					      PyBytes_AS_STRING(format_spec),
-					      PyBytes_GET_SIZE(format_spec));
-	if (PyUnicode_Check(format_spec)) {
-		/* Convert format_spec to a str */
-		PyObject *result;
-		PyObject *str_spec = PyObject_Str(format_spec);
+    if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
+        return NULL;
+    if (PyBytes_Check(format_spec))
+        return _PyLong_FormatAdvanced(self,
+                                      PyBytes_AS_STRING(format_spec),
+                                      PyBytes_GET_SIZE(format_spec));
+    if (PyUnicode_Check(format_spec)) {
+        /* Convert format_spec to a str */
+        PyObject *result;
+        PyObject *str_spec = PyObject_Str(format_spec);
 
-		if (str_spec == NULL)
-			return NULL;
+        if (str_spec == NULL)
+            return NULL;
 
-		result = _PyLong_FormatAdvanced(self,
-						PyBytes_AS_STRING(str_spec),
-						PyBytes_GET_SIZE(str_spec));
+        result = _PyLong_FormatAdvanced(self,
+                                        PyBytes_AS_STRING(str_spec),
+                                        PyBytes_GET_SIZE(str_spec));
 
-		Py_DECREF(str_spec);
-		return result;
-	}
-	PyErr_SetString(PyExc_TypeError, "__format__ requires str or unicode");
-	return NULL;
+        Py_DECREF(str_spec);
+        return result;
+    }
+    PyErr_SetString(PyExc_TypeError, "__format__ requires str or unicode");
+    return NULL;
 }
 
 static PyObject *
 long_sizeof(PyLongObject *v)
 {
-	Py_ssize_t res;
+    Py_ssize_t res;
 
-	res = v->ob_type->tp_basicsize + ABS(Py_SIZE(v))*sizeof(digit);
-	return PyInt_FromSsize_t(res);
+    res = v->ob_type->tp_basicsize + ABS(Py_SIZE(v))*sizeof(digit);
+    return PyInt_FromSsize_t(res);
 }
 
 static PyObject *
 long_bit_length(PyLongObject *v)
 {
-	PyLongObject *result, *x, *y;
-	Py_ssize_t ndigits, msd_bits = 0;
-	digit msd;
+    PyLongObject *result, *x, *y;
+    Py_ssize_t ndigits, msd_bits = 0;
+    digit msd;
 
-	assert(v != NULL);
-	assert(PyLong_Check(v));
+    assert(v != NULL);
+    assert(PyLong_Check(v));
 
-	ndigits = ABS(Py_SIZE(v));
-	if (ndigits == 0)
-		return PyInt_FromLong(0);
+    ndigits = ABS(Py_SIZE(v));
+    if (ndigits == 0)
+        return PyInt_FromLong(0);
 
-	msd = v->ob_digit[ndigits-1];
-	while (msd >= 32) {
-		msd_bits += 6;
-		msd >>= 6;
-	}
-	msd_bits += (long)(BitLengthTable[msd]);
+    msd = v->ob_digit[ndigits-1];
+    while (msd >= 32) {
+        msd_bits += 6;
+        msd >>= 6;
+    }
+    msd_bits += (long)(BitLengthTable[msd]);
 
-	if (ndigits <= PY_SSIZE_T_MAX/PyLong_SHIFT)
-		return PyInt_FromSsize_t((ndigits-1)*PyLong_SHIFT + msd_bits);
+    if (ndigits <= PY_SSIZE_T_MAX/PyLong_SHIFT)
+        return PyInt_FromSsize_t((ndigits-1)*PyLong_SHIFT + msd_bits);
 
-	/* expression above may overflow; use Python integers instead */
-	result = (PyLongObject *)PyLong_FromSsize_t(ndigits - 1);
-	if (result == NULL)
-		return NULL;
-	x = (PyLongObject *)PyLong_FromLong(PyLong_SHIFT);
-	if (x == NULL)
-		goto error;
-	y = (PyLongObject *)long_mul(result, x);
-	Py_DECREF(x);
-	if (y == NULL)
-		goto error;
-	Py_DECREF(result);
-	result = y;
+    /* expression above may overflow; use Python integers instead */
+    result = (PyLongObject *)PyLong_FromSsize_t(ndigits - 1);
+    if (result == NULL)
+        return NULL;
+    x = (PyLongObject *)PyLong_FromLong(PyLong_SHIFT);
+    if (x == NULL)
+        goto error;
+    y = (PyLongObject *)long_mul(result, x);
+    Py_DECREF(x);
+    if (y == NULL)
+        goto error;
+    Py_DECREF(result);
+    result = y;
 
-	x = (PyLongObject *)PyLong_FromLong((long)msd_bits);
-	if (x == NULL)
-		goto error;
-	y = (PyLongObject *)long_add(result, x);
-	Py_DECREF(x);
-	if (y == NULL)
-		goto error;
-	Py_DECREF(result);
-	result = y;
+    x = (PyLongObject *)PyLong_FromLong((long)msd_bits);
+    if (x == NULL)
+        goto error;
+    y = (PyLongObject *)long_add(result, x);
+    Py_DECREF(x);
+    if (y == NULL)
+        goto error;
+    Py_DECREF(result);
+    result = y;
 
-	return (PyObject *)result;
+    return (PyObject *)result;
 
 error:
-	Py_DECREF(result);
-	return NULL;
+    Py_DECREF(result);
+    return NULL;
 }
 
 PyDoc_STRVAR(long_bit_length_doc,
@@ -4175,26 +4175,26 @@
 static PyObject *
 long_is_finite(PyObject *v)
 {
-	Py_RETURN_TRUE;
+    Py_RETURN_TRUE;
 }
 #endif
 
 static PyMethodDef long_methods[] = {
-	{"conjugate",	(PyCFunction)long_long,	METH_NOARGS,
-	 "Returns self, the complex conjugate of any long."},
-	{"bit_length",	(PyCFunction)long_bit_length, METH_NOARGS,
-	 long_bit_length_doc},
+    {"conjugate",       (PyCFunction)long_long, METH_NOARGS,
+     "Returns self, the complex conjugate of any long."},
+    {"bit_length",      (PyCFunction)long_bit_length, METH_NOARGS,
+     long_bit_length_doc},
 #if 0
-	{"is_finite",	(PyCFunction)long_is_finite,	METH_NOARGS,
-	 "Returns always True."},
+    {"is_finite",       (PyCFunction)long_is_finite,    METH_NOARGS,
+     "Returns always True."},
 #endif
-	{"__trunc__",	(PyCFunction)long_long,	METH_NOARGS,
-         "Truncating an Integral returns itself."},
-	{"__getnewargs__",	(PyCFunction)long_getnewargs,	METH_NOARGS},
-        {"__format__", (PyCFunction)long__format__, METH_VARARGS},
-	{"__sizeof__",	(PyCFunction)long_sizeof, METH_NOARGS,
-	 "Returns size in memory, in bytes"},
-	{NULL,		NULL}		/* sentinel */
+    {"__trunc__",       (PyCFunction)long_long, METH_NOARGS,
+     "Truncating an Integral returns itself."},
+    {"__getnewargs__",          (PyCFunction)long_getnewargs,   METH_NOARGS},
+    {"__format__", (PyCFunction)long__format__, METH_VARARGS},
+    {"__sizeof__",      (PyCFunction)long_sizeof, METH_NOARGS,
+     "Returns size in memory, in bytes"},
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyGetSetDef long_getset[] = {
@@ -4227,89 +4227,89 @@
 converting a non-string.");
 
 static PyNumberMethods long_as_number = {
-	(binaryfunc)	long_add,	/*nb_add*/
-	(binaryfunc)	long_sub,	/*nb_subtract*/
-	(binaryfunc)	long_mul,	/*nb_multiply*/
-			long_classic_div, /*nb_divide*/
-			long_mod,	/*nb_remainder*/
-			long_divmod,	/*nb_divmod*/
-			long_pow,	/*nb_power*/
-	(unaryfunc) 	long_neg,	/*nb_negative*/
-	(unaryfunc) 	long_long,	/*tp_positive*/
-	(unaryfunc) 	long_abs,	/*tp_absolute*/
-	(inquiry)	long_nonzero,	/*tp_nonzero*/
-	(unaryfunc)	long_invert,	/*nb_invert*/
-			long_lshift,	/*nb_lshift*/
-	(binaryfunc)	long_rshift,	/*nb_rshift*/
-			long_and,	/*nb_and*/
-			long_xor,	/*nb_xor*/
-			long_or,	/*nb_or*/
-			long_coerce,	/*nb_coerce*/
-			long_int,	/*nb_int*/
-			long_long,	/*nb_long*/
-			long_float,	/*nb_float*/
-			long_oct,	/*nb_oct*/
-			long_hex,	/*nb_hex*/
-	0,				/* nb_inplace_add */
-	0,				/* nb_inplace_subtract */
-	0,				/* nb_inplace_multiply */
-	0,				/* nb_inplace_divide */
-	0,				/* nb_inplace_remainder */
-	0,				/* nb_inplace_power */
-	0,				/* nb_inplace_lshift */
-	0,				/* nb_inplace_rshift */
-	0,				/* nb_inplace_and */
-	0,				/* nb_inplace_xor */
-	0,				/* nb_inplace_or */
-	long_div,			/* nb_floor_divide */
-	long_true_divide,		/* nb_true_divide */
-	0,				/* nb_inplace_floor_divide */
-	0,				/* nb_inplace_true_divide */
-	long_long,			/* nb_index */
+    (binaryfunc)        long_add,       /*nb_add*/
+    (binaryfunc)        long_sub,       /*nb_subtract*/
+    (binaryfunc)        long_mul,       /*nb_multiply*/
+            long_classic_div, /*nb_divide*/
+            long_mod,                   /*nb_remainder*/
+            long_divmod,                /*nb_divmod*/
+            long_pow,                   /*nb_power*/
+    (unaryfunc)         long_neg,       /*nb_negative*/
+    (unaryfunc)         long_long,      /*tp_positive*/
+    (unaryfunc)         long_abs,       /*tp_absolute*/
+    (inquiry)           long_nonzero,   /*tp_nonzero*/
+    (unaryfunc)         long_invert,    /*nb_invert*/
+            long_lshift,                /*nb_lshift*/
+    (binaryfunc)        long_rshift,    /*nb_rshift*/
+            long_and,                   /*nb_and*/
+            long_xor,                   /*nb_xor*/
+            long_or,                    /*nb_or*/
+            long_coerce,                /*nb_coerce*/
+            long_int,                   /*nb_int*/
+            long_long,                  /*nb_long*/
+            long_float,                 /*nb_float*/
+            long_oct,                   /*nb_oct*/
+            long_hex,                   /*nb_hex*/
+    0,                                  /* nb_inplace_add */
+    0,                                  /* nb_inplace_subtract */
+    0,                                  /* nb_inplace_multiply */
+    0,                                  /* nb_inplace_divide */
+    0,                                  /* nb_inplace_remainder */
+    0,                                  /* nb_inplace_power */
+    0,                                  /* nb_inplace_lshift */
+    0,                                  /* nb_inplace_rshift */
+    0,                                  /* nb_inplace_and */
+    0,                                  /* nb_inplace_xor */
+    0,                                  /* nb_inplace_or */
+    long_div,                           /* nb_floor_divide */
+    long_true_divide,                   /* nb_true_divide */
+    0,                                  /* nb_inplace_floor_divide */
+    0,                                  /* nb_inplace_true_divide */
+    long_long,                          /* nb_index */
 };
 
 PyTypeObject PyLong_Type = {
-	PyObject_HEAD_INIT(&PyType_Type)
-	0,					/* ob_size */
-	"long",					/* tp_name */
-	offsetof(PyLongObject, ob_digit),	/* tp_basicsize */
-	sizeof(digit),				/* tp_itemsize */
-	long_dealloc,				/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)long_compare,			/* tp_compare */
-	long_repr,				/* tp_repr */
-	&long_as_number,			/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	(hashfunc)long_hash,			/* tp_hash */
-        0,              			/* tp_call */
-        long_str,				/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
-		Py_TPFLAGS_BASETYPE | Py_TPFLAGS_LONG_SUBCLASS,	/* tp_flags */
-	long_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	long_methods,				/* tp_methods */
-	0,					/* tp_members */
-	long_getset,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	long_new,				/* tp_new */
-	PyObject_Del,                           /* tp_free */
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,                                          /* ob_size */
+    "long",                                     /* tp_name */
+    offsetof(PyLongObject, ob_digit),           /* tp_basicsize */
+    sizeof(digit),                              /* tp_itemsize */
+    long_dealloc,                               /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)long_compare,                      /* tp_compare */
+    long_repr,                                  /* tp_repr */
+    &long_as_number,                            /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)long_hash,                        /* tp_hash */
+    0,                                          /* tp_call */
+    long_str,                                   /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
+        Py_TPFLAGS_BASETYPE | Py_TPFLAGS_LONG_SUBCLASS,         /* tp_flags */
+    long_doc,                                   /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    long_methods,                               /* tp_methods */
+    0,                                          /* tp_members */
+    long_getset,                                /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    long_new,                                   /* tp_new */
+    PyObject_Del,                           /* tp_free */
 };
 
 static PyTypeObject Long_InfoType;
@@ -4321,43 +4321,43 @@
 internal representation of integers.  The attributes are read only.");
 
 static PyStructSequence_Field long_info_fields[] = {
-	{"bits_per_digit", "size of a digit in bits"},
-	{"sizeof_digit", "size in bytes of the C type used to "
-	                 "represent a digit"},
-	{NULL, NULL}
+    {"bits_per_digit", "size of a digit in bits"},
+    {"sizeof_digit", "size in bytes of the C type used to "
+                     "represent a digit"},
+    {NULL, NULL}
 };
 
 static PyStructSequence_Desc long_info_desc = {
-	"sys.long_info",   /* name */
-	long_info__doc__,  /* doc */
-	long_info_fields,  /* fields */
-	2                 /* number of fields */
+    "sys.long_info",   /* name */
+    long_info__doc__,  /* doc */
+    long_info_fields,  /* fields */
+    2                 /* number of fields */
 };
 
 PyObject *
 PyLong_GetInfo(void)
 {
-	PyObject* long_info;
-	int field = 0;
-	long_info = PyStructSequence_New(&Long_InfoType);
-	if (long_info == NULL)
-		return NULL;
-	PyStructSequence_SET_ITEM(long_info, field++,
-				  PyInt_FromLong(PyLong_SHIFT));
-	PyStructSequence_SET_ITEM(long_info, field++,
-				  PyInt_FromLong(sizeof(digit)));
-	if (PyErr_Occurred()) {
-		Py_CLEAR(long_info);
-		return NULL;
-	}
-	return long_info;
+    PyObject* long_info;
+    int field = 0;
+    long_info = PyStructSequence_New(&Long_InfoType);
+    if (long_info == NULL)
+        return NULL;
+    PyStructSequence_SET_ITEM(long_info, field++,
+                              PyInt_FromLong(PyLong_SHIFT));
+    PyStructSequence_SET_ITEM(long_info, field++,
+                              PyInt_FromLong(sizeof(digit)));
+    if (PyErr_Occurred()) {
+        Py_CLEAR(long_info);
+        return NULL;
+    }
+    return long_info;
 }
 
 int
 _PyLong_Init(void)
 {
-	/* initialize long_info */
-	if (Long_InfoType.tp_name == 0)
-		PyStructSequence_InitType(&Long_InfoType, &long_info_desc);
-	return 1;
+    /* initialize long_info */
+    if (Long_InfoType.tp_name == 0)
+        PyStructSequence_InitType(&Long_InfoType, &long_info_desc);
+    return 1;
 }
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 69d7791..0b60ca3 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -16,113 +16,113 @@
 PyObject *
 PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module)
 {
-	PyCFunctionObject *op;
-	op = free_list;
-	if (op != NULL) {
-		free_list = (PyCFunctionObject *)(op->m_self);
-		PyObject_INIT(op, &PyCFunction_Type);
-		numfree--;
-	}
-	else {
-		op = PyObject_GC_New(PyCFunctionObject, &PyCFunction_Type);
-		if (op == NULL)
-			return NULL;
-	}
-	op->m_ml = ml;
-	Py_XINCREF(self);
-	op->m_self = self;
-	Py_XINCREF(module);
-	op->m_module = module;
-	_PyObject_GC_TRACK(op);
-	return (PyObject *)op;
+    PyCFunctionObject *op;
+    op = free_list;
+    if (op != NULL) {
+        free_list = (PyCFunctionObject *)(op->m_self);
+        PyObject_INIT(op, &PyCFunction_Type);
+        numfree--;
+    }
+    else {
+        op = PyObject_GC_New(PyCFunctionObject, &PyCFunction_Type);
+        if (op == NULL)
+            return NULL;
+    }
+    op->m_ml = ml;
+    Py_XINCREF(self);
+    op->m_self = self;
+    Py_XINCREF(module);
+    op->m_module = module;
+    _PyObject_GC_TRACK(op);
+    return (PyObject *)op;
 }
 
 PyCFunction
 PyCFunction_GetFunction(PyObject *op)
 {
-	if (!PyCFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyCFunctionObject *)op) -> m_ml -> ml_meth;
+    if (!PyCFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyCFunctionObject *)op) -> m_ml -> ml_meth;
 }
 
 PyObject *
 PyCFunction_GetSelf(PyObject *op)
 {
-	if (!PyCFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return ((PyCFunctionObject *)op) -> m_self;
+    if (!PyCFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return ((PyCFunctionObject *)op) -> m_self;
 }
 
 int
 PyCFunction_GetFlags(PyObject *op)
 {
-	if (!PyCFunction_Check(op)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return ((PyCFunctionObject *)op) -> m_ml -> ml_flags;
+    if (!PyCFunction_Check(op)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return ((PyCFunctionObject *)op) -> m_ml -> ml_flags;
 }
 
 PyObject *
 PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
 {
-	PyCFunctionObject* f = (PyCFunctionObject*)func;
-	PyCFunction meth = PyCFunction_GET_FUNCTION(func);
-	PyObject *self = PyCFunction_GET_SELF(func);
-	Py_ssize_t size;
+    PyCFunctionObject* f = (PyCFunctionObject*)func;
+    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+    PyObject *self = PyCFunction_GET_SELF(func);
+    Py_ssize_t size;
 
-	switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
-	case METH_VARARGS:
-		if (kw == NULL || PyDict_Size(kw) == 0)
-			return (*meth)(self, arg);
-		break;
-	case METH_VARARGS | METH_KEYWORDS:
-	case METH_OLDARGS | METH_KEYWORDS:
-		return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
-	case METH_NOARGS:
-		if (kw == NULL || PyDict_Size(kw) == 0) {
-			size = PyTuple_GET_SIZE(arg);
-			if (size == 0)
-				return (*meth)(self, NULL);
-			PyErr_Format(PyExc_TypeError,
-			    "%.200s() takes no arguments (%zd given)",
-			    f->m_ml->ml_name, size);
-			return NULL;
-		}
-		break;
-	case METH_O:
-		if (kw == NULL || PyDict_Size(kw) == 0) {
-			size = PyTuple_GET_SIZE(arg);
-			if (size == 1)
-				return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
-			PyErr_Format(PyExc_TypeError,
-			    "%.200s() takes exactly one argument (%zd given)",
-			    f->m_ml->ml_name, size);
-			return NULL;
-		}
-		break;
-	case METH_OLDARGS:
-		/* the really old style */
-		if (kw == NULL || PyDict_Size(kw) == 0) {
-			size = PyTuple_GET_SIZE(arg);
-			if (size == 1)
-				arg = PyTuple_GET_ITEM(arg, 0);
-			else if (size == 0)
-				arg = NULL;
-			return (*meth)(self, arg);
-		}
-		break;
-	default:
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
-		     f->m_ml->ml_name);
-	return NULL;
+    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
+    case METH_VARARGS:
+        if (kw == NULL || PyDict_Size(kw) == 0)
+            return (*meth)(self, arg);
+        break;
+    case METH_VARARGS | METH_KEYWORDS:
+    case METH_OLDARGS | METH_KEYWORDS:
+        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
+    case METH_NOARGS:
+        if (kw == NULL || PyDict_Size(kw) == 0) {
+            size = PyTuple_GET_SIZE(arg);
+            if (size == 0)
+                return (*meth)(self, NULL);
+            PyErr_Format(PyExc_TypeError,
+                "%.200s() takes no arguments (%zd given)",
+                f->m_ml->ml_name, size);
+            return NULL;
+        }
+        break;
+    case METH_O:
+        if (kw == NULL || PyDict_Size(kw) == 0) {
+            size = PyTuple_GET_SIZE(arg);
+            if (size == 1)
+                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
+            PyErr_Format(PyExc_TypeError,
+                "%.200s() takes exactly one argument (%zd given)",
+                f->m_ml->ml_name, size);
+            return NULL;
+        }
+        break;
+    case METH_OLDARGS:
+        /* the really old style */
+        if (kw == NULL || PyDict_Size(kw) == 0) {
+            size = PyTuple_GET_SIZE(arg);
+            if (size == 1)
+                arg = PyTuple_GET_ITEM(arg, 0);
+            else if (size == 0)
+                arg = NULL;
+            return (*meth)(self, arg);
+        }
+        break;
+    default:
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+                 f->m_ml->ml_name);
+    return NULL;
 }
 
 /* Methods (the standard built-in methods, that is) */
@@ -130,187 +130,187 @@
 static void
 meth_dealloc(PyCFunctionObject *m)
 {
-	_PyObject_GC_UNTRACK(m);
-	Py_XDECREF(m->m_self);
-	Py_XDECREF(m->m_module);
-	if (numfree < PyCFunction_MAXFREELIST) {
-		m->m_self = (PyObject *)free_list;
-		free_list = m;
-		numfree++;
-	}
-	else {
-		PyObject_GC_Del(m);
-	}
+    _PyObject_GC_UNTRACK(m);
+    Py_XDECREF(m->m_self);
+    Py_XDECREF(m->m_module);
+    if (numfree < PyCFunction_MAXFREELIST) {
+        m->m_self = (PyObject *)free_list;
+        free_list = m;
+        numfree++;
+    }
+    else {
+        PyObject_GC_Del(m);
+    }
 }
 
 static PyObject *
 meth_get__doc__(PyCFunctionObject *m, void *closure)
 {
-	const char *doc = m->m_ml->ml_doc;
+    const char *doc = m->m_ml->ml_doc;
 
-	if (doc != NULL)
-		return PyString_FromString(doc);
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (doc != NULL)
+        return PyString_FromString(doc);
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 meth_get__name__(PyCFunctionObject *m, void *closure)
 {
-	return PyString_FromString(m->m_ml->ml_name);
+    return PyString_FromString(m->m_ml->ml_name);
 }
 
 static int
 meth_traverse(PyCFunctionObject *m, visitproc visit, void *arg)
 {
-	Py_VISIT(m->m_self);
-	Py_VISIT(m->m_module);
-	return 0;
+    Py_VISIT(m->m_self);
+    Py_VISIT(m->m_module);
+    return 0;
 }
 
 static PyObject *
 meth_get__self__(PyCFunctionObject *m, void *closure)
 {
-	PyObject *self;
-	if (PyEval_GetRestricted()) {
-		PyErr_SetString(PyExc_RuntimeError,
-			"method.__self__ not accessible in restricted mode");
-		return NULL;
-	}
-	self = m->m_self;
-	if (self == NULL)
-		self = Py_None;
-	Py_INCREF(self);
-	return self;
+    PyObject *self;
+    if (PyEval_GetRestricted()) {
+        PyErr_SetString(PyExc_RuntimeError,
+            "method.__self__ not accessible in restricted mode");
+        return NULL;
+    }
+    self = m->m_self;
+    if (self == NULL)
+        self = Py_None;
+    Py_INCREF(self);
+    return self;
 }
 
 static PyGetSetDef meth_getsets [] = {
-	{"__doc__",  (getter)meth_get__doc__,  NULL, NULL},
-	{"__name__", (getter)meth_get__name__, NULL, NULL},
-	{"__self__", (getter)meth_get__self__, NULL, NULL},
-	{0}
+    {"__doc__",  (getter)meth_get__doc__,  NULL, NULL},
+    {"__name__", (getter)meth_get__name__, NULL, NULL},
+    {"__self__", (getter)meth_get__self__, NULL, NULL},
+    {0}
 };
 
 #define OFF(x) offsetof(PyCFunctionObject, x)
 
 static PyMemberDef meth_members[] = {
-	{"__module__",    T_OBJECT,     OFF(m_module), PY_WRITE_RESTRICTED},
-	{NULL}
+    {"__module__",    T_OBJECT,     OFF(m_module), PY_WRITE_RESTRICTED},
+    {NULL}
 };
 
 static PyObject *
 meth_repr(PyCFunctionObject *m)
 {
-	if (m->m_self == NULL)
-		return PyString_FromFormat("<built-in function %s>",
-					   m->m_ml->ml_name);
-	return PyString_FromFormat("<built-in method %s of %s object at %p>",
-				   m->m_ml->ml_name,
-				   m->m_self->ob_type->tp_name,
-				   m->m_self);
+    if (m->m_self == NULL)
+        return PyString_FromFormat("<built-in function %s>",
+                                   m->m_ml->ml_name);
+    return PyString_FromFormat("<built-in method %s of %s object at %p>",
+                               m->m_ml->ml_name,
+                               m->m_self->ob_type->tp_name,
+                               m->m_self);
 }
 
 static int
 meth_compare(PyCFunctionObject *a, PyCFunctionObject *b)
 {
-	if (a->m_self != b->m_self)
-		return (a->m_self < b->m_self) ? -1 : 1;
-	if (a->m_ml->ml_meth == b->m_ml->ml_meth)
-		return 0;
-	if (strcmp(a->m_ml->ml_name, b->m_ml->ml_name) < 0)
-		return -1;
-	else
-		return 1;
+    if (a->m_self != b->m_self)
+        return (a->m_self < b->m_self) ? -1 : 1;
+    if (a->m_ml->ml_meth == b->m_ml->ml_meth)
+        return 0;
+    if (strcmp(a->m_ml->ml_name, b->m_ml->ml_name) < 0)
+        return -1;
+    else
+        return 1;
 }
 
 static PyObject *
 meth_richcompare(PyObject *self, PyObject *other, int op)
 {
-	PyCFunctionObject *a, *b;
-	PyObject *res;
-	int eq;
+    PyCFunctionObject *a, *b;
+    PyObject *res;
+    int eq;
 
-	if (op != Py_EQ && op != Py_NE) {
-		/* Py3K warning if comparison isn't == or !=.  */
-		if (PyErr_WarnPy3k("builtin_function_or_method order "
-				   "comparisons not supported in 3.x", 1) < 0) {
-			return NULL;
-		}
+    if (op != Py_EQ && op != Py_NE) {
+        /* Py3K warning if comparison isn't == or !=.  */
+        if (PyErr_WarnPy3k("builtin_function_or_method order "
+                           "comparisons not supported in 3.x", 1) < 0) {
+            return NULL;
+        }
 
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	else if (!PyCFunction_Check(self) || !PyCFunction_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	a = (PyCFunctionObject *)self;
-	b = (PyCFunctionObject *)other;
-	eq = a->m_self == b->m_self;
-	if (eq)
-		eq = a->m_ml->ml_meth == b->m_ml->ml_meth;
-	if (op == Py_EQ)
-		res = eq ? Py_True : Py_False;
-	else
-		res = eq ? Py_False : Py_True;
-	Py_INCREF(res);
-	return res;
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    else if (!PyCFunction_Check(self) || !PyCFunction_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    a = (PyCFunctionObject *)self;
+    b = (PyCFunctionObject *)other;
+    eq = a->m_self == b->m_self;
+    if (eq)
+        eq = a->m_ml->ml_meth == b->m_ml->ml_meth;
+    if (op == Py_EQ)
+        res = eq ? Py_True : Py_False;
+    else
+        res = eq ? Py_False : Py_True;
+    Py_INCREF(res);
+    return res;
 }
 
 static long
 meth_hash(PyCFunctionObject *a)
 {
-	long x,y;
-	if (a->m_self == NULL)
-		x = 0;
-	else {
-		x = PyObject_Hash(a->m_self);
-		if (x == -1)
-			return -1;
-	}
-	y = _Py_HashPointer((void*)(a->m_ml->ml_meth));
-	if (y == -1)
-		return -1;
-	x ^= y;
-	if (x == -1)
-		x = -2;
-	return x;
+    long x,y;
+    if (a->m_self == NULL)
+        x = 0;
+    else {
+        x = PyObject_Hash(a->m_self);
+        if (x == -1)
+            return -1;
+    }
+    y = _Py_HashPointer((void*)(a->m_ml->ml_meth));
+    if (y == -1)
+        return -1;
+    x ^= y;
+    if (x == -1)
+        x = -2;
+    return x;
 }
 
 
 PyTypeObject PyCFunction_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"builtin_function_or_method",
-	sizeof(PyCFunctionObject),
-	0,
-	(destructor)meth_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)meth_compare,			/* tp_compare */
-	(reprfunc)meth_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	(hashfunc)meth_hash,			/* tp_hash */
-	PyCFunction_Call,			/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)meth_traverse,		/* tp_traverse */
-	0,					/* tp_clear */
-	meth_richcompare,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	meth_members,				/* tp_members */
-	meth_getsets,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "builtin_function_or_method",
+    sizeof(PyCFunctionObject),
+    0,
+    (destructor)meth_dealloc,                   /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)meth_compare,                      /* tp_compare */
+    (reprfunc)meth_repr,                        /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)meth_hash,                        /* tp_hash */
+    PyCFunction_Call,                           /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)meth_traverse,                /* tp_traverse */
+    0,                                          /* tp_clear */
+    meth_richcompare,                                           /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    meth_members,                               /* tp_members */
+    meth_getsets,                               /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
 };
 
 /* List all methods in a chain -- helper for findmethodinchain */
@@ -318,32 +318,32 @@
 static PyObject *
 listmethodchain(PyMethodChain *chain)
 {
-	PyMethodChain *c;
-	PyMethodDef *ml;
-	int i, n;
-	PyObject *v;
+    PyMethodChain *c;
+    PyMethodDef *ml;
+    int i, n;
+    PyObject *v;
 
-	n = 0;
-	for (c = chain; c != NULL; c = c->link) {
-		for (ml = c->methods; ml->ml_name != NULL; ml++)
-			n++;
-	}
-	v = PyList_New(n);
-	if (v == NULL)
-		return NULL;
-	i = 0;
-	for (c = chain; c != NULL; c = c->link) {
-		for (ml = c->methods; ml->ml_name != NULL; ml++) {
-			PyList_SetItem(v, i, PyString_FromString(ml->ml_name));
-			i++;
-		}
-	}
-	if (PyErr_Occurred()) {
-		Py_DECREF(v);
-		return NULL;
-	}
-	PyList_Sort(v);
-	return v;
+    n = 0;
+    for (c = chain; c != NULL; c = c->link) {
+        for (ml = c->methods; ml->ml_name != NULL; ml++)
+            n++;
+    }
+    v = PyList_New(n);
+    if (v == NULL)
+        return NULL;
+    i = 0;
+    for (c = chain; c != NULL; c = c->link) {
+        for (ml = c->methods; ml->ml_name != NULL; ml++) {
+            PyList_SetItem(v, i, PyString_FromString(ml->ml_name));
+            i++;
+        }
+    }
+    if (PyErr_Occurred()) {
+        Py_DECREF(v);
+        return NULL;
+    }
+    PyList_Sort(v);
+    return v;
 }
 
 /* Find a method in a method chain */
@@ -351,31 +351,31 @@
 PyObject *
 Py_FindMethodInChain(PyMethodChain *chain, PyObject *self, const char *name)
 {
-	if (name[0] == '_' && name[1] == '_') {
-		if (strcmp(name, "__methods__") == 0) {
-			if (PyErr_WarnPy3k("__methods__ not supported in 3.x",
-					   1) < 0)
-				return NULL;
-			return listmethodchain(chain);
-		}
-		if (strcmp(name, "__doc__") == 0) {
-			const char *doc = self->ob_type->tp_doc;
-			if (doc != NULL)
-				return PyString_FromString(doc);
-		}
-	}
-	while (chain != NULL) {
-		PyMethodDef *ml = chain->methods;
-		for (; ml->ml_name != NULL; ml++) {
-			if (name[0] == ml->ml_name[0] &&
-			    strcmp(name+1, ml->ml_name+1) == 0)
-				/* XXX */
-				return PyCFunction_New(ml, self);
-		}
-		chain = chain->link;
-	}
-	PyErr_SetString(PyExc_AttributeError, name);
-	return NULL;
+    if (name[0] == '_' && name[1] == '_') {
+        if (strcmp(name, "__methods__") == 0) {
+            if (PyErr_WarnPy3k("__methods__ not supported in 3.x",
+                               1) < 0)
+                return NULL;
+            return listmethodchain(chain);
+        }
+        if (strcmp(name, "__doc__") == 0) {
+            const char *doc = self->ob_type->tp_doc;
+            if (doc != NULL)
+                return PyString_FromString(doc);
+        }
+    }
+    while (chain != NULL) {
+        PyMethodDef *ml = chain->methods;
+        for (; ml->ml_name != NULL; ml++) {
+            if (name[0] == ml->ml_name[0] &&
+                strcmp(name+1, ml->ml_name+1) == 0)
+                /* XXX */
+                return PyCFunction_New(ml, self);
+        }
+        chain = chain->link;
+    }
+    PyErr_SetString(PyExc_AttributeError, name);
+    return NULL;
 }
 
 /* Find a method in a single method list */
@@ -383,10 +383,10 @@
 PyObject *
 Py_FindMethod(PyMethodDef *methods, PyObject *self, const char *name)
 {
-	PyMethodChain chain;
-	chain.methods = methods;
-	chain.link = NULL;
-	return Py_FindMethodInChain(&chain, self, name);
+    PyMethodChain chain;
+    chain.methods = methods;
+    chain.link = NULL;
+    return Py_FindMethodInChain(&chain, self, name);
 }
 
 /* Clear out the free list */
@@ -394,22 +394,22 @@
 int
 PyCFunction_ClearFreeList(void)
 {
-	int freelist_size = numfree;
-	
-	while (free_list) {
-		PyCFunctionObject *v = free_list;
-		free_list = (PyCFunctionObject *)(v->m_self);
-		PyObject_GC_Del(v);
-		numfree--;
-	}
-	assert(numfree == 0);
-	return freelist_size;
+    int freelist_size = numfree;
+
+    while (free_list) {
+        PyCFunctionObject *v = free_list;
+        free_list = (PyCFunctionObject *)(v->m_self);
+        PyObject_GC_Del(v);
+        numfree--;
+    }
+    assert(numfree == 0);
+    return freelist_size;
 }
 
 void
 PyCFunction_Fini(void)
 {
-	(void)PyCFunction_ClearFreeList();
+    (void)PyCFunction_ClearFreeList();
 }
 
 /* PyCFunction_New() is now just a macro that calls PyCFunction_NewEx(),
@@ -423,5 +423,5 @@
 PyObject *
 PyCFunction_New(PyMethodDef *ml, PyObject *self)
 {
-	return PyCFunction_NewEx(ml, self, NULL);
+    return PyCFunction_NewEx(ml, self, NULL);
 }
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index c9f00e9..ced16eb 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -5,144 +5,144 @@
 #include "structmember.h"
 
 typedef struct {
-	PyObject_HEAD
-	PyObject *md_dict;
+    PyObject_HEAD
+    PyObject *md_dict;
 } PyModuleObject;
 
 static PyMemberDef module_members[] = {
-	{"__dict__", T_OBJECT, offsetof(PyModuleObject, md_dict), READONLY},
-	{0}
+    {"__dict__", T_OBJECT, offsetof(PyModuleObject, md_dict), READONLY},
+    {0}
 };
 
 PyObject *
 PyModule_New(const char *name)
 {
-	PyModuleObject *m;
-	PyObject *nameobj;
-	m = PyObject_GC_New(PyModuleObject, &PyModule_Type);
-	if (m == NULL)
-		return NULL;
-	nameobj = PyString_FromString(name);
-	m->md_dict = PyDict_New();
-	if (m->md_dict == NULL || nameobj == NULL)
-		goto fail;
-	if (PyDict_SetItemString(m->md_dict, "__name__", nameobj) != 0)
-		goto fail;
-	if (PyDict_SetItemString(m->md_dict, "__doc__", Py_None) != 0)
-		goto fail;
-	if (PyDict_SetItemString(m->md_dict, "__package__", Py_None) != 0)
-		goto fail;
-	Py_DECREF(nameobj);
-	PyObject_GC_Track(m);
-	return (PyObject *)m;
+    PyModuleObject *m;
+    PyObject *nameobj;
+    m = PyObject_GC_New(PyModuleObject, &PyModule_Type);
+    if (m == NULL)
+        return NULL;
+    nameobj = PyString_FromString(name);
+    m->md_dict = PyDict_New();
+    if (m->md_dict == NULL || nameobj == NULL)
+        goto fail;
+    if (PyDict_SetItemString(m->md_dict, "__name__", nameobj) != 0)
+        goto fail;
+    if (PyDict_SetItemString(m->md_dict, "__doc__", Py_None) != 0)
+        goto fail;
+    if (PyDict_SetItemString(m->md_dict, "__package__", Py_None) != 0)
+        goto fail;
+    Py_DECREF(nameobj);
+    PyObject_GC_Track(m);
+    return (PyObject *)m;
 
  fail:
-	Py_XDECREF(nameobj);
-	Py_DECREF(m);
-	return NULL;
+    Py_XDECREF(nameobj);
+    Py_DECREF(m);
+    return NULL;
 }
 
 PyObject *
 PyModule_GetDict(PyObject *m)
 {
-	PyObject *d;
-	if (!PyModule_Check(m)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	d = ((PyModuleObject *)m) -> md_dict;
-	if (d == NULL)
-		((PyModuleObject *)m) -> md_dict = d = PyDict_New();
-	return d;
+    PyObject *d;
+    if (!PyModule_Check(m)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    d = ((PyModuleObject *)m) -> md_dict;
+    if (d == NULL)
+        ((PyModuleObject *)m) -> md_dict = d = PyDict_New();
+    return d;
 }
 
 char *
 PyModule_GetName(PyObject *m)
 {
-	PyObject *d;
-	PyObject *nameobj;
-	if (!PyModule_Check(m)) {
-		PyErr_BadArgument();
-		return NULL;
-	}
-	d = ((PyModuleObject *)m)->md_dict;
-	if (d == NULL ||
-	    (nameobj = PyDict_GetItemString(d, "__name__")) == NULL ||
-	    !PyString_Check(nameobj))
-	{
-		PyErr_SetString(PyExc_SystemError, "nameless module");
-		return NULL;
-	}
-	return PyString_AsString(nameobj);
+    PyObject *d;
+    PyObject *nameobj;
+    if (!PyModule_Check(m)) {
+        PyErr_BadArgument();
+        return NULL;
+    }
+    d = ((PyModuleObject *)m)->md_dict;
+    if (d == NULL ||
+        (nameobj = PyDict_GetItemString(d, "__name__")) == NULL ||
+        !PyString_Check(nameobj))
+    {
+        PyErr_SetString(PyExc_SystemError, "nameless module");
+        return NULL;
+    }
+    return PyString_AsString(nameobj);
 }
 
 char *
 PyModule_GetFilename(PyObject *m)
 {
-	PyObject *d;
-	PyObject *fileobj;
-	if (!PyModule_Check(m)) {
-		PyErr_BadArgument();
-		return NULL;
-	}
-	d = ((PyModuleObject *)m)->md_dict;
-	if (d == NULL ||
-	    (fileobj = PyDict_GetItemString(d, "__file__")) == NULL ||
-	    !PyString_Check(fileobj))
-	{
-		PyErr_SetString(PyExc_SystemError, "module filename missing");
-		return NULL;
-	}
-	return PyString_AsString(fileobj);
+    PyObject *d;
+    PyObject *fileobj;
+    if (!PyModule_Check(m)) {
+        PyErr_BadArgument();
+        return NULL;
+    }
+    d = ((PyModuleObject *)m)->md_dict;
+    if (d == NULL ||
+        (fileobj = PyDict_GetItemString(d, "__file__")) == NULL ||
+        !PyString_Check(fileobj))
+    {
+        PyErr_SetString(PyExc_SystemError, "module filename missing");
+        return NULL;
+    }
+    return PyString_AsString(fileobj);
 }
 
 void
 _PyModule_Clear(PyObject *m)
 {
-	/* To make the execution order of destructors for global
-	   objects a bit more predictable, we first zap all objects
-	   whose name starts with a single underscore, before we clear
-	   the entire dictionary.  We zap them by replacing them with
-	   None, rather than deleting them from the dictionary, to
-	   avoid rehashing the dictionary (to some extent). */
+    /* To make the execution order of destructors for global
+       objects a bit more predictable, we first zap all objects
+       whose name starts with a single underscore, before we clear
+       the entire dictionary.  We zap them by replacing them with
+       None, rather than deleting them from the dictionary, to
+       avoid rehashing the dictionary (to some extent). */
 
-	Py_ssize_t pos;
-	PyObject *key, *value;
-	PyObject *d;
+    Py_ssize_t pos;
+    PyObject *key, *value;
+    PyObject *d;
 
-	d = ((PyModuleObject *)m)->md_dict;
-	if (d == NULL)
-		return;
+    d = ((PyModuleObject *)m)->md_dict;
+    if (d == NULL)
+        return;
 
-	/* First, clear only names starting with a single underscore */
-	pos = 0;
-	while (PyDict_Next(d, &pos, &key, &value)) {
-		if (value != Py_None && PyString_Check(key)) {
-			char *s = PyString_AsString(key);
-			if (s[0] == '_' && s[1] != '_') {
-				if (Py_VerboseFlag > 1)
-				    PySys_WriteStderr("#   clear[1] %s\n", s);
-				PyDict_SetItem(d, key, Py_None);
-			}
-		}
-	}
+    /* First, clear only names starting with a single underscore */
+    pos = 0;
+    while (PyDict_Next(d, &pos, &key, &value)) {
+        if (value != Py_None && PyString_Check(key)) {
+            char *s = PyString_AsString(key);
+            if (s[0] == '_' && s[1] != '_') {
+                if (Py_VerboseFlag > 1)
+                    PySys_WriteStderr("#   clear[1] %s\n", s);
+                PyDict_SetItem(d, key, Py_None);
+            }
+        }
+    }
 
-	/* Next, clear all names except for __builtins__ */
-	pos = 0;
-	while (PyDict_Next(d, &pos, &key, &value)) {
-		if (value != Py_None && PyString_Check(key)) {
-			char *s = PyString_AsString(key);
-			if (s[0] != '_' || strcmp(s, "__builtins__") != 0) {
-				if (Py_VerboseFlag > 1)
-				    PySys_WriteStderr("#   clear[2] %s\n", s);
-				PyDict_SetItem(d, key, Py_None);
-			}
-		}
-	}
+    /* Next, clear all names except for __builtins__ */
+    pos = 0;
+    while (PyDict_Next(d, &pos, &key, &value)) {
+        if (value != Py_None && PyString_Check(key)) {
+            char *s = PyString_AsString(key);
+            if (s[0] != '_' || strcmp(s, "__builtins__") != 0) {
+                if (Py_VerboseFlag > 1)
+                    PySys_WriteStderr("#   clear[2] %s\n", s);
+                PyDict_SetItem(d, key, Py_None);
+            }
+        }
+    }
 
-	/* Note: we leave __builtins__ in place, so that destructors
-	   of non-global objects defined in this module can still use
-	   builtins, in particularly 'None'. */
+    /* Note: we leave __builtins__ in place, so that destructors
+       of non-global objects defined in this module can still use
+       builtins, in particularly 'None'. */
 
 }
 
@@ -151,56 +151,56 @@
 static int
 module_init(PyModuleObject *m, PyObject *args, PyObject *kwds)
 {
-	static char *kwlist[] = {"name", "doc", NULL};
-	PyObject *dict, *name = Py_None, *doc = Py_None;
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "S|O:module.__init__",
-                                         kwlist, &name, &doc))
-		return -1;
-	dict = m->md_dict;
-	if (dict == NULL) {
-		dict = PyDict_New();
-		if (dict == NULL)
-			return -1;
-		m->md_dict = dict;
-	}
-	if (PyDict_SetItemString(dict, "__name__", name) < 0)
-		return -1;
-	if (PyDict_SetItemString(dict, "__doc__", doc) < 0)
-		return -1;
-	return 0;
+    static char *kwlist[] = {"name", "doc", NULL};
+    PyObject *dict, *name = Py_None, *doc = Py_None;
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "S|O:module.__init__",
+                                     kwlist, &name, &doc))
+        return -1;
+    dict = m->md_dict;
+    if (dict == NULL) {
+        dict = PyDict_New();
+        if (dict == NULL)
+            return -1;
+        m->md_dict = dict;
+    }
+    if (PyDict_SetItemString(dict, "__name__", name) < 0)
+        return -1;
+    if (PyDict_SetItemString(dict, "__doc__", doc) < 0)
+        return -1;
+    return 0;
 }
 
 static void
 module_dealloc(PyModuleObject *m)
 {
-	PyObject_GC_UnTrack(m);
-	if (m->md_dict != NULL) {
-		/* If we are the only ones holding a reference, we can clear
-		   the dictionary. */
-		if (Py_REFCNT(m->md_dict) == 1)
-			_PyModule_Clear((PyObject *)m);
-		Py_DECREF(m->md_dict);
-	}
-	Py_TYPE(m)->tp_free((PyObject *)m);
+    PyObject_GC_UnTrack(m);
+    if (m->md_dict != NULL) {
+        /* If we are the only ones holding a reference, we can clear
+           the dictionary. */
+        if (Py_REFCNT(m->md_dict) == 1)
+            _PyModule_Clear((PyObject *)m);
+        Py_DECREF(m->md_dict);
+    }
+    Py_TYPE(m)->tp_free((PyObject *)m);
 }
 
 static PyObject *
 module_repr(PyModuleObject *m)
 {
-	char *name;
-	char *filename;
+    char *name;
+    char *filename;
 
-	name = PyModule_GetName((PyObject *)m);
-	if (name == NULL) {
-		PyErr_Clear();
-		name = "?";
-	}
-	filename = PyModule_GetFilename((PyObject *)m);
-	if (filename == NULL) {
-		PyErr_Clear();
-		return PyString_FromFormat("<module '%s' (built-in)>", name);
-	}
-	return PyString_FromFormat("<module '%s' from '%s'>", name, filename);
+    name = PyModule_GetName((PyObject *)m);
+    if (name == NULL) {
+        PyErr_Clear();
+        name = "?";
+    }
+    filename = PyModule_GetFilename((PyObject *)m);
+    if (filename == NULL) {
+        PyErr_Clear();
+        return PyString_FromFormat("<module '%s' (built-in)>", name);
+    }
+    return PyString_FromFormat("<module '%s' from '%s'>", name, filename);
 }
 
 /* We only need a traverse function, no clear function: If the module
@@ -209,8 +209,8 @@
 static int
 module_traverse(PyModuleObject *m, visitproc visit, void *arg)
 {
-	Py_VISIT(m->md_dict);
-	return 0;
+    Py_VISIT(m->md_dict);
+    return 0;
 }
 
 PyDoc_STRVAR(module_doc,
@@ -220,44 +220,44 @@
 The name must be a string; the optional doc argument can have any type.");
 
 PyTypeObject PyModule_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"module",				/* tp_name */
-	sizeof(PyModuleObject),			/* tp_size */
-	0,					/* tp_itemsize */
-	(destructor)module_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)module_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	PyObject_GenericSetAttr,		/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_BASETYPE,		/* tp_flags */
-	module_doc,				/* tp_doc */
-	(traverseproc)module_traverse,		/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	module_members,				/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	offsetof(PyModuleObject, md_dict),	/* tp_dictoffset */
-	(initproc)module_init,			/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	PyType_GenericNew,			/* tp_new */
-	PyObject_GC_Del,		        /* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "module",                                   /* tp_name */
+    sizeof(PyModuleObject),                     /* tp_size */
+    0,                                          /* tp_itemsize */
+    (destructor)module_dealloc,                 /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)module_repr,                      /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    PyObject_GenericSetAttr,                    /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_BASETYPE,                    /* tp_flags */
+    module_doc,                                 /* tp_doc */
+    (traverseproc)module_traverse,              /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    module_members,                             /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    offsetof(PyModuleObject, md_dict),          /* tp_dictoffset */
+    (initproc)module_init,                      /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    PyType_GenericNew,                          /* tp_new */
+    PyObject_GC_Del,                            /* tp_free */
 };
diff --git a/Objects/object.c b/Objects/object.c
index cf8a550..e4252c5 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -14,18 +14,18 @@
 Py_ssize_t
 _Py_GetRefTotal(void)
 {
-	PyObject *o;
-	Py_ssize_t total = _Py_RefTotal;
-        /* ignore the references to the dummy object of the dicts and sets
-           because they are not reliable and not useful (now that the
-           hash table code is well-tested) */
-	o = _PyDict_Dummy();
-	if (o != NULL)
-		total -= o->ob_refcnt;
-	o = _PySet_Dummy();
-	if (o != NULL)
-		total -= o->ob_refcnt;
-	return total;
+    PyObject *o;
+    Py_ssize_t total = _Py_RefTotal;
+    /* ignore the references to the dummy object of the dicts and sets
+       because they are not reliable and not useful (now that the
+       hash table code is well-tested) */
+    o = _PyDict_Dummy();
+    if (o != NULL)
+        total -= o->ob_refcnt;
+    o = _PySet_Dummy();
+    if (o != NULL)
+        total -= o->ob_refcnt;
+    return total;
 }
 #endif /* Py_REF_DEBUG */
 
@@ -58,21 +58,21 @@
 _Py_AddToAllObjects(PyObject *op, int force)
 {
 #ifdef  Py_DEBUG
-	if (!force) {
-		/* If it's initialized memory, op must be in or out of
-		 * the list unambiguously.
-		 */
-		assert((op->_ob_prev == NULL) == (op->_ob_next == NULL));
-	}
+    if (!force) {
+        /* If it's initialized memory, op must be in or out of
+         * the list unambiguously.
+         */
+        assert((op->_ob_prev == NULL) == (op->_ob_next == NULL));
+    }
 #endif
-	if (force || op->_ob_prev == NULL) {
-		op->_ob_next = refchain._ob_next;
-		op->_ob_prev = &refchain;
-		refchain._ob_next->_ob_prev = op;
-		refchain._ob_next = op;
-	}
+    if (force || op->_ob_prev == NULL) {
+        op->_ob_next = refchain._ob_next;
+        op->_ob_prev = &refchain;
+        refchain._ob_next->_ob_prev = op;
+        refchain._ob_next = op;
+    }
 }
-#endif	/* Py_TRACE_REFS */
+#endif  /* Py_TRACE_REFS */
 
 #ifdef COUNT_ALLOCS
 static PyTypeObject *type_list;
@@ -89,99 +89,99 @@
 void
 dump_counts(FILE* f)
 {
-	PyTypeObject *tp;
+    PyTypeObject *tp;
 
-	for (tp = type_list; tp; tp = tp->tp_next)
-		fprintf(f, "%s alloc'd: %" PY_FORMAT_SIZE_T "d, "
-			"freed: %" PY_FORMAT_SIZE_T "d, "
-			"max in use: %" PY_FORMAT_SIZE_T "d\n",
-			tp->tp_name, tp->tp_allocs, tp->tp_frees,
-			tp->tp_maxalloc);
-	fprintf(f, "fast tuple allocs: %" PY_FORMAT_SIZE_T "d, "
-		"empty: %" PY_FORMAT_SIZE_T "d\n",
-		fast_tuple_allocs, tuple_zero_allocs);
-	fprintf(f, "fast int allocs: pos: %" PY_FORMAT_SIZE_T "d, "
-		"neg: %" PY_FORMAT_SIZE_T "d\n",
-		quick_int_allocs, quick_neg_int_allocs);
-	fprintf(f, "null strings: %" PY_FORMAT_SIZE_T "d, "
-		"1-strings: %" PY_FORMAT_SIZE_T "d\n",
-		null_strings, one_strings);
+    for (tp = type_list; tp; tp = tp->tp_next)
+        fprintf(f, "%s alloc'd: %" PY_FORMAT_SIZE_T "d, "
+            "freed: %" PY_FORMAT_SIZE_T "d, "
+            "max in use: %" PY_FORMAT_SIZE_T "d\n",
+            tp->tp_name, tp->tp_allocs, tp->tp_frees,
+            tp->tp_maxalloc);
+    fprintf(f, "fast tuple allocs: %" PY_FORMAT_SIZE_T "d, "
+        "empty: %" PY_FORMAT_SIZE_T "d\n",
+        fast_tuple_allocs, tuple_zero_allocs);
+    fprintf(f, "fast int allocs: pos: %" PY_FORMAT_SIZE_T "d, "
+        "neg: %" PY_FORMAT_SIZE_T "d\n",
+        quick_int_allocs, quick_neg_int_allocs);
+    fprintf(f, "null strings: %" PY_FORMAT_SIZE_T "d, "
+        "1-strings: %" PY_FORMAT_SIZE_T "d\n",
+        null_strings, one_strings);
 }
 
 PyObject *
 get_counts(void)
 {
-	PyTypeObject *tp;
-	PyObject *result;
-	PyObject *v;
+    PyTypeObject *tp;
+    PyObject *result;
+    PyObject *v;
 
-	result = PyList_New(0);
-	if (result == NULL)
-		return NULL;
-	for (tp = type_list; tp; tp = tp->tp_next) {
-		v = Py_BuildValue("(snnn)", tp->tp_name, tp->tp_allocs,
-				  tp->tp_frees, tp->tp_maxalloc);
-		if (v == NULL) {
-			Py_DECREF(result);
-			return NULL;
-		}
-		if (PyList_Append(result, v) < 0) {
-			Py_DECREF(v);
-			Py_DECREF(result);
-			return NULL;
-		}
-		Py_DECREF(v);
-	}
-	return result;
+    result = PyList_New(0);
+    if (result == NULL)
+        return NULL;
+    for (tp = type_list; tp; tp = tp->tp_next) {
+        v = Py_BuildValue("(snnn)", tp->tp_name, tp->tp_allocs,
+                          tp->tp_frees, tp->tp_maxalloc);
+        if (v == NULL) {
+            Py_DECREF(result);
+            return NULL;
+        }
+        if (PyList_Append(result, v) < 0) {
+            Py_DECREF(v);
+            Py_DECREF(result);
+            return NULL;
+        }
+        Py_DECREF(v);
+    }
+    return result;
 }
 
 void
 inc_count(PyTypeObject *tp)
 {
-	if (tp->tp_next == NULL && tp->tp_prev == NULL) {
-		/* first time; insert in linked list */
-		if (tp->tp_next != NULL) /* sanity check */
-			Py_FatalError("XXX inc_count sanity check");
-		if (type_list)
-			type_list->tp_prev = tp;
-		tp->tp_next = type_list;
-		/* Note that as of Python 2.2, heap-allocated type objects
-		 * can go away, but this code requires that they stay alive
-		 * until program exit.  That's why we're careful with
-		 * refcounts here.  type_list gets a new reference to tp,
-		 * while ownership of the reference type_list used to hold
-		 * (if any) was transferred to tp->tp_next in the line above.
-		 * tp is thus effectively immortal after this.
-		 */
-		Py_INCREF(tp);
-		type_list = tp;
+    if (tp->tp_next == NULL && tp->tp_prev == NULL) {
+        /* first time; insert in linked list */
+        if (tp->tp_next != NULL) /* sanity check */
+            Py_FatalError("XXX inc_count sanity check");
+        if (type_list)
+            type_list->tp_prev = tp;
+        tp->tp_next = type_list;
+        /* Note that as of Python 2.2, heap-allocated type objects
+         * can go away, but this code requires that they stay alive
+         * until program exit.  That's why we're careful with
+         * refcounts here.  type_list gets a new reference to tp,
+         * while ownership of the reference type_list used to hold
+         * (if any) was transferred to tp->tp_next in the line above.
+         * tp is thus effectively immortal after this.
+         */
+        Py_INCREF(tp);
+        type_list = tp;
 #ifdef Py_TRACE_REFS
-		/* Also insert in the doubly-linked list of all objects,
-		 * if not already there.
-		 */
-		_Py_AddToAllObjects((PyObject *)tp, 0);
+        /* Also insert in the doubly-linked list of all objects,
+         * if not already there.
+         */
+        _Py_AddToAllObjects((PyObject *)tp, 0);
 #endif
-	}
-	tp->tp_allocs++;
-	if (tp->tp_allocs - tp->tp_frees > tp->tp_maxalloc)
-		tp->tp_maxalloc = tp->tp_allocs - tp->tp_frees;
+    }
+    tp->tp_allocs++;
+    if (tp->tp_allocs - tp->tp_frees > tp->tp_maxalloc)
+        tp->tp_maxalloc = tp->tp_allocs - tp->tp_frees;
 }
 
 void dec_count(PyTypeObject *tp)
 {
-	tp->tp_frees++;
-	if (unlist_types_without_objects &&
-	    tp->tp_allocs == tp->tp_frees) {
-		/* unlink the type from type_list */
-		if (tp->tp_prev)
-			tp->tp_prev->tp_next = tp->tp_next;
-		else
-			type_list = tp->tp_next;
-		if (tp->tp_next)
-			tp->tp_next->tp_prev = tp->tp_prev;
-		tp->tp_next = tp->tp_prev = NULL;
-		Py_DECREF(tp);
-	}
+    tp->tp_frees++;
+    if (unlist_types_without_objects &&
+        tp->tp_allocs == tp->tp_frees) {
+        /* unlink the type from type_list */
+        if (tp->tp_prev)
+            tp->tp_prev->tp_next = tp->tp_next;
+        else
+            type_list = tp->tp_next;
+        if (tp->tp_next)
+            tp->tp_next->tp_prev = tp->tp_prev;
+        tp->tp_next = tp->tp_prev = NULL;
+        Py_DECREF(tp);
+    }
 }
 
 #endif
@@ -191,13 +191,13 @@
 void
 _Py_NegativeRefcount(const char *fname, int lineno, PyObject *op)
 {
-	char buf[300];
+    char buf[300];
 
-	PyOS_snprintf(buf, sizeof(buf),
-		      "%s:%i object at %p has negative ref count "
-		      "%" PY_FORMAT_SIZE_T "d",
-		      fname, lineno, op, op->ob_refcnt);
-	Py_FatalError(buf);
+    PyOS_snprintf(buf, sizeof(buf),
+                  "%s:%i object at %p has negative ref count "
+                  "%" PY_FORMAT_SIZE_T "d",
+                  fname, lineno, op, op->ob_refcnt);
+    Py_FatalError(buf);
 }
 
 #endif /* Py_REF_DEBUG */
@@ -217,45 +217,45 @@
 PyObject *
 PyObject_Init(PyObject *op, PyTypeObject *tp)
 {
-	if (op == NULL)
-		return PyErr_NoMemory();
-	/* Any changes should be reflected in PyObject_INIT (objimpl.h) */
-	Py_TYPE(op) = tp;
-	_Py_NewReference(op);
-	return op;
+    if (op == NULL)
+        return PyErr_NoMemory();
+    /* Any changes should be reflected in PyObject_INIT (objimpl.h) */
+    Py_TYPE(op) = tp;
+    _Py_NewReference(op);
+    return op;
 }
 
 PyVarObject *
 PyObject_InitVar(PyVarObject *op, PyTypeObject *tp, Py_ssize_t size)
 {
-	if (op == NULL)
-		return (PyVarObject *) PyErr_NoMemory();
-	/* Any changes should be reflected in PyObject_INIT_VAR */
-	op->ob_size = size;
-	Py_TYPE(op) = tp;
-	_Py_NewReference((PyObject *)op);
-	return op;
+    if (op == NULL)
+        return (PyVarObject *) PyErr_NoMemory();
+    /* Any changes should be reflected in PyObject_INIT_VAR */
+    op->ob_size = size;
+    Py_TYPE(op) = tp;
+    _Py_NewReference((PyObject *)op);
+    return op;
 }
 
 PyObject *
 _PyObject_New(PyTypeObject *tp)
 {
-	PyObject *op;
-	op = (PyObject *) PyObject_MALLOC(_PyObject_SIZE(tp));
-	if (op == NULL)
-		return PyErr_NoMemory();
-	return PyObject_INIT(op, tp);
+    PyObject *op;
+    op = (PyObject *) PyObject_MALLOC(_PyObject_SIZE(tp));
+    if (op == NULL)
+        return PyErr_NoMemory();
+    return PyObject_INIT(op, tp);
 }
 
 PyVarObject *
 _PyObject_NewVar(PyTypeObject *tp, Py_ssize_t nitems)
 {
-	PyVarObject *op;
-	const size_t size = _PyObject_VAR_SIZE(tp, nitems);
-	op = (PyVarObject *) PyObject_MALLOC(size);
-	if (op == NULL)
-		return (PyVarObject *)PyErr_NoMemory();
-	return PyObject_INIT_VAR(op, tp, nitems);
+    PyVarObject *op;
+    const size_t size = _PyObject_VAR_SIZE(tp, nitems);
+    op = (PyVarObject *) PyObject_MALLOC(size);
+    if (op == NULL)
+        return (PyVarObject *)PyErr_NoMemory();
+    return PyObject_INIT_VAR(op, tp, nitems);
 }
 
 /* for binary compatibility with 2.2 */
@@ -263,284 +263,284 @@
 void
 _PyObject_Del(PyObject *op)
 {
-	PyObject_FREE(op);
+    PyObject_FREE(op);
 }
 
 /* Implementation of PyObject_Print with recursion checking */
 static int
 internal_print(PyObject *op, FILE *fp, int flags, int nesting)
 {
-	int ret = 0;
-	if (nesting > 10) {
-		PyErr_SetString(PyExc_RuntimeError, "print recursion");
-		return -1;
-	}
-	if (PyErr_CheckSignals())
-		return -1;
+    int ret = 0;
+    if (nesting > 10) {
+        PyErr_SetString(PyExc_RuntimeError, "print recursion");
+        return -1;
+    }
+    if (PyErr_CheckSignals())
+        return -1;
 #ifdef USE_STACKCHECK
-	if (PyOS_CheckStack()) {
-		PyErr_SetString(PyExc_MemoryError, "stack overflow");
-		return -1;
-	}
+    if (PyOS_CheckStack()) {
+        PyErr_SetString(PyExc_MemoryError, "stack overflow");
+        return -1;
+    }
 #endif
-	clearerr(fp); /* Clear any previous error condition */
-	if (op == NULL) {
-		Py_BEGIN_ALLOW_THREADS
-		fprintf(fp, "<nil>");
-		Py_END_ALLOW_THREADS
-	}
-	else {
-		if (op->ob_refcnt <= 0)
-			/* XXX(twouters) cast refcount to long until %zd is
-			   universally available */
-			Py_BEGIN_ALLOW_THREADS
-			fprintf(fp, "<refcnt %ld at %p>",
-				(long)op->ob_refcnt, op);
-			Py_END_ALLOW_THREADS
-		else if (Py_TYPE(op)->tp_print == NULL) {
-			PyObject *s;
-			if (flags & Py_PRINT_RAW)
-				s = PyObject_Str(op);
-			else
-				s = PyObject_Repr(op);
-			if (s == NULL)
-				ret = -1;
-			else {
-				ret = internal_print(s, fp, Py_PRINT_RAW,
-						     nesting+1);
-			}
-			Py_XDECREF(s);
-		}
-		else
-			ret = (*Py_TYPE(op)->tp_print)(op, fp, flags);
-	}
-	if (ret == 0) {
-		if (ferror(fp)) {
-			PyErr_SetFromErrno(PyExc_IOError);
-			clearerr(fp);
-			ret = -1;
-		}
-	}
-	return ret;
+    clearerr(fp); /* Clear any previous error condition */
+    if (op == NULL) {
+        Py_BEGIN_ALLOW_THREADS
+        fprintf(fp, "<nil>");
+        Py_END_ALLOW_THREADS
+    }
+    else {
+        if (op->ob_refcnt <= 0)
+            /* XXX(twouters) cast refcount to long until %zd is
+               universally available */
+            Py_BEGIN_ALLOW_THREADS
+            fprintf(fp, "<refcnt %ld at %p>",
+                (long)op->ob_refcnt, op);
+            Py_END_ALLOW_THREADS
+        else if (Py_TYPE(op)->tp_print == NULL) {
+            PyObject *s;
+            if (flags & Py_PRINT_RAW)
+                s = PyObject_Str(op);
+            else
+                s = PyObject_Repr(op);
+            if (s == NULL)
+                ret = -1;
+            else {
+                ret = internal_print(s, fp, Py_PRINT_RAW,
+                                     nesting+1);
+            }
+            Py_XDECREF(s);
+        }
+        else
+            ret = (*Py_TYPE(op)->tp_print)(op, fp, flags);
+    }
+    if (ret == 0) {
+        if (ferror(fp)) {
+            PyErr_SetFromErrno(PyExc_IOError);
+            clearerr(fp);
+            ret = -1;
+        }
+    }
+    return ret;
 }
 
 int
 PyObject_Print(PyObject *op, FILE *fp, int flags)
 {
-	return internal_print(op, fp, flags, 0);
+    return internal_print(op, fp, flags, 0);
 }
 
 
 /* For debugging convenience.  See Misc/gdbinit for some useful gdb hooks */
 void _PyObject_Dump(PyObject* op)
 {
-	if (op == NULL)
-		fprintf(stderr, "NULL\n");
-	else {
+    if (op == NULL)
+        fprintf(stderr, "NULL\n");
+    else {
 #ifdef WITH_THREAD
-		PyGILState_STATE gil;
+        PyGILState_STATE gil;
 #endif
-		fprintf(stderr, "object  : ");
+        fprintf(stderr, "object  : ");
 #ifdef WITH_THREAD
-		gil = PyGILState_Ensure();
+        gil = PyGILState_Ensure();
 #endif
-		(void)PyObject_Print(op, stderr, 0);
+        (void)PyObject_Print(op, stderr, 0);
 #ifdef WITH_THREAD
-		PyGILState_Release(gil);
+        PyGILState_Release(gil);
 #endif
-		/* XXX(twouters) cast refcount to long until %zd is
-		   universally available */
-		fprintf(stderr, "\n"
-			"type    : %s\n"
-			"refcount: %ld\n"
-			"address : %p\n",
-			Py_TYPE(op)==NULL ? "NULL" : Py_TYPE(op)->tp_name,
-			(long)op->ob_refcnt,
-			op);
-	}
+        /* XXX(twouters) cast refcount to long until %zd is
+           universally available */
+        fprintf(stderr, "\n"
+            "type    : %s\n"
+            "refcount: %ld\n"
+            "address : %p\n",
+            Py_TYPE(op)==NULL ? "NULL" : Py_TYPE(op)->tp_name,
+            (long)op->ob_refcnt,
+            op);
+    }
 }
 
 PyObject *
 PyObject_Repr(PyObject *v)
 {
-	if (PyErr_CheckSignals())
-		return NULL;
+    if (PyErr_CheckSignals())
+        return NULL;
 #ifdef USE_STACKCHECK
-	if (PyOS_CheckStack()) {
-		PyErr_SetString(PyExc_MemoryError, "stack overflow");
-		return NULL;
-	}
+    if (PyOS_CheckStack()) {
+        PyErr_SetString(PyExc_MemoryError, "stack overflow");
+        return NULL;
+    }
 #endif
-	if (v == NULL)
-		return PyString_FromString("<NULL>");
-	else if (Py_TYPE(v)->tp_repr == NULL)
-		return PyString_FromFormat("<%s object at %p>",
-					   Py_TYPE(v)->tp_name, v);
-	else {
-		PyObject *res;
-		res = (*Py_TYPE(v)->tp_repr)(v);
-		if (res == NULL)
-			return NULL;
+    if (v == NULL)
+        return PyString_FromString("<NULL>");
+    else if (Py_TYPE(v)->tp_repr == NULL)
+        return PyString_FromFormat("<%s object at %p>",
+                                   Py_TYPE(v)->tp_name, v);
+    else {
+        PyObject *res;
+        res = (*Py_TYPE(v)->tp_repr)(v);
+        if (res == NULL)
+            return NULL;
 #ifdef Py_USING_UNICODE
-		if (PyUnicode_Check(res)) {
-			PyObject* str;
-			str = PyUnicode_AsEncodedString(res, NULL, NULL);
-			Py_DECREF(res);
-			if (str)
-				res = str;
-			else
-				return NULL;
-		}
+        if (PyUnicode_Check(res)) {
+            PyObject* str;
+            str = PyUnicode_AsEncodedString(res, NULL, NULL);
+            Py_DECREF(res);
+            if (str)
+                res = str;
+            else
+                return NULL;
+        }
 #endif
-		if (!PyString_Check(res)) {
-			PyErr_Format(PyExc_TypeError,
-				     "__repr__ returned non-string (type %.200s)",
-				     Py_TYPE(res)->tp_name);
-			Py_DECREF(res);
-			return NULL;
-		}
-		return res;
-	}
+        if (!PyString_Check(res)) {
+            PyErr_Format(PyExc_TypeError,
+                         "__repr__ returned non-string (type %.200s)",
+                         Py_TYPE(res)->tp_name);
+            Py_DECREF(res);
+            return NULL;
+        }
+        return res;
+    }
 }
 
 PyObject *
 _PyObject_Str(PyObject *v)
 {
-	PyObject *res;
-	int type_ok;
-	if (v == NULL)
-		return PyString_FromString("<NULL>");
-	if (PyString_CheckExact(v)) {
-		Py_INCREF(v);
-		return v;
-	}
+    PyObject *res;
+    int type_ok;
+    if (v == NULL)
+        return PyString_FromString("<NULL>");
+    if (PyString_CheckExact(v)) {
+        Py_INCREF(v);
+        return v;
+    }
 #ifdef Py_USING_UNICODE
-	if (PyUnicode_CheckExact(v)) {
-		Py_INCREF(v);
-		return v;
-	}
+    if (PyUnicode_CheckExact(v)) {
+        Py_INCREF(v);
+        return v;
+    }
 #endif
-	if (Py_TYPE(v)->tp_str == NULL)
-		return PyObject_Repr(v);
+    if (Py_TYPE(v)->tp_str == NULL)
+        return PyObject_Repr(v);
 
-	/* It is possible for a type to have a tp_str representation that loops
-	   infinitely. */
-	if (Py_EnterRecursiveCall(" while getting the str of an object"))
-		return NULL;
-	res = (*Py_TYPE(v)->tp_str)(v);
-	Py_LeaveRecursiveCall();
-	if (res == NULL)
-		return NULL;
-	type_ok = PyString_Check(res);
+    /* It is possible for a type to have a tp_str representation that loops
+       infinitely. */
+    if (Py_EnterRecursiveCall(" while getting the str of an object"))
+        return NULL;
+    res = (*Py_TYPE(v)->tp_str)(v);
+    Py_LeaveRecursiveCall();
+    if (res == NULL)
+        return NULL;
+    type_ok = PyString_Check(res);
 #ifdef Py_USING_UNICODE
-	type_ok = type_ok || PyUnicode_Check(res);
+    type_ok = type_ok || PyUnicode_Check(res);
 #endif
-	if (!type_ok) {
-		PyErr_Format(PyExc_TypeError,
-			     "__str__ returned non-string (type %.200s)",
-			     Py_TYPE(res)->tp_name);
-		Py_DECREF(res);
-		return NULL;
-	}
-	return res;
+    if (!type_ok) {
+        PyErr_Format(PyExc_TypeError,
+                     "__str__ returned non-string (type %.200s)",
+                     Py_TYPE(res)->tp_name);
+        Py_DECREF(res);
+        return NULL;
+    }
+    return res;
 }
 
 PyObject *
 PyObject_Str(PyObject *v)
 {
-	PyObject *res = _PyObject_Str(v);
-	if (res == NULL)
-		return NULL;
+    PyObject *res = _PyObject_Str(v);
+    if (res == NULL)
+        return NULL;
 #ifdef Py_USING_UNICODE
-	if (PyUnicode_Check(res)) {
-		PyObject* str;
-		str = PyUnicode_AsEncodedString(res, NULL, NULL);
-		Py_DECREF(res);
-		if (str)
-			res = str;
-		else
-		    	return NULL;
-	}
+    if (PyUnicode_Check(res)) {
+        PyObject* str;
+        str = PyUnicode_AsEncodedString(res, NULL, NULL);
+        Py_DECREF(res);
+        if (str)
+            res = str;
+        else
+            return NULL;
+    }
 #endif
-	assert(PyString_Check(res));
-	return res;
+    assert(PyString_Check(res));
+    return res;
 }
 
 #ifdef Py_USING_UNICODE
 PyObject *
 PyObject_Unicode(PyObject *v)
 {
-	PyObject *res;
-	PyObject *func;
-	PyObject *str;
-	int unicode_method_found = 0;
-	static PyObject *unicodestr;
+    PyObject *res;
+    PyObject *func;
+    PyObject *str;
+    int unicode_method_found = 0;
+    static PyObject *unicodestr;
 
-	if (v == NULL) {
-		res = PyString_FromString("<NULL>");
-		if (res == NULL)
-			return NULL;
-		str = PyUnicode_FromEncodedObject(res, NULL, "strict");
-		Py_DECREF(res);
-		return str;
-	} else if (PyUnicode_CheckExact(v)) {
-		Py_INCREF(v);
-		return v;
-	}
+    if (v == NULL) {
+        res = PyString_FromString("<NULL>");
+        if (res == NULL)
+            return NULL;
+        str = PyUnicode_FromEncodedObject(res, NULL, "strict");
+        Py_DECREF(res);
+        return str;
+    } else if (PyUnicode_CheckExact(v)) {
+        Py_INCREF(v);
+        return v;
+    }
 
-	if (PyInstance_Check(v)) {
-		/* We're an instance of a classic class */
-		/* Try __unicode__ from the instance -- alas we have no type */
-		func = PyObject_GetAttr(v, unicodestr);
-		if (func != NULL) {
-			unicode_method_found = 1;
-			res = PyObject_CallFunctionObjArgs(func, NULL);
-			Py_DECREF(func);
-		}
-		else {
-			PyErr_Clear(); 
-		}
-	}
-	else {
-		/* Not a classic class instance, try __unicode__. */
-		func = _PyObject_LookupSpecial(v, "__unicode__", &unicodestr);
-		if (func != NULL) {
-			unicode_method_found = 1;
-			res = PyObject_CallFunctionObjArgs(func, NULL);
-			Py_DECREF(func);
-		}
-		else if (PyErr_Occurred())
-			return NULL;
-	}
+    if (PyInstance_Check(v)) {
+        /* We're an instance of a classic class */
+        /* Try __unicode__ from the instance -- alas we have no type */
+        func = PyObject_GetAttr(v, unicodestr);
+        if (func != NULL) {
+            unicode_method_found = 1;
+            res = PyObject_CallFunctionObjArgs(func, NULL);
+            Py_DECREF(func);
+        }
+        else {
+            PyErr_Clear();
+        }
+    }
+    else {
+        /* Not a classic class instance, try __unicode__. */
+        func = _PyObject_LookupSpecial(v, "__unicode__", &unicodestr);
+        if (func != NULL) {
+            unicode_method_found = 1;
+            res = PyObject_CallFunctionObjArgs(func, NULL);
+            Py_DECREF(func);
+        }
+        else if (PyErr_Occurred())
+            return NULL;
+    }
 
-	/* Didn't find __unicode__ */
-	if (!unicode_method_found) {
-		if (PyUnicode_Check(v)) {
-			/* For a Unicode subtype that's didn't overwrite __unicode__,
-			   return a true Unicode object with the same data. */
-			return PyUnicode_FromUnicode(PyUnicode_AS_UNICODE(v),
-						     PyUnicode_GET_SIZE(v));
-		}
-		if (PyString_CheckExact(v)) {
-			Py_INCREF(v);
-			res = v;
-		}
-		else {
-			if (Py_TYPE(v)->tp_str != NULL)
-				res = (*Py_TYPE(v)->tp_str)(v);
-			else
-				res = PyObject_Repr(v);
-		}
-	}
+    /* Didn't find __unicode__ */
+    if (!unicode_method_found) {
+        if (PyUnicode_Check(v)) {
+            /* For a Unicode subtype that's didn't overwrite __unicode__,
+               return a true Unicode object with the same data. */
+            return PyUnicode_FromUnicode(PyUnicode_AS_UNICODE(v),
+                                         PyUnicode_GET_SIZE(v));
+        }
+        if (PyString_CheckExact(v)) {
+            Py_INCREF(v);
+            res = v;
+        }
+        else {
+            if (Py_TYPE(v)->tp_str != NULL)
+                res = (*Py_TYPE(v)->tp_str)(v);
+            else
+                res = PyObject_Repr(v);
+        }
+    }
 
-	if (res == NULL)
-		return NULL;
-	if (!PyUnicode_Check(res)) {
-		str = PyUnicode_FromEncodedObject(res, NULL, "strict");
-		Py_DECREF(res);
-		res = str;
-	}
-	return res;
+    if (res == NULL)
+        return NULL;
+    if (!PyUnicode_Check(res)) {
+        str = PyUnicode_FromEncodedObject(res, NULL, "strict");
+        Py_DECREF(res);
+        res = str;
+    }
+    return res;
 }
 #endif
 
@@ -555,39 +555,39 @@
 static int
 adjust_tp_compare(int c)
 {
-	if (PyErr_Occurred()) {
-		if (c != -1 && c != -2) {
-			PyObject *t, *v, *tb;
-			PyErr_Fetch(&t, &v, &tb);
-			if (PyErr_Warn(PyExc_RuntimeWarning,
-				       "tp_compare didn't return -1 or -2 "
-				       "for exception") < 0) {
-				Py_XDECREF(t);
-				Py_XDECREF(v);
-				Py_XDECREF(tb);
-			}
-			else
-				PyErr_Restore(t, v, tb);
-		}
-		return -2;
-	}
-	else if (c < -1 || c > 1) {
-		if (PyErr_Warn(PyExc_RuntimeWarning,
-			       "tp_compare didn't return -1, 0 or 1") < 0)
-			return -2;
-		else
-			return c < -1 ? -1 : 1;
-	}
-	else {
-		assert(c >= -1 && c <= 1);
-		return c;
-	}
+    if (PyErr_Occurred()) {
+        if (c != -1 && c != -2) {
+            PyObject *t, *v, *tb;
+            PyErr_Fetch(&t, &v, &tb);
+            if (PyErr_Warn(PyExc_RuntimeWarning,
+                           "tp_compare didn't return -1 or -2 "
+                           "for exception") < 0) {
+                Py_XDECREF(t);
+                Py_XDECREF(v);
+                Py_XDECREF(tb);
+            }
+            else
+                PyErr_Restore(t, v, tb);
+        }
+        return -2;
+    }
+    else if (c < -1 || c > 1) {
+        if (PyErr_Warn(PyExc_RuntimeWarning,
+                       "tp_compare didn't return -1, 0 or 1") < 0)
+            return -2;
+        else
+            return c < -1 ? -1 : 1;
+    }
+    else {
+        assert(c >= -1 && c <= 1);
+        return c;
+    }
 }
 
 
 /* Macro to get the tp_richcompare field of a type if defined */
 #define RICHCOMPARE(t) (PyType_HasFeature((t), Py_TPFLAGS_HAVE_RICHCOMPARE) \
-                         ? (t)->tp_richcompare : NULL)
+             ? (t)->tp_richcompare : NULL)
 
 /* Map rich comparison operators to their swapped version, e.g. LT --> GT */
 int _Py_SwappedOp[] = {Py_GT, Py_GE, Py_EQ, Py_NE, Py_LT, Py_LE};
@@ -602,29 +602,29 @@
 static PyObject *
 try_rich_compare(PyObject *v, PyObject *w, int op)
 {
-	richcmpfunc f;
-	PyObject *res;
+    richcmpfunc f;
+    PyObject *res;
 
-	if (v->ob_type != w->ob_type &&
-	    PyType_IsSubtype(w->ob_type, v->ob_type) &&
-	    (f = RICHCOMPARE(w->ob_type)) != NULL) {
-		res = (*f)(w, v, _Py_SwappedOp[op]);
-		if (res != Py_NotImplemented)
-			return res;
-		Py_DECREF(res);
-	}
-	if ((f = RICHCOMPARE(v->ob_type)) != NULL) {
-		res = (*f)(v, w, op);
-		if (res != Py_NotImplemented)
-			return res;
-		Py_DECREF(res);
-	}
-	if ((f = RICHCOMPARE(w->ob_type)) != NULL) {
-		return (*f)(w, v, _Py_SwappedOp[op]);
-	}
-	res = Py_NotImplemented;
-	Py_INCREF(res);
-	return res;
+    if (v->ob_type != w->ob_type &&
+        PyType_IsSubtype(w->ob_type, v->ob_type) &&
+        (f = RICHCOMPARE(w->ob_type)) != NULL) {
+        res = (*f)(w, v, _Py_SwappedOp[op]);
+        if (res != Py_NotImplemented)
+            return res;
+        Py_DECREF(res);
+    }
+    if ((f = RICHCOMPARE(v->ob_type)) != NULL) {
+        res = (*f)(v, w, op);
+        if (res != Py_NotImplemented)
+            return res;
+        Py_DECREF(res);
+    }
+    if ((f = RICHCOMPARE(w->ob_type)) != NULL) {
+        return (*f)(w, v, _Py_SwappedOp[op]);
+    }
+    res = Py_NotImplemented;
+    Py_INCREF(res);
+    return res;
 }
 
 /* Try a genuine rich comparison, returning an int.  Return:
@@ -637,21 +637,21 @@
 static int
 try_rich_compare_bool(PyObject *v, PyObject *w, int op)
 {
-	PyObject *res;
-	int ok;
+    PyObject *res;
+    int ok;
 
-	if (RICHCOMPARE(v->ob_type) == NULL && RICHCOMPARE(w->ob_type) == NULL)
-		return 2; /* Shortcut, avoid INCREF+DECREF */
-	res = try_rich_compare(v, w, op);
-	if (res == NULL)
-		return -1;
-	if (res == Py_NotImplemented) {
-		Py_DECREF(res);
-		return 2;
-	}
-	ok = PyObject_IsTrue(res);
-	Py_DECREF(res);
-	return ok;
+    if (RICHCOMPARE(v->ob_type) == NULL && RICHCOMPARE(w->ob_type) == NULL)
+        return 2; /* Shortcut, avoid INCREF+DECREF */
+    res = try_rich_compare(v, w, op);
+    if (res == NULL)
+        return -1;
+    if (res == Py_NotImplemented) {
+        Py_DECREF(res);
+        return 2;
+    }
+    ok = PyObject_IsTrue(res);
+    Py_DECREF(res);
+    return ok;
 }
 
 /* Try rich comparisons to determine a 3-way comparison.  Return:
@@ -664,27 +664,27 @@
 static int
 try_rich_to_3way_compare(PyObject *v, PyObject *w)
 {
-	static struct { int op; int outcome; } tries[3] = {
-		/* Try this operator, and if it is true, use this outcome: */
-		{Py_EQ, 0},
-		{Py_LT, -1},
-		{Py_GT, 1},
-	};
-	int i;
+    static struct { int op; int outcome; } tries[3] = {
+        /* Try this operator, and if it is true, use this outcome: */
+        {Py_EQ, 0},
+        {Py_LT, -1},
+        {Py_GT, 1},
+    };
+    int i;
 
-	if (RICHCOMPARE(v->ob_type) == NULL && RICHCOMPARE(w->ob_type) == NULL)
-		return 2; /* Shortcut */
+    if (RICHCOMPARE(v->ob_type) == NULL && RICHCOMPARE(w->ob_type) == NULL)
+        return 2; /* Shortcut */
 
-	for (i = 0; i < 3; i++) {
-		switch (try_rich_compare_bool(v, w, tries[i].op)) {
-		case -1:
-			return -2;
-		case 1:
-			return tries[i].outcome;
-		}
-	}
+    for (i = 0; i < 3; i++) {
+        switch (try_rich_compare_bool(v, w, tries[i].op)) {
+        case -1:
+            return -2;
+        case 1:
+            return tries[i].outcome;
+        }
+    }
 
-	return 2;
+    return 2;
 }
 
 /* Try a 3-way comparison, returning an int.  Return:
@@ -697,55 +697,55 @@
 static int
 try_3way_compare(PyObject *v, PyObject *w)
 {
-	int c;
-	cmpfunc f;
+    int c;
+    cmpfunc f;
 
-	/* Comparisons involving instances are given to instance_compare,
-	   which has the same return conventions as this function. */
+    /* Comparisons involving instances are given to instance_compare,
+       which has the same return conventions as this function. */
 
-	f = v->ob_type->tp_compare;
-	if (PyInstance_Check(v))
-		return (*f)(v, w);
-	if (PyInstance_Check(w))
-		return (*w->ob_type->tp_compare)(v, w);
+    f = v->ob_type->tp_compare;
+    if (PyInstance_Check(v))
+        return (*f)(v, w);
+    if (PyInstance_Check(w))
+        return (*w->ob_type->tp_compare)(v, w);
 
-	/* If both have the same (non-NULL) tp_compare, use it. */
-	if (f != NULL && f == w->ob_type->tp_compare) {
-		c = (*f)(v, w);
-		return adjust_tp_compare(c);
-	}
+    /* If both have the same (non-NULL) tp_compare, use it. */
+    if (f != NULL && f == w->ob_type->tp_compare) {
+        c = (*f)(v, w);
+        return adjust_tp_compare(c);
+    }
 
-	/* If either tp_compare is _PyObject_SlotCompare, that's safe. */
-	if (f == _PyObject_SlotCompare ||
-	    w->ob_type->tp_compare == _PyObject_SlotCompare)
-		return _PyObject_SlotCompare(v, w);
+    /* If either tp_compare is _PyObject_SlotCompare, that's safe. */
+    if (f == _PyObject_SlotCompare ||
+        w->ob_type->tp_compare == _PyObject_SlotCompare)
+        return _PyObject_SlotCompare(v, w);
 
-	/* If we're here, v and w,
-	    a) are not instances;
-	    b) have different types or a type without tp_compare; and
-	    c) don't have a user-defined tp_compare.
-	   tp_compare implementations in C assume that both arguments
-	   have their type, so we give up if the coercion fails or if
-	   it yields types which are still incompatible (which can
-	   happen with a user-defined nb_coerce).
-	*/
-	c = PyNumber_CoerceEx(&v, &w);
-	if (c < 0)
-		return -2;
-	if (c > 0)
-		return 2;
-	f = v->ob_type->tp_compare;
-	if (f != NULL && f == w->ob_type->tp_compare) {
-		c = (*f)(v, w);
-		Py_DECREF(v);
-		Py_DECREF(w);
-		return adjust_tp_compare(c);
-	}
+    /* If we're here, v and w,
+        a) are not instances;
+        b) have different types or a type without tp_compare; and
+        c) don't have a user-defined tp_compare.
+       tp_compare implementations in C assume that both arguments
+       have their type, so we give up if the coercion fails or if
+       it yields types which are still incompatible (which can
+       happen with a user-defined nb_coerce).
+    */
+    c = PyNumber_CoerceEx(&v, &w);
+    if (c < 0)
+        return -2;
+    if (c > 0)
+        return 2;
+    f = v->ob_type->tp_compare;
+    if (f != NULL && f == w->ob_type->tp_compare) {
+        c = (*f)(v, w);
+        Py_DECREF(v);
+        Py_DECREF(w);
+        return adjust_tp_compare(c);
+    }
 
-	/* No comparison defined */
-	Py_DECREF(v);
-	Py_DECREF(w);
-	return 2;
+    /* No comparison defined */
+    Py_DECREF(v);
+    Py_DECREF(w);
+    return 2;
 }
 
 /* Final fallback 3-way comparison, returning an int.  Return:
@@ -757,43 +757,43 @@
 static int
 default_3way_compare(PyObject *v, PyObject *w)
 {
-	int c;
-	const char *vname, *wname;
+    int c;
+    const char *vname, *wname;
 
-	if (v->ob_type == w->ob_type) {
-		/* When comparing these pointers, they must be cast to
-		 * integer types (i.e. Py_uintptr_t, our spelling of C9X's
-		 * uintptr_t).  ANSI specifies that pointer compares other
-		 * than == and != to non-related structures are undefined.
-		 */
-		Py_uintptr_t vv = (Py_uintptr_t)v;
-		Py_uintptr_t ww = (Py_uintptr_t)w;
-		return (vv < ww) ? -1 : (vv > ww) ? 1 : 0;
-	}
+    if (v->ob_type == w->ob_type) {
+        /* When comparing these pointers, they must be cast to
+         * integer types (i.e. Py_uintptr_t, our spelling of C9X's
+         * uintptr_t).  ANSI specifies that pointer compares other
+         * than == and != to non-related structures are undefined.
+         */
+        Py_uintptr_t vv = (Py_uintptr_t)v;
+        Py_uintptr_t ww = (Py_uintptr_t)w;
+        return (vv < ww) ? -1 : (vv > ww) ? 1 : 0;
+    }
 
-	/* None is smaller than anything */
-	if (v == Py_None)
-		return -1;
-	if (w == Py_None)
-		return 1;
+    /* None is smaller than anything */
+    if (v == Py_None)
+        return -1;
+    if (w == Py_None)
+        return 1;
 
-	/* different type: compare type names; numbers are smaller */
-	if (PyNumber_Check(v))
-		vname = "";
-	else
-		vname = v->ob_type->tp_name;
-	if (PyNumber_Check(w))
-		wname = "";
-	else
-		wname = w->ob_type->tp_name;
-	c = strcmp(vname, wname);
-	if (c < 0)
-		return -1;
-	if (c > 0)
-		return 1;
-	/* Same type name, or (more likely) incomparable numeric types */
-	return ((Py_uintptr_t)(v->ob_type) < (
-		Py_uintptr_t)(w->ob_type)) ? -1 : 1;
+    /* different type: compare type names; numbers are smaller */
+    if (PyNumber_Check(v))
+        vname = "";
+    else
+        vname = v->ob_type->tp_name;
+    if (PyNumber_Check(w))
+        wname = "";
+    else
+        wname = w->ob_type->tp_name;
+    c = strcmp(vname, wname);
+    if (c < 0)
+        return -1;
+    if (c > 0)
+        return 1;
+    /* Same type name, or (more likely) incomparable numeric types */
+    return ((Py_uintptr_t)(v->ob_type) < (
+        Py_uintptr_t)(w->ob_type)) ? -1 : 1;
 }
 
 /* Do a 3-way comparison, by hook or by crook.  Return:
@@ -807,35 +807,35 @@
 static int
 do_cmp(PyObject *v, PyObject *w)
 {
-	int c;
-	cmpfunc f;
+    int c;
+    cmpfunc f;
 
-	if (v->ob_type == w->ob_type
-	    && (f = v->ob_type->tp_compare) != NULL) {
-		c = (*f)(v, w);
-		if (PyInstance_Check(v)) {
-			/* Instance tp_compare has a different signature.
-			   But if it returns undefined we fall through. */
-			if (c != 2)
-				return c;
-			/* Else fall through to try_rich_to_3way_compare() */
-		}
-		else
-			return adjust_tp_compare(c);
-	}
-	/* We only get here if one of the following is true:
-	   a) v and w have different types
-	   b) v and w have the same type, which doesn't have tp_compare
-	   c) v and w are instances, and either __cmp__ is not defined or
-	      __cmp__ returns NotImplemented
-	*/
-	c = try_rich_to_3way_compare(v, w);
-	if (c < 2)
-		return c;
-	c = try_3way_compare(v, w);
-	if (c < 2)
-		return c;
-	return default_3way_compare(v, w);
+    if (v->ob_type == w->ob_type
+        && (f = v->ob_type->tp_compare) != NULL) {
+        c = (*f)(v, w);
+        if (PyInstance_Check(v)) {
+            /* Instance tp_compare has a different signature.
+               But if it returns undefined we fall through. */
+            if (c != 2)
+                return c;
+            /* Else fall through to try_rich_to_3way_compare() */
+        }
+        else
+            return adjust_tp_compare(c);
+    }
+    /* We only get here if one of the following is true:
+       a) v and w have different types
+       b) v and w have the same type, which doesn't have tp_compare
+       c) v and w are instances, and either __cmp__ is not defined or
+          __cmp__ returns NotImplemented
+    */
+    c = try_rich_to_3way_compare(v, w);
+    if (c < 2)
+        return c;
+    c = try_3way_compare(v, w);
+    if (c < 2)
+        return c;
+    return default_3way_compare(v, w);
 }
 
 /* Compare v to w.  Return
@@ -848,37 +848,37 @@
 int
 PyObject_Compare(PyObject *v, PyObject *w)
 {
-	int result;
+    int result;
 
-	if (v == NULL || w == NULL) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (v == w)
-		return 0;
-	if (Py_EnterRecursiveCall(" in cmp"))
-		return -1;
-	result = do_cmp(v, w);
-	Py_LeaveRecursiveCall();
-	return result < 0 ? -1 : result;
+    if (v == NULL || w == NULL) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (v == w)
+        return 0;
+    if (Py_EnterRecursiveCall(" in cmp"))
+        return -1;
+    result = do_cmp(v, w);
+    Py_LeaveRecursiveCall();
+    return result < 0 ? -1 : result;
 }
 
 /* Return (new reference to) Py_True or Py_False. */
 static PyObject *
 convert_3way_to_object(int op, int c)
 {
-	PyObject *result;
-	switch (op) {
-	case Py_LT: c = c <  0; break;
-	case Py_LE: c = c <= 0; break;
-	case Py_EQ: c = c == 0; break;
-	case Py_NE: c = c != 0; break;
-	case Py_GT: c = c >  0; break;
-	case Py_GE: c = c >= 0; break;
-	}
-	result = c ? Py_True : Py_False;
-	Py_INCREF(result);
-	return result;
+    PyObject *result;
+    switch (op) {
+    case Py_LT: c = c <  0; break;
+    case Py_LE: c = c <= 0; break;
+    case Py_EQ: c = c == 0; break;
+    case Py_NE: c = c != 0; break;
+    case Py_GT: c = c >  0; break;
+    case Py_GE: c = c >= 0; break;
+    }
+    result = c ? Py_True : Py_False;
+    Py_INCREF(result);
+    return result;
 }
 
 /* We want a rich comparison but don't have one.  Try a 3-way cmp instead.
@@ -890,25 +890,25 @@
 static PyObject *
 try_3way_to_rich_compare(PyObject *v, PyObject *w, int op)
 {
-	int c;
+    int c;
 
-	c = try_3way_compare(v, w);
-	if (c >= 2) {
+    c = try_3way_compare(v, w);
+    if (c >= 2) {
 
-		/* Py3K warning if types are not equal and comparison isn't == or !=  */
-		if (Py_Py3kWarningFlag &&
-		    v->ob_type != w->ob_type && op != Py_EQ && op != Py_NE &&
-		    PyErr_WarnEx(PyExc_DeprecationWarning,
-			       "comparing unequal types not supported "
-			       "in 3.x", 1) < 0) {
-			return NULL;
-		}
+        /* Py3K warning if types are not equal and comparison isn't == or !=  */
+        if (Py_Py3kWarningFlag &&
+            v->ob_type != w->ob_type && op != Py_EQ && op != Py_NE &&
+            PyErr_WarnEx(PyExc_DeprecationWarning,
+                       "comparing unequal types not supported "
+                       "in 3.x", 1) < 0) {
+            return NULL;
+        }
 
-		c = default_3way_compare(v, w);
-	}
-	if (c <= -2)
-		return NULL;
-	return convert_3way_to_object(op, c);
+        c = default_3way_compare(v, w);
+    }
+    if (c <= -2)
+        return NULL;
+    return convert_3way_to_object(op, c);
 }
 
 /* Do rich comparison on v and w.  Return
@@ -920,14 +920,14 @@
 static PyObject *
 do_richcmp(PyObject *v, PyObject *w, int op)
 {
-	PyObject *res;
+    PyObject *res;
 
-	res = try_rich_compare(v, w, op);
-	if (res != Py_NotImplemented)
-		return res;
-	Py_DECREF(res);
+    res = try_rich_compare(v, w, op);
+    if (res != Py_NotImplemented)
+        return res;
+    Py_DECREF(res);
 
-	return try_3way_to_rich_compare(v, w, op);
+    return try_3way_to_rich_compare(v, w, op);
 }
 
 /* Return:
@@ -938,77 +938,77 @@
 PyObject *
 PyObject_RichCompare(PyObject *v, PyObject *w, int op)
 {
-	PyObject *res;
+    PyObject *res;
 
-	assert(Py_LT <= op && op <= Py_GE);
-	if (Py_EnterRecursiveCall(" in cmp"))
-		return NULL;
+    assert(Py_LT <= op && op <= Py_GE);
+    if (Py_EnterRecursiveCall(" in cmp"))
+        return NULL;
 
-	/* If the types are equal, and not old-style instances, try to
-	   get out cheap (don't bother with coercions etc.). */
-	if (v->ob_type == w->ob_type && !PyInstance_Check(v)) {
-		cmpfunc fcmp;
-		richcmpfunc frich = RICHCOMPARE(v->ob_type);
-		/* If the type has richcmp, try it first.  try_rich_compare
-		   tries it two-sided, which is not needed since we've a
-		   single type only. */
-		if (frich != NULL) {
-			res = (*frich)(v, w, op);
-			if (res != Py_NotImplemented)
-				goto Done;
-			Py_DECREF(res);
-		}
-		/* No richcmp, or this particular richmp not implemented.
-		   Try 3-way cmp. */
-		fcmp = v->ob_type->tp_compare;
-		if (fcmp != NULL) {
-			int c = (*fcmp)(v, w);
-			c = adjust_tp_compare(c);
-			if (c == -2) {
-				res = NULL;
-				goto Done;
-			}
-			res = convert_3way_to_object(op, c);
-			goto Done;
-		}
-	}
+    /* If the types are equal, and not old-style instances, try to
+       get out cheap (don't bother with coercions etc.). */
+    if (v->ob_type == w->ob_type && !PyInstance_Check(v)) {
+        cmpfunc fcmp;
+        richcmpfunc frich = RICHCOMPARE(v->ob_type);
+        /* If the type has richcmp, try it first.  try_rich_compare
+           tries it two-sided, which is not needed since we've a
+           single type only. */
+        if (frich != NULL) {
+            res = (*frich)(v, w, op);
+            if (res != Py_NotImplemented)
+                goto Done;
+            Py_DECREF(res);
+        }
+        /* No richcmp, or this particular richmp not implemented.
+           Try 3-way cmp. */
+        fcmp = v->ob_type->tp_compare;
+        if (fcmp != NULL) {
+            int c = (*fcmp)(v, w);
+            c = adjust_tp_compare(c);
+            if (c == -2) {
+                res = NULL;
+                goto Done;
+            }
+            res = convert_3way_to_object(op, c);
+            goto Done;
+        }
+    }
 
-	/* Fast path not taken, or couldn't deliver a useful result. */
-	res = do_richcmp(v, w, op);
+    /* Fast path not taken, or couldn't deliver a useful result. */
+    res = do_richcmp(v, w, op);
 Done:
-	Py_LeaveRecursiveCall();
-	return res;
+    Py_LeaveRecursiveCall();
+    return res;
 }
 
 /* Return -1 if error; 1 if v op w; 0 if not (v op w). */
 int
 PyObject_RichCompareBool(PyObject *v, PyObject *w, int op)
 {
-	PyObject *res;
-	int ok;
+    PyObject *res;
+    int ok;
 
-	/* Quick result when objects are the same.
-	   Guarantees that identity implies equality. */
-	if (v == w) {
-		if (op == Py_EQ)
-			return 1;
-		else if (op == Py_NE)
-			return 0;
-	}
+    /* Quick result when objects are the same.
+       Guarantees that identity implies equality. */
+    if (v == w) {
+        if (op == Py_EQ)
+            return 1;
+        else if (op == Py_NE)
+            return 0;
+    }
 
-	res = PyObject_RichCompare(v, w, op);
-	if (res == NULL)
-		return -1;
-	if (PyBool_Check(res))
-		ok = (res == Py_True);
-	else
-		ok = PyObject_IsTrue(res);
-	Py_DECREF(res);
-	return ok;
+    res = PyObject_RichCompare(v, w, op);
+    if (res == NULL)
+        return -1;
+    if (PyBool_Check(res))
+        ok = (res == Py_True);
+    else
+        ok = PyObject_IsTrue(res);
+    Py_DECREF(res);
+    return ok;
 }
 
 /* Set of hash utility functions to help maintaining the invariant that
-	if a==b then hash(a)==hash(b)
+    if a==b then hash(a)==hash(b)
 
    All the utility functions (_Py_Hash*()) return "-1" to signify an error.
 */
@@ -1016,252 +1016,252 @@
 long
 _Py_HashDouble(double v)
 {
-	double intpart, fractpart;
-	int expo;
-	long hipart;
-	long x;		/* the final hash value */
-	/* This is designed so that Python numbers of different types
-	 * that compare equal hash to the same value; otherwise comparisons
-	 * of mapping keys will turn out weird.
-	 */
+    double intpart, fractpart;
+    int expo;
+    long hipart;
+    long x;             /* the final hash value */
+    /* This is designed so that Python numbers of different types
+     * that compare equal hash to the same value; otherwise comparisons
+     * of mapping keys will turn out weird.
+     */
 
-	if (!Py_IS_FINITE(v)) {
-		if (Py_IS_INFINITY(v))
-			return v < 0 ? -271828 : 314159;
-		else
-			return 0;
-	}
-	fractpart = modf(v, &intpart);
-	if (fractpart == 0.0) {
-		/* This must return the same hash as an equal int or long. */
-		if (intpart > LONG_MAX/2 || -intpart > LONG_MAX/2) {
-			/* Convert to long and use its hash. */
-			PyObject *plong;	/* converted to Python long */
-			plong = PyLong_FromDouble(v);
-			if (plong == NULL)
-				return -1;
-			x = PyObject_Hash(plong);
-			Py_DECREF(plong);
-			return x;
-		}
-		/* Fits in a C long == a Python int, so is its own hash. */
-		x = (long)intpart;
-		if (x == -1)
-			x = -2;
-		return x;
-	}
-	/* The fractional part is non-zero, so we don't have to worry about
-	 * making this match the hash of some other type.
-	 * Use frexp to get at the bits in the double.
-	 * Since the VAX D double format has 56 mantissa bits, which is the
-	 * most of any double format in use, each of these parts may have as
-	 * many as (but no more than) 56 significant bits.
-	 * So, assuming sizeof(long) >= 4, each part can be broken into two
-	 * longs; frexp and multiplication are used to do that.
-	 * Also, since the Cray double format has 15 exponent bits, which is
-	 * the most of any double format in use, shifting the exponent field
-	 * left by 15 won't overflow a long (again assuming sizeof(long) >= 4).
-	 */
-	v = frexp(v, &expo);
-	v *= 2147483648.0;	/* 2**31 */
-	hipart = (long)v;	/* take the top 32 bits */
-	v = (v - (double)hipart) * 2147483648.0; /* get the next 32 bits */
-	x = hipart + (long)v + (expo << 15);
-	if (x == -1)
-		x = -2;
-	return x;
+    if (!Py_IS_FINITE(v)) {
+        if (Py_IS_INFINITY(v))
+            return v < 0 ? -271828 : 314159;
+        else
+            return 0;
+    }
+    fractpart = modf(v, &intpart);
+    if (fractpart == 0.0) {
+        /* This must return the same hash as an equal int or long. */
+        if (intpart > LONG_MAX/2 || -intpart > LONG_MAX/2) {
+            /* Convert to long and use its hash. */
+            PyObject *plong;                    /* converted to Python long */
+            plong = PyLong_FromDouble(v);
+            if (plong == NULL)
+                return -1;
+            x = PyObject_Hash(plong);
+            Py_DECREF(plong);
+            return x;
+        }
+        /* Fits in a C long == a Python int, so is its own hash. */
+        x = (long)intpart;
+        if (x == -1)
+            x = -2;
+        return x;
+    }
+    /* The fractional part is non-zero, so we don't have to worry about
+     * making this match the hash of some other type.
+     * Use frexp to get at the bits in the double.
+     * Since the VAX D double format has 56 mantissa bits, which is the
+     * most of any double format in use, each of these parts may have as
+     * many as (but no more than) 56 significant bits.
+     * So, assuming sizeof(long) >= 4, each part can be broken into two
+     * longs; frexp and multiplication are used to do that.
+     * Also, since the Cray double format has 15 exponent bits, which is
+     * the most of any double format in use, shifting the exponent field
+     * left by 15 won't overflow a long (again assuming sizeof(long) >= 4).
+     */
+    v = frexp(v, &expo);
+    v *= 2147483648.0;          /* 2**31 */
+    hipart = (long)v;           /* take the top 32 bits */
+    v = (v - (double)hipart) * 2147483648.0; /* get the next 32 bits */
+    x = hipart + (long)v + (expo << 15);
+    if (x == -1)
+        x = -2;
+    return x;
 }
 
 long
 _Py_HashPointer(void *p)
 {
-	long x;
-	size_t y = (size_t)p;
-	/* bottom 3 or 4 bits are likely to be 0; rotate y by 4 to avoid
-	   excessive hash collisions for dicts and sets */
-	y = (y >> 4) | (y << (8 * SIZEOF_VOID_P - 4));
-	x = (long)y;
-	if (x == -1)
-		x = -2;
-	return x;
+    long x;
+    size_t y = (size_t)p;
+    /* bottom 3 or 4 bits are likely to be 0; rotate y by 4 to avoid
+       excessive hash collisions for dicts and sets */
+    y = (y >> 4) | (y << (8 * SIZEOF_VOID_P - 4));
+    x = (long)y;
+    if (x == -1)
+        x = -2;
+    return x;
 }
 
 long
 PyObject_HashNotImplemented(PyObject *self)
 {
-	PyErr_Format(PyExc_TypeError, "unhashable type: '%.200s'",
-		     self->ob_type->tp_name);
-	return -1;
+    PyErr_Format(PyExc_TypeError, "unhashable type: '%.200s'",
+                 self->ob_type->tp_name);
+    return -1;
 }
 
 long
 PyObject_Hash(PyObject *v)
 {
-	PyTypeObject *tp = v->ob_type;
-	if (tp->tp_hash != NULL)
-		return (*tp->tp_hash)(v);
-	/* To keep to the general practice that inheriting
-	 * solely from object in C code should work without
-	 * an explicit call to PyType_Ready, we implicitly call
-	 * PyType_Ready here and then check the tp_hash slot again
-	 */
-	if (tp->tp_dict == NULL) {
-		if (PyType_Ready(tp) < 0)
-			return -1;
-		if (tp->tp_hash != NULL)
-			return (*tp->tp_hash)(v);
-	}
-	if (tp->tp_compare == NULL && RICHCOMPARE(tp) == NULL) {
-		return _Py_HashPointer(v); /* Use address as hash value */
-	}
-	/* If there's a cmp but no hash defined, the object can't be hashed */
-	return PyObject_HashNotImplemented(v);
+    PyTypeObject *tp = v->ob_type;
+    if (tp->tp_hash != NULL)
+        return (*tp->tp_hash)(v);
+    /* To keep to the general practice that inheriting
+     * solely from object in C code should work without
+     * an explicit call to PyType_Ready, we implicitly call
+     * PyType_Ready here and then check the tp_hash slot again
+     */
+    if (tp->tp_dict == NULL) {
+        if (PyType_Ready(tp) < 0)
+            return -1;
+        if (tp->tp_hash != NULL)
+            return (*tp->tp_hash)(v);
+    }
+    if (tp->tp_compare == NULL && RICHCOMPARE(tp) == NULL) {
+        return _Py_HashPointer(v); /* Use address as hash value */
+    }
+    /* If there's a cmp but no hash defined, the object can't be hashed */
+    return PyObject_HashNotImplemented(v);
 }
 
 PyObject *
 PyObject_GetAttrString(PyObject *v, const char *name)
 {
-	PyObject *w, *res;
+    PyObject *w, *res;
 
-	if (Py_TYPE(v)->tp_getattr != NULL)
-		return (*Py_TYPE(v)->tp_getattr)(v, (char*)name);
-	w = PyString_InternFromString(name);
-	if (w == NULL)
-		return NULL;
-	res = PyObject_GetAttr(v, w);
-	Py_XDECREF(w);
-	return res;
+    if (Py_TYPE(v)->tp_getattr != NULL)
+        return (*Py_TYPE(v)->tp_getattr)(v, (char*)name);
+    w = PyString_InternFromString(name);
+    if (w == NULL)
+        return NULL;
+    res = PyObject_GetAttr(v, w);
+    Py_XDECREF(w);
+    return res;
 }
 
 int
 PyObject_HasAttrString(PyObject *v, const char *name)
 {
-	PyObject *res = PyObject_GetAttrString(v, name);
-	if (res != NULL) {
-		Py_DECREF(res);
-		return 1;
-	}
-	PyErr_Clear();
-	return 0;
+    PyObject *res = PyObject_GetAttrString(v, name);
+    if (res != NULL) {
+        Py_DECREF(res);
+        return 1;
+    }
+    PyErr_Clear();
+    return 0;
 }
 
 int
 PyObject_SetAttrString(PyObject *v, const char *name, PyObject *w)
 {
-	PyObject *s;
-	int res;
+    PyObject *s;
+    int res;
 
-	if (Py_TYPE(v)->tp_setattr != NULL)
-		return (*Py_TYPE(v)->tp_setattr)(v, (char*)name, w);
-	s = PyString_InternFromString(name);
-	if (s == NULL)
-		return -1;
-	res = PyObject_SetAttr(v, s, w);
-	Py_XDECREF(s);
-	return res;
+    if (Py_TYPE(v)->tp_setattr != NULL)
+        return (*Py_TYPE(v)->tp_setattr)(v, (char*)name, w);
+    s = PyString_InternFromString(name);
+    if (s == NULL)
+        return -1;
+    res = PyObject_SetAttr(v, s, w);
+    Py_XDECREF(s);
+    return res;
 }
 
 PyObject *
 PyObject_GetAttr(PyObject *v, PyObject *name)
 {
-	PyTypeObject *tp = Py_TYPE(v);
+    PyTypeObject *tp = Py_TYPE(v);
 
-	if (!PyString_Check(name)) {
+    if (!PyString_Check(name)) {
 #ifdef Py_USING_UNICODE
-		/* The Unicode to string conversion is done here because the
-		   existing tp_getattro slots expect a string object as name
-		   and we wouldn't want to break those. */
-		if (PyUnicode_Check(name)) {
-			name = _PyUnicode_AsDefaultEncodedString(name, NULL);
-			if (name == NULL)
-				return NULL;
-		}
-		else
+        /* The Unicode to string conversion is done here because the
+           existing tp_getattro slots expect a string object as name
+           and we wouldn't want to break those. */
+        if (PyUnicode_Check(name)) {
+            name = _PyUnicode_AsDefaultEncodedString(name, NULL);
+            if (name == NULL)
+                return NULL;
+        }
+        else
 #endif
-		{
-			PyErr_Format(PyExc_TypeError,
-				     "attribute name must be string, not '%.200s'",
-				     Py_TYPE(name)->tp_name);
-			return NULL;
-		}
-	}
-	if (tp->tp_getattro != NULL)
-		return (*tp->tp_getattro)(v, name);
-	if (tp->tp_getattr != NULL)
-		return (*tp->tp_getattr)(v, PyString_AS_STRING(name));
-	PyErr_Format(PyExc_AttributeError,
-		     "'%.50s' object has no attribute '%.400s'",
-		     tp->tp_name, PyString_AS_STRING(name));
-	return NULL;
+        {
+            PyErr_Format(PyExc_TypeError,
+                         "attribute name must be string, not '%.200s'",
+                         Py_TYPE(name)->tp_name);
+            return NULL;
+        }
+    }
+    if (tp->tp_getattro != NULL)
+        return (*tp->tp_getattro)(v, name);
+    if (tp->tp_getattr != NULL)
+        return (*tp->tp_getattr)(v, PyString_AS_STRING(name));
+    PyErr_Format(PyExc_AttributeError,
+                 "'%.50s' object has no attribute '%.400s'",
+                 tp->tp_name, PyString_AS_STRING(name));
+    return NULL;
 }
 
 int
 PyObject_HasAttr(PyObject *v, PyObject *name)
 {
-	PyObject *res = PyObject_GetAttr(v, name);
-	if (res != NULL) {
-		Py_DECREF(res);
-		return 1;
-	}
-	PyErr_Clear();
-	return 0;
+    PyObject *res = PyObject_GetAttr(v, name);
+    if (res != NULL) {
+        Py_DECREF(res);
+        return 1;
+    }
+    PyErr_Clear();
+    return 0;
 }
 
 int
 PyObject_SetAttr(PyObject *v, PyObject *name, PyObject *value)
 {
-	PyTypeObject *tp = Py_TYPE(v);
-	int err;
+    PyTypeObject *tp = Py_TYPE(v);
+    int err;
 
-	if (!PyString_Check(name)){
+    if (!PyString_Check(name)){
 #ifdef Py_USING_UNICODE
-		/* The Unicode to string conversion is done here because the
-		   existing tp_setattro slots expect a string object as name
-		   and we wouldn't want to break those. */
-		if (PyUnicode_Check(name)) {
-			name = PyUnicode_AsEncodedString(name, NULL, NULL);
-			if (name == NULL)
-				return -1;
-		}
-		else
+        /* The Unicode to string conversion is done here because the
+           existing tp_setattro slots expect a string object as name
+           and we wouldn't want to break those. */
+        if (PyUnicode_Check(name)) {
+            name = PyUnicode_AsEncodedString(name, NULL, NULL);
+            if (name == NULL)
+                return -1;
+        }
+        else
 #endif
-		{
-			PyErr_Format(PyExc_TypeError,
-				     "attribute name must be string, not '%.200s'",
-				     Py_TYPE(name)->tp_name);
-			return -1;
-		}
-	}
-	else
-		Py_INCREF(name);
+        {
+            PyErr_Format(PyExc_TypeError,
+                         "attribute name must be string, not '%.200s'",
+                         Py_TYPE(name)->tp_name);
+            return -1;
+        }
+    }
+    else
+        Py_INCREF(name);
 
-	PyString_InternInPlace(&name);
-	if (tp->tp_setattro != NULL) {
-		err = (*tp->tp_setattro)(v, name, value);
-		Py_DECREF(name);
-		return err;
-	}
-	if (tp->tp_setattr != NULL) {
-		err = (*tp->tp_setattr)(v, PyString_AS_STRING(name), value);
-		Py_DECREF(name);
-		return err;
-	}
-	Py_DECREF(name);
-	if (tp->tp_getattr == NULL && tp->tp_getattro == NULL)
-		PyErr_Format(PyExc_TypeError,
-			     "'%.100s' object has no attributes "
-			     "(%s .%.100s)",
-			     tp->tp_name,
-			     value==NULL ? "del" : "assign to",
-			     PyString_AS_STRING(name));
-	else
-		PyErr_Format(PyExc_TypeError,
-			     "'%.100s' object has only read-only attributes "
-			     "(%s .%.100s)",
-			     tp->tp_name,
-			     value==NULL ? "del" : "assign to",
-			     PyString_AS_STRING(name));
-	return -1;
+    PyString_InternInPlace(&name);
+    if (tp->tp_setattro != NULL) {
+        err = (*tp->tp_setattro)(v, name, value);
+        Py_DECREF(name);
+        return err;
+    }
+    if (tp->tp_setattr != NULL) {
+        err = (*tp->tp_setattr)(v, PyString_AS_STRING(name), value);
+        Py_DECREF(name);
+        return err;
+    }
+    Py_DECREF(name);
+    if (tp->tp_getattr == NULL && tp->tp_getattro == NULL)
+        PyErr_Format(PyExc_TypeError,
+                     "'%.100s' object has no attributes "
+                     "(%s .%.100s)",
+                     tp->tp_name,
+                     value==NULL ? "del" : "assign to",
+                     PyString_AS_STRING(name));
+    else
+        PyErr_Format(PyExc_TypeError,
+                     "'%.100s' object has only read-only attributes "
+                     "(%s .%.100s)",
+                     tp->tp_name,
+                     value==NULL ? "del" : "assign to",
+                     PyString_AS_STRING(name));
+    return -1;
 }
 
 /* Helper to get a pointer to an object's __dict__ slot, if any */
@@ -1269,35 +1269,35 @@
 PyObject **
 _PyObject_GetDictPtr(PyObject *obj)
 {
-	Py_ssize_t dictoffset;
-	PyTypeObject *tp = Py_TYPE(obj);
+    Py_ssize_t dictoffset;
+    PyTypeObject *tp = Py_TYPE(obj);
 
-	if (!(tp->tp_flags & Py_TPFLAGS_HAVE_CLASS))
-		return NULL;
-	dictoffset = tp->tp_dictoffset;
-	if (dictoffset == 0)
-		return NULL;
-	if (dictoffset < 0) {
-		Py_ssize_t tsize;
-		size_t size;
+    if (!(tp->tp_flags & Py_TPFLAGS_HAVE_CLASS))
+        return NULL;
+    dictoffset = tp->tp_dictoffset;
+    if (dictoffset == 0)
+        return NULL;
+    if (dictoffset < 0) {
+        Py_ssize_t tsize;
+        size_t size;
 
-		tsize = ((PyVarObject *)obj)->ob_size;
-		if (tsize < 0)
-			tsize = -tsize;
-		size = _PyObject_VAR_SIZE(tp, tsize);
+        tsize = ((PyVarObject *)obj)->ob_size;
+        if (tsize < 0)
+            tsize = -tsize;
+        size = _PyObject_VAR_SIZE(tp, tsize);
 
-		dictoffset += (long)size;
-		assert(dictoffset > 0);
-		assert(dictoffset % SIZEOF_VOID_P == 0);
-	}
-	return (PyObject **) ((char *)obj + dictoffset);
+        dictoffset += (long)size;
+        assert(dictoffset > 0);
+        assert(dictoffset % SIZEOF_VOID_P == 0);
+    }
+    return (PyObject **) ((char *)obj + dictoffset);
 }
 
 PyObject *
 PyObject_SelfIter(PyObject *obj)
 {
-	Py_INCREF(obj);
-	return obj;
+    Py_INCREF(obj);
+    return obj;
 }
 
 /* Helper used when the __next__ method is removed from a type:
@@ -1308,10 +1308,10 @@
 PyObject *
 _PyObject_NextNotImplemented(PyObject *self)
 {
-	PyErr_Format(PyExc_TypeError,
-		     "'%.200s' object is not iterable",
-		     Py_TYPE(self)->tp_name);
-	return NULL;
+    PyErr_Format(PyExc_TypeError,
+                 "'%.200s' object is not iterable",
+                 Py_TYPE(self)->tp_name);
+    return NULL;
 }
 
 /* Generic GetAttr functions - put these in your tp_[gs]etattro slot */
@@ -1319,221 +1319,221 @@
 PyObject *
 PyObject_GenericGetAttr(PyObject *obj, PyObject *name)
 {
-	PyTypeObject *tp = Py_TYPE(obj);
-	PyObject *descr = NULL;
-	PyObject *res = NULL;
-	descrgetfunc f;
-	Py_ssize_t dictoffset;
-	PyObject **dictptr;
+    PyTypeObject *tp = Py_TYPE(obj);
+    PyObject *descr = NULL;
+    PyObject *res = NULL;
+    descrgetfunc f;
+    Py_ssize_t dictoffset;
+    PyObject **dictptr;
 
-	if (!PyString_Check(name)){
+    if (!PyString_Check(name)){
 #ifdef Py_USING_UNICODE
-		/* The Unicode to string conversion is done here because the
-		   existing tp_setattro slots expect a string object as name
-		   and we wouldn't want to break those. */
-		if (PyUnicode_Check(name)) {
-			name = PyUnicode_AsEncodedString(name, NULL, NULL);
-			if (name == NULL)
-				return NULL;
-		}
-		else
+        /* The Unicode to string conversion is done here because the
+           existing tp_setattro slots expect a string object as name
+           and we wouldn't want to break those. */
+        if (PyUnicode_Check(name)) {
+            name = PyUnicode_AsEncodedString(name, NULL, NULL);
+            if (name == NULL)
+                return NULL;
+        }
+        else
 #endif
-		{
-			PyErr_Format(PyExc_TypeError,
-				     "attribute name must be string, not '%.200s'",
-				     Py_TYPE(name)->tp_name);
-			return NULL;
-		}
-	}
-	else
-		Py_INCREF(name);
+        {
+            PyErr_Format(PyExc_TypeError,
+                         "attribute name must be string, not '%.200s'",
+                         Py_TYPE(name)->tp_name);
+            return NULL;
+        }
+    }
+    else
+        Py_INCREF(name);
 
-	if (tp->tp_dict == NULL) {
-		if (PyType_Ready(tp) < 0)
-			goto done;
-	}
+    if (tp->tp_dict == NULL) {
+        if (PyType_Ready(tp) < 0)
+            goto done;
+    }
 
 #if 0 /* XXX this is not quite _PyType_Lookup anymore */
-	/* Inline _PyType_Lookup */
-	{
-		Py_ssize_t i, n;
-		PyObject *mro, *base, *dict;
+    /* Inline _PyType_Lookup */
+    {
+        Py_ssize_t i, n;
+        PyObject *mro, *base, *dict;
 
-		/* Look in tp_dict of types in MRO */
-		mro = tp->tp_mro;
-		assert(mro != NULL);
-		assert(PyTuple_Check(mro));
-		n = PyTuple_GET_SIZE(mro);
-		for (i = 0; i < n; i++) {
-			base = PyTuple_GET_ITEM(mro, i);
-			if (PyClass_Check(base))
-				dict = ((PyClassObject *)base)->cl_dict;
-			else {
-				assert(PyType_Check(base));
-				dict = ((PyTypeObject *)base)->tp_dict;
-			}
-			assert(dict && PyDict_Check(dict));
-			descr = PyDict_GetItem(dict, name);
-			if (descr != NULL)
-				break;
-		}
-	}
+        /* Look in tp_dict of types in MRO */
+        mro = tp->tp_mro;
+        assert(mro != NULL);
+        assert(PyTuple_Check(mro));
+        n = PyTuple_GET_SIZE(mro);
+        for (i = 0; i < n; i++) {
+            base = PyTuple_GET_ITEM(mro, i);
+            if (PyClass_Check(base))
+                dict = ((PyClassObject *)base)->cl_dict;
+            else {
+                assert(PyType_Check(base));
+                dict = ((PyTypeObject *)base)->tp_dict;
+            }
+            assert(dict && PyDict_Check(dict));
+            descr = PyDict_GetItem(dict, name);
+            if (descr != NULL)
+                break;
+        }
+    }
 #else
-	descr = _PyType_Lookup(tp, name);
+    descr = _PyType_Lookup(tp, name);
 #endif
 
-	Py_XINCREF(descr);
+    Py_XINCREF(descr);
 
-	f = NULL;
-	if (descr != NULL &&
-	    PyType_HasFeature(descr->ob_type, Py_TPFLAGS_HAVE_CLASS)) {
-		f = descr->ob_type->tp_descr_get;
-		if (f != NULL && PyDescr_IsData(descr)) {
-			res = f(descr, obj, (PyObject *)obj->ob_type);
-			Py_DECREF(descr);
-			goto done;
-		}
-	}
+    f = NULL;
+    if (descr != NULL &&
+        PyType_HasFeature(descr->ob_type, Py_TPFLAGS_HAVE_CLASS)) {
+        f = descr->ob_type->tp_descr_get;
+        if (f != NULL && PyDescr_IsData(descr)) {
+            res = f(descr, obj, (PyObject *)obj->ob_type);
+            Py_DECREF(descr);
+            goto done;
+        }
+    }
 
-	/* Inline _PyObject_GetDictPtr */
-	dictoffset = tp->tp_dictoffset;
-	if (dictoffset != 0) {
-		PyObject *dict;
-		if (dictoffset < 0) {
-			Py_ssize_t tsize;
-			size_t size;
+    /* Inline _PyObject_GetDictPtr */
+    dictoffset = tp->tp_dictoffset;
+    if (dictoffset != 0) {
+        PyObject *dict;
+        if (dictoffset < 0) {
+            Py_ssize_t tsize;
+            size_t size;
 
-			tsize = ((PyVarObject *)obj)->ob_size;
-			if (tsize < 0)
-				tsize = -tsize;
-			size = _PyObject_VAR_SIZE(tp, tsize);
+            tsize = ((PyVarObject *)obj)->ob_size;
+            if (tsize < 0)
+                tsize = -tsize;
+            size = _PyObject_VAR_SIZE(tp, tsize);
 
-			dictoffset += (long)size;
-			assert(dictoffset > 0);
-			assert(dictoffset % SIZEOF_VOID_P == 0);
-		}
-		dictptr = (PyObject **) ((char *)obj + dictoffset);
-		dict = *dictptr;
-		if (dict != NULL) {
-			Py_INCREF(dict);
-			res = PyDict_GetItem(dict, name);
-			if (res != NULL) {
-				Py_INCREF(res);
-				Py_XDECREF(descr);
-                                Py_DECREF(dict);
-				goto done;
-			}
-                        Py_DECREF(dict);
-		}
-	}
+            dictoffset += (long)size;
+            assert(dictoffset > 0);
+            assert(dictoffset % SIZEOF_VOID_P == 0);
+        }
+        dictptr = (PyObject **) ((char *)obj + dictoffset);
+        dict = *dictptr;
+        if (dict != NULL) {
+            Py_INCREF(dict);
+            res = PyDict_GetItem(dict, name);
+            if (res != NULL) {
+                Py_INCREF(res);
+                Py_XDECREF(descr);
+                Py_DECREF(dict);
+                goto done;
+            }
+            Py_DECREF(dict);
+        }
+    }
 
-	if (f != NULL) {
-		res = f(descr, obj, (PyObject *)Py_TYPE(obj));
-		Py_DECREF(descr);
-		goto done;
-	}
+    if (f != NULL) {
+        res = f(descr, obj, (PyObject *)Py_TYPE(obj));
+        Py_DECREF(descr);
+        goto done;
+    }
 
-	if (descr != NULL) {
-		res = descr;
-		/* descr was already increfed above */
-		goto done;
-	}
+    if (descr != NULL) {
+        res = descr;
+        /* descr was already increfed above */
+        goto done;
+    }
 
-	PyErr_Format(PyExc_AttributeError,
-		     "'%.50s' object has no attribute '%.400s'",
-		     tp->tp_name, PyString_AS_STRING(name));
+    PyErr_Format(PyExc_AttributeError,
+                 "'%.50s' object has no attribute '%.400s'",
+                 tp->tp_name, PyString_AS_STRING(name));
   done:
-	Py_DECREF(name);
-	return res;
+    Py_DECREF(name);
+    return res;
 }
 
 int
 PyObject_GenericSetAttr(PyObject *obj, PyObject *name, PyObject *value)
 {
-	PyTypeObject *tp = Py_TYPE(obj);
-	PyObject *descr;
-	descrsetfunc f;
-	PyObject **dictptr;
-	int res = -1;
+    PyTypeObject *tp = Py_TYPE(obj);
+    PyObject *descr;
+    descrsetfunc f;
+    PyObject **dictptr;
+    int res = -1;
 
-	if (!PyString_Check(name)){
+    if (!PyString_Check(name)){
 #ifdef Py_USING_UNICODE
-		/* The Unicode to string conversion is done here because the
-		   existing tp_setattro slots expect a string object as name
-		   and we wouldn't want to break those. */
-		if (PyUnicode_Check(name)) {
-			name = PyUnicode_AsEncodedString(name, NULL, NULL);
-			if (name == NULL)
-				return -1;
-		}
-		else
+        /* The Unicode to string conversion is done here because the
+           existing tp_setattro slots expect a string object as name
+           and we wouldn't want to break those. */
+        if (PyUnicode_Check(name)) {
+            name = PyUnicode_AsEncodedString(name, NULL, NULL);
+            if (name == NULL)
+                return -1;
+        }
+        else
 #endif
-		{
-			PyErr_Format(PyExc_TypeError,
-				     "attribute name must be string, not '%.200s'",
-				     Py_TYPE(name)->tp_name);
-			return -1;
-		}
-	}
-	else
-		Py_INCREF(name);
+        {
+            PyErr_Format(PyExc_TypeError,
+                         "attribute name must be string, not '%.200s'",
+                         Py_TYPE(name)->tp_name);
+            return -1;
+        }
+    }
+    else
+        Py_INCREF(name);
 
-	if (tp->tp_dict == NULL) {
-		if (PyType_Ready(tp) < 0)
-			goto done;
-	}
+    if (tp->tp_dict == NULL) {
+        if (PyType_Ready(tp) < 0)
+            goto done;
+    }
 
-	descr = _PyType_Lookup(tp, name);
-	f = NULL;
-	if (descr != NULL &&
-	    PyType_HasFeature(descr->ob_type, Py_TPFLAGS_HAVE_CLASS)) {
-		f = descr->ob_type->tp_descr_set;
-		if (f != NULL && PyDescr_IsData(descr)) {
-			res = f(descr, obj, value);
-			goto done;
-		}
-	}
+    descr = _PyType_Lookup(tp, name);
+    f = NULL;
+    if (descr != NULL &&
+        PyType_HasFeature(descr->ob_type, Py_TPFLAGS_HAVE_CLASS)) {
+        f = descr->ob_type->tp_descr_set;
+        if (f != NULL && PyDescr_IsData(descr)) {
+            res = f(descr, obj, value);
+            goto done;
+        }
+    }
 
-	dictptr = _PyObject_GetDictPtr(obj);
-	if (dictptr != NULL) {
-		PyObject *dict = *dictptr;
-		if (dict == NULL && value != NULL) {
-			dict = PyDict_New();
-			if (dict == NULL)
-				goto done;
-			*dictptr = dict;
-		}
-		if (dict != NULL) {
-			Py_INCREF(dict);
-			if (value == NULL)
-				res = PyDict_DelItem(dict, name);
-			else
-				res = PyDict_SetItem(dict, name, value);
-			if (res < 0 && PyErr_ExceptionMatches(PyExc_KeyError))
-				PyErr_SetObject(PyExc_AttributeError, name);
-			Py_DECREF(dict);
-			goto done;
-		}
-	}
+    dictptr = _PyObject_GetDictPtr(obj);
+    if (dictptr != NULL) {
+        PyObject *dict = *dictptr;
+        if (dict == NULL && value != NULL) {
+            dict = PyDict_New();
+            if (dict == NULL)
+                goto done;
+            *dictptr = dict;
+        }
+        if (dict != NULL) {
+            Py_INCREF(dict);
+            if (value == NULL)
+                res = PyDict_DelItem(dict, name);
+            else
+                res = PyDict_SetItem(dict, name, value);
+            if (res < 0 && PyErr_ExceptionMatches(PyExc_KeyError))
+                PyErr_SetObject(PyExc_AttributeError, name);
+            Py_DECREF(dict);
+            goto done;
+        }
+    }
 
-	if (f != NULL) {
-		res = f(descr, obj, value);
-		goto done;
-	}
+    if (f != NULL) {
+        res = f(descr, obj, value);
+        goto done;
+    }
 
-	if (descr == NULL) {
-		PyErr_Format(PyExc_AttributeError,
-			     "'%.100s' object has no attribute '%.200s'",
-			     tp->tp_name, PyString_AS_STRING(name));
-		goto done;
-	}
+    if (descr == NULL) {
+        PyErr_Format(PyExc_AttributeError,
+                     "'%.100s' object has no attribute '%.200s'",
+                     tp->tp_name, PyString_AS_STRING(name));
+        goto done;
+    }
 
-	PyErr_Format(PyExc_AttributeError,
-		     "'%.50s' object attribute '%.400s' is read-only",
-		     tp->tp_name, PyString_AS_STRING(name));
+    PyErr_Format(PyExc_AttributeError,
+                 "'%.50s' object attribute '%.400s' is read-only",
+                 tp->tp_name, PyString_AS_STRING(name));
   done:
-	Py_DECREF(name);
-	return res;
+    Py_DECREF(name);
+    return res;
 }
 
 /* Test a value used as condition, e.g., in a for or if statement.
@@ -1542,26 +1542,26 @@
 int
 PyObject_IsTrue(PyObject *v)
 {
-	Py_ssize_t res;
-	if (v == Py_True)
-		return 1;
-	if (v == Py_False)
-		return 0;
-	if (v == Py_None)
-		return 0;
-	else if (v->ob_type->tp_as_number != NULL &&
-		 v->ob_type->tp_as_number->nb_nonzero != NULL)
-		res = (*v->ob_type->tp_as_number->nb_nonzero)(v);
-	else if (v->ob_type->tp_as_mapping != NULL &&
-		 v->ob_type->tp_as_mapping->mp_length != NULL)
-		res = (*v->ob_type->tp_as_mapping->mp_length)(v);
-	else if (v->ob_type->tp_as_sequence != NULL &&
-		 v->ob_type->tp_as_sequence->sq_length != NULL)
-		res = (*v->ob_type->tp_as_sequence->sq_length)(v);
-	else
-		return 1;
-	/* if it is negative, it should be either -1 or -2 */
-	return (res > 0) ? 1 : Py_SAFE_DOWNCAST(res, Py_ssize_t, int);
+    Py_ssize_t res;
+    if (v == Py_True)
+        return 1;
+    if (v == Py_False)
+        return 0;
+    if (v == Py_None)
+        return 0;
+    else if (v->ob_type->tp_as_number != NULL &&
+             v->ob_type->tp_as_number->nb_nonzero != NULL)
+        res = (*v->ob_type->tp_as_number->nb_nonzero)(v);
+    else if (v->ob_type->tp_as_mapping != NULL &&
+             v->ob_type->tp_as_mapping->mp_length != NULL)
+        res = (*v->ob_type->tp_as_mapping->mp_length)(v);
+    else if (v->ob_type->tp_as_sequence != NULL &&
+             v->ob_type->tp_as_sequence->sq_length != NULL)
+        res = (*v->ob_type->tp_as_sequence->sq_length)(v);
+    else
+        return 1;
+    /* if it is negative, it should be either -1 or -2 */
+    return (res > 0) ? 1 : Py_SAFE_DOWNCAST(res, Py_ssize_t, int);
 }
 
 /* equivalent of 'not v'
@@ -1570,11 +1570,11 @@
 int
 PyObject_Not(PyObject *v)
 {
-	int res;
-	res = PyObject_IsTrue(v);
-	if (res < 0)
-		return res;
-	return res == 0;
+    int res;
+    res = PyObject_IsTrue(v);
+    if (res < 0)
+        return res;
+    return res == 0;
 }
 
 /* Coerce two numeric types to the "larger" one.
@@ -1587,29 +1587,29 @@
 int
 PyNumber_CoerceEx(PyObject **pv, PyObject **pw)
 {
-	register PyObject *v = *pv;
-	register PyObject *w = *pw;
-	int res;
+    register PyObject *v = *pv;
+    register PyObject *w = *pw;
+    int res;
 
-	/* Shortcut only for old-style types */
-	if (v->ob_type == w->ob_type &&
-	    !PyType_HasFeature(v->ob_type, Py_TPFLAGS_CHECKTYPES))
-	{
-		Py_INCREF(v);
-		Py_INCREF(w);
-		return 0;
-	}
-	if (v->ob_type->tp_as_number && v->ob_type->tp_as_number->nb_coerce) {
-		res = (*v->ob_type->tp_as_number->nb_coerce)(pv, pw);
-		if (res <= 0)
-			return res;
-	}
-	if (w->ob_type->tp_as_number && w->ob_type->tp_as_number->nb_coerce) {
-		res = (*w->ob_type->tp_as_number->nb_coerce)(pw, pv);
-		if (res <= 0)
-			return res;
-	}
-	return 1;
+    /* Shortcut only for old-style types */
+    if (v->ob_type == w->ob_type &&
+        !PyType_HasFeature(v->ob_type, Py_TPFLAGS_CHECKTYPES))
+    {
+        Py_INCREF(v);
+        Py_INCREF(w);
+        return 0;
+    }
+    if (v->ob_type->tp_as_number && v->ob_type->tp_as_number->nb_coerce) {
+        res = (*v->ob_type->tp_as_number->nb_coerce)(pv, pw);
+        if (res <= 0)
+            return res;
+    }
+    if (w->ob_type->tp_as_number && w->ob_type->tp_as_number->nb_coerce) {
+        res = (*w->ob_type->tp_as_number->nb_coerce)(pw, pv);
+        if (res <= 0)
+            return res;
+    }
+    return 1;
 }
 
 /* Coerce two numeric types to the "larger" one.
@@ -1620,11 +1620,11 @@
 int
 PyNumber_Coerce(PyObject **pv, PyObject **pw)
 {
-	int err = PyNumber_CoerceEx(pv, pw);
-	if (err <= 0)
-		return err;
-	PyErr_SetString(PyExc_TypeError, "number coercion failed");
-	return -1;
+    int err = PyNumber_CoerceEx(pv, pw);
+    if (err <= 0)
+        return err;
+    PyErr_SetString(PyExc_TypeError, "number coercion failed");
+    return -1;
 }
 
 
@@ -1633,22 +1633,22 @@
 int
 PyCallable_Check(PyObject *x)
 {
-	if (x == NULL)
-		return 0;
-	if (PyInstance_Check(x)) {
-		PyObject *call = PyObject_GetAttrString(x, "__call__");
-		if (call == NULL) {
-			PyErr_Clear();
-			return 0;
-		}
-		/* Could test recursively but don't, for fear of endless
-		   recursion if some joker sets self.__call__ = self */
-		Py_DECREF(call);
-		return 1;
-	}
-	else {
-		return x->ob_type->tp_call != NULL;
-	}
+    if (x == NULL)
+        return 0;
+    if (PyInstance_Check(x)) {
+        PyObject *call = PyObject_GetAttrString(x, "__call__");
+        if (call == NULL) {
+            PyErr_Clear();
+            return 0;
+        }
+        /* Could test recursively but don't, for fear of endless
+           recursion if some joker sets self.__call__ = self */
+        Py_DECREF(call);
+        return 1;
+    }
+    else {
+        return x->ob_type->tp_call != NULL;
+    }
 }
 
 /* ------------------------- PyObject_Dir() helpers ------------------------- */
@@ -1664,52 +1664,52 @@
 static int
 merge_class_dict(PyObject* dict, PyObject* aclass)
 {
-	PyObject *classdict;
-	PyObject *bases;
+    PyObject *classdict;
+    PyObject *bases;
 
-	assert(PyDict_Check(dict));
-	assert(aclass);
+    assert(PyDict_Check(dict));
+    assert(aclass);
 
-	/* Merge in the type's dict (if any). */
-	classdict = PyObject_GetAttrString(aclass, "__dict__");
-	if (classdict == NULL)
-		PyErr_Clear();
-	else {
-		int status = PyDict_Update(dict, classdict);
-		Py_DECREF(classdict);
-		if (status < 0)
-			return -1;
-	}
+    /* Merge in the type's dict (if any). */
+    classdict = PyObject_GetAttrString(aclass, "__dict__");
+    if (classdict == NULL)
+        PyErr_Clear();
+    else {
+        int status = PyDict_Update(dict, classdict);
+        Py_DECREF(classdict);
+        if (status < 0)
+            return -1;
+    }
 
-	/* Recursively merge in the base types' (if any) dicts. */
-	bases = PyObject_GetAttrString(aclass, "__bases__");
-	if (bases == NULL)
-		PyErr_Clear();
-	else {
-		/* We have no guarantee that bases is a real tuple */
-		Py_ssize_t i, n;
-		n = PySequence_Size(bases); /* This better be right */
-		if (n < 0)
-			PyErr_Clear();
-		else {
-			for (i = 0; i < n; i++) {
-				int status;
-				PyObject *base = PySequence_GetItem(bases, i);
-				if (base == NULL) {
-					Py_DECREF(bases);
-					return -1;
-				}
-				status = merge_class_dict(dict, base);
-				Py_DECREF(base);
-				if (status < 0) {
-					Py_DECREF(bases);
-					return -1;
-				}
-			}
-		}
-		Py_DECREF(bases);
-	}
-	return 0;
+    /* Recursively merge in the base types' (if any) dicts. */
+    bases = PyObject_GetAttrString(aclass, "__bases__");
+    if (bases == NULL)
+        PyErr_Clear();
+    else {
+        /* We have no guarantee that bases is a real tuple */
+        Py_ssize_t i, n;
+        n = PySequence_Size(bases); /* This better be right */
+        if (n < 0)
+            PyErr_Clear();
+        else {
+            for (i = 0; i < n; i++) {
+                int status;
+                PyObject *base = PySequence_GetItem(bases, i);
+                if (base == NULL) {
+                    Py_DECREF(bases);
+                    return -1;
+                }
+                status = merge_class_dict(dict, base);
+                Py_DECREF(base);
+                if (status < 0) {
+                    Py_DECREF(bases);
+                    return -1;
+                }
+            }
+        }
+        Py_DECREF(bases);
+    }
+    return 0;
 }
 
 /* Helper for PyObject_Dir.
@@ -1722,107 +1722,107 @@
 static int
 merge_list_attr(PyObject* dict, PyObject* obj, const char *attrname)
 {
-	PyObject *list;
-	int result = 0;
+    PyObject *list;
+    int result = 0;
 
-	assert(PyDict_Check(dict));
-	assert(obj);
-	assert(attrname);
+    assert(PyDict_Check(dict));
+    assert(obj);
+    assert(attrname);
 
-	list = PyObject_GetAttrString(obj, attrname);
-	if (list == NULL)
-		PyErr_Clear();
+    list = PyObject_GetAttrString(obj, attrname);
+    if (list == NULL)
+        PyErr_Clear();
 
-	else if (PyList_Check(list)) {
-		int i;
-		for (i = 0; i < PyList_GET_SIZE(list); ++i) {
-			PyObject *item = PyList_GET_ITEM(list, i);
-			if (PyString_Check(item)) {
-				result = PyDict_SetItem(dict, item, Py_None);
-				if (result < 0)
-					break;
-			}
-		}
-		if (Py_Py3kWarningFlag &&
-		    (strcmp(attrname, "__members__") == 0 ||
-		     strcmp(attrname, "__methods__") == 0)) {
-			if (PyErr_WarnEx(PyExc_DeprecationWarning, 
-				       "__members__ and __methods__ not "
-				       "supported in 3.x", 1) < 0) {
-				Py_XDECREF(list);
-				return -1;
-			}
-		}
-	}
+    else if (PyList_Check(list)) {
+        int i;
+        for (i = 0; i < PyList_GET_SIZE(list); ++i) {
+            PyObject *item = PyList_GET_ITEM(list, i);
+            if (PyString_Check(item)) {
+                result = PyDict_SetItem(dict, item, Py_None);
+                if (result < 0)
+                    break;
+            }
+        }
+        if (Py_Py3kWarningFlag &&
+            (strcmp(attrname, "__members__") == 0 ||
+             strcmp(attrname, "__methods__") == 0)) {
+            if (PyErr_WarnEx(PyExc_DeprecationWarning,
+                           "__members__ and __methods__ not "
+                           "supported in 3.x", 1) < 0) {
+                Py_XDECREF(list);
+                return -1;
+            }
+        }
+    }
 
-	Py_XDECREF(list);
-	return result;
+    Py_XDECREF(list);
+    return result;
 }
 
 /* Helper for PyObject_Dir without arguments: returns the local scope. */
 static PyObject *
 _dir_locals(void)
 {
-	PyObject *names;
-	PyObject *locals = PyEval_GetLocals();
+    PyObject *names;
+    PyObject *locals = PyEval_GetLocals();
 
-	if (locals == NULL) {
-		PyErr_SetString(PyExc_SystemError, "frame does not exist");
-		return NULL;
-	}
+    if (locals == NULL) {
+        PyErr_SetString(PyExc_SystemError, "frame does not exist");
+        return NULL;
+    }
 
-	names = PyMapping_Keys(locals);
-	if (!names)
-		return NULL;
-	if (!PyList_Check(names)) {
-		PyErr_Format(PyExc_TypeError,
-			"dir(): expected keys() of locals to be a list, "
-			"not '%.200s'", Py_TYPE(names)->tp_name);
-		Py_DECREF(names);
-		return NULL;
-	}
-	/* the locals don't need to be DECREF'd */
-	return names;
+    names = PyMapping_Keys(locals);
+    if (!names)
+        return NULL;
+    if (!PyList_Check(names)) {
+        PyErr_Format(PyExc_TypeError,
+            "dir(): expected keys() of locals to be a list, "
+            "not '%.200s'", Py_TYPE(names)->tp_name);
+        Py_DECREF(names);
+        return NULL;
+    }
+    /* the locals don't need to be DECREF'd */
+    return names;
 }
 
 /* Helper for PyObject_Dir of type objects: returns __dict__ and __bases__.
-   We deliberately don't suck up its __class__, as methods belonging to the 
-   metaclass would probably be more confusing than helpful. 
+   We deliberately don't suck up its __class__, as methods belonging to the
+   metaclass would probably be more confusing than helpful.
 */
-static PyObject * 
+static PyObject *
 _specialized_dir_type(PyObject *obj)
 {
-	PyObject *result = NULL;
-	PyObject *dict = PyDict_New();
+    PyObject *result = NULL;
+    PyObject *dict = PyDict_New();
 
-	if (dict != NULL && merge_class_dict(dict, obj) == 0)
-		result = PyDict_Keys(dict);
+    if (dict != NULL && merge_class_dict(dict, obj) == 0)
+        result = PyDict_Keys(dict);
 
-	Py_XDECREF(dict);
-	return result;
+    Py_XDECREF(dict);
+    return result;
 }
 
 /* Helper for PyObject_Dir of module objects: returns the module's __dict__. */
 static PyObject *
 _specialized_dir_module(PyObject *obj)
 {
-	PyObject *result = NULL;
-	PyObject *dict = PyObject_GetAttrString(obj, "__dict__");
+    PyObject *result = NULL;
+    PyObject *dict = PyObject_GetAttrString(obj, "__dict__");
 
-	if (dict != NULL) {
-		if (PyDict_Check(dict))
-			result = PyDict_Keys(dict);
-		else {
-			char *name = PyModule_GetName(obj);
-			if (name)
-				PyErr_Format(PyExc_TypeError,
-					     "%.200s.__dict__ is not a dictionary",
-					     name);
-		}
-	}
+    if (dict != NULL) {
+        if (PyDict_Check(dict))
+            result = PyDict_Keys(dict);
+        else {
+            char *name = PyModule_GetName(obj);
+            if (name)
+                PyErr_Format(PyExc_TypeError,
+                             "%.200s.__dict__ is not a dictionary",
+                             name);
+        }
+    }
 
-	Py_XDECREF(dict);
-	return result;
+    Py_XDECREF(dict);
+    return result;
 }
 
 /* Helper for PyObject_Dir of generic objects: returns __dict__, __class__,
@@ -1831,54 +1831,54 @@
 static PyObject *
 _generic_dir(PyObject *obj)
 {
-	PyObject *result = NULL;
-	PyObject *dict = NULL;
-	PyObject *itsclass = NULL;
-	
-	/* Get __dict__ (which may or may not be a real dict...) */
-	dict = PyObject_GetAttrString(obj, "__dict__");
-	if (dict == NULL) {
-		PyErr_Clear();
-		dict = PyDict_New();
-	}
-	else if (!PyDict_Check(dict)) {
-		Py_DECREF(dict);
-		dict = PyDict_New();
-	}
-	else {
-		/* Copy __dict__ to avoid mutating it. */
-		PyObject *temp = PyDict_Copy(dict);
-		Py_DECREF(dict);
-		dict = temp;
-	}
+    PyObject *result = NULL;
+    PyObject *dict = NULL;
+    PyObject *itsclass = NULL;
 
-	if (dict == NULL)
-		goto error;
+    /* Get __dict__ (which may or may not be a real dict...) */
+    dict = PyObject_GetAttrString(obj, "__dict__");
+    if (dict == NULL) {
+        PyErr_Clear();
+        dict = PyDict_New();
+    }
+    else if (!PyDict_Check(dict)) {
+        Py_DECREF(dict);
+        dict = PyDict_New();
+    }
+    else {
+        /* Copy __dict__ to avoid mutating it. */
+        PyObject *temp = PyDict_Copy(dict);
+        Py_DECREF(dict);
+        dict = temp;
+    }
 
-	/* Merge in __members__ and __methods__ (if any).
-	 * This is removed in Python 3000. */
-	if (merge_list_attr(dict, obj, "__members__") < 0)
-		goto error;
-	if (merge_list_attr(dict, obj, "__methods__") < 0)
-		goto error;
+    if (dict == NULL)
+        goto error;
 
-	/* Merge in attrs reachable from its class. */
-	itsclass = PyObject_GetAttrString(obj, "__class__");
-	if (itsclass == NULL)
-		/* XXX(tomer): Perhaps fall back to obj->ob_type if no
-		               __class__ exists? */
-		PyErr_Clear();
-	else {
-		if (merge_class_dict(dict, itsclass) != 0)
-			goto error;
-	}
+    /* Merge in __members__ and __methods__ (if any).
+     * This is removed in Python 3000. */
+    if (merge_list_attr(dict, obj, "__members__") < 0)
+        goto error;
+    if (merge_list_attr(dict, obj, "__methods__") < 0)
+        goto error;
 
-	result = PyDict_Keys(dict);
-	/* fall through */
+    /* Merge in attrs reachable from its class. */
+    itsclass = PyObject_GetAttrString(obj, "__class__");
+    if (itsclass == NULL)
+        /* XXX(tomer): Perhaps fall back to obj->ob_type if no
+                       __class__ exists? */
+        PyErr_Clear();
+    else {
+        if (merge_class_dict(dict, itsclass) != 0)
+            goto error;
+    }
+
+    result = PyDict_Keys(dict);
+    /* fall through */
 error:
-	Py_XDECREF(itsclass);
-	Py_XDECREF(dict);
-	return result;
+    Py_XDECREF(itsclass);
+    Py_XDECREF(dict);
+    return result;
 }
 
 /* Helper for PyObject_Dir: object introspection.
@@ -1887,40 +1887,40 @@
 static PyObject *
 _dir_object(PyObject *obj)
 {
-	PyObject *result = NULL;
-	PyObject *dirfunc = PyObject_GetAttrString((PyObject *)obj->ob_type,
-						   "__dir__");
+    PyObject *result = NULL;
+    PyObject *dirfunc = PyObject_GetAttrString((PyObject *)obj->ob_type,
+                                               "__dir__");
 
-	assert(obj);
-	if (dirfunc == NULL) {
-		/* use default implementation */
-		PyErr_Clear();
-		if (PyModule_Check(obj))
-			result = _specialized_dir_module(obj);
-		else if (PyType_Check(obj) || PyClass_Check(obj))
-			result = _specialized_dir_type(obj);
-		else
-			result = _generic_dir(obj);
-	}
-	else {
-		/* use __dir__ */
-		result = PyObject_CallFunctionObjArgs(dirfunc, obj, NULL);
-		Py_DECREF(dirfunc);
-		if (result == NULL)
-			return NULL;
+    assert(obj);
+    if (dirfunc == NULL) {
+        /* use default implementation */
+        PyErr_Clear();
+        if (PyModule_Check(obj))
+            result = _specialized_dir_module(obj);
+        else if (PyType_Check(obj) || PyClass_Check(obj))
+            result = _specialized_dir_type(obj);
+        else
+            result = _generic_dir(obj);
+    }
+    else {
+        /* use __dir__ */
+        result = PyObject_CallFunctionObjArgs(dirfunc, obj, NULL);
+        Py_DECREF(dirfunc);
+        if (result == NULL)
+            return NULL;
 
-		/* result must be a list */
-		/* XXX(gbrandl): could also check if all items are strings */
-		if (!PyList_Check(result)) {
-			PyErr_Format(PyExc_TypeError,
-				     "__dir__() must return a list, not %.200s",
-				     Py_TYPE(result)->tp_name);
-			Py_DECREF(result);
-			result = NULL;
-		}
-	}
+        /* result must be a list */
+        /* XXX(gbrandl): could also check if all items are strings */
+        if (!PyList_Check(result)) {
+            PyErr_Format(PyExc_TypeError,
+                         "__dir__() must return a list, not %.200s",
+                         Py_TYPE(result)->tp_name);
+            Py_DECREF(result);
+            result = NULL;
+        }
+    }
 
-	return result;
+    return result;
 }
 
 /* Implementation of dir() -- if obj is NULL, returns the names in the current
@@ -1930,24 +1930,24 @@
 PyObject *
 PyObject_Dir(PyObject *obj)
 {
-	PyObject * result;
+    PyObject * result;
 
-	if (obj == NULL)
-		/* no object -- introspect the locals */
-		result = _dir_locals();
-	else
-		/* object -- introspect the object */
-		result = _dir_object(obj);
+    if (obj == NULL)
+        /* no object -- introspect the locals */
+        result = _dir_locals();
+    else
+        /* object -- introspect the object */
+        result = _dir_object(obj);
 
-	assert(result == NULL || PyList_Check(result));
+    assert(result == NULL || PyList_Check(result));
 
-	if (result != NULL && PyList_Sort(result) != 0) {
-		/* sorting the list failed */
-		Py_DECREF(result);
-		result = NULL;
-	}
-	
-	return result;
+    if (result != NULL && PyList_Sort(result) != 0) {
+        /* sorting the list failed */
+        Py_DECREF(result);
+        result = NULL;
+    }
+
+    return result;
 }
 
 /*
@@ -1961,35 +1961,35 @@
 static PyObject *
 none_repr(PyObject *op)
 {
-	return PyString_FromString("None");
+    return PyString_FromString("None");
 }
 
 /* ARGUSED */
 static void
 none_dealloc(PyObject* ignore)
 {
-	/* This should never get called, but we also don't want to SEGV if
-	 * we accidentally decref None out of existence.
-	 */
-	Py_FatalError("deallocating None");
+    /* This should never get called, but we also don't want to SEGV if
+     * we accidentally decref None out of existence.
+     */
+    Py_FatalError("deallocating None");
 }
 
 
 static PyTypeObject PyNone_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"NoneType",
-	0,
-	0,
-	none_dealloc,	/*tp_dealloc*/ /*never called*/
-	0,		/*tp_print*/
-	0,		/*tp_getattr*/
-	0,		/*tp_setattr*/
-	0,		/*tp_compare*/
-	none_repr,	/*tp_repr*/
-	0,		/*tp_as_number*/
-	0,		/*tp_as_sequence*/
-	0,		/*tp_as_mapping*/
-	(hashfunc)_Py_HashPointer, /*tp_hash */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "NoneType",
+    0,
+    0,
+    none_dealloc,       /*tp_dealloc*/ /*never called*/
+    0,                  /*tp_print*/
+    0,                  /*tp_getattr*/
+    0,                  /*tp_setattr*/
+    0,                  /*tp_compare*/
+    none_repr,          /*tp_repr*/
+    0,                  /*tp_as_number*/
+    0,                  /*tp_as_sequence*/
+    0,                  /*tp_as_mapping*/
+    (hashfunc)_Py_HashPointer, /*tp_hash */
 };
 
 PyObject _Py_NoneStruct = {
@@ -2003,167 +2003,167 @@
 static PyObject *
 NotImplemented_repr(PyObject *op)
 {
-	return PyString_FromString("NotImplemented");
+    return PyString_FromString("NotImplemented");
 }
 
 static PyTypeObject PyNotImplemented_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"NotImplementedType",
-	0,
-	0,
-	none_dealloc,	/*tp_dealloc*/ /*never called*/
-	0,		/*tp_print*/
-	0,		/*tp_getattr*/
-	0,		/*tp_setattr*/
-	0,		/*tp_compare*/
-	NotImplemented_repr, /*tp_repr*/
-	0,		/*tp_as_number*/
-	0,		/*tp_as_sequence*/
-	0,		/*tp_as_mapping*/
-	0,		/*tp_hash */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "NotImplementedType",
+    0,
+    0,
+    none_dealloc,       /*tp_dealloc*/ /*never called*/
+    0,                  /*tp_print*/
+    0,                  /*tp_getattr*/
+    0,                  /*tp_setattr*/
+    0,                  /*tp_compare*/
+    NotImplemented_repr, /*tp_repr*/
+    0,                  /*tp_as_number*/
+    0,                  /*tp_as_sequence*/
+    0,                  /*tp_as_mapping*/
+    0,                  /*tp_hash */
 };
 
 PyObject _Py_NotImplementedStruct = {
-	_PyObject_EXTRA_INIT
-	1, &PyNotImplemented_Type
+    _PyObject_EXTRA_INIT
+    1, &PyNotImplemented_Type
 };
 
 void
 _Py_ReadyTypes(void)
 {
-	if (PyType_Ready(&PyType_Type) < 0)
-		Py_FatalError("Can't initialize type type");
+    if (PyType_Ready(&PyType_Type) < 0)
+        Py_FatalError("Can't initialize type type");
 
-	if (PyType_Ready(&_PyWeakref_RefType) < 0)
-		Py_FatalError("Can't initialize weakref type");
+    if (PyType_Ready(&_PyWeakref_RefType) < 0)
+        Py_FatalError("Can't initialize weakref type");
 
-	if (PyType_Ready(&_PyWeakref_CallableProxyType) < 0)
-		Py_FatalError("Can't initialize callable weakref proxy type");
+    if (PyType_Ready(&_PyWeakref_CallableProxyType) < 0)
+        Py_FatalError("Can't initialize callable weakref proxy type");
 
-	if (PyType_Ready(&_PyWeakref_ProxyType) < 0)
-		Py_FatalError("Can't initialize weakref proxy type");
+    if (PyType_Ready(&_PyWeakref_ProxyType) < 0)
+        Py_FatalError("Can't initialize weakref proxy type");
 
-	if (PyType_Ready(&PyBool_Type) < 0)
-		Py_FatalError("Can't initialize bool type");
+    if (PyType_Ready(&PyBool_Type) < 0)
+        Py_FatalError("Can't initialize bool type");
 
-	if (PyType_Ready(&PyString_Type) < 0)
-		Py_FatalError("Can't initialize str type");
+    if (PyType_Ready(&PyString_Type) < 0)
+        Py_FatalError("Can't initialize str type");
 
-	if (PyType_Ready(&PyByteArray_Type) < 0)
-		Py_FatalError("Can't initialize bytearray type");
+    if (PyType_Ready(&PyByteArray_Type) < 0)
+        Py_FatalError("Can't initialize bytearray type");
 
-	if (PyType_Ready(&PyList_Type) < 0)
-		Py_FatalError("Can't initialize list type");
+    if (PyType_Ready(&PyList_Type) < 0)
+        Py_FatalError("Can't initialize list type");
 
-	if (PyType_Ready(&PyNone_Type) < 0)
-		Py_FatalError("Can't initialize None type");
+    if (PyType_Ready(&PyNone_Type) < 0)
+        Py_FatalError("Can't initialize None type");
 
-	if (PyType_Ready(&PyNotImplemented_Type) < 0)
-		Py_FatalError("Can't initialize NotImplemented type");
+    if (PyType_Ready(&PyNotImplemented_Type) < 0)
+        Py_FatalError("Can't initialize NotImplemented type");
 
-	if (PyType_Ready(&PyTraceBack_Type) < 0)
-		Py_FatalError("Can't initialize traceback type");
+    if (PyType_Ready(&PyTraceBack_Type) < 0)
+        Py_FatalError("Can't initialize traceback type");
 
-	if (PyType_Ready(&PySuper_Type) < 0)
-		Py_FatalError("Can't initialize super type");
+    if (PyType_Ready(&PySuper_Type) < 0)
+        Py_FatalError("Can't initialize super type");
 
-	if (PyType_Ready(&PyBaseObject_Type) < 0)
-		Py_FatalError("Can't initialize object type");
+    if (PyType_Ready(&PyBaseObject_Type) < 0)
+        Py_FatalError("Can't initialize object type");
 
-	if (PyType_Ready(&PyRange_Type) < 0)
-		Py_FatalError("Can't initialize xrange type");
+    if (PyType_Ready(&PyRange_Type) < 0)
+        Py_FatalError("Can't initialize xrange type");
 
-	if (PyType_Ready(&PyDict_Type) < 0)
-		Py_FatalError("Can't initialize dict type");
+    if (PyType_Ready(&PyDict_Type) < 0)
+        Py_FatalError("Can't initialize dict type");
 
-	if (PyType_Ready(&PySet_Type) < 0)
-		Py_FatalError("Can't initialize set type");
+    if (PyType_Ready(&PySet_Type) < 0)
+        Py_FatalError("Can't initialize set type");
 
-	if (PyType_Ready(&PyUnicode_Type) < 0)
-		Py_FatalError("Can't initialize unicode type");
+    if (PyType_Ready(&PyUnicode_Type) < 0)
+        Py_FatalError("Can't initialize unicode type");
 
-	if (PyType_Ready(&PySlice_Type) < 0)
-		Py_FatalError("Can't initialize slice type");
+    if (PyType_Ready(&PySlice_Type) < 0)
+        Py_FatalError("Can't initialize slice type");
 
-	if (PyType_Ready(&PyStaticMethod_Type) < 0)
-		Py_FatalError("Can't initialize static method type");
+    if (PyType_Ready(&PyStaticMethod_Type) < 0)
+        Py_FatalError("Can't initialize static method type");
 
 #ifndef WITHOUT_COMPLEX
-	if (PyType_Ready(&PyComplex_Type) < 0)
-		Py_FatalError("Can't initialize complex type");
+    if (PyType_Ready(&PyComplex_Type) < 0)
+        Py_FatalError("Can't initialize complex type");
 #endif
 
-	if (PyType_Ready(&PyFloat_Type) < 0)
-		Py_FatalError("Can't initialize float type");
+    if (PyType_Ready(&PyFloat_Type) < 0)
+        Py_FatalError("Can't initialize float type");
 
-	if (PyType_Ready(&PyBuffer_Type) < 0)
-		Py_FatalError("Can't initialize buffer type");
+    if (PyType_Ready(&PyBuffer_Type) < 0)
+        Py_FatalError("Can't initialize buffer type");
 
-	if (PyType_Ready(&PyLong_Type) < 0)
-		Py_FatalError("Can't initialize long type");
+    if (PyType_Ready(&PyLong_Type) < 0)
+        Py_FatalError("Can't initialize long type");
 
-	if (PyType_Ready(&PyInt_Type) < 0)
-		Py_FatalError("Can't initialize int type");
+    if (PyType_Ready(&PyInt_Type) < 0)
+        Py_FatalError("Can't initialize int type");
 
-	if (PyType_Ready(&PyFrozenSet_Type) < 0)
-		Py_FatalError("Can't initialize frozenset type");
+    if (PyType_Ready(&PyFrozenSet_Type) < 0)
+        Py_FatalError("Can't initialize frozenset type");
 
-	if (PyType_Ready(&PyProperty_Type) < 0)
-		Py_FatalError("Can't initialize property type");
+    if (PyType_Ready(&PyProperty_Type) < 0)
+        Py_FatalError("Can't initialize property type");
 
-	if (PyType_Ready(&PyMemoryView_Type) < 0)
-		Py_FatalError("Can't initialize memoryview type");
+    if (PyType_Ready(&PyMemoryView_Type) < 0)
+        Py_FatalError("Can't initialize memoryview type");
 
-	if (PyType_Ready(&PyTuple_Type) < 0)
-		Py_FatalError("Can't initialize tuple type");
+    if (PyType_Ready(&PyTuple_Type) < 0)
+        Py_FatalError("Can't initialize tuple type");
 
-	if (PyType_Ready(&PyEnum_Type) < 0)
-		Py_FatalError("Can't initialize enumerate type");
+    if (PyType_Ready(&PyEnum_Type) < 0)
+        Py_FatalError("Can't initialize enumerate type");
 
-	if (PyType_Ready(&PyReversed_Type) < 0)
-		Py_FatalError("Can't initialize reversed type");
+    if (PyType_Ready(&PyReversed_Type) < 0)
+        Py_FatalError("Can't initialize reversed type");
 
-	if (PyType_Ready(&PyCode_Type) < 0)
-		Py_FatalError("Can't initialize code type");
+    if (PyType_Ready(&PyCode_Type) < 0)
+        Py_FatalError("Can't initialize code type");
 
-	if (PyType_Ready(&PyFrame_Type) < 0)
-		Py_FatalError("Can't initialize frame type");
+    if (PyType_Ready(&PyFrame_Type) < 0)
+        Py_FatalError("Can't initialize frame type");
 
-	if (PyType_Ready(&PyCFunction_Type) < 0)
-		Py_FatalError("Can't initialize builtin function type");
+    if (PyType_Ready(&PyCFunction_Type) < 0)
+        Py_FatalError("Can't initialize builtin function type");
 
-	if (PyType_Ready(&PyMethod_Type) < 0)
-		Py_FatalError("Can't initialize method type");
+    if (PyType_Ready(&PyMethod_Type) < 0)
+        Py_FatalError("Can't initialize method type");
 
-	if (PyType_Ready(&PyFunction_Type) < 0)
-		Py_FatalError("Can't initialize function type");
+    if (PyType_Ready(&PyFunction_Type) < 0)
+        Py_FatalError("Can't initialize function type");
 
-	if (PyType_Ready(&PyClass_Type) < 0)
-		Py_FatalError("Can't initialize class type");
+    if (PyType_Ready(&PyClass_Type) < 0)
+        Py_FatalError("Can't initialize class type");
 
-	if (PyType_Ready(&PyDictProxy_Type) < 0)
-		Py_FatalError("Can't initialize dict proxy type");
+    if (PyType_Ready(&PyDictProxy_Type) < 0)
+        Py_FatalError("Can't initialize dict proxy type");
 
-	if (PyType_Ready(&PyGen_Type) < 0)
-		Py_FatalError("Can't initialize generator type");
+    if (PyType_Ready(&PyGen_Type) < 0)
+        Py_FatalError("Can't initialize generator type");
 
-	if (PyType_Ready(&PyGetSetDescr_Type) < 0)
-		Py_FatalError("Can't initialize get-set descriptor type");
+    if (PyType_Ready(&PyGetSetDescr_Type) < 0)
+        Py_FatalError("Can't initialize get-set descriptor type");
 
-	if (PyType_Ready(&PyWrapperDescr_Type) < 0)
-		Py_FatalError("Can't initialize wrapper type");
+    if (PyType_Ready(&PyWrapperDescr_Type) < 0)
+        Py_FatalError("Can't initialize wrapper type");
 
-	if (PyType_Ready(&PyInstance_Type) < 0)
-		Py_FatalError("Can't initialize instance type");
+    if (PyType_Ready(&PyInstance_Type) < 0)
+        Py_FatalError("Can't initialize instance type");
 
-	if (PyType_Ready(&PyEllipsis_Type) < 0)
-		Py_FatalError("Can't initialize ellipsis type");
+    if (PyType_Ready(&PyEllipsis_Type) < 0)
+        Py_FatalError("Can't initialize ellipsis type");
 
-	if (PyType_Ready(&PyMemberDescr_Type) < 0)
-		Py_FatalError("Can't initialize member descriptor type");
+    if (PyType_Ready(&PyMemberDescr_Type) < 0)
+        Py_FatalError("Can't initialize member descriptor type");
 
-	if (PyType_Ready(&PyFile_Type) < 0)
-		Py_FatalError("Can't initialize file type");
+    if (PyType_Ready(&PyFile_Type) < 0)
+        Py_FatalError("Can't initialize file type");
 }
 
 
@@ -2172,43 +2172,43 @@
 void
 _Py_NewReference(PyObject *op)
 {
-	_Py_INC_REFTOTAL;
-	op->ob_refcnt = 1;
-	_Py_AddToAllObjects(op, 1);
-	_Py_INC_TPALLOCS(op);
+    _Py_INC_REFTOTAL;
+    op->ob_refcnt = 1;
+    _Py_AddToAllObjects(op, 1);
+    _Py_INC_TPALLOCS(op);
 }
 
 void
 _Py_ForgetReference(register PyObject *op)
 {
 #ifdef SLOW_UNREF_CHECK
-        register PyObject *p;
+    register PyObject *p;
 #endif
-	if (op->ob_refcnt < 0)
-		Py_FatalError("UNREF negative refcnt");
-	if (op == &refchain ||
-	    op->_ob_prev->_ob_next != op || op->_ob_next->_ob_prev != op)
-		Py_FatalError("UNREF invalid object");
+    if (op->ob_refcnt < 0)
+        Py_FatalError("UNREF negative refcnt");
+    if (op == &refchain ||
+        op->_ob_prev->_ob_next != op || op->_ob_next->_ob_prev != op)
+        Py_FatalError("UNREF invalid object");
 #ifdef SLOW_UNREF_CHECK
-	for (p = refchain._ob_next; p != &refchain; p = p->_ob_next) {
-		if (p == op)
-			break;
-	}
-	if (p == &refchain) /* Not found */
-		Py_FatalError("UNREF unknown object");
+    for (p = refchain._ob_next; p != &refchain; p = p->_ob_next) {
+        if (p == op)
+            break;
+    }
+    if (p == &refchain) /* Not found */
+        Py_FatalError("UNREF unknown object");
 #endif
-	op->_ob_next->_ob_prev = op->_ob_prev;
-	op->_ob_prev->_ob_next = op->_ob_next;
-	op->_ob_next = op->_ob_prev = NULL;
-	_Py_INC_TPFREES(op);
+    op->_ob_next->_ob_prev = op->_ob_prev;
+    op->_ob_prev->_ob_next = op->_ob_next;
+    op->_ob_next = op->_ob_prev = NULL;
+    _Py_INC_TPFREES(op);
 }
 
 void
 _Py_Dealloc(PyObject *op)
 {
-	destructor dealloc = Py_TYPE(op)->tp_dealloc;
-	_Py_ForgetReference(op);
-	(*dealloc)(op);
+    destructor dealloc = Py_TYPE(op)->tp_dealloc;
+    _Py_ForgetReference(op);
+    (*dealloc)(op);
 }
 
 /* Print all live objects.  Because PyObject_Print is called, the
@@ -2217,14 +2217,14 @@
 void
 _Py_PrintReferences(FILE *fp)
 {
-	PyObject *op;
-	fprintf(fp, "Remaining objects:\n");
-	for (op = refchain._ob_next; op != &refchain; op = op->_ob_next) {
-		fprintf(fp, "%p [%" PY_FORMAT_SIZE_T "d] ", op, op->ob_refcnt);
-		if (PyObject_Print(op, fp, 0) != 0)
-			PyErr_Clear();
-		putc('\n', fp);
-	}
+    PyObject *op;
+    fprintf(fp, "Remaining objects:\n");
+    for (op = refchain._ob_next; op != &refchain; op = op->_ob_next) {
+        fprintf(fp, "%p [%" PY_FORMAT_SIZE_T "d] ", op, op->ob_refcnt);
+        if (PyObject_Print(op, fp, 0) != 0)
+            PyErr_Clear();
+        putc('\n', fp);
+    }
 }
 
 /* Print the addresses of all live objects.  Unlike _Py_PrintReferences, this
@@ -2233,40 +2233,40 @@
 void
 _Py_PrintReferenceAddresses(FILE *fp)
 {
-	PyObject *op;
-	fprintf(fp, "Remaining object addresses:\n");
-	for (op = refchain._ob_next; op != &refchain; op = op->_ob_next)
-		fprintf(fp, "%p [%" PY_FORMAT_SIZE_T "d] %s\n", op,
-			op->ob_refcnt, Py_TYPE(op)->tp_name);
+    PyObject *op;
+    fprintf(fp, "Remaining object addresses:\n");
+    for (op = refchain._ob_next; op != &refchain; op = op->_ob_next)
+        fprintf(fp, "%p [%" PY_FORMAT_SIZE_T "d] %s\n", op,
+            op->ob_refcnt, Py_TYPE(op)->tp_name);
 }
 
 PyObject *
 _Py_GetObjects(PyObject *self, PyObject *args)
 {
-	int i, n;
-	PyObject *t = NULL;
-	PyObject *res, *op;
+    int i, n;
+    PyObject *t = NULL;
+    PyObject *res, *op;
 
-	if (!PyArg_ParseTuple(args, "i|O", &n, &t))
-		return NULL;
-	op = refchain._ob_next;
-	res = PyList_New(0);
-	if (res == NULL)
-		return NULL;
-	for (i = 0; (n == 0 || i < n) && op != &refchain; i++) {
-		while (op == self || op == args || op == res || op == t ||
-		       (t != NULL && Py_TYPE(op) != (PyTypeObject *) t)) {
-			op = op->_ob_next;
-			if (op == &refchain)
-				return res;
-		}
-		if (PyList_Append(res, op) < 0) {
-			Py_DECREF(res);
-			return NULL;
-		}
-		op = op->_ob_next;
-	}
-	return res;
+    if (!PyArg_ParseTuple(args, "i|O", &n, &t))
+        return NULL;
+    op = refchain._ob_next;
+    res = PyList_New(0);
+    if (res == NULL)
+        return NULL;
+    for (i = 0; (n == 0 || i < n) && op != &refchain; i++) {
+        while (op == self || op == args || op == res || op == t ||
+               (t != NULL && Py_TYPE(op) != (PyTypeObject *) t)) {
+            op = op->_ob_next;
+            if (op == &refchain)
+                return res;
+        }
+        if (PyList_Append(res, op) < 0) {
+            Py_DECREF(res);
+            return NULL;
+        }
+        op = op->_ob_next;
+    }
+    return res;
 }
 
 #endif
@@ -2289,19 +2289,19 @@
 void *
 PyMem_Malloc(size_t nbytes)
 {
-	return PyMem_MALLOC(nbytes);
+    return PyMem_MALLOC(nbytes);
 }
 
 void *
 PyMem_Realloc(void *p, size_t nbytes)
 {
-	return PyMem_REALLOC(p, nbytes);
+    return PyMem_REALLOC(p, nbytes);
 }
 
 void
 PyMem_Free(void *p)
 {
-	PyMem_FREE(p);
+    PyMem_FREE(p);
 }
 
 
@@ -2322,52 +2322,52 @@
 int
 Py_ReprEnter(PyObject *obj)
 {
-	PyObject *dict;
-	PyObject *list;
-	Py_ssize_t i;
+    PyObject *dict;
+    PyObject *list;
+    Py_ssize_t i;
 
-	dict = PyThreadState_GetDict();
-	if (dict == NULL)
-		return 0;
-	list = PyDict_GetItemString(dict, KEY);
-	if (list == NULL) {
-		list = PyList_New(0);
-		if (list == NULL)
-			return -1;
-		if (PyDict_SetItemString(dict, KEY, list) < 0)
-			return -1;
-		Py_DECREF(list);
-	}
-	i = PyList_GET_SIZE(list);
-	while (--i >= 0) {
-		if (PyList_GET_ITEM(list, i) == obj)
-			return 1;
-	}
-	PyList_Append(list, obj);
-	return 0;
+    dict = PyThreadState_GetDict();
+    if (dict == NULL)
+        return 0;
+    list = PyDict_GetItemString(dict, KEY);
+    if (list == NULL) {
+        list = PyList_New(0);
+        if (list == NULL)
+            return -1;
+        if (PyDict_SetItemString(dict, KEY, list) < 0)
+            return -1;
+        Py_DECREF(list);
+    }
+    i = PyList_GET_SIZE(list);
+    while (--i >= 0) {
+        if (PyList_GET_ITEM(list, i) == obj)
+            return 1;
+    }
+    PyList_Append(list, obj);
+    return 0;
 }
 
 void
 Py_ReprLeave(PyObject *obj)
 {
-	PyObject *dict;
-	PyObject *list;
-	Py_ssize_t i;
+    PyObject *dict;
+    PyObject *list;
+    Py_ssize_t i;
 
-	dict = PyThreadState_GetDict();
-	if (dict == NULL)
-		return;
-	list = PyDict_GetItemString(dict, KEY);
-	if (list == NULL || !PyList_Check(list))
-		return;
-	i = PyList_GET_SIZE(list);
-	/* Count backwards because we always expect obj to be list[-1] */
-	while (--i >= 0) {
-		if (PyList_GET_ITEM(list, i) == obj) {
-			PyList_SetSlice(list, i, i + 1, NULL);
-			break;
-		}
-	}
+    dict = PyThreadState_GetDict();
+    if (dict == NULL)
+        return;
+    list = PyDict_GetItemString(dict, KEY);
+    if (list == NULL || !PyList_Check(list))
+        return;
+    i = PyList_GET_SIZE(list);
+    /* Count backwards because we always expect obj to be list[-1] */
+    while (--i >= 0) {
+        if (PyList_GET_ITEM(list, i) == obj) {
+            PyList_SetSlice(list, i, i + 1, NULL);
+            break;
+        }
+    }
 }
 
 /* Trashcan support. */
@@ -2387,11 +2387,11 @@
 void
 _PyTrash_deposit_object(PyObject *op)
 {
-	assert(PyObject_IS_GC(op));
-	assert(_Py_AS_GC(op)->gc.gc_refs == _PyGC_REFS_UNTRACKED);
-	assert(op->ob_refcnt == 0);
-	_Py_AS_GC(op)->gc.gc_prev = (PyGC_Head *)_PyTrash_delete_later;
-	_PyTrash_delete_later = op;
+    assert(PyObject_IS_GC(op));
+    assert(_Py_AS_GC(op)->gc.gc_refs == _PyGC_REFS_UNTRACKED);
+    assert(op->ob_refcnt == 0);
+    _Py_AS_GC(op)->gc.gc_prev = (PyGC_Head *)_PyTrash_delete_later;
+    _PyTrash_delete_later = op;
 }
 
 /* Dealloccate all the objects in the _PyTrash_delete_later list.  Called when
@@ -2400,24 +2400,24 @@
 void
 _PyTrash_destroy_chain(void)
 {
-	while (_PyTrash_delete_later) {
-		PyObject *op = _PyTrash_delete_later;
-		destructor dealloc = Py_TYPE(op)->tp_dealloc;
+    while (_PyTrash_delete_later) {
+        PyObject *op = _PyTrash_delete_later;
+        destructor dealloc = Py_TYPE(op)->tp_dealloc;
 
-		_PyTrash_delete_later =
-			(PyObject*) _Py_AS_GC(op)->gc.gc_prev;
+        _PyTrash_delete_later =
+            (PyObject*) _Py_AS_GC(op)->gc.gc_prev;
 
-		/* Call the deallocator directly.  This used to try to
-		 * fool Py_DECREF into calling it indirectly, but
-		 * Py_DECREF was already called on this object, and in
-		 * assorted non-release builds calling Py_DECREF again ends
-		 * up distorting allocation statistics.
-		 */
-		assert(op->ob_refcnt == 0);
-		++_PyTrash_delete_nesting;
-		(*dealloc)(op);
-		--_PyTrash_delete_nesting;
-	}
+        /* Call the deallocator directly.  This used to try to
+         * fool Py_DECREF into calling it indirectly, but
+         * Py_DECREF was already called on this object, and in
+         * assorted non-release builds calling Py_DECREF again ends
+         * up distorting allocation statistics.
+         */
+        assert(op->ob_refcnt == 0);
+        ++_PyTrash_delete_nesting;
+        (*dealloc)(op);
+        --_PyTrash_delete_nesting;
+    }
 }
 
 #ifdef __cplusplus
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index c8c36d5..506b1c1 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -27,7 +27,7 @@
    the cyclic garbage collector operates selectively on container objects.
 
 
-        Object-specific allocators
+    Object-specific allocators
     _____   ______   ______       ________
    [ int ] [ dict ] [ list ] ... [ string ]       Python core         |
 +3 | <----- Object-specific memory -----> | <-- Non-object memory --> |
@@ -67,7 +67,7 @@
  *    in Proc. 1995 Int'l. Workshop on Memory Management, September 1995.
  */
 
-/* #undef WITH_MEMORY_LIMITS */		/* disable mem limit checks  */
+/* #undef WITH_MEMORY_LIMITS */         /* disable mem limit checks  */
 
 /*==========================================================================*/
 
@@ -95,22 +95,22 @@
  *
  * For small requests we have the following table:
  *
- * Request in bytes	Size of allocated block      Size class idx
+ * Request in bytes     Size of allocated block      Size class idx
  * ----------------------------------------------------------------
  *        1-8                     8                       0
- *	  9-16                   16                       1
- *	 17-24                   24                       2
- *	 25-32                   32                       3
- *	 33-40                   40                       4
- *	 41-48                   48                       5
- *	 49-56                   56                       6
- *	 57-64                   64                       7
- *	 65-72                   72                       8
- *	  ...                   ...                     ...
- *	241-248                 248                      30
- *	249-256                 256                      31
+ *        9-16                   16                       1
+ *       17-24                   24                       2
+ *       25-32                   32                       3
+ *       33-40                   40                       4
+ *       41-48                   48                       5
+ *       49-56                   56                       6
+ *       57-64                   64                       7
+ *       65-72                   72                       8
+ *        ...                   ...                     ...
+ *      241-248                 248                      30
+ *      249-256                 256                      31
  *
- *	0, 257 and up: routed to the underlying allocator.
+ *      0, 257 and up: routed to the underlying allocator.
  */
 
 /*==========================================================================*/
@@ -127,9 +127,9 @@
  *
  * You shouldn't change this unless you know what you are doing.
  */
-#define ALIGNMENT		8		/* must be 2^N */
-#define ALIGNMENT_SHIFT		3
-#define ALIGNMENT_MASK		(ALIGNMENT - 1)
+#define ALIGNMENT               8               /* must be 2^N */
+#define ALIGNMENT_SHIFT         3
+#define ALIGNMENT_MASK          (ALIGNMENT - 1)
 
 /* Return the number of bytes in size class I, as a uint. */
 #define INDEX2SIZE(I) (((uint)(I) + 1) << ALIGNMENT_SHIFT)
@@ -140,14 +140,14 @@
  * this value according to your application behaviour and memory needs.
  *
  * The following invariants must hold:
- *	1) ALIGNMENT <= SMALL_REQUEST_THRESHOLD <= 256
- *	2) SMALL_REQUEST_THRESHOLD is evenly divisible by ALIGNMENT
+ *      1) ALIGNMENT <= SMALL_REQUEST_THRESHOLD <= 256
+ *      2) SMALL_REQUEST_THRESHOLD is evenly divisible by ALIGNMENT
  *
  * Although not required, for better performance and space efficiency,
  * it is recommended that SMALL_REQUEST_THRESHOLD is set to a power of 2.
  */
-#define SMALL_REQUEST_THRESHOLD	256
-#define NB_SMALL_SIZE_CLASSES	(SMALL_REQUEST_THRESHOLD / ALIGNMENT)
+#define SMALL_REQUEST_THRESHOLD 256
+#define NB_SMALL_SIZE_CLASSES   (SMALL_REQUEST_THRESHOLD / ALIGNMENT)
 
 /*
  * The system's VMM page size can be obtained on most unices with a
@@ -159,15 +159,15 @@
  * violation fault.  4K is apparently OK for all the platforms that python
  * currently targets.
  */
-#define SYSTEM_PAGE_SIZE	(4 * 1024)
-#define SYSTEM_PAGE_SIZE_MASK	(SYSTEM_PAGE_SIZE - 1)
+#define SYSTEM_PAGE_SIZE        (4 * 1024)
+#define SYSTEM_PAGE_SIZE_MASK   (SYSTEM_PAGE_SIZE - 1)
 
 /*
  * Maximum amount of memory managed by the allocator for small requests.
  */
 #ifdef WITH_MEMORY_LIMITS
 #ifndef SMALL_MEMORY_LIMIT
-#define SMALL_MEMORY_LIMIT	(64 * 1024 * 1024)	/* 64 MB -- more? */
+#define SMALL_MEMORY_LIMIT      (64 * 1024 * 1024)      /* 64 MB -- more? */
 #endif
 #endif
 
@@ -184,18 +184,18 @@
  * some address space wastage, but this is the most portable way to request
  * memory from the system across various platforms.
  */
-#define ARENA_SIZE		(256 << 10)	/* 256KB */
+#define ARENA_SIZE              (256 << 10)     /* 256KB */
 
 #ifdef WITH_MEMORY_LIMITS
-#define MAX_ARENAS		(SMALL_MEMORY_LIMIT / ARENA_SIZE)
+#define MAX_ARENAS              (SMALL_MEMORY_LIMIT / ARENA_SIZE)
 #endif
 
 /*
  * Size of the pools used for small blocks. Should be a power of 2,
  * between 1K and SYSTEM_PAGE_SIZE, that is: 1k, 2k, 4k.
  */
-#define POOL_SIZE		SYSTEM_PAGE_SIZE	/* must be 2^N */
-#define POOL_SIZE_MASK		SYSTEM_PAGE_SIZE_MASK
+#define POOL_SIZE               SYSTEM_PAGE_SIZE        /* must be 2^N */
+#define POOL_SIZE_MASK          SYSTEM_PAGE_SIZE_MASK
 
 /*
  * -- End of tunable settings section --
@@ -221,92 +221,92 @@
 /*
  * Python's threads are serialized, so object malloc locking is disabled.
  */
-#define SIMPLELOCK_DECL(lock)	/* simple lock declaration		*/
-#define SIMPLELOCK_INIT(lock)	/* allocate (if needed) and initialize	*/
-#define SIMPLELOCK_FINI(lock)	/* free/destroy an existing lock 	*/
-#define SIMPLELOCK_LOCK(lock)	/* acquire released lock */
-#define SIMPLELOCK_UNLOCK(lock)	/* release acquired lock */
+#define SIMPLELOCK_DECL(lock)   /* simple lock declaration              */
+#define SIMPLELOCK_INIT(lock)   /* allocate (if needed) and initialize  */
+#define SIMPLELOCK_FINI(lock)   /* free/destroy an existing lock        */
+#define SIMPLELOCK_LOCK(lock)   /* acquire released lock */
+#define SIMPLELOCK_UNLOCK(lock) /* release acquired lock */
 
 /*
  * Basic types
  * I don't care if these are defined in <sys/types.h> or elsewhere. Axiom.
  */
 #undef  uchar
-#define uchar	unsigned char	/* assuming == 8 bits  */
+#define uchar   unsigned char   /* assuming == 8 bits  */
 
 #undef  uint
-#define uint	unsigned int	/* assuming >= 16 bits */
+#define uint    unsigned int    /* assuming >= 16 bits */
 
 #undef  ulong
-#define ulong	unsigned long	/* assuming >= 32 bits */
+#define ulong   unsigned long   /* assuming >= 32 bits */
 
 #undef uptr
-#define uptr	Py_uintptr_t
+#define uptr    Py_uintptr_t
 
 /* When you say memory, my mind reasons in terms of (pointers to) blocks */
 typedef uchar block;
 
 /* Pool for small blocks. */
 struct pool_header {
-	union { block *_padding;
-		uint count; } ref;	/* number of allocated blocks    */
-	block *freeblock;		/* pool's free list head         */
-	struct pool_header *nextpool;	/* next pool of this size class  */
-	struct pool_header *prevpool;	/* previous pool       ""        */
-	uint arenaindex;		/* index into arenas of base adr */
-	uint szidx;			/* block size class index	 */
-	uint nextoffset;		/* bytes to virgin block	 */
-	uint maxnextoffset;		/* largest valid nextoffset	 */
+    union { block *_padding;
+        uint count; } ref;              /* number of allocated blocks    */
+    block *freeblock;                   /* pool's free list head         */
+    struct pool_header *nextpool;       /* next pool of this size class  */
+    struct pool_header *prevpool;       /* previous pool       ""        */
+    uint arenaindex;                    /* index into arenas of base adr */
+    uint szidx;                         /* block size class index        */
+    uint nextoffset;                    /* bytes to virgin block         */
+    uint maxnextoffset;                 /* largest valid nextoffset      */
 };
 
 typedef struct pool_header *poolp;
 
 /* Record keeping for arenas. */
 struct arena_object {
-	/* The address of the arena, as returned by malloc.  Note that 0
-	 * will never be returned by a successful malloc, and is used
-	 * here to mark an arena_object that doesn't correspond to an
-	 * allocated arena.
-	 */
-	uptr address;
+    /* The address of the arena, as returned by malloc.  Note that 0
+     * will never be returned by a successful malloc, and is used
+     * here to mark an arena_object that doesn't correspond to an
+     * allocated arena.
+     */
+    uptr address;
 
-	/* Pool-aligned pointer to the next pool to be carved off. */
-	block* pool_address;
+    /* Pool-aligned pointer to the next pool to be carved off. */
+    block* pool_address;
 
-	/* The number of available pools in the arena:  free pools + never-
-	 * allocated pools.
-	 */
-	uint nfreepools;
+    /* The number of available pools in the arena:  free pools + never-
+     * allocated pools.
+     */
+    uint nfreepools;
 
-	/* The total number of pools in the arena, whether or not available. */
-	uint ntotalpools;
+    /* The total number of pools in the arena, whether or not available. */
+    uint ntotalpools;
 
-	/* Singly-linked list of available pools. */
-	struct pool_header* freepools;
+    /* Singly-linked list of available pools. */
+    struct pool_header* freepools;
 
-	/* Whenever this arena_object is not associated with an allocated
-	 * arena, the nextarena member is used to link all unassociated
-	 * arena_objects in the singly-linked `unused_arena_objects` list.
-	 * The prevarena member is unused in this case.
-	 *
-	 * When this arena_object is associated with an allocated arena
-	 * with at least one available pool, both members are used in the
-	 * doubly-linked `usable_arenas` list, which is maintained in
-	 * increasing order of `nfreepools` values.
-	 *
-	 * Else this arena_object is associated with an allocated arena
-	 * all of whose pools are in use.  `nextarena` and `prevarena`
-	 * are both meaningless in this case.
-	 */
-	struct arena_object* nextarena;
-	struct arena_object* prevarena;
+    /* Whenever this arena_object is not associated with an allocated
+     * arena, the nextarena member is used to link all unassociated
+     * arena_objects in the singly-linked `unused_arena_objects` list.
+     * The prevarena member is unused in this case.
+     *
+     * When this arena_object is associated with an allocated arena
+     * with at least one available pool, both members are used in the
+     * doubly-linked `usable_arenas` list, which is maintained in
+     * increasing order of `nfreepools` values.
+     *
+     * Else this arena_object is associated with an allocated arena
+     * all of whose pools are in use.  `nextarena` and `prevarena`
+     * are both meaningless in this case.
+     */
+    struct arena_object* nextarena;
+    struct arena_object* prevarena;
 };
 
 #undef  ROUNDUP
-#define ROUNDUP(x)		(((x) + ALIGNMENT_MASK) & ~ALIGNMENT_MASK)
-#define POOL_OVERHEAD		ROUNDUP(sizeof(struct pool_header))
+#define ROUNDUP(x)              (((x) + ALIGNMENT_MASK) & ~ALIGNMENT_MASK)
+#define POOL_OVERHEAD           ROUNDUP(sizeof(struct pool_header))
 
-#define DUMMY_SIZE_IDX		0xffff	/* size class of newly cached pools */
+#define DUMMY_SIZE_IDX          0xffff  /* size class of newly cached pools */
 
 /* Round pointer P down to the closest pool-aligned address <= P, as a poolp */
 #define POOL_ADDR(P) ((poolp)((uptr)(P) & ~(uptr)POOL_SIZE_MASK))
@@ -320,10 +320,10 @@
  * This malloc lock
  */
 SIMPLELOCK_DECL(_malloc_lock)
-#define LOCK()		SIMPLELOCK_LOCK(_malloc_lock)
-#define UNLOCK()	SIMPLELOCK_UNLOCK(_malloc_lock)
-#define LOCK_INIT()	SIMPLELOCK_INIT(_malloc_lock)
-#define LOCK_FINI()	SIMPLELOCK_FINI(_malloc_lock)
+#define LOCK()          SIMPLELOCK_LOCK(_malloc_lock)
+#define UNLOCK()        SIMPLELOCK_UNLOCK(_malloc_lock)
+#define LOCK_INIT()     SIMPLELOCK_INIT(_malloc_lock)
+#define LOCK_FINI()     SIMPLELOCK_FINI(_malloc_lock)
 
 /*
  * Pool table -- headed, circular, doubly-linked lists of partially used pools.
@@ -403,9 +403,9 @@
 compensating for that a pool_header's nextpool and prevpool members
 immediately follow a pool_header's first two members:
 
-	union { block *_padding;
-		uint count; } ref;
-	block *freeblock;
+    union { block *_padding;
+        uint count; } ref;
+    block *freeblock;
 
 each of which consume sizeof(block *) bytes.  So what usedpools[i+i] really
 contains is a fudged-up pointer p such that *if* C believes it's a poolp
@@ -421,25 +421,25 @@
 the prevpool member.
 **************************************************************************** */
 
-#define PTA(x)	((poolp )((uchar *)&(usedpools[2*(x)]) - 2*sizeof(block *)))
-#define PT(x)	PTA(x), PTA(x)
+#define PTA(x)  ((poolp )((uchar *)&(usedpools[2*(x)]) - 2*sizeof(block *)))
+#define PT(x)   PTA(x), PTA(x)
 
 static poolp usedpools[2 * ((NB_SMALL_SIZE_CLASSES + 7) / 8) * 8] = {
-	PT(0), PT(1), PT(2), PT(3), PT(4), PT(5), PT(6), PT(7)
+    PT(0), PT(1), PT(2), PT(3), PT(4), PT(5), PT(6), PT(7)
 #if NB_SMALL_SIZE_CLASSES > 8
-	, PT(8), PT(9), PT(10), PT(11), PT(12), PT(13), PT(14), PT(15)
+    , PT(8), PT(9), PT(10), PT(11), PT(12), PT(13), PT(14), PT(15)
 #if NB_SMALL_SIZE_CLASSES > 16
-	, PT(16), PT(17), PT(18), PT(19), PT(20), PT(21), PT(22), PT(23)
+    , PT(16), PT(17), PT(18), PT(19), PT(20), PT(21), PT(22), PT(23)
 #if NB_SMALL_SIZE_CLASSES > 24
-	, PT(24), PT(25), PT(26), PT(27), PT(28), PT(29), PT(30), PT(31)
+    , PT(24), PT(25), PT(26), PT(27), PT(28), PT(29), PT(30), PT(31)
 #if NB_SMALL_SIZE_CLASSES > 32
-	, PT(32), PT(33), PT(34), PT(35), PT(36), PT(37), PT(38), PT(39)
+    , PT(32), PT(33), PT(34), PT(35), PT(36), PT(37), PT(38), PT(39)
 #if NB_SMALL_SIZE_CLASSES > 40
-	, PT(40), PT(41), PT(42), PT(43), PT(44), PT(45), PT(46), PT(47)
+    , PT(40), PT(41), PT(42), PT(43), PT(44), PT(45), PT(46), PT(47)
 #if NB_SMALL_SIZE_CLASSES > 48
-	, PT(48), PT(49), PT(50), PT(51), PT(52), PT(53), PT(54), PT(55)
+    , PT(48), PT(49), PT(50), PT(51), PT(52), PT(53), PT(54), PT(55)
 #if NB_SMALL_SIZE_CLASSES > 56
-	, PT(56), PT(57), PT(58), PT(59), PT(60), PT(61), PT(62), PT(63)
+    , PT(56), PT(57), PT(58), PT(59), PT(60), PT(61), PT(62), PT(63)
 #endif /* NB_SMALL_SIZE_CLASSES > 56 */
 #endif /* NB_SMALL_SIZE_CLASSES > 48 */
 #endif /* NB_SMALL_SIZE_CLASSES > 40 */
@@ -523,90 +523,90 @@
 static struct arena_object*
 new_arena(void)
 {
-	struct arena_object* arenaobj;
-	uint excess;	/* number of bytes above pool alignment */
+    struct arena_object* arenaobj;
+    uint excess;        /* number of bytes above pool alignment */
 
 #ifdef PYMALLOC_DEBUG
-	if (Py_GETENV("PYTHONMALLOCSTATS"))
-		_PyObject_DebugMallocStats();
+    if (Py_GETENV("PYTHONMALLOCSTATS"))
+        _PyObject_DebugMallocStats();
 #endif
-	if (unused_arena_objects == NULL) {
-		uint i;
-		uint numarenas;
-		size_t nbytes;
+    if (unused_arena_objects == NULL) {
+        uint i;
+        uint numarenas;
+        size_t nbytes;
 
-		/* Double the number of arena objects on each allocation.
-		 * Note that it's possible for `numarenas` to overflow.
-		 */
-		numarenas = maxarenas ? maxarenas << 1 : INITIAL_ARENA_OBJECTS;
-		if (numarenas <= maxarenas)
-			return NULL;	/* overflow */
+        /* Double the number of arena objects on each allocation.
+         * Note that it's possible for `numarenas` to overflow.
+         */
+        numarenas = maxarenas ? maxarenas << 1 : INITIAL_ARENA_OBJECTS;
+        if (numarenas <= maxarenas)
+            return NULL;                /* overflow */
 #if SIZEOF_SIZE_T <= SIZEOF_INT
-		if (numarenas > PY_SIZE_MAX / sizeof(*arenas))
-			return NULL;	/* overflow */
+        if (numarenas > PY_SIZE_MAX / sizeof(*arenas))
+            return NULL;                /* overflow */
 #endif
-		nbytes = numarenas * sizeof(*arenas);
-		arenaobj = (struct arena_object *)realloc(arenas, nbytes);
-		if (arenaobj == NULL)
-			return NULL;
-		arenas = arenaobj;
+        nbytes = numarenas * sizeof(*arenas);
+        arenaobj = (struct arena_object *)realloc(arenas, nbytes);
+        if (arenaobj == NULL)
+            return NULL;
+        arenas = arenaobj;
 
-		/* We might need to fix pointers that were copied.  However,
-		 * new_arena only gets called when all the pages in the
-		 * previous arenas are full.  Thus, there are *no* pointers
-		 * into the old array. Thus, we don't have to worry about
-		 * invalid pointers.  Just to be sure, some asserts:
-		 */
-		assert(usable_arenas == NULL);
-		assert(unused_arena_objects == NULL);
+        /* We might need to fix pointers that were copied.  However,
+         * new_arena only gets called when all the pages in the
+         * previous arenas are full.  Thus, there are *no* pointers
+         * into the old array. Thus, we don't have to worry about
+         * invalid pointers.  Just to be sure, some asserts:
+         */
+        assert(usable_arenas == NULL);
+        assert(unused_arena_objects == NULL);
 
-		/* Put the new arenas on the unused_arena_objects list. */
-		for (i = maxarenas; i < numarenas; ++i) {
-			arenas[i].address = 0;	/* mark as unassociated */
-			arenas[i].nextarena = i < numarenas - 1 ?
-					       &arenas[i+1] : NULL;
-		}
+        /* Put the new arenas on the unused_arena_objects list. */
+        for (i = maxarenas; i < numarenas; ++i) {
+            arenas[i].address = 0;              /* mark as unassociated */
+            arenas[i].nextarena = i < numarenas - 1 ?
+                                   &arenas[i+1] : NULL;
+        }
 
-		/* Update globals. */
-		unused_arena_objects = &arenas[maxarenas];
-		maxarenas = numarenas;
-	}
+        /* Update globals. */
+        unused_arena_objects = &arenas[maxarenas];
+        maxarenas = numarenas;
+    }
 
-	/* Take the next available arena object off the head of the list. */
-	assert(unused_arena_objects != NULL);
-	arenaobj = unused_arena_objects;
-	unused_arena_objects = arenaobj->nextarena;
-	assert(arenaobj->address == 0);
-	arenaobj->address = (uptr)malloc(ARENA_SIZE);
-	if (arenaobj->address == 0) {
-		/* The allocation failed: return NULL after putting the
-		 * arenaobj back.
-		 */
-		arenaobj->nextarena = unused_arena_objects;
-		unused_arena_objects = arenaobj;
-		return NULL;
-	}
+    /* Take the next available arena object off the head of the list. */
+    assert(unused_arena_objects != NULL);
+    arenaobj = unused_arena_objects;
+    unused_arena_objects = arenaobj->nextarena;
+    assert(arenaobj->address == 0);
+    arenaobj->address = (uptr)malloc(ARENA_SIZE);
+    if (arenaobj->address == 0) {
+        /* The allocation failed: return NULL after putting the
+         * arenaobj back.
+         */
+        arenaobj->nextarena = unused_arena_objects;
+        unused_arena_objects = arenaobj;
+        return NULL;
+    }
 
-	++narenas_currently_allocated;
+    ++narenas_currently_allocated;
 #ifdef PYMALLOC_DEBUG
-	++ntimes_arena_allocated;
-	if (narenas_currently_allocated > narenas_highwater)
-		narenas_highwater = narenas_currently_allocated;
+    ++ntimes_arena_allocated;
+    if (narenas_currently_allocated > narenas_highwater)
+        narenas_highwater = narenas_currently_allocated;
 #endif
-	arenaobj->freepools = NULL;
-	/* pool_address <- first pool-aligned address in the arena
-	   nfreepools <- number of whole pools that fit after alignment */
-	arenaobj->pool_address = (block*)arenaobj->address;
-	arenaobj->nfreepools = ARENA_SIZE / POOL_SIZE;
-	assert(POOL_SIZE * arenaobj->nfreepools == ARENA_SIZE);
-	excess = (uint)(arenaobj->address & POOL_SIZE_MASK);
-	if (excess != 0) {
-		--arenaobj->nfreepools;
-		arenaobj->pool_address += POOL_SIZE - excess;
-	}
-	arenaobj->ntotalpools = arenaobj->nfreepools;
+    arenaobj->freepools = NULL;
+    /* pool_address <- first pool-aligned address in the arena
+       nfreepools <- number of whole pools that fit after alignment */
+    arenaobj->pool_address = (block*)arenaobj->address;
+    arenaobj->nfreepools = ARENA_SIZE / POOL_SIZE;
+    assert(POOL_SIZE * arenaobj->nfreepools == ARENA_SIZE);
+    excess = (uint)(arenaobj->address & POOL_SIZE_MASK);
+    if (excess != 0) {
+        --arenaobj->nfreepools;
+        arenaobj->pool_address += POOL_SIZE - excess;
+    }
+    arenaobj->ntotalpools = arenaobj->nfreepools;
 
-	return arenaobj;
+    return arenaobj;
 }
 
 /*
@@ -622,11 +622,11 @@
 Tricky:  Let B be the arena base address associated with the pool, B =
 arenas[(POOL)->arenaindex].address.  Then P belongs to the arena if and only if
 
-	B <= P < B + ARENA_SIZE
+    B <= P < B + ARENA_SIZE
 
 Subtracting B throughout, this is true iff
 
-	0 <= P-B < ARENA_SIZE
+    0 <= P-B < ARENA_SIZE
 
 By using unsigned arithmetic, the "0 <=" half of the test can be skipped.
 
@@ -660,7 +660,7 @@
 arena_object (one not currently associated with an allocated arena),
 AO.address is 0, and the second test in the macro reduces to:
 
-	P < ARENA_SIZE
+    P < ARENA_SIZE
 
 If P >= ARENA_SIZE (extremely likely), the macro again correctly concludes
 that P is not controlled by obmalloc.  However, if P < ARENA_SIZE, this part
@@ -683,10 +683,10 @@
 obmalloc controls.  Since this test is needed at every entry point, it's
 extremely desirable that it be this fast.
 */
-#define Py_ADDRESS_IN_RANGE(P, POOL)			\
-	((POOL)->arenaindex < maxarenas &&		\
-	 (uptr)(P) - arenas[(POOL)->arenaindex].address < (uptr)ARENA_SIZE && \
-	 arenas[(POOL)->arenaindex].address != 0)
+#define Py_ADDRESS_IN_RANGE(P, POOL)                    \
+    ((POOL)->arenaindex < maxarenas &&                  \
+     (uptr)(P) - arenas[(POOL)->arenaindex].address < (uptr)ARENA_SIZE && \
+     arenas[(POOL)->arenaindex].address != 0)
 
 
 /* This is only useful when running memory debuggers such as
@@ -709,7 +709,7 @@
 #undef Py_ADDRESS_IN_RANGE
 
 #if defined(__GNUC__) && ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) || \
-			  (__GNUC__ >= 4))
+              (__GNUC__ >= 4))
 #define Py_NO_INLINE __attribute__((__noinline__))
 #else
 #define Py_NO_INLINE
@@ -738,201 +738,201 @@
 void *
 PyObject_Malloc(size_t nbytes)
 {
-	block *bp;
-	poolp pool;
-	poolp next;
-	uint size;
+    block *bp;
+    poolp pool;
+    poolp next;
+    uint size;
 
 #ifdef WITH_VALGRIND
-	if (UNLIKELY(running_on_valgrind == -1))
-		running_on_valgrind = RUNNING_ON_VALGRIND;
-	if (UNLIKELY(running_on_valgrind))
-		goto redirect;
+    if (UNLIKELY(running_on_valgrind == -1))
+        running_on_valgrind = RUNNING_ON_VALGRIND;
+    if (UNLIKELY(running_on_valgrind))
+        goto redirect;
 #endif
 
-	/*
-	 * Limit ourselves to PY_SSIZE_T_MAX bytes to prevent security holes.
-	 * Most python internals blindly use a signed Py_ssize_t to track
-	 * things without checking for overflows or negatives.
-	 * As size_t is unsigned, checking for nbytes < 0 is not required.
-	 */
-	if (nbytes > PY_SSIZE_T_MAX)
-		return NULL;
+    /*
+     * Limit ourselves to PY_SSIZE_T_MAX bytes to prevent security holes.
+     * Most python internals blindly use a signed Py_ssize_t to track
+     * things without checking for overflows or negatives.
+     * As size_t is unsigned, checking for nbytes < 0 is not required.
+     */
+    if (nbytes > PY_SSIZE_T_MAX)
+        return NULL;
 
-	/*
-	 * This implicitly redirects malloc(0).
-	 */
-	if ((nbytes - 1) < SMALL_REQUEST_THRESHOLD) {
-		LOCK();
-		/*
-		 * Most frequent paths first
-		 */
-		size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
-		pool = usedpools[size + size];
-		if (pool != pool->nextpool) {
-			/*
-			 * There is a used pool for this size class.
-			 * Pick up the head block of its free list.
-			 */
-			++pool->ref.count;
-			bp = pool->freeblock;
-			assert(bp != NULL);
-			if ((pool->freeblock = *(block **)bp) != NULL) {
-				UNLOCK();
-				return (void *)bp;
-			}
-			/*
-			 * Reached the end of the free list, try to extend it.
-			 */
-			if (pool->nextoffset <= pool->maxnextoffset) {
-				/* There is room for another block. */
-				pool->freeblock = (block*)pool +
-						  pool->nextoffset;
-				pool->nextoffset += INDEX2SIZE(size);
-				*(block **)(pool->freeblock) = NULL;
-				UNLOCK();
-				return (void *)bp;
-			}
-			/* Pool is full, unlink from used pools. */
-			next = pool->nextpool;
-			pool = pool->prevpool;
-			next->prevpool = pool;
-			pool->nextpool = next;
-			UNLOCK();
-			return (void *)bp;
-		}
+    /*
+     * This implicitly redirects malloc(0).
+     */
+    if ((nbytes - 1) < SMALL_REQUEST_THRESHOLD) {
+        LOCK();
+        /*
+         * Most frequent paths first
+         */
+        size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
+        pool = usedpools[size + size];
+        if (pool != pool->nextpool) {
+            /*
+             * There is a used pool for this size class.
+             * Pick up the head block of its free list.
+             */
+            ++pool->ref.count;
+            bp = pool->freeblock;
+            assert(bp != NULL);
+            if ((pool->freeblock = *(block **)bp) != NULL) {
+                UNLOCK();
+                return (void *)bp;
+            }
+            /*
+             * Reached the end of the free list, try to extend it.
+             */
+            if (pool->nextoffset <= pool->maxnextoffset) {
+                /* There is room for another block. */
+                pool->freeblock = (block*)pool +
+                                  pool->nextoffset;
+                pool->nextoffset += INDEX2SIZE(size);
+                *(block **)(pool->freeblock) = NULL;
+                UNLOCK();
+                return (void *)bp;
+            }
+            /* Pool is full, unlink from used pools. */
+            next = pool->nextpool;
+            pool = pool->prevpool;
+            next->prevpool = pool;
+            pool->nextpool = next;
+            UNLOCK();
+            return (void *)bp;
+        }
 
-		/* There isn't a pool of the right size class immediately
-		 * available:  use a free pool.
-		 */
-		if (usable_arenas == NULL) {
-			/* No arena has a free pool:  allocate a new arena. */
+        /* There isn't a pool of the right size class immediately
+         * available:  use a free pool.
+         */
+        if (usable_arenas == NULL) {
+            /* No arena has a free pool:  allocate a new arena. */
 #ifdef WITH_MEMORY_LIMITS
-			if (narenas_currently_allocated >= MAX_ARENAS) {
-				UNLOCK();
-				goto redirect;
-			}
+            if (narenas_currently_allocated >= MAX_ARENAS) {
+                UNLOCK();
+                goto redirect;
+            }
 #endif
-			usable_arenas = new_arena();
-			if (usable_arenas == NULL) {
-				UNLOCK();
-				goto redirect;
-			}
-			usable_arenas->nextarena =
-				usable_arenas->prevarena = NULL;
-		}
-		assert(usable_arenas->address != 0);
+            usable_arenas = new_arena();
+            if (usable_arenas == NULL) {
+                UNLOCK();
+                goto redirect;
+            }
+            usable_arenas->nextarena =
+                usable_arenas->prevarena = NULL;
+        }
+        assert(usable_arenas->address != 0);
 
-		/* Try to get a cached free pool. */
-		pool = usable_arenas->freepools;
-		if (pool != NULL) {
-			/* Unlink from cached pools. */
-			usable_arenas->freepools = pool->nextpool;
+        /* Try to get a cached free pool. */
+        pool = usable_arenas->freepools;
+        if (pool != NULL) {
+            /* Unlink from cached pools. */
+            usable_arenas->freepools = pool->nextpool;
 
-			/* This arena already had the smallest nfreepools
-			 * value, so decreasing nfreepools doesn't change
-			 * that, and we don't need to rearrange the
-			 * usable_arenas list.  However, if the arena has
-			 * become wholly allocated, we need to remove its
-			 * arena_object from usable_arenas.
-			 */
-			--usable_arenas->nfreepools;
-			if (usable_arenas->nfreepools == 0) {
-				/* Wholly allocated:  remove. */
-				assert(usable_arenas->freepools == NULL);
-				assert(usable_arenas->nextarena == NULL ||
-				       usable_arenas->nextarena->prevarena ==
-					   usable_arenas);
+            /* This arena already had the smallest nfreepools
+             * value, so decreasing nfreepools doesn't change
+             * that, and we don't need to rearrange the
+             * usable_arenas list.  However, if the arena has
+             * become wholly allocated, we need to remove its
+             * arena_object from usable_arenas.
+             */
+            --usable_arenas->nfreepools;
+            if (usable_arenas->nfreepools == 0) {
+                /* Wholly allocated:  remove. */
+                assert(usable_arenas->freepools == NULL);
+                assert(usable_arenas->nextarena == NULL ||
+                       usable_arenas->nextarena->prevarena ==
+                       usable_arenas);
 
-				usable_arenas = usable_arenas->nextarena;
-				if (usable_arenas != NULL) {
-					usable_arenas->prevarena = NULL;
-					assert(usable_arenas->address != 0);
-				}
-			}
-			else {
-				/* nfreepools > 0:  it must be that freepools
-				 * isn't NULL, or that we haven't yet carved
-				 * off all the arena's pools for the first
-				 * time.
-				 */
-				assert(usable_arenas->freepools != NULL ||
-				       usable_arenas->pool_address <=
-				           (block*)usable_arenas->address +
-				               ARENA_SIZE - POOL_SIZE);
-			}
-		init_pool:
-			/* Frontlink to used pools. */
-			next = usedpools[size + size]; /* == prev */
-			pool->nextpool = next;
-			pool->prevpool = next;
-			next->nextpool = pool;
-			next->prevpool = pool;
-			pool->ref.count = 1;
-			if (pool->szidx == size) {
-				/* Luckily, this pool last contained blocks
-				 * of the same size class, so its header
-				 * and free list are already initialized.
-				 */
-				bp = pool->freeblock;
-				pool->freeblock = *(block **)bp;
-				UNLOCK();
-				return (void *)bp;
-			}
-			/*
-			 * Initialize the pool header, set up the free list to
-			 * contain just the second block, and return the first
-			 * block.
-			 */
-			pool->szidx = size;
-			size = INDEX2SIZE(size);
-			bp = (block *)pool + POOL_OVERHEAD;
-			pool->nextoffset = POOL_OVERHEAD + (size << 1);
-			pool->maxnextoffset = POOL_SIZE - size;
-			pool->freeblock = bp + size;
-			*(block **)(pool->freeblock) = NULL;
-			UNLOCK();
-			return (void *)bp;
-		}
+                usable_arenas = usable_arenas->nextarena;
+                if (usable_arenas != NULL) {
+                    usable_arenas->prevarena = NULL;
+                    assert(usable_arenas->address != 0);
+                }
+            }
+            else {
+                /* nfreepools > 0:  it must be that freepools
+                 * isn't NULL, or that we haven't yet carved
+                 * off all the arena's pools for the first
+                 * time.
+                 */
+                assert(usable_arenas->freepools != NULL ||
+                       usable_arenas->pool_address <=
+                       (block*)usable_arenas->address +
+                           ARENA_SIZE - POOL_SIZE);
+            }
+        init_pool:
+            /* Frontlink to used pools. */
+            next = usedpools[size + size]; /* == prev */
+            pool->nextpool = next;
+            pool->prevpool = next;
+            next->nextpool = pool;
+            next->prevpool = pool;
+            pool->ref.count = 1;
+            if (pool->szidx == size) {
+                /* Luckily, this pool last contained blocks
+                 * of the same size class, so its header
+                 * and free list are already initialized.
+                 */
+                bp = pool->freeblock;
+                pool->freeblock = *(block **)bp;
+                UNLOCK();
+                return (void *)bp;
+            }
+            /*
+             * Initialize the pool header, set up the free list to
+             * contain just the second block, and return the first
+             * block.
+             */
+            pool->szidx = size;
+            size = INDEX2SIZE(size);
+            bp = (block *)pool + POOL_OVERHEAD;
+            pool->nextoffset = POOL_OVERHEAD + (size << 1);
+            pool->maxnextoffset = POOL_SIZE - size;
+            pool->freeblock = bp + size;
+            *(block **)(pool->freeblock) = NULL;
+            UNLOCK();
+            return (void *)bp;
+        }
 
-		/* Carve off a new pool. */
-		assert(usable_arenas->nfreepools > 0);
-		assert(usable_arenas->freepools == NULL);
-		pool = (poolp)usable_arenas->pool_address;
-		assert((block*)pool <= (block*)usable_arenas->address +
-		                       ARENA_SIZE - POOL_SIZE);
-		pool->arenaindex = usable_arenas - arenas;
-		assert(&arenas[pool->arenaindex] == usable_arenas);
-		pool->szidx = DUMMY_SIZE_IDX;
-		usable_arenas->pool_address += POOL_SIZE;
-		--usable_arenas->nfreepools;
+        /* Carve off a new pool. */
+        assert(usable_arenas->nfreepools > 0);
+        assert(usable_arenas->freepools == NULL);
+        pool = (poolp)usable_arenas->pool_address;
+        assert((block*)pool <= (block*)usable_arenas->address +
+                               ARENA_SIZE - POOL_SIZE);
+        pool->arenaindex = usable_arenas - arenas;
+        assert(&arenas[pool->arenaindex] == usable_arenas);
+        pool->szidx = DUMMY_SIZE_IDX;
+        usable_arenas->pool_address += POOL_SIZE;
+        --usable_arenas->nfreepools;
 
-		if (usable_arenas->nfreepools == 0) {
-			assert(usable_arenas->nextarena == NULL ||
-			       usable_arenas->nextarena->prevarena ==
-			       	   usable_arenas);
-			/* Unlink the arena:  it is completely allocated. */
-			usable_arenas = usable_arenas->nextarena;
-			if (usable_arenas != NULL) {
-				usable_arenas->prevarena = NULL;
-				assert(usable_arenas->address != 0);
-			}
-		}
+        if (usable_arenas->nfreepools == 0) {
+            assert(usable_arenas->nextarena == NULL ||
+                   usable_arenas->nextarena->prevarena ==
+                   usable_arenas);
+            /* Unlink the arena:  it is completely allocated. */
+            usable_arenas = usable_arenas->nextarena;
+            if (usable_arenas != NULL) {
+                usable_arenas->prevarena = NULL;
+                assert(usable_arenas->address != 0);
+            }
+        }
 
-		goto init_pool;
-	}
+        goto init_pool;
+    }
 
-        /* The small block allocator ends here. */
+    /* The small block allocator ends here. */
 
 redirect:
-	/* Redirect the original request to the underlying (libc) allocator.
-	 * We jump here on bigger requests, on error in the code above (as a
-	 * last chance to serve the request) or when the max memory limit
-	 * has been reached.
-	 */
-	if (nbytes == 0)
-		nbytes = 1;
-	return (void *)malloc(nbytes);
+    /* Redirect the original request to the underlying (libc) allocator.
+     * We jump here on bigger requests, on error in the code above (as a
+     * last chance to serve the request) or when the max memory limit
+     * has been reached.
+     */
+    if (nbytes == 0)
+        nbytes = 1;
+    return (void *)malloc(nbytes);
 }
 
 /* free */
@@ -941,218 +941,218 @@
 void
 PyObject_Free(void *p)
 {
-	poolp pool;
-	block *lastfree;
-	poolp next, prev;
-	uint size;
+    poolp pool;
+    block *lastfree;
+    poolp next, prev;
+    uint size;
 
-	if (p == NULL)	/* free(NULL) has no effect */
-		return;
+    if (p == NULL)      /* free(NULL) has no effect */
+        return;
 
 #ifdef WITH_VALGRIND
-	if (UNLIKELY(running_on_valgrind > 0))
-		goto redirect;
+    if (UNLIKELY(running_on_valgrind > 0))
+        goto redirect;
 #endif
 
-	pool = POOL_ADDR(p);
-	if (Py_ADDRESS_IN_RANGE(p, pool)) {
-		/* We allocated this address. */
-		LOCK();
-		/* Link p to the start of the pool's freeblock list.  Since
-		 * the pool had at least the p block outstanding, the pool
-		 * wasn't empty (so it's already in a usedpools[] list, or
-		 * was full and is in no list -- it's not in the freeblocks
-		 * list in any case).
-		 */
-		assert(pool->ref.count > 0);	/* else it was empty */
-		*(block **)p = lastfree = pool->freeblock;
-		pool->freeblock = (block *)p;
-		if (lastfree) {
-			struct arena_object* ao;
-			uint nf;  /* ao->nfreepools */
+    pool = POOL_ADDR(p);
+    if (Py_ADDRESS_IN_RANGE(p, pool)) {
+        /* We allocated this address. */
+        LOCK();
+        /* Link p to the start of the pool's freeblock list.  Since
+         * the pool had at least the p block outstanding, the pool
+         * wasn't empty (so it's already in a usedpools[] list, or
+         * was full and is in no list -- it's not in the freeblocks
+         * list in any case).
+         */
+        assert(pool->ref.count > 0);            /* else it was empty */
+        *(block **)p = lastfree = pool->freeblock;
+        pool->freeblock = (block *)p;
+        if (lastfree) {
+            struct arena_object* ao;
+            uint nf;  /* ao->nfreepools */
 
-			/* freeblock wasn't NULL, so the pool wasn't full,
-			 * and the pool is in a usedpools[] list.
-			 */
-			if (--pool->ref.count != 0) {
-				/* pool isn't empty:  leave it in usedpools */
-				UNLOCK();
-				return;
-			}
-			/* Pool is now empty:  unlink from usedpools, and
-			 * link to the front of freepools.  This ensures that
-			 * previously freed pools will be allocated later
-			 * (being not referenced, they are perhaps paged out).
-			 */
-			next = pool->nextpool;
-			prev = pool->prevpool;
-			next->prevpool = prev;
-			prev->nextpool = next;
+            /* freeblock wasn't NULL, so the pool wasn't full,
+             * and the pool is in a usedpools[] list.
+             */
+            if (--pool->ref.count != 0) {
+                /* pool isn't empty:  leave it in usedpools */
+                UNLOCK();
+                return;
+            }
+            /* Pool is now empty:  unlink from usedpools, and
+             * link to the front of freepools.  This ensures that
+             * previously freed pools will be allocated later
+             * (being not referenced, they are perhaps paged out).
+             */
+            next = pool->nextpool;
+            prev = pool->prevpool;
+            next->prevpool = prev;
+            prev->nextpool = next;
 
-			/* Link the pool to freepools.  This is a singly-linked
-			 * list, and pool->prevpool isn't used there.
-			 */
-			ao = &arenas[pool->arenaindex];
-			pool->nextpool = ao->freepools;
-			ao->freepools = pool;
-			nf = ++ao->nfreepools;
+            /* Link the pool to freepools.  This is a singly-linked
+             * list, and pool->prevpool isn't used there.
+             */
+            ao = &arenas[pool->arenaindex];
+            pool->nextpool = ao->freepools;
+            ao->freepools = pool;
+            nf = ++ao->nfreepools;
 
-			/* All the rest is arena management.  We just freed
-			 * a pool, and there are 4 cases for arena mgmt:
-			 * 1. If all the pools are free, return the arena to
-			 *    the system free().
-			 * 2. If this is the only free pool in the arena,
-			 *    add the arena back to the `usable_arenas` list.
-			 * 3. If the "next" arena has a smaller count of free
-			 *    pools, we have to "slide this arena right" to
-			 *    restore that usable_arenas is sorted in order of
-			 *    nfreepools.
-			 * 4. Else there's nothing more to do.
-			 */
-			if (nf == ao->ntotalpools) {
-				/* Case 1.  First unlink ao from usable_arenas.
-				 */
-				assert(ao->prevarena == NULL ||
-				       ao->prevarena->address != 0);
-				assert(ao ->nextarena == NULL ||
-				       ao->nextarena->address != 0);
+            /* All the rest is arena management.  We just freed
+             * a pool, and there are 4 cases for arena mgmt:
+             * 1. If all the pools are free, return the arena to
+             *    the system free().
+             * 2. If this is the only free pool in the arena,
+             *    add the arena back to the `usable_arenas` list.
+             * 3. If the "next" arena has a smaller count of free
+             *    pools, we have to "slide this arena right" to
+             *    restore that usable_arenas is sorted in order of
+             *    nfreepools.
+             * 4. Else there's nothing more to do.
+             */
+            if (nf == ao->ntotalpools) {
+                /* Case 1.  First unlink ao from usable_arenas.
+                 */
+                assert(ao->prevarena == NULL ||
+                       ao->prevarena->address != 0);
+                assert(ao ->nextarena == NULL ||
+                       ao->nextarena->address != 0);
 
-				/* Fix the pointer in the prevarena, or the
-				 * usable_arenas pointer.
-				 */
-				if (ao->prevarena == NULL) {
-					usable_arenas = ao->nextarena;
-					assert(usable_arenas == NULL ||
-					       usable_arenas->address != 0);
-				}
-				else {
-					assert(ao->prevarena->nextarena == ao);
-					ao->prevarena->nextarena =
-						ao->nextarena;
-				}
-				/* Fix the pointer in the nextarena. */
-				if (ao->nextarena != NULL) {
-					assert(ao->nextarena->prevarena == ao);
-					ao->nextarena->prevarena =
-						ao->prevarena;
-				}
-				/* Record that this arena_object slot is
-				 * available to be reused.
-				 */
-				ao->nextarena = unused_arena_objects;
-				unused_arena_objects = ao;
+                /* Fix the pointer in the prevarena, or the
+                 * usable_arenas pointer.
+                 */
+                if (ao->prevarena == NULL) {
+                    usable_arenas = ao->nextarena;
+                    assert(usable_arenas == NULL ||
+                           usable_arenas->address != 0);
+                }
+                else {
+                    assert(ao->prevarena->nextarena == ao);
+                    ao->prevarena->nextarena =
+                        ao->nextarena;
+                }
+                /* Fix the pointer in the nextarena. */
+                if (ao->nextarena != NULL) {
+                    assert(ao->nextarena->prevarena == ao);
+                    ao->nextarena->prevarena =
+                        ao->prevarena;
+                }
+                /* Record that this arena_object slot is
+                 * available to be reused.
+                 */
+                ao->nextarena = unused_arena_objects;
+                unused_arena_objects = ao;
 
-				/* Free the entire arena. */
-				free((void *)ao->address);
-				ao->address = 0;	/* mark unassociated */
-				--narenas_currently_allocated;
+                /* Free the entire arena. */
+                free((void *)ao->address);
+                ao->address = 0;                        /* mark unassociated */
+                --narenas_currently_allocated;
 
-				UNLOCK();
-				return;
-			}
-			if (nf == 1) {
-				/* Case 2.  Put ao at the head of
-				 * usable_arenas.  Note that because
-				 * ao->nfreepools was 0 before, ao isn't
-				 * currently on the usable_arenas list.
-				 */
-				ao->nextarena = usable_arenas;
-				ao->prevarena = NULL;
-				if (usable_arenas)
-					usable_arenas->prevarena = ao;
-				usable_arenas = ao;
-				assert(usable_arenas->address != 0);
+                UNLOCK();
+                return;
+            }
+            if (nf == 1) {
+                /* Case 2.  Put ao at the head of
+                 * usable_arenas.  Note that because
+                 * ao->nfreepools was 0 before, ao isn't
+                 * currently on the usable_arenas list.
+                 */
+                ao->nextarena = usable_arenas;
+                ao->prevarena = NULL;
+                if (usable_arenas)
+                    usable_arenas->prevarena = ao;
+                usable_arenas = ao;
+                assert(usable_arenas->address != 0);
 
-				UNLOCK();
-				return;
-			}
-			/* If this arena is now out of order, we need to keep
-			 * the list sorted.  The list is kept sorted so that
-			 * the "most full" arenas are used first, which allows
-			 * the nearly empty arenas to be completely freed.  In
-			 * a few un-scientific tests, it seems like this
-			 * approach allowed a lot more memory to be freed.
-			 */
-			if (ao->nextarena == NULL ||
-				     nf <= ao->nextarena->nfreepools) {
-				/* Case 4.  Nothing to do. */
-				UNLOCK();
-				return;
-			}
-			/* Case 3:  We have to move the arena towards the end
-			 * of the list, because it has more free pools than
-			 * the arena to its right.
-			 * First unlink ao from usable_arenas.
-			 */
-			if (ao->prevarena != NULL) {
-				/* ao isn't at the head of the list */
-				assert(ao->prevarena->nextarena == ao);
-				ao->prevarena->nextarena = ao->nextarena;
-			}
-			else {
-				/* ao is at the head of the list */
-				assert(usable_arenas == ao);
-				usable_arenas = ao->nextarena;
-			}
-			ao->nextarena->prevarena = ao->prevarena;
+                UNLOCK();
+                return;
+            }
+            /* If this arena is now out of order, we need to keep
+             * the list sorted.  The list is kept sorted so that
+             * the "most full" arenas are used first, which allows
+             * the nearly empty arenas to be completely freed.  In
+             * a few un-scientific tests, it seems like this
+             * approach allowed a lot more memory to be freed.
+             */
+            if (ao->nextarena == NULL ||
+                         nf <= ao->nextarena->nfreepools) {
+                /* Case 4.  Nothing to do. */
+                UNLOCK();
+                return;
+            }
+            /* Case 3:  We have to move the arena towards the end
+             * of the list, because it has more free pools than
+             * the arena to its right.
+             * First unlink ao from usable_arenas.
+             */
+            if (ao->prevarena != NULL) {
+                /* ao isn't at the head of the list */
+                assert(ao->prevarena->nextarena == ao);
+                ao->prevarena->nextarena = ao->nextarena;
+            }
+            else {
+                /* ao is at the head of the list */
+                assert(usable_arenas == ao);
+                usable_arenas = ao->nextarena;
+            }
+            ao->nextarena->prevarena = ao->prevarena;
 
-			/* Locate the new insertion point by iterating over
-			 * the list, using our nextarena pointer.
-			 */
-			while (ao->nextarena != NULL &&
-					nf > ao->nextarena->nfreepools) {
-				ao->prevarena = ao->nextarena;
-				ao->nextarena = ao->nextarena->nextarena;
-			}
+            /* Locate the new insertion point by iterating over
+             * the list, using our nextarena pointer.
+             */
+            while (ao->nextarena != NULL &&
+                            nf > ao->nextarena->nfreepools) {
+                ao->prevarena = ao->nextarena;
+                ao->nextarena = ao->nextarena->nextarena;
+            }
 
-			/* Insert ao at this point. */
-			assert(ao->nextarena == NULL ||
-				ao->prevarena == ao->nextarena->prevarena);
-			assert(ao->prevarena->nextarena == ao->nextarena);
+            /* Insert ao at this point. */
+            assert(ao->nextarena == NULL ||
+                ao->prevarena == ao->nextarena->prevarena);
+            assert(ao->prevarena->nextarena == ao->nextarena);
 
-			ao->prevarena->nextarena = ao;
-			if (ao->nextarena != NULL)
-				ao->nextarena->prevarena = ao;
+            ao->prevarena->nextarena = ao;
+            if (ao->nextarena != NULL)
+                ao->nextarena->prevarena = ao;
 
-			/* Verify that the swaps worked. */
-			assert(ao->nextarena == NULL ||
-				  nf <= ao->nextarena->nfreepools);
-			assert(ao->prevarena == NULL ||
-				  nf > ao->prevarena->nfreepools);
-			assert(ao->nextarena == NULL ||
-				ao->nextarena->prevarena == ao);
-			assert((usable_arenas == ao &&
-				ao->prevarena == NULL) ||
-				ao->prevarena->nextarena == ao);
+            /* Verify that the swaps worked. */
+            assert(ao->nextarena == NULL ||
+                      nf <= ao->nextarena->nfreepools);
+            assert(ao->prevarena == NULL ||
+                      nf > ao->prevarena->nfreepools);
+            assert(ao->nextarena == NULL ||
+                ao->nextarena->prevarena == ao);
+            assert((usable_arenas == ao &&
+                ao->prevarena == NULL) ||
+                ao->prevarena->nextarena == ao);
 
-			UNLOCK();
-			return;
-		}
-		/* Pool was full, so doesn't currently live in any list:
-		 * link it to the front of the appropriate usedpools[] list.
-		 * This mimics LRU pool usage for new allocations and
-		 * targets optimal filling when several pools contain
-		 * blocks of the same size class.
-		 */
-		--pool->ref.count;
-		assert(pool->ref.count > 0);	/* else the pool is empty */
-		size = pool->szidx;
-		next = usedpools[size + size];
-		prev = next->prevpool;
-		/* insert pool before next:   prev <-> pool <-> next */
-		pool->nextpool = next;
-		pool->prevpool = prev;
-		next->prevpool = pool;
-		prev->nextpool = pool;
-		UNLOCK();
-		return;
-	}
+            UNLOCK();
+            return;
+        }
+        /* Pool was full, so doesn't currently live in any list:
+         * link it to the front of the appropriate usedpools[] list.
+         * This mimics LRU pool usage for new allocations and
+         * targets optimal filling when several pools contain
+         * blocks of the same size class.
+         */
+        --pool->ref.count;
+        assert(pool->ref.count > 0);            /* else the pool is empty */
+        size = pool->szidx;
+        next = usedpools[size + size];
+        prev = next->prevpool;
+        /* insert pool before next:   prev <-> pool <-> next */
+        pool->nextpool = next;
+        pool->prevpool = prev;
+        next->prevpool = pool;
+        prev->nextpool = pool;
+        UNLOCK();
+        return;
+    }
 
 #ifdef WITH_VALGRIND
 redirect:
 #endif
-	/* We didn't allocate this address. */
-	free(p);
+    /* We didn't allocate this address. */
+    free(p);
 }
 
 /* realloc.  If p is NULL, this acts like malloc(nbytes).  Else if nbytes==0,
@@ -1164,81 +1164,81 @@
 void *
 PyObject_Realloc(void *p, size_t nbytes)
 {
-	void *bp;
-	poolp pool;
-	size_t size;
+    void *bp;
+    poolp pool;
+    size_t size;
 
-	if (p == NULL)
-		return PyObject_Malloc(nbytes);
+    if (p == NULL)
+        return PyObject_Malloc(nbytes);
 
-	/*
-	 * Limit ourselves to PY_SSIZE_T_MAX bytes to prevent security holes.
-	 * Most python internals blindly use a signed Py_ssize_t to track
-	 * things without checking for overflows or negatives.
-	 * As size_t is unsigned, checking for nbytes < 0 is not required.
-	 */
-	if (nbytes > PY_SSIZE_T_MAX)
-		return NULL;
+    /*
+     * Limit ourselves to PY_SSIZE_T_MAX bytes to prevent security holes.
+     * Most python internals blindly use a signed Py_ssize_t to track
+     * things without checking for overflows or negatives.
+     * As size_t is unsigned, checking for nbytes < 0 is not required.
+     */
+    if (nbytes > PY_SSIZE_T_MAX)
+        return NULL;
 
 #ifdef WITH_VALGRIND
-	/* Treat running_on_valgrind == -1 the same as 0 */
-	if (UNLIKELY(running_on_valgrind > 0))
-		goto redirect;
+    /* Treat running_on_valgrind == -1 the same as 0 */
+    if (UNLIKELY(running_on_valgrind > 0))
+        goto redirect;
 #endif
 
-	pool = POOL_ADDR(p);
-	if (Py_ADDRESS_IN_RANGE(p, pool)) {
-		/* We're in charge of this block */
-		size = INDEX2SIZE(pool->szidx);
-		if (nbytes <= size) {
-			/* The block is staying the same or shrinking.  If
-			 * it's shrinking, there's a tradeoff:  it costs
-			 * cycles to copy the block to a smaller size class,
-			 * but it wastes memory not to copy it.  The
-			 * compromise here is to copy on shrink only if at
-			 * least 25% of size can be shaved off.
-			 */
-			if (4 * nbytes > 3 * size) {
-				/* It's the same,
-				 * or shrinking and new/old > 3/4.
-				 */
-				return p;
-			}
-			size = nbytes;
-		}
-		bp = PyObject_Malloc(nbytes);
-		if (bp != NULL) {
-			memcpy(bp, p, size);
-			PyObject_Free(p);
-		}
-		return bp;
-	}
+    pool = POOL_ADDR(p);
+    if (Py_ADDRESS_IN_RANGE(p, pool)) {
+        /* We're in charge of this block */
+        size = INDEX2SIZE(pool->szidx);
+        if (nbytes <= size) {
+            /* The block is staying the same or shrinking.  If
+             * it's shrinking, there's a tradeoff:  it costs
+             * cycles to copy the block to a smaller size class,
+             * but it wastes memory not to copy it.  The
+             * compromise here is to copy on shrink only if at
+             * least 25% of size can be shaved off.
+             */
+            if (4 * nbytes > 3 * size) {
+                /* It's the same,
+                 * or shrinking and new/old > 3/4.
+                 */
+                return p;
+            }
+            size = nbytes;
+        }
+        bp = PyObject_Malloc(nbytes);
+        if (bp != NULL) {
+            memcpy(bp, p, size);
+            PyObject_Free(p);
+        }
+        return bp;
+    }
 #ifdef WITH_VALGRIND
  redirect:
 #endif
-	/* We're not managing this block.  If nbytes <=
-	 * SMALL_REQUEST_THRESHOLD, it's tempting to try to take over this
-	 * block.  However, if we do, we need to copy the valid data from
-	 * the C-managed block to one of our blocks, and there's no portable
-	 * way to know how much of the memory space starting at p is valid.
-	 * As bug 1185883 pointed out the hard way, it's possible that the
-	 * C-managed block is "at the end" of allocated VM space, so that
-	 * a memory fault can occur if we try to copy nbytes bytes starting
-	 * at p.  Instead we punt:  let C continue to manage this block.
-         */
-	if (nbytes)
-		return realloc(p, nbytes);
-	/* C doesn't define the result of realloc(p, 0) (it may or may not
-	 * return NULL then), but Python's docs promise that nbytes==0 never
-	 * returns NULL.  We don't pass 0 to realloc(), to avoid that endcase
-	 * to begin with.  Even then, we can't be sure that realloc() won't
-	 * return NULL.
-	 */
-	bp = realloc(p, 1);
-   	return bp ? bp : p;
+    /* We're not managing this block.  If nbytes <=
+     * SMALL_REQUEST_THRESHOLD, it's tempting to try to take over this
+     * block.  However, if we do, we need to copy the valid data from
+     * the C-managed block to one of our blocks, and there's no portable
+     * way to know how much of the memory space starting at p is valid.
+     * As bug 1185883 pointed out the hard way, it's possible that the
+     * C-managed block is "at the end" of allocated VM space, so that
+     * a memory fault can occur if we try to copy nbytes bytes starting
+     * at p.  Instead we punt:  let C continue to manage this block.
+     */
+    if (nbytes)
+        return realloc(p, nbytes);
+    /* C doesn't define the result of realloc(p, 0) (it may or may not
+     * return NULL then), but Python's docs promise that nbytes==0 never
+     * returns NULL.  We don't pass 0 to realloc(), to avoid that endcase
+     * to begin with.  Even then, we can't be sure that realloc() won't
+     * return NULL.
+     */
+    bp = realloc(p, 1);
+    return bp ? bp : p;
 }
 
-#else	/* ! WITH_PYMALLOC */
+#else   /* ! WITH_PYMALLOC */
 
 /*==========================================================================*/
 /* pymalloc not enabled:  Redirect the entry points to malloc.  These will
@@ -1247,19 +1247,19 @@
 void *
 PyObject_Malloc(size_t n)
 {
-	return PyMem_MALLOC(n);
+    return PyMem_MALLOC(n);
 }
 
 void *
 PyObject_Realloc(void *p, size_t n)
 {
-	return PyMem_REALLOC(p, n);
+    return PyMem_REALLOC(p, n);
 }
 
 void
 PyObject_Free(void *p)
 {
-	PyMem_FREE(p);
+    PyMem_FREE(p);
 }
 #endif /* WITH_PYMALLOC */
 
@@ -1284,7 +1284,7 @@
 #define _PYMALLOC_MEM_ID 'm'   /* the PyMem_Malloc() API */
 #define _PYMALLOC_OBJ_ID 'o'   /* The PyObject_Malloc() API */
 
-static size_t serialno = 0;	/* incremented on each debug {m,re}alloc */
+static size_t serialno = 0;     /* incremented on each debug {m,re}alloc */
 
 /* serialno is always incremented via calling this routine.  The point is
  * to supply a single place to set a breakpoint.
@@ -1292,7 +1292,7 @@
 static void
 bumpserialno(void)
 {
-	++serialno;
+    ++serialno;
 }
 
 #define SST SIZEOF_SIZE_T
@@ -1301,13 +1301,13 @@
 static size_t
 read_size_t(const void *p)
 {
-	const uchar *q = (const uchar *)p;
-	size_t result = *q++;
-	int i;
+    const uchar *q = (const uchar *)p;
+    size_t result = *q++;
+    int i;
 
-	for (i = SST; --i > 0; ++q)
-		result = (result << 8) | *q;
-	return result;
+    for (i = SST; --i > 0; ++q)
+        result = (result << 8) | *q;
+    return result;
 }
 
 /* Write n as a big-endian size_t, MSB at address p, LSB at
@@ -1316,13 +1316,13 @@
 static void
 write_size_t(void *p, size_t n)
 {
-	uchar *q = (uchar *)p + SST - 1;
-	int i;
+    uchar *q = (uchar *)p + SST - 1;
+    int i;
 
-	for (i = SST; --i >= 0; --q) {
-		*q = (uchar)(n & 0xff);
-		n >>= 8;
-	}
+    for (i = SST; --i >= 0; --q) {
+        *q = (uchar)(n & 0xff);
+        n >>= 8;
+    }
 }
 
 #ifdef Py_DEBUG
@@ -1333,22 +1333,22 @@
 static int
 pool_is_in_list(const poolp target, poolp list)
 {
-	poolp origlist = list;
-	assert(target != NULL);
-	if (list == NULL)
-		return 0;
-	do {
-		if (target == list)
-			return 1;
-		list = list->nextpool;
-	} while (list != NULL && list != origlist);
-	return 0;
+    poolp origlist = list;
+    assert(target != NULL);
+    if (list == NULL)
+        return 0;
+    do {
+        if (target == list)
+            return 1;
+        list = list->nextpool;
+    } while (list != NULL && list != origlist);
+    return 0;
 }
 
 #else
 #define pool_is_in_list(X, Y) 1
 
-#endif	/* Py_DEBUG */
+#endif  /* Py_DEBUG */
 
 /* Let S = sizeof(size_t).  The debug malloc asks for 4*S extra bytes and
    fills them with useful stuff, here calling the underlying malloc's result p:
@@ -1378,39 +1378,39 @@
 void *
 _PyMem_DebugMalloc(size_t nbytes)
 {
-	return _PyObject_DebugMallocApi(_PYMALLOC_MEM_ID, nbytes);
+    return _PyObject_DebugMallocApi(_PYMALLOC_MEM_ID, nbytes);
 }
 void *
 _PyMem_DebugRealloc(void *p, size_t nbytes)
 {
-	return _PyObject_DebugReallocApi(_PYMALLOC_MEM_ID, p, nbytes);
+    return _PyObject_DebugReallocApi(_PYMALLOC_MEM_ID, p, nbytes);
 }
 void
 _PyMem_DebugFree(void *p)
 {
-	_PyObject_DebugFreeApi(_PYMALLOC_MEM_ID, p);
+    _PyObject_DebugFreeApi(_PYMALLOC_MEM_ID, p);
 }
 
 /* debug replacements for the PyObject_* memory API */
 void *
 _PyObject_DebugMalloc(size_t nbytes)
 {
-	return _PyObject_DebugMallocApi(_PYMALLOC_OBJ_ID, nbytes);
+    return _PyObject_DebugMallocApi(_PYMALLOC_OBJ_ID, nbytes);
 }
 void *
 _PyObject_DebugRealloc(void *p, size_t nbytes)
 {
-	return _PyObject_DebugReallocApi(_PYMALLOC_OBJ_ID, p, nbytes);
+    return _PyObject_DebugReallocApi(_PYMALLOC_OBJ_ID, p, nbytes);
 }
 void
 _PyObject_DebugFree(void *p)
 {
-	_PyObject_DebugFreeApi(_PYMALLOC_OBJ_ID, p);
+    _PyObject_DebugFreeApi(_PYMALLOC_OBJ_ID, p);
 }
 void
 _PyObject_DebugCheckAddress(const void *p)
 {
-	_PyObject_DebugCheckAddressApi(_PYMALLOC_OBJ_ID, p);
+    _PyObject_DebugCheckAddressApi(_PYMALLOC_OBJ_ID, p);
 }
 
 
@@ -1418,34 +1418,34 @@
 void *
 _PyObject_DebugMallocApi(char id, size_t nbytes)
 {
-	uchar *p;	/* base address of malloc'ed block */
-	uchar *tail;	/* p + 2*SST + nbytes == pointer to tail pad bytes */
-	size_t total;	/* nbytes + 4*SST */
+    uchar *p;           /* base address of malloc'ed block */
+    uchar *tail;        /* p + 2*SST + nbytes == pointer to tail pad bytes */
+    size_t total;       /* nbytes + 4*SST */
 
-	bumpserialno();
-	total = nbytes + 4*SST;
-	if (total < nbytes)
-		/* overflow:  can't represent total as a size_t */
-		return NULL;
+    bumpserialno();
+    total = nbytes + 4*SST;
+    if (total < nbytes)
+        /* overflow:  can't represent total as a size_t */
+        return NULL;
 
-	p = (uchar *)PyObject_Malloc(total);
-	if (p == NULL)
-		return NULL;
+    p = (uchar *)PyObject_Malloc(total);
+    if (p == NULL)
+        return NULL;
 
-	/* at p, write size (SST bytes), id (1 byte), pad (SST-1 bytes) */
-	write_size_t(p, nbytes);
-	p[SST] = (uchar)id;
-	memset(p + SST + 1 , FORBIDDENBYTE, SST-1);
+    /* at p, write size (SST bytes), id (1 byte), pad (SST-1 bytes) */
+    write_size_t(p, nbytes);
+    p[SST] = (uchar)id;
+    memset(p + SST + 1 , FORBIDDENBYTE, SST-1);
 
-	if (nbytes > 0)
-		memset(p + 2*SST, CLEANBYTE, nbytes);
+    if (nbytes > 0)
+        memset(p + 2*SST, CLEANBYTE, nbytes);
 
-	/* at tail, write pad (SST bytes) and serialno (SST bytes) */
-	tail = p + 2*SST + nbytes;
-	memset(tail, FORBIDDENBYTE, SST);
-	write_size_t(tail + SST, serialno);
+    /* at tail, write pad (SST bytes) and serialno (SST bytes) */
+    tail = p + 2*SST + nbytes;
+    memset(tail, FORBIDDENBYTE, SST);
+    write_size_t(tail + SST, serialno);
 
-	return p + 2*SST;
+    return p + 2*SST;
 }
 
 /* The debug free first checks the 2*SST bytes on each end for sanity (in
@@ -1456,68 +1456,68 @@
 void
 _PyObject_DebugFreeApi(char api, void *p)
 {
-	uchar *q = (uchar *)p - 2*SST;  /* address returned from malloc */
-	size_t nbytes;
+    uchar *q = (uchar *)p - 2*SST;  /* address returned from malloc */
+    size_t nbytes;
 
-	if (p == NULL)
-		return;
-	_PyObject_DebugCheckAddressApi(api, p);
-	nbytes = read_size_t(q);
-	nbytes += 4*SST;
-	if (nbytes > 0)
-		memset(q, DEADBYTE, nbytes);
-	PyObject_Free(q);
+    if (p == NULL)
+        return;
+    _PyObject_DebugCheckAddressApi(api, p);
+    nbytes = read_size_t(q);
+    nbytes += 4*SST;
+    if (nbytes > 0)
+        memset(q, DEADBYTE, nbytes);
+    PyObject_Free(q);
 }
 
 void *
 _PyObject_DebugReallocApi(char api, void *p, size_t nbytes)
 {
-	uchar *q = (uchar *)p;
-	uchar *tail;
-	size_t total;	/* nbytes + 4*SST */
-	size_t original_nbytes;
-	int i;
+    uchar *q = (uchar *)p;
+    uchar *tail;
+    size_t total;       /* nbytes + 4*SST */
+    size_t original_nbytes;
+    int i;
 
-	if (p == NULL)
-		return _PyObject_DebugMallocApi(api, nbytes);
+    if (p == NULL)
+        return _PyObject_DebugMallocApi(api, nbytes);
 
-	_PyObject_DebugCheckAddressApi(api, p);
-	bumpserialno();
-	original_nbytes = read_size_t(q - 2*SST);
-	total = nbytes + 4*SST;
-	if (total < nbytes)
-		/* overflow:  can't represent total as a size_t */
-		return NULL;
+    _PyObject_DebugCheckAddressApi(api, p);
+    bumpserialno();
+    original_nbytes = read_size_t(q - 2*SST);
+    total = nbytes + 4*SST;
+    if (total < nbytes)
+        /* overflow:  can't represent total as a size_t */
+        return NULL;
 
-	if (nbytes < original_nbytes) {
-		/* shrinking:  mark old extra memory dead */
-		memset(q + nbytes, DEADBYTE, original_nbytes - nbytes + 2*SST);
-	}
+    if (nbytes < original_nbytes) {
+        /* shrinking:  mark old extra memory dead */
+        memset(q + nbytes, DEADBYTE, original_nbytes - nbytes + 2*SST);
+    }
 
-	/* Resize and add decorations. We may get a new pointer here, in which
-	 * case we didn't get the chance to mark the old memory with DEADBYTE,
-	 * but we live with that.
-	 */
-	q = (uchar *)PyObject_Realloc(q - 2*SST, total);
-	if (q == NULL)
-		return NULL;
+    /* Resize and add decorations. We may get a new pointer here, in which
+     * case we didn't get the chance to mark the old memory with DEADBYTE,
+     * but we live with that.
+     */
+    q = (uchar *)PyObject_Realloc(q - 2*SST, total);
+    if (q == NULL)
+        return NULL;
 
-	write_size_t(q, nbytes);
-	assert(q[SST] == (uchar)api);
-	for (i = 1; i < SST; ++i)
-		assert(q[SST + i] == FORBIDDENBYTE);
-	q += 2*SST;
-	tail = q + nbytes;
-	memset(tail, FORBIDDENBYTE, SST);
-	write_size_t(tail + SST, serialno);
+    write_size_t(q, nbytes);
+    assert(q[SST] == (uchar)api);
+    for (i = 1; i < SST; ++i)
+        assert(q[SST + i] == FORBIDDENBYTE);
+    q += 2*SST;
+    tail = q + nbytes;
+    memset(tail, FORBIDDENBYTE, SST);
+    write_size_t(tail + SST, serialno);
 
-	if (nbytes > original_nbytes) {
-		/* growing:  mark new extra memory clean */
-		memset(q + original_nbytes, CLEANBYTE,
-			nbytes - original_nbytes);
-	}
+    if (nbytes > original_nbytes) {
+        /* growing:  mark new extra memory clean */
+        memset(q + original_nbytes, CLEANBYTE,
+            nbytes - original_nbytes);
+    }
 
-	return q;
+    return q;
 }
 
 /* Check the forbidden bytes on both ends of the memory allocated for p.
@@ -1528,192 +1528,192 @@
  void
 _PyObject_DebugCheckAddressApi(char api, const void *p)
 {
-	const uchar *q = (const uchar *)p;
-	char msgbuf[64];
-	char *msg;
-	size_t nbytes;
-	const uchar *tail;
-	int i;
-	char id;
+    const uchar *q = (const uchar *)p;
+    char msgbuf[64];
+    char *msg;
+    size_t nbytes;
+    const uchar *tail;
+    int i;
+    char id;
 
-	if (p == NULL) {
-		msg = "didn't expect a NULL pointer";
-		goto error;
-	}
+    if (p == NULL) {
+        msg = "didn't expect a NULL pointer";
+        goto error;
+    }
 
-	/* Check the API id */
-	id = (char)q[-SST];
-	if (id != api) {
-		msg = msgbuf;
-		snprintf(msg, sizeof(msgbuf), "bad ID: Allocated using API '%c', verified using API '%c'", id, api);
-		msgbuf[sizeof(msgbuf)-1] = 0;
-		goto error;
-	}
+    /* Check the API id */
+    id = (char)q[-SST];
+    if (id != api) {
+        msg = msgbuf;
+        snprintf(msg, sizeof(msgbuf), "bad ID: Allocated using API '%c', verified using API '%c'", id, api);
+        msgbuf[sizeof(msgbuf)-1] = 0;
+        goto error;
+    }
 
-	/* Check the stuff at the start of p first:  if there's underwrite
-	 * corruption, the number-of-bytes field may be nuts, and checking
-	 * the tail could lead to a segfault then.
-	 */
-	for (i = SST-1; i >= 1; --i) {
-		if (*(q-i) != FORBIDDENBYTE) {
-			msg = "bad leading pad byte";
-			goto error;
-		}
-	}
+    /* Check the stuff at the start of p first:  if there's underwrite
+     * corruption, the number-of-bytes field may be nuts, and checking
+     * the tail could lead to a segfault then.
+     */
+    for (i = SST-1; i >= 1; --i) {
+        if (*(q-i) != FORBIDDENBYTE) {
+            msg = "bad leading pad byte";
+            goto error;
+        }
+    }
 
-	nbytes = read_size_t(q - 2*SST);
-	tail = q + nbytes;
-	for (i = 0; i < SST; ++i) {
-		if (tail[i] != FORBIDDENBYTE) {
-			msg = "bad trailing pad byte";
-			goto error;
-		}
-	}
+    nbytes = read_size_t(q - 2*SST);
+    tail = q + nbytes;
+    for (i = 0; i < SST; ++i) {
+        if (tail[i] != FORBIDDENBYTE) {
+            msg = "bad trailing pad byte";
+            goto error;
+        }
+    }
 
-	return;
+    return;
 
 error:
-	_PyObject_DebugDumpAddress(p);
-	Py_FatalError(msg);
+    _PyObject_DebugDumpAddress(p);
+    Py_FatalError(msg);
 }
 
 /* Display info to stderr about the memory block at p. */
 void
 _PyObject_DebugDumpAddress(const void *p)
 {
-	const uchar *q = (const uchar *)p;
-	const uchar *tail;
-	size_t nbytes, serial;
-	int i;
-	int ok;
-	char id;
+    const uchar *q = (const uchar *)p;
+    const uchar *tail;
+    size_t nbytes, serial;
+    int i;
+    int ok;
+    char id;
 
-	fprintf(stderr, "Debug memory block at address p=%p:", p);
-	if (p == NULL) {
-		fprintf(stderr, "\n");
-		return;
-	}
-	id = (char)q[-SST];
-	fprintf(stderr, " API '%c'\n", id);
+    fprintf(stderr, "Debug memory block at address p=%p:", p);
+    if (p == NULL) {
+        fprintf(stderr, "\n");
+        return;
+    }
+    id = (char)q[-SST];
+    fprintf(stderr, " API '%c'\n", id);
 
-	nbytes = read_size_t(q - 2*SST);
-	fprintf(stderr, "    %" PY_FORMAT_SIZE_T "u bytes originally "
-	                "requested\n", nbytes);
+    nbytes = read_size_t(q - 2*SST);
+    fprintf(stderr, "    %" PY_FORMAT_SIZE_T "u bytes originally "
+                    "requested\n", nbytes);
 
-	/* In case this is nuts, check the leading pad bytes first. */
-	fprintf(stderr, "    The %d pad bytes at p-%d are ", SST-1, SST-1);
-	ok = 1;
-	for (i = 1; i <= SST-1; ++i) {
-		if (*(q-i) != FORBIDDENBYTE) {
-			ok = 0;
-			break;
-		}
-	}
-	if (ok)
-		fputs("FORBIDDENBYTE, as expected.\n", stderr);
-	else {
-		fprintf(stderr, "not all FORBIDDENBYTE (0x%02x):\n",
-			FORBIDDENBYTE);
-		for (i = SST-1; i >= 1; --i) {
-			const uchar byte = *(q-i);
-			fprintf(stderr, "        at p-%d: 0x%02x", i, byte);
-			if (byte != FORBIDDENBYTE)
-				fputs(" *** OUCH", stderr);
-			fputc('\n', stderr);
-		}
+    /* In case this is nuts, check the leading pad bytes first. */
+    fprintf(stderr, "    The %d pad bytes at p-%d are ", SST-1, SST-1);
+    ok = 1;
+    for (i = 1; i <= SST-1; ++i) {
+        if (*(q-i) != FORBIDDENBYTE) {
+            ok = 0;
+            break;
+        }
+    }
+    if (ok)
+        fputs("FORBIDDENBYTE, as expected.\n", stderr);
+    else {
+        fprintf(stderr, "not all FORBIDDENBYTE (0x%02x):\n",
+            FORBIDDENBYTE);
+        for (i = SST-1; i >= 1; --i) {
+            const uchar byte = *(q-i);
+            fprintf(stderr, "        at p-%d: 0x%02x", i, byte);
+            if (byte != FORBIDDENBYTE)
+                fputs(" *** OUCH", stderr);
+            fputc('\n', stderr);
+        }
 
-		fputs("    Because memory is corrupted at the start, the "
-		      "count of bytes requested\n"
-		      "       may be bogus, and checking the trailing pad "
-		      "bytes may segfault.\n", stderr);
-	}
+        fputs("    Because memory is corrupted at the start, the "
+              "count of bytes requested\n"
+              "       may be bogus, and checking the trailing pad "
+              "bytes may segfault.\n", stderr);
+    }
 
-	tail = q + nbytes;
-	fprintf(stderr, "    The %d pad bytes at tail=%p are ", SST, tail);
-	ok = 1;
-	for (i = 0; i < SST; ++i) {
-		if (tail[i] != FORBIDDENBYTE) {
-			ok = 0;
-			break;
-		}
-	}
-	if (ok)
-		fputs("FORBIDDENBYTE, as expected.\n", stderr);
-	else {
-		fprintf(stderr, "not all FORBIDDENBYTE (0x%02x):\n",
-			FORBIDDENBYTE);
-		for (i = 0; i < SST; ++i) {
-			const uchar byte = tail[i];
-			fprintf(stderr, "        at tail+%d: 0x%02x",
-				i, byte);
-			if (byte != FORBIDDENBYTE)
-				fputs(" *** OUCH", stderr);
-			fputc('\n', stderr);
-		}
-	}
+    tail = q + nbytes;
+    fprintf(stderr, "    The %d pad bytes at tail=%p are ", SST, tail);
+    ok = 1;
+    for (i = 0; i < SST; ++i) {
+        if (tail[i] != FORBIDDENBYTE) {
+            ok = 0;
+            break;
+        }
+    }
+    if (ok)
+        fputs("FORBIDDENBYTE, as expected.\n", stderr);
+    else {
+        fprintf(stderr, "not all FORBIDDENBYTE (0x%02x):\n",
+            FORBIDDENBYTE);
+        for (i = 0; i < SST; ++i) {
+            const uchar byte = tail[i];
+            fprintf(stderr, "        at tail+%d: 0x%02x",
+                i, byte);
+            if (byte != FORBIDDENBYTE)
+                fputs(" *** OUCH", stderr);
+            fputc('\n', stderr);
+        }
+    }
 
-	serial = read_size_t(tail + SST);
-	fprintf(stderr, "    The block was made by call #%" PY_FORMAT_SIZE_T
-			"u to debug malloc/realloc.\n", serial);
+    serial = read_size_t(tail + SST);
+    fprintf(stderr, "    The block was made by call #%" PY_FORMAT_SIZE_T
+                    "u to debug malloc/realloc.\n", serial);
 
-	if (nbytes > 0) {
-		i = 0;
-		fputs("    Data at p:", stderr);
-		/* print up to 8 bytes at the start */
-		while (q < tail && i < 8) {
-			fprintf(stderr, " %02x", *q);
-			++i;
-			++q;
-		}
-		/* and up to 8 at the end */
-		if (q < tail) {
-			if (tail - q > 8) {
-				fputs(" ...", stderr);
-				q = tail - 8;
-			}
-			while (q < tail) {
-				fprintf(stderr, " %02x", *q);
-				++q;
-			}
-		}
-		fputc('\n', stderr);
-	}
+    if (nbytes > 0) {
+        i = 0;
+        fputs("    Data at p:", stderr);
+        /* print up to 8 bytes at the start */
+        while (q < tail && i < 8) {
+            fprintf(stderr, " %02x", *q);
+            ++i;
+            ++q;
+        }
+        /* and up to 8 at the end */
+        if (q < tail) {
+            if (tail - q > 8) {
+                fputs(" ...", stderr);
+                q = tail - 8;
+            }
+            while (q < tail) {
+                fprintf(stderr, " %02x", *q);
+                ++q;
+            }
+        }
+        fputc('\n', stderr);
+    }
 }
 
 static size_t
 printone(const char* msg, size_t value)
 {
-	int i, k;
-	char buf[100];
-	size_t origvalue = value;
+    int i, k;
+    char buf[100];
+    size_t origvalue = value;
 
-	fputs(msg, stderr);
-	for (i = (int)strlen(msg); i < 35; ++i)
-		fputc(' ', stderr);
-	fputc('=', stderr);
+    fputs(msg, stderr);
+    for (i = (int)strlen(msg); i < 35; ++i)
+        fputc(' ', stderr);
+    fputc('=', stderr);
 
-	/* Write the value with commas. */
-	i = 22;
-	buf[i--] = '\0';
-	buf[i--] = '\n';
-	k = 3;
-	do {
-		size_t nextvalue = value / 10;
-		uint digit = (uint)(value - nextvalue * 10);
-		value = nextvalue;
-		buf[i--] = (char)(digit + '0');
-		--k;
-		if (k == 0 && value && i >= 0) {
-			k = 3;
-			buf[i--] = ',';
-		}
-	} while (value && i >= 0);
+    /* Write the value with commas. */
+    i = 22;
+    buf[i--] = '\0';
+    buf[i--] = '\n';
+    k = 3;
+    do {
+        size_t nextvalue = value / 10;
+        uint digit = (uint)(value - nextvalue * 10);
+        value = nextvalue;
+        buf[i--] = (char)(digit + '0');
+        --k;
+        if (k == 0 && value && i >= 0) {
+            k = 3;
+            buf[i--] = ',';
+        }
+    } while (value && i >= 0);
 
-	while (i >= 0)
-		buf[i--] = ' ';
-	fputs(buf, stderr);
+    while (i >= 0)
+        buf[i--] = ' ';
+    fputs(buf, stderr);
 
-	return origvalue;
+    return origvalue;
 }
 
 /* Print summary info to stderr about the state of pymalloc's structures.
@@ -1723,140 +1723,140 @@
 void
 _PyObject_DebugMallocStats(void)
 {
-	uint i;
-	const uint numclasses = SMALL_REQUEST_THRESHOLD >> ALIGNMENT_SHIFT;
-	/* # of pools, allocated blocks, and free blocks per class index */
-	size_t numpools[SMALL_REQUEST_THRESHOLD >> ALIGNMENT_SHIFT];
-	size_t numblocks[SMALL_REQUEST_THRESHOLD >> ALIGNMENT_SHIFT];
-	size_t numfreeblocks[SMALL_REQUEST_THRESHOLD >> ALIGNMENT_SHIFT];
-	/* total # of allocated bytes in used and full pools */
-	size_t allocated_bytes = 0;
-	/* total # of available bytes in used pools */
-	size_t available_bytes = 0;
-	/* # of free pools + pools not yet carved out of current arena */
-	uint numfreepools = 0;
-	/* # of bytes for arena alignment padding */
-	size_t arena_alignment = 0;
-	/* # of bytes in used and full pools used for pool_headers */
-	size_t pool_header_bytes = 0;
-	/* # of bytes in used and full pools wasted due to quantization,
-	 * i.e. the necessarily leftover space at the ends of used and
-	 * full pools.
-	 */
-	size_t quantization = 0;
-	/* # of arenas actually allocated. */
-	size_t narenas = 0;
-	/* running total -- should equal narenas * ARENA_SIZE */
-	size_t total;
-	char buf[128];
+    uint i;
+    const uint numclasses = SMALL_REQUEST_THRESHOLD >> ALIGNMENT_SHIFT;
+    /* # of pools, allocated blocks, and free blocks per class index */
+    size_t numpools[SMALL_REQUEST_THRESHOLD >> ALIGNMENT_SHIFT];
+    size_t numblocks[SMALL_REQUEST_THRESHOLD >> ALIGNMENT_SHIFT];
+    size_t numfreeblocks[SMALL_REQUEST_THRESHOLD >> ALIGNMENT_SHIFT];
+    /* total # of allocated bytes in used and full pools */
+    size_t allocated_bytes = 0;
+    /* total # of available bytes in used pools */
+    size_t available_bytes = 0;
+    /* # of free pools + pools not yet carved out of current arena */
+    uint numfreepools = 0;
+    /* # of bytes for arena alignment padding */
+    size_t arena_alignment = 0;
+    /* # of bytes in used and full pools used for pool_headers */
+    size_t pool_header_bytes = 0;
+    /* # of bytes in used and full pools wasted due to quantization,
+     * i.e. the necessarily leftover space at the ends of used and
+     * full pools.
+     */
+    size_t quantization = 0;
+    /* # of arenas actually allocated. */
+    size_t narenas = 0;
+    /* running total -- should equal narenas * ARENA_SIZE */
+    size_t total;
+    char buf[128];
 
-	fprintf(stderr, "Small block threshold = %d, in %u size classes.\n",
-		SMALL_REQUEST_THRESHOLD, numclasses);
+    fprintf(stderr, "Small block threshold = %d, in %u size classes.\n",
+        SMALL_REQUEST_THRESHOLD, numclasses);
 
-	for (i = 0; i < numclasses; ++i)
-		numpools[i] = numblocks[i] = numfreeblocks[i] = 0;
+    for (i = 0; i < numclasses; ++i)
+        numpools[i] = numblocks[i] = numfreeblocks[i] = 0;
 
-	/* Because full pools aren't linked to from anything, it's easiest
-	 * to march over all the arenas.  If we're lucky, most of the memory
-	 * will be living in full pools -- would be a shame to miss them.
-	 */
-	for (i = 0; i < maxarenas; ++i) {
-		uint j;
-		uptr base = arenas[i].address;
+    /* Because full pools aren't linked to from anything, it's easiest
+     * to march over all the arenas.  If we're lucky, most of the memory
+     * will be living in full pools -- would be a shame to miss them.
+     */
+    for (i = 0; i < maxarenas; ++i) {
+        uint j;
+        uptr base = arenas[i].address;
 
-		/* Skip arenas which are not allocated. */
-		if (arenas[i].address == (uptr)NULL)
-			continue;
-		narenas += 1;
+        /* Skip arenas which are not allocated. */
+        if (arenas[i].address == (uptr)NULL)
+            continue;
+        narenas += 1;
 
-		numfreepools += arenas[i].nfreepools;
+        numfreepools += arenas[i].nfreepools;
 
-		/* round up to pool alignment */
-		if (base & (uptr)POOL_SIZE_MASK) {
-			arena_alignment += POOL_SIZE;
-			base &= ~(uptr)POOL_SIZE_MASK;
-			base += POOL_SIZE;
-		}
+        /* round up to pool alignment */
+        if (base & (uptr)POOL_SIZE_MASK) {
+            arena_alignment += POOL_SIZE;
+            base &= ~(uptr)POOL_SIZE_MASK;
+            base += POOL_SIZE;
+        }
 
-		/* visit every pool in the arena */
-		assert(base <= (uptr) arenas[i].pool_address);
-		for (j = 0;
-			    base < (uptr) arenas[i].pool_address;
-			    ++j, base += POOL_SIZE) {
-			poolp p = (poolp)base;
-			const uint sz = p->szidx;
-			uint freeblocks;
+        /* visit every pool in the arena */
+        assert(base <= (uptr) arenas[i].pool_address);
+        for (j = 0;
+                    base < (uptr) arenas[i].pool_address;
+                    ++j, base += POOL_SIZE) {
+            poolp p = (poolp)base;
+            const uint sz = p->szidx;
+            uint freeblocks;
 
-			if (p->ref.count == 0) {
-				/* currently unused */
-				assert(pool_is_in_list(p, arenas[i].freepools));
-				continue;
-			}
-			++numpools[sz];
-			numblocks[sz] += p->ref.count;
-			freeblocks = NUMBLOCKS(sz) - p->ref.count;
-			numfreeblocks[sz] += freeblocks;
+            if (p->ref.count == 0) {
+                /* currently unused */
+                assert(pool_is_in_list(p, arenas[i].freepools));
+                continue;
+            }
+            ++numpools[sz];
+            numblocks[sz] += p->ref.count;
+            freeblocks = NUMBLOCKS(sz) - p->ref.count;
+            numfreeblocks[sz] += freeblocks;
 #ifdef Py_DEBUG
-			if (freeblocks > 0)
-				assert(pool_is_in_list(p, usedpools[sz + sz]));
+            if (freeblocks > 0)
+                assert(pool_is_in_list(p, usedpools[sz + sz]));
 #endif
-		}
-	}
-	assert(narenas == narenas_currently_allocated);
+        }
+    }
+    assert(narenas == narenas_currently_allocated);
 
-	fputc('\n', stderr);
-	fputs("class   size   num pools   blocks in use  avail blocks\n"
-	      "-----   ----   ---------   -------------  ------------\n",
-		stderr);
+    fputc('\n', stderr);
+    fputs("class   size   num pools   blocks in use  avail blocks\n"
+          "-----   ----   ---------   -------------  ------------\n",
+        stderr);
 
-	for (i = 0; i < numclasses; ++i) {
-		size_t p = numpools[i];
-		size_t b = numblocks[i];
-		size_t f = numfreeblocks[i];
-		uint size = INDEX2SIZE(i);
-		if (p == 0) {
-			assert(b == 0 && f == 0);
-			continue;
-		}
-		fprintf(stderr, "%5u %6u "
-				"%11" PY_FORMAT_SIZE_T "u "
-				"%15" PY_FORMAT_SIZE_T "u "
-				"%13" PY_FORMAT_SIZE_T "u\n",
-			i, size, p, b, f);
-		allocated_bytes += b * size;
-		available_bytes += f * size;
-		pool_header_bytes += p * POOL_OVERHEAD;
-		quantization += p * ((POOL_SIZE - POOL_OVERHEAD) % size);
-	}
-	fputc('\n', stderr);
-	(void)printone("# times object malloc called", serialno);
+    for (i = 0; i < numclasses; ++i) {
+        size_t p = numpools[i];
+        size_t b = numblocks[i];
+        size_t f = numfreeblocks[i];
+        uint size = INDEX2SIZE(i);
+        if (p == 0) {
+            assert(b == 0 && f == 0);
+            continue;
+        }
+        fprintf(stderr, "%5u %6u "
+                        "%11" PY_FORMAT_SIZE_T "u "
+                        "%15" PY_FORMAT_SIZE_T "u "
+                        "%13" PY_FORMAT_SIZE_T "u\n",
+            i, size, p, b, f);
+        allocated_bytes += b * size;
+        available_bytes += f * size;
+        pool_header_bytes += p * POOL_OVERHEAD;
+        quantization += p * ((POOL_SIZE - POOL_OVERHEAD) % size);
+    }
+    fputc('\n', stderr);
+    (void)printone("# times object malloc called", serialno);
 
-	(void)printone("# arenas allocated total", ntimes_arena_allocated);
-	(void)printone("# arenas reclaimed", ntimes_arena_allocated - narenas);
-	(void)printone("# arenas highwater mark", narenas_highwater);
-	(void)printone("# arenas allocated current", narenas);
+    (void)printone("# arenas allocated total", ntimes_arena_allocated);
+    (void)printone("# arenas reclaimed", ntimes_arena_allocated - narenas);
+    (void)printone("# arenas highwater mark", narenas_highwater);
+    (void)printone("# arenas allocated current", narenas);
 
-	PyOS_snprintf(buf, sizeof(buf),
-		"%" PY_FORMAT_SIZE_T "u arenas * %d bytes/arena",
-		narenas, ARENA_SIZE);
-	(void)printone(buf, narenas * ARENA_SIZE);
+    PyOS_snprintf(buf, sizeof(buf),
+        "%" PY_FORMAT_SIZE_T "u arenas * %d bytes/arena",
+        narenas, ARENA_SIZE);
+    (void)printone(buf, narenas * ARENA_SIZE);
 
-	fputc('\n', stderr);
+    fputc('\n', stderr);
 
-	total = printone("# bytes in allocated blocks", allocated_bytes);
-	total += printone("# bytes in available blocks", available_bytes);
+    total = printone("# bytes in allocated blocks", allocated_bytes);
+    total += printone("# bytes in available blocks", available_bytes);
 
-	PyOS_snprintf(buf, sizeof(buf),
-		"%u unused pools * %d bytes", numfreepools, POOL_SIZE);
-	total += printone(buf, (size_t)numfreepools * POOL_SIZE);
+    PyOS_snprintf(buf, sizeof(buf),
+        "%u unused pools * %d bytes", numfreepools, POOL_SIZE);
+    total += printone(buf, (size_t)numfreepools * POOL_SIZE);
 
-	total += printone("# bytes lost to pool headers", pool_header_bytes);
-	total += printone("# bytes lost to quantization", quantization);
-	total += printone("# bytes lost to arena alignment", arena_alignment);
-	(void)printone("Total", total);
+    total += printone("# bytes lost to pool headers", pool_header_bytes);
+    total += printone("# bytes lost to quantization", quantization);
+    total += printone("# bytes lost to arena alignment", arena_alignment);
+    (void)printone("Total", total);
 }
 
-#endif	/* PYMALLOC_DEBUG */
+#endif  /* PYMALLOC_DEBUG */
 
 #ifdef Py_USING_MEMORY_DEBUGGER
 /* Make this function last so gcc won't inline it since the definition is
@@ -1865,8 +1865,8 @@
 int
 Py_ADDRESS_IN_RANGE(void *P, poolp pool)
 {
-	return pool->arenaindex < maxarenas &&
-	       (uptr)P - arenas[pool->arenaindex].address < (uptr)ARENA_SIZE &&
-	       arenas[pool->arenaindex].address != 0;
+    return pool->arenaindex < maxarenas &&
+           (uptr)P - arenas[pool->arenaindex].address < (uptr)ARENA_SIZE &&
+           arenas[pool->arenaindex].address != 0;
 }
 #endif
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index f45b771..4e64dba 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -3,10 +3,10 @@
 #include "Python.h"
 
 typedef struct {
-	PyObject_HEAD
-	long	start;
-	long	step;
-	long	len;
+    PyObject_HEAD
+    long        start;
+    long        step;
+    long        len;
 } rangeobject;
 
 /* Return number of items in range (lo, hi, step).  step != 0
@@ -30,53 +30,53 @@
     ---------------------------------------------------------------*/
     assert(step != 0);
     if (step > 0 && lo < hi)
-        return 1UL + (hi - 1UL - lo) / step;
+    return 1UL + (hi - 1UL - lo) / step;
     else if (step < 0 && lo > hi)
-        return 1UL + (lo - 1UL - hi) / (0UL - step);
+    return 1UL + (lo - 1UL - hi) / (0UL - step);
     else
-        return 0UL;
+    return 0UL;
 }
 
 static PyObject *
 range_new(PyTypeObject *type, PyObject *args, PyObject *kw)
 {
-	rangeobject *obj;
-	long ilow = 0, ihigh = 0, istep = 1;
-	unsigned long n;
+    rangeobject *obj;
+    long ilow = 0, ihigh = 0, istep = 1;
+    unsigned long n;
 
-	if (!_PyArg_NoKeywords("xrange()", kw))
-		return NULL;
+    if (!_PyArg_NoKeywords("xrange()", kw))
+        return NULL;
 
-	if (PyTuple_Size(args) <= 1) {
-		if (!PyArg_ParseTuple(args,
-				"l;xrange() requires 1-3 int arguments",
-				&ihigh))
-			return NULL;
-	}
-	else {
-		if (!PyArg_ParseTuple(args,
-				"ll|l;xrange() requires 1-3 int arguments",
-				&ilow, &ihigh, &istep))
-			return NULL;
-	}
-	if (istep == 0) {
-		PyErr_SetString(PyExc_ValueError, "xrange() arg 3 must not be zero");
-		return NULL;
-	}
-	n = get_len_of_range(ilow, ihigh, istep);
-	if (n > (unsigned long)LONG_MAX || (long)n > PY_SSIZE_T_MAX) {
-		PyErr_SetString(PyExc_OverflowError,
-				"xrange() result has too many items");
-		return NULL;
-	}
+    if (PyTuple_Size(args) <= 1) {
+        if (!PyArg_ParseTuple(args,
+                        "l;xrange() requires 1-3 int arguments",
+                        &ihigh))
+            return NULL;
+    }
+    else {
+        if (!PyArg_ParseTuple(args,
+                        "ll|l;xrange() requires 1-3 int arguments",
+                        &ilow, &ihigh, &istep))
+            return NULL;
+    }
+    if (istep == 0) {
+        PyErr_SetString(PyExc_ValueError, "xrange() arg 3 must not be zero");
+        return NULL;
+    }
+    n = get_len_of_range(ilow, ihigh, istep);
+    if (n > (unsigned long)LONG_MAX || (long)n > PY_SSIZE_T_MAX) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "xrange() result has too many items");
+        return NULL;
+    }
 
-	obj = PyObject_New(rangeobject, &PyRange_Type);
-	if (obj == NULL)
-		return NULL;
-	obj->start = ilow;
-	obj->len   = (long)n;
-	obj->step  = istep;
-	return (PyObject *) obj;
+    obj = PyObject_New(rangeobject, &PyRange_Type);
+    if (obj == NULL)
+        return NULL;
+    obj->start = ilow;
+    obj->len   = (long)n;
+    obj->step  = istep;
+    return (PyObject *) obj;
 }
 
 PyDoc_STRVAR(range_doc,
@@ -89,60 +89,60 @@
 static PyObject *
 range_item(rangeobject *r, Py_ssize_t i)
 {
-	if (i < 0 || i >= r->len) {
-		PyErr_SetString(PyExc_IndexError,
-				"xrange object index out of range");
-		return NULL;
-	}
-	/* do calculation entirely using unsigned longs, to avoid
-	   undefined behaviour due to signed overflow. */
-	return PyInt_FromLong((long)(r->start + (unsigned long)i * r->step));
+    if (i < 0 || i >= r->len) {
+        PyErr_SetString(PyExc_IndexError,
+                        "xrange object index out of range");
+        return NULL;
+    }
+    /* do calculation entirely using unsigned longs, to avoid
+       undefined behaviour due to signed overflow. */
+    return PyInt_FromLong((long)(r->start + (unsigned long)i * r->step));
 }
 
 static Py_ssize_t
 range_length(rangeobject *r)
 {
-	return (Py_ssize_t)(r->len);
+    return (Py_ssize_t)(r->len);
 }
 
 static PyObject *
 range_repr(rangeobject *r)
 {
-	PyObject *rtn;
+    PyObject *rtn;
 
-	if (r->start == 0 && r->step == 1)
-		rtn = PyString_FromFormat("xrange(%ld)",
-					  r->start + r->len * r->step);
+    if (r->start == 0 && r->step == 1)
+        rtn = PyString_FromFormat("xrange(%ld)",
+                                  r->start + r->len * r->step);
 
-	else if (r->step == 1)
-		rtn = PyString_FromFormat("xrange(%ld, %ld)",
-					  r->start,
-					  r->start + r->len * r->step);
+    else if (r->step == 1)
+        rtn = PyString_FromFormat("xrange(%ld, %ld)",
+                                  r->start,
+                                  r->start + r->len * r->step);
 
-	else
-		rtn = PyString_FromFormat("xrange(%ld, %ld, %ld)",
-					  r->start,
-					  r->start + r->len * r->step,
-					  r->step);
-	return rtn;
+    else
+        rtn = PyString_FromFormat("xrange(%ld, %ld, %ld)",
+                                  r->start,
+                                  r->start + r->len * r->step,
+                                  r->step);
+    return rtn;
 }
 
 /* Pickling support */
 static PyObject *
 range_reduce(rangeobject *r, PyObject *args)
 {
-	return Py_BuildValue("(O(iii))", Py_TYPE(r),
-			     r->start,
-			     r->start + r->len * r->step,
-			     r->step);
+    return Py_BuildValue("(O(iii))", Py_TYPE(r),
+                         r->start,
+                         r->start + r->len * r->step,
+                         r->step);
 }
 
 static PySequenceMethods range_as_sequence = {
-	(lenfunc)range_length,	/* sq_length */
-	0,			/* sq_concat */
-	0,			/* sq_repeat */
-	(ssizeargfunc)range_item, /* sq_item */
-	0,			/* sq_slice */
+    (lenfunc)range_length,      /* sq_length */
+    0,                          /* sq_concat */
+    0,                          /* sq_repeat */
+    (ssizeargfunc)range_item, /* sq_item */
+    0,                          /* sq_slice */
 };
 
 static PyObject * range_iter(PyObject *seq);
@@ -152,171 +152,171 @@
 "Returns a reverse iterator.");
 
 static PyMethodDef range_methods[] = {
-	{"__reversed__",	(PyCFunction)range_reverse, METH_NOARGS, reverse_doc},
-	{"__reduce__",		(PyCFunction)range_reduce, METH_VARARGS},
- 	{NULL,		NULL}		/* sentinel */
+    {"__reversed__",            (PyCFunction)range_reverse, METH_NOARGS, reverse_doc},
+    {"__reduce__",              (PyCFunction)range_reduce, METH_VARARGS},
+    {NULL,              NULL}           /* sentinel */
 };
 
 PyTypeObject PyRange_Type = {
-	PyObject_HEAD_INIT(&PyType_Type)
-	0,			/* Number of items for varobject */
-	"xrange",		/* Name of this type */
-	sizeof(rangeobject),	/* Basic object size */
-	0,			/* Item size for varobject */
-	(destructor)PyObject_Del, /* tp_dealloc */
-	0,			/* tp_print */
-	0,			/* tp_getattr */
-	0,			/* tp_setattr */
-	0,			/* tp_compare */
-	(reprfunc)range_repr,	/* tp_repr */
-	0,			/* tp_as_number */
-	&range_as_sequence,	/* tp_as_sequence */
-	0,			/* tp_as_mapping */
-	0,			/* tp_hash */
-	0,			/* tp_call */
-	0,			/* tp_str */
-	PyObject_GenericGetAttr,  /* tp_getattro */
-	0,			/* tp_setattro */
-	0,			/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,	/* tp_flags */
-	range_doc,		/* tp_doc */
-	0,			/* tp_traverse */
-	0,			/* tp_clear */
-	0,			/* tp_richcompare */
-	0,			/* tp_weaklistoffset */
-	range_iter,		/* tp_iter */
-	0,			/* tp_iternext */
-	range_methods,		/* tp_methods */
-	0,			/* tp_members */
-	0,			/* tp_getset */
-	0,			/* tp_base */
-	0,			/* tp_dict */
-	0,			/* tp_descr_get */
-	0,			/* tp_descr_set */
-	0,			/* tp_dictoffset */
-	0,			/* tp_init */
-	0,			/* tp_alloc */
-	range_new,		/* tp_new */
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,                          /* Number of items for varobject */
+    "xrange",                   /* Name of this type */
+    sizeof(rangeobject),        /* Basic object size */
+    0,                          /* Item size for varobject */
+    (destructor)PyObject_Del, /* tp_dealloc */
+    0,                          /* tp_print */
+    0,                          /* tp_getattr */
+    0,                          /* tp_setattr */
+    0,                          /* tp_compare */
+    (reprfunc)range_repr,       /* tp_repr */
+    0,                          /* tp_as_number */
+    &range_as_sequence,         /* tp_as_sequence */
+    0,                          /* tp_as_mapping */
+    0,                          /* tp_hash */
+    0,                          /* tp_call */
+    0,                          /* tp_str */
+    PyObject_GenericGetAttr,  /* tp_getattro */
+    0,                          /* tp_setattro */
+    0,                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,         /* tp_flags */
+    range_doc,                  /* tp_doc */
+    0,                          /* tp_traverse */
+    0,                          /* tp_clear */
+    0,                          /* tp_richcompare */
+    0,                          /* tp_weaklistoffset */
+    range_iter,                 /* tp_iter */
+    0,                          /* tp_iternext */
+    range_methods,              /* tp_methods */
+    0,                          /* tp_members */
+    0,                          /* tp_getset */
+    0,                          /* tp_base */
+    0,                          /* tp_dict */
+    0,                          /* tp_descr_get */
+    0,                          /* tp_descr_set */
+    0,                          /* tp_dictoffset */
+    0,                          /* tp_init */
+    0,                          /* tp_alloc */
+    range_new,                  /* tp_new */
 };
 
 /*********************** Xrange Iterator **************************/
 
 typedef struct {
-	PyObject_HEAD
-	long	index;
-	long	start;
-	long	step;
-	long	len;
+    PyObject_HEAD
+    long        index;
+    long        start;
+    long        step;
+    long        len;
 } rangeiterobject;
 
 static PyObject *
 rangeiter_next(rangeiterobject *r)
 {
-	if (r->index < r->len)
-		return PyInt_FromLong(r->start + (r->index++) * r->step);
-	return NULL;
+    if (r->index < r->len)
+        return PyInt_FromLong(r->start + (r->index++) * r->step);
+    return NULL;
 }
 
 static PyObject *
 rangeiter_len(rangeiterobject *r)
 {
-	return PyInt_FromLong(r->len - r->index);
+    return PyInt_FromLong(r->len - r->index);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
 
 static PyMethodDef rangeiter_methods[] = {
-	{"__length_hint__", (PyCFunction)rangeiter_len, METH_NOARGS, length_hint_doc},
- 	{NULL,		NULL}		/* sentinel */
+    {"__length_hint__", (PyCFunction)rangeiter_len, METH_NOARGS, length_hint_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyTypeObject Pyrangeiter_Type = {
-	PyObject_HEAD_INIT(&PyType_Type)
-	0,                                      /* ob_size */
-	"rangeiterator",                        /* tp_name */
-	sizeof(rangeiterobject),                /* tp_basicsize */
-	0,                                      /* tp_itemsize */
-	/* methods */
-	(destructor)PyObject_Del,		/* tp_dealloc */
-	0,                                      /* tp_print */
-	0,                                      /* tp_getattr */
-	0,                                      /* tp_setattr */
-	0,                                      /* tp_compare */
-	0,                                      /* tp_repr */
-	0,                                      /* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,                                      /* tp_as_mapping */
-	0,                                      /* tp_hash */
-	0,                                      /* tp_call */
-	0,                                      /* tp_str */
-	PyObject_GenericGetAttr,                /* tp_getattro */
-	0,                                      /* tp_setattro */
-	0,                                      /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,			/* tp_flags */
-	0,                                      /* tp_doc */
-	0,					/* tp_traverse */
-	0,                                      /* tp_clear */
-	0,                                      /* tp_richcompare */
-	0,                                      /* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)rangeiter_next,		/* tp_iternext */
-	rangeiter_methods,			/* tp_methods */
-	0,
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,                                      /* ob_size */
+    "rangeiterator",                        /* tp_name */
+    sizeof(rangeiterobject),                /* tp_basicsize */
+    0,                                      /* tp_itemsize */
+    /* methods */
+    (destructor)PyObject_Del,                   /* tp_dealloc */
+    0,                                      /* tp_print */
+    0,                                      /* tp_getattr */
+    0,                                      /* tp_setattr */
+    0,                                      /* tp_compare */
+    0,                                      /* tp_repr */
+    0,                                      /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                      /* tp_as_mapping */
+    0,                                      /* tp_hash */
+    0,                                      /* tp_call */
+    0,                                      /* tp_str */
+    PyObject_GenericGetAttr,                /* tp_getattro */
+    0,                                      /* tp_setattro */
+    0,                                      /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,                         /* tp_flags */
+    0,                                      /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                      /* tp_clear */
+    0,                                      /* tp_richcompare */
+    0,                                      /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)rangeiter_next,               /* tp_iternext */
+    rangeiter_methods,                          /* tp_methods */
+    0,
 };
 
 static PyObject *
 range_iter(PyObject *seq)
 {
-	rangeiterobject *it;
+    rangeiterobject *it;
 
-	if (!PyRange_Check(seq)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	it = PyObject_New(rangeiterobject, &Pyrangeiter_Type);
-	if (it == NULL)
-		return NULL;
-	it->index = 0;
-	it->start = ((rangeobject *)seq)->start;
-	it->step = ((rangeobject *)seq)->step;
-	it->len = ((rangeobject *)seq)->len;
-	return (PyObject *)it;
+    if (!PyRange_Check(seq)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    it = PyObject_New(rangeiterobject, &Pyrangeiter_Type);
+    if (it == NULL)
+        return NULL;
+    it->index = 0;
+    it->start = ((rangeobject *)seq)->start;
+    it->step = ((rangeobject *)seq)->step;
+    it->len = ((rangeobject *)seq)->len;
+    return (PyObject *)it;
 }
 
 static PyObject *
 range_reverse(PyObject *seq)
 {
-	rangeiterobject *it;
-	long start, step, len;
+    rangeiterobject *it;
+    long start, step, len;
 
-	if (!PyRange_Check(seq)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	it = PyObject_New(rangeiterobject, &Pyrangeiter_Type);
-	if (it == NULL)
-		return NULL;
+    if (!PyRange_Check(seq)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    it = PyObject_New(rangeiterobject, &Pyrangeiter_Type);
+    if (it == NULL)
+        return NULL;
 
-	start = ((rangeobject *)seq)->start;
-	step = ((rangeobject *)seq)->step;
-	len = ((rangeobject *)seq)->len;
+    start = ((rangeobject *)seq)->start;
+    step = ((rangeobject *)seq)->step;
+    len = ((rangeobject *)seq)->len;
 
-	it->index = 0;
-	it->len = len;
-	/* the casts below guard against signed overflow by turning it
-	   into unsigned overflow instead.  The correctness of this
-	   code still depends on conversion from unsigned long to long
-	   wrapping modulo ULONG_MAX+1, which isn't guaranteed (see
-	   C99 6.3.1.3p3) but seems to hold in practice for all
-	   platforms we're likely to meet.
+    it->index = 0;
+    it->len = len;
+    /* the casts below guard against signed overflow by turning it
+       into unsigned overflow instead.  The correctness of this
+       code still depends on conversion from unsigned long to long
+       wrapping modulo ULONG_MAX+1, which isn't guaranteed (see
+       C99 6.3.1.3p3) but seems to hold in practice for all
+       platforms we're likely to meet.
 
-	   If step == LONG_MIN then we still end up with LONG_MIN
-	   after negation; but this works out, since we've still got
-	   the correct value modulo ULONG_MAX+1, and the range_item
-	   calculation is also done modulo ULONG_MAX+1.
-	*/
-	it->start = (long)(start + (unsigned long)(len-1) * step);
-	it->step = (long)(0UL-step);
+       If step == LONG_MIN then we still end up with LONG_MIN
+       after negation; but this works out, since we've still got
+       the correct value modulo ULONG_MAX+1, and the range_item
+       calculation is also done modulo ULONG_MAX+1.
+    */
+    it->start = (long)(start + (unsigned long)(len-1) * step);
+    it->step = (long)(0UL-step);
 
-	return (PyObject *)it;
+    return (PyObject *)it;
 }
diff --git a/Objects/setobject.c b/Objects/setobject.c
index f97b0c0..f98a930 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1,5 +1,5 @@
 
-/* set object implementation 
+/* set object implementation
    Written and maintained by Raymond D. Hettinger <python@rcn.com>
    Derived from Lib/sets.py and Objects/dictobject.c.
 
@@ -16,12 +16,12 @@
 static void
 set_key_error(PyObject *arg)
 {
-	PyObject *tup;
-	tup = PyTuple_Pack(1, arg);
-	if (!tup)
-		return; /* caller will expect error to be set anyway */
-	PyErr_SetObject(PyExc_KeyError, tup);
-	Py_DECREF(tup);
+    PyObject *tup;
+    tup = PyTuple_Pack(1, arg);
+    if (!tup)
+        return; /* caller will expect error to be set anyway */
+    PyErr_SetObject(PyExc_KeyError, tup);
+    Py_DECREF(tup);
 }
 
 /* This must be >= 1. */
@@ -34,20 +34,20 @@
 PyObject *
 _PySet_Dummy(void)
 {
-	return dummy;
+    return dummy;
 }
 #endif
 
-#define INIT_NONZERO_SET_SLOTS(so) do {				\
-	(so)->table = (so)->smalltable;				\
-	(so)->mask = PySet_MINSIZE - 1;				\
-	(so)->hash = -1;					\
+#define INIT_NONZERO_SET_SLOTS(so) do {                         \
+    (so)->table = (so)->smalltable;                             \
+    (so)->mask = PySet_MINSIZE - 1;                             \
+    (so)->hash = -1;                                            \
     } while(0)
 
-#define EMPTY_TO_MINSIZE(so) do {				\
-	memset((so)->smalltable, 0, sizeof((so)->smalltable));	\
-	(so)->used = (so)->fill = 0;				\
-	INIT_NONZERO_SET_SLOTS(so);				\
+#define EMPTY_TO_MINSIZE(so) do {                               \
+    memset((so)->smalltable, 0, sizeof((so)->smalltable));      \
+    (so)->used = (so)->fill = 0;                                \
+    INIT_NONZERO_SET_SLOTS(so);                                 \
     } while(0)
 
 /* Reuse scheme to save calls to malloc, free, and memset */
@@ -75,78 +75,78 @@
 static setentry *
 set_lookkey(PySetObject *so, PyObject *key, register long hash)
 {
-	register Py_ssize_t i;
-	register size_t perturb;
-	register setentry *freeslot;
-	register size_t mask = so->mask;
-	setentry *table = so->table;
-	register setentry *entry;
-	register int cmp;
-	PyObject *startkey;
+    register Py_ssize_t i;
+    register size_t perturb;
+    register setentry *freeslot;
+    register size_t mask = so->mask;
+    setentry *table = so->table;
+    register setentry *entry;
+    register int cmp;
+    PyObject *startkey;
 
-	i = hash & mask;
-	entry = &table[i];
-	if (entry->key == NULL || entry->key == key)
-		return entry;
+    i = hash & mask;
+    entry = &table[i];
+    if (entry->key == NULL || entry->key == key)
+        return entry;
 
-	if (entry->key == dummy)
-		freeslot = entry;
-	else {
-		if (entry->hash == hash) {
-			startkey = entry->key;
-			Py_INCREF(startkey);
-			cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
-			Py_DECREF(startkey);
-			if (cmp < 0)
-				return NULL;
-			if (table == so->table && entry->key == startkey) {
-				if (cmp > 0)
-					return entry;
-			}
-			else {
-				/* The compare did major nasty stuff to the
-				 * set:  start over.
- 				 */
- 				return set_lookkey(so, key, hash);
- 			}
-		}
-		freeslot = NULL;
-	}
+    if (entry->key == dummy)
+        freeslot = entry;
+    else {
+        if (entry->hash == hash) {
+            startkey = entry->key;
+            Py_INCREF(startkey);
+            cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
+            Py_DECREF(startkey);
+            if (cmp < 0)
+                return NULL;
+            if (table == so->table && entry->key == startkey) {
+                if (cmp > 0)
+                    return entry;
+            }
+            else {
+                /* The compare did major nasty stuff to the
+                 * set:  start over.
+                 */
+                return set_lookkey(so, key, hash);
+            }
+        }
+        freeslot = NULL;
+    }
 
-	/* In the loop, key == dummy is by far (factor of 100s) the
-	   least likely outcome, so test for that last. */
-	for (perturb = hash; ; perturb >>= PERTURB_SHIFT) {
-		i = (i << 2) + i + perturb + 1;
-		entry = &table[i & mask];
-		if (entry->key == NULL) {
-			if (freeslot != NULL)
-				entry = freeslot;
-			break;
-		}
-		if (entry->key == key)
-			break;
-		if (entry->hash == hash && entry->key != dummy) {
-			startkey = entry->key;
-			Py_INCREF(startkey);
-			cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
-			Py_DECREF(startkey);
-			if (cmp < 0)
-				return NULL;
-			if (table == so->table && entry->key == startkey) {
-				if (cmp > 0)
-					break;
-			}
-			else {
-				/* The compare did major nasty stuff to the
-				 * set:  start over.
- 				 */
- 				return set_lookkey(so, key, hash);
- 			}
-		}
-		else if (entry->key == dummy && freeslot == NULL)
-			freeslot = entry;
-	}
-	return entry;
+    /* In the loop, key == dummy is by far (factor of 100s) the
+       least likely outcome, so test for that last. */
+    for (perturb = hash; ; perturb >>= PERTURB_SHIFT) {
+        i = (i << 2) + i + perturb + 1;
+        entry = &table[i & mask];
+        if (entry->key == NULL) {
+            if (freeslot != NULL)
+                entry = freeslot;
+            break;
+        }
+        if (entry->key == key)
+            break;
+        if (entry->hash == hash && entry->key != dummy) {
+            startkey = entry->key;
+            Py_INCREF(startkey);
+            cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
+            Py_DECREF(startkey);
+            if (cmp < 0)
+                return NULL;
+            if (table == so->table && entry->key == startkey) {
+                if (cmp > 0)
+                    break;
+            }
+            else {
+                /* The compare did major nasty stuff to the
+                 * set:  start over.
+                 */
+                return set_lookkey(so, key, hash);
+            }
+        }
+        else if (entry->key == dummy && freeslot == NULL)
+            freeslot = entry;
+    }
+    return entry;
 }
 
 /*
@@ -157,50 +157,50 @@
 static setentry *
 set_lookkey_string(PySetObject *so, PyObject *key, register long hash)
 {
-	register Py_ssize_t i;
-	register size_t perturb;
-	register setentry *freeslot;
-	register size_t mask = so->mask;
-	setentry *table = so->table;
-	register setentry *entry;
+    register Py_ssize_t i;
+    register size_t perturb;
+    register setentry *freeslot;
+    register size_t mask = so->mask;
+    setentry *table = so->table;
+    register setentry *entry;
 
-	/* Make sure this function doesn't have to handle non-string keys,
-	   including subclasses of str; e.g., one reason to subclass
-	   strings is to override __eq__, and for speed we don't cater to
-	   that here. */
-	if (!PyString_CheckExact(key)) {
-		so->lookup = set_lookkey;
-		return set_lookkey(so, key, hash);
-	}
-	i = hash & mask;
-	entry = &table[i];
-	if (entry->key == NULL || entry->key == key)
-		return entry;
-	if (entry->key == dummy)
-		freeslot = entry;
-	else {
-		if (entry->hash == hash && _PyString_Eq(entry->key, key))
-			return entry;
-		freeslot = NULL;
-	}
+    /* Make sure this function doesn't have to handle non-string keys,
+       including subclasses of str; e.g., one reason to subclass
+       strings is to override __eq__, and for speed we don't cater to
+       that here. */
+    if (!PyString_CheckExact(key)) {
+        so->lookup = set_lookkey;
+        return set_lookkey(so, key, hash);
+    }
+    i = hash & mask;
+    entry = &table[i];
+    if (entry->key == NULL || entry->key == key)
+        return entry;
+    if (entry->key == dummy)
+        freeslot = entry;
+    else {
+        if (entry->hash == hash && _PyString_Eq(entry->key, key))
+            return entry;
+        freeslot = NULL;
+    }
 
-	/* In the loop, key == dummy is by far (factor of 100s) the
-	   least likely outcome, so test for that last. */
-	for (perturb = hash; ; perturb >>= PERTURB_SHIFT) {
-		i = (i << 2) + i + perturb + 1;
-		entry = &table[i & mask];
-		if (entry->key == NULL)
-			return freeslot == NULL ? entry : freeslot;
-		if (entry->key == key
-		    || (entry->hash == hash
-			&& entry->key != dummy
-			&& _PyString_Eq(entry->key, key)))
-			return entry;
-		if (entry->key == dummy && freeslot == NULL)
-			freeslot = entry;
-	}
-	assert(0);	/* NOT REACHED */
-	return 0;
+    /* In the loop, key == dummy is by far (factor of 100s) the
+       least likely outcome, so test for that last. */
+    for (perturb = hash; ; perturb >>= PERTURB_SHIFT) {
+        i = (i << 2) + i + perturb + 1;
+        entry = &table[i & mask];
+        if (entry->key == NULL)
+            return freeslot == NULL ? entry : freeslot;
+        if (entry->key == key
+            || (entry->hash == hash
+            && entry->key != dummy
+            && _PyString_Eq(entry->key, key)))
+            return entry;
+        if (entry->key == dummy && freeslot == NULL)
+            freeslot = entry;
+    }
+    assert(0);          /* NOT REACHED */
+    return 0;
 }
 
 /*
@@ -211,30 +211,30 @@
 static int
 set_insert_key(register PySetObject *so, PyObject *key, long hash)
 {
-	register setentry *entry;
-	typedef setentry *(*lookupfunc)(PySetObject *, PyObject *, long);
+    register setentry *entry;
+    typedef setentry *(*lookupfunc)(PySetObject *, PyObject *, long);
 
-	assert(so->lookup != NULL);
-	entry = so->lookup(so, key, hash);
-	if (entry == NULL)
-		return -1;
-	if (entry->key == NULL) {
-		/* UNUSED */
-		so->fill++; 
-		entry->key = key;
-		entry->hash = hash;
-		so->used++;
-	} else if (entry->key == dummy) {
-		/* DUMMY */
-		entry->key = key;
-		entry->hash = hash;
-		so->used++;
-		Py_DECREF(dummy);
-	} else {
-		/* ACTIVE */
-		Py_DECREF(key);
-	}
-	return 0;
+    assert(so->lookup != NULL);
+    entry = so->lookup(so, key, hash);
+    if (entry == NULL)
+        return -1;
+    if (entry->key == NULL) {
+        /* UNUSED */
+        so->fill++;
+        entry->key = key;
+        entry->hash = hash;
+        so->used++;
+    } else if (entry->key == dummy) {
+        /* DUMMY */
+        entry->key = key;
+        entry->hash = hash;
+        so->used++;
+        Py_DECREF(dummy);
+    } else {
+        /* ACTIVE */
+        Py_DECREF(key);
+    }
+    return 0;
 }
 
 /*
@@ -248,22 +248,22 @@
 static void
 set_insert_clean(register PySetObject *so, PyObject *key, long hash)
 {
-	register size_t i;
-	register size_t perturb;
-	register size_t mask = (size_t)so->mask;
-	setentry *table = so->table;
-	register setentry *entry;
+    register size_t i;
+    register size_t perturb;
+    register size_t mask = (size_t)so->mask;
+    setentry *table = so->table;
+    register setentry *entry;
 
-	i = hash & mask;
-	entry = &table[i];
-	for (perturb = hash; entry->key != NULL; perturb >>= PERTURB_SHIFT) {
-		i = (i << 2) + i + perturb + 1;
-		entry = &table[i & mask];
-	}
-	so->fill++;
-	entry->key = key;
-	entry->hash = hash;
-	so->used++;
+    i = hash & mask;
+    entry = &table[i];
+    for (perturb = hash; entry->key != NULL; perturb >>= PERTURB_SHIFT) {
+        i = (i << 2) + i + perturb + 1;
+        entry = &table[i & mask];
+    }
+    so->fill++;
+    entry->key = key;
+    entry->hash = hash;
+    so->used++;
 }
 
 /*
@@ -274,86 +274,86 @@
 static int
 set_table_resize(PySetObject *so, Py_ssize_t minused)
 {
-	Py_ssize_t newsize;
-	setentry *oldtable, *newtable, *entry;
-	Py_ssize_t i;
-	int is_oldtable_malloced;
-	setentry small_copy[PySet_MINSIZE];
+    Py_ssize_t newsize;
+    setentry *oldtable, *newtable, *entry;
+    Py_ssize_t i;
+    int is_oldtable_malloced;
+    setentry small_copy[PySet_MINSIZE];
 
-	assert(minused >= 0);
+    assert(minused >= 0);
 
-	/* Find the smallest table size > minused. */
-	for (newsize = PySet_MINSIZE;
-	     newsize <= minused && newsize > 0;
-	     newsize <<= 1)
-		;
-	if (newsize <= 0) {
-		PyErr_NoMemory();
-		return -1;
-	}
+    /* Find the smallest table size > minused. */
+    for (newsize = PySet_MINSIZE;
+         newsize <= minused && newsize > 0;
+         newsize <<= 1)
+        ;
+    if (newsize <= 0) {
+        PyErr_NoMemory();
+        return -1;
+    }
 
-	/* Get space for a new table. */
-	oldtable = so->table;
-	assert(oldtable != NULL);
-	is_oldtable_malloced = oldtable != so->smalltable;
+    /* Get space for a new table. */
+    oldtable = so->table;
+    assert(oldtable != NULL);
+    is_oldtable_malloced = oldtable != so->smalltable;
 
-	if (newsize == PySet_MINSIZE) {
-		/* A large table is shrinking, or we can't get any smaller. */
-		newtable = so->smalltable;
-		if (newtable == oldtable) {
-			if (so->fill == so->used) {
-				/* No dummies, so no point doing anything. */
-				return 0;
-			}
-			/* We're not going to resize it, but rebuild the
-			   table anyway to purge old dummy entries.
-			   Subtle:  This is *necessary* if fill==size,
-			   as set_lookkey needs at least one virgin slot to
-			   terminate failing searches.  If fill < size, it's
-			   merely desirable, as dummies slow searches. */
-			assert(so->fill > so->used);
-			memcpy(small_copy, oldtable, sizeof(small_copy));
-			oldtable = small_copy;
-		}
-	}
-	else {
-		newtable = PyMem_NEW(setentry, newsize);
-		if (newtable == NULL) {
-			PyErr_NoMemory();
-			return -1;
-		}
-	}
+    if (newsize == PySet_MINSIZE) {
+        /* A large table is shrinking, or we can't get any smaller. */
+        newtable = so->smalltable;
+        if (newtable == oldtable) {
+            if (so->fill == so->used) {
+                /* No dummies, so no point doing anything. */
+                return 0;
+            }
+            /* We're not going to resize it, but rebuild the
+               table anyway to purge old dummy entries.
+               Subtle:  This is *necessary* if fill==size,
+               as set_lookkey needs at least one virgin slot to
+               terminate failing searches.  If fill < size, it's
+               merely desirable, as dummies slow searches. */
+            assert(so->fill > so->used);
+            memcpy(small_copy, oldtable, sizeof(small_copy));
+            oldtable = small_copy;
+        }
+    }
+    else {
+        newtable = PyMem_NEW(setentry, newsize);
+        if (newtable == NULL) {
+            PyErr_NoMemory();
+            return -1;
+        }
+    }
 
-	/* Make the set empty, using the new table. */
-	assert(newtable != oldtable);
-	so->table = newtable;
-	so->mask = newsize - 1;
-	memset(newtable, 0, sizeof(setentry) * newsize);
-	so->used = 0;
-	i = so->fill;
-	so->fill = 0;
+    /* Make the set empty, using the new table. */
+    assert(newtable != oldtable);
+    so->table = newtable;
+    so->mask = newsize - 1;
+    memset(newtable, 0, sizeof(setentry) * newsize);
+    so->used = 0;
+    i = so->fill;
+    so->fill = 0;
 
-	/* Copy the data over; this is refcount-neutral for active entries;
-	   dummy entries aren't copied over, of course */
-	for (entry = oldtable; i > 0; entry++) {
-		if (entry->key == NULL) {
-			/* UNUSED */
-			;
-		} else if (entry->key == dummy) {
-			/* DUMMY */
-			--i;
-			assert(entry->key == dummy);
-			Py_DECREF(entry->key);
-		} else {
-			/* ACTIVE */
-			--i;
-			set_insert_clean(so, entry->key, entry->hash);
-		}
-	}
+    /* Copy the data over; this is refcount-neutral for active entries;
+       dummy entries aren't copied over, of course */
+    for (entry = oldtable; i > 0; entry++) {
+        if (entry->key == NULL) {
+            /* UNUSED */
+            ;
+        } else if (entry->key == dummy) {
+            /* DUMMY */
+            --i;
+            assert(entry->key == dummy);
+            Py_DECREF(entry->key);
+        } else {
+            /* ACTIVE */
+            --i;
+            set_insert_clean(so, entry->key, entry->hash);
+        }
+    }
 
-	if (is_oldtable_malloced)
-		PyMem_DEL(oldtable);
-	return 0;
+    if (is_oldtable_malloced)
+        PyMem_DEL(oldtable);
+    return 0;
 }
 
 /* CAUTION: set_add_key/entry() must guarantee it won't resize the table */
@@ -361,42 +361,42 @@
 static int
 set_add_entry(register PySetObject *so, setentry *entry)
 {
-	register Py_ssize_t n_used;
+    register Py_ssize_t n_used;
 
-	assert(so->fill <= so->mask);  /* at least one empty slot */
-	n_used = so->used;
-	Py_INCREF(entry->key);
-	if (set_insert_key(so, entry->key, entry->hash) == -1) {
-		Py_DECREF(entry->key);
-		return -1;
-	}
-	if (!(so->used > n_used && so->fill*3 >= (so->mask+1)*2))
-		return 0;
-	return set_table_resize(so, so->used>50000 ? so->used*2 : so->used*4);
+    assert(so->fill <= so->mask);  /* at least one empty slot */
+    n_used = so->used;
+    Py_INCREF(entry->key);
+    if (set_insert_key(so, entry->key, entry->hash) == -1) {
+        Py_DECREF(entry->key);
+        return -1;
+    }
+    if (!(so->used > n_used && so->fill*3 >= (so->mask+1)*2))
+        return 0;
+    return set_table_resize(so, so->used>50000 ? so->used*2 : so->used*4);
 }
 
 static int
 set_add_key(register PySetObject *so, PyObject *key)
 {
-	register long hash;
-	register Py_ssize_t n_used;
+    register long hash;
+    register Py_ssize_t n_used;
 
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return -1;
-	}
-	assert(so->fill <= so->mask);  /* at least one empty slot */
-	n_used = so->used;
-	Py_INCREF(key);
-	if (set_insert_key(so, key, hash) == -1) {
-		Py_DECREF(key);
-		return -1;
-	}
-	if (!(so->used > n_used && so->fill*3 >= (so->mask+1)*2))
-		return 0;
-	return set_table_resize(so, so->used>50000 ? so->used*2 : so->used*4);
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return -1;
+    }
+    assert(so->fill <= so->mask);  /* at least one empty slot */
+    n_used = so->used;
+    Py_INCREF(key);
+    if (set_insert_key(so, key, hash) == -1) {
+        Py_DECREF(key);
+        return -1;
+    }
+    if (!(so->used > n_used && so->fill*3 >= (so->mask+1)*2))
+        return 0;
+    return set_table_resize(so, so->used>50000 ? so->used*2 : so->used*4);
 }
 
 #define DISCARD_NOTFOUND 0
@@ -404,111 +404,111 @@
 
 static int
 set_discard_entry(PySetObject *so, setentry *oldentry)
-{	register setentry *entry;
-	PyObject *old_key;
+{       register setentry *entry;
+    PyObject *old_key;
 
-	entry = (so->lookup)(so, oldentry->key, oldentry->hash);
-	if (entry == NULL)
-		return -1;
-	if (entry->key == NULL  ||  entry->key == dummy)
-		return DISCARD_NOTFOUND;
-	old_key = entry->key;
-	Py_INCREF(dummy);
-	entry->key = dummy;
-	so->used--;
-	Py_DECREF(old_key);
-	return DISCARD_FOUND;
+    entry = (so->lookup)(so, oldentry->key, oldentry->hash);
+    if (entry == NULL)
+        return -1;
+    if (entry->key == NULL  ||  entry->key == dummy)
+        return DISCARD_NOTFOUND;
+    old_key = entry->key;
+    Py_INCREF(dummy);
+    entry->key = dummy;
+    so->used--;
+    Py_DECREF(old_key);
+    return DISCARD_FOUND;
 }
 
 static int
 set_discard_key(PySetObject *so, PyObject *key)
 {
-	register long hash;
-	register setentry *entry;
-	PyObject *old_key;
+    register long hash;
+    register setentry *entry;
+    PyObject *old_key;
 
-	assert (PyAnySet_Check(so));
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return -1;
-	}
-	entry = (so->lookup)(so, key, hash);
-	if (entry == NULL)
-		return -1;
-	if (entry->key == NULL  ||  entry->key == dummy)
-		return DISCARD_NOTFOUND;
-	old_key = entry->key;
-	Py_INCREF(dummy);
-	entry->key = dummy;
-	so->used--;
-	Py_DECREF(old_key);
-	return DISCARD_FOUND;
+    assert (PyAnySet_Check(so));
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return -1;
+    }
+    entry = (so->lookup)(so, key, hash);
+    if (entry == NULL)
+        return -1;
+    if (entry->key == NULL  ||  entry->key == dummy)
+        return DISCARD_NOTFOUND;
+    old_key = entry->key;
+    Py_INCREF(dummy);
+    entry->key = dummy;
+    so->used--;
+    Py_DECREF(old_key);
+    return DISCARD_FOUND;
 }
 
 static int
 set_clear_internal(PySetObject *so)
 {
-	setentry *entry, *table;
-	int table_is_malloced;
-	Py_ssize_t fill;
-	setentry small_copy[PySet_MINSIZE];
+    setentry *entry, *table;
+    int table_is_malloced;
+    Py_ssize_t fill;
+    setentry small_copy[PySet_MINSIZE];
 #ifdef Py_DEBUG
-	Py_ssize_t i, n;
-	assert (PyAnySet_Check(so));
+    Py_ssize_t i, n;
+    assert (PyAnySet_Check(so));
 
-	n = so->mask + 1;
-	i = 0;
+    n = so->mask + 1;
+    i = 0;
 #endif
 
-	table = so->table;
-	assert(table != NULL);
-	table_is_malloced = table != so->smalltable;
+    table = so->table;
+    assert(table != NULL);
+    table_is_malloced = table != so->smalltable;
 
-	/* This is delicate.  During the process of clearing the set,
-	 * decrefs can cause the set to mutate.  To avoid fatal confusion
-	 * (voice of experience), we have to make the set empty before
-	 * clearing the slots, and never refer to anything via so->ref while
-	 * clearing.
-	 */
-	fill = so->fill;
-	if (table_is_malloced)
-		EMPTY_TO_MINSIZE(so);
+    /* This is delicate.  During the process of clearing the set,
+     * decrefs can cause the set to mutate.  To avoid fatal confusion
+     * (voice of experience), we have to make the set empty before
+     * clearing the slots, and never refer to anything via so->ref while
+     * clearing.
+     */
+    fill = so->fill;
+    if (table_is_malloced)
+        EMPTY_TO_MINSIZE(so);
 
-	else if (fill > 0) {
-		/* It's a small table with something that needs to be cleared.
-		 * Afraid the only safe way is to copy the set entries into
-		 * another small table first.
-		 */
-		memcpy(small_copy, table, sizeof(small_copy));
-		table = small_copy;
-		EMPTY_TO_MINSIZE(so);
-	}
-	/* else it's a small table that's already empty */
+    else if (fill > 0) {
+        /* It's a small table with something that needs to be cleared.
+         * Afraid the only safe way is to copy the set entries into
+         * another small table first.
+         */
+        memcpy(small_copy, table, sizeof(small_copy));
+        table = small_copy;
+        EMPTY_TO_MINSIZE(so);
+    }
+    /* else it's a small table that's already empty */
 
-	/* Now we can finally clear things.  If C had refcounts, we could
-	 * assert that the refcount on table is 1 now, i.e. that this function
-	 * has unique access to it, so decref side-effects can't alter it.
-	 */
-	for (entry = table; fill > 0; ++entry) {
+    /* Now we can finally clear things.  If C had refcounts, we could
+     * assert that the refcount on table is 1 now, i.e. that this function
+     * has unique access to it, so decref side-effects can't alter it.
+     */
+    for (entry = table; fill > 0; ++entry) {
 #ifdef Py_DEBUG
-		assert(i < n);
-		++i;
+        assert(i < n);
+        ++i;
 #endif
-		if (entry->key) {
-			--fill;
-			Py_DECREF(entry->key);
-		}
+        if (entry->key) {
+            --fill;
+            Py_DECREF(entry->key);
+        }
 #ifdef Py_DEBUG
-		else
-			assert(entry->key == NULL);
+        else
+            assert(entry->key == NULL);
 #endif
-	}
+    }
 
-	if (table_is_malloced)
-		PyMem_DEL(table);
-	return 0;
+    if (table_is_malloced)
+        PyMem_DEL(table);
+    return 0;
 }
 
 /*
@@ -522,236 +522,236 @@
  *     }
  *
  * CAUTION:  In general, it isn't safe to use set_next in a loop that
- * mutates the table.  
+ * mutates the table.
  */
 static int
 set_next(PySetObject *so, Py_ssize_t *pos_ptr, setentry **entry_ptr)
 {
-	Py_ssize_t i;
-	Py_ssize_t mask;
-	register setentry *table;
+    Py_ssize_t i;
+    Py_ssize_t mask;
+    register setentry *table;
 
-	assert (PyAnySet_Check(so));
-	i = *pos_ptr;
-	assert(i >= 0);
-	table = so->table;
-	mask = so->mask;
-	while (i <= mask && (table[i].key == NULL || table[i].key == dummy))
-		i++;
-	*pos_ptr = i+1;
-	if (i > mask)
-		return 0;
-	assert(table[i].key != NULL);
-	*entry_ptr = &table[i];
-	return 1;
+    assert (PyAnySet_Check(so));
+    i = *pos_ptr;
+    assert(i >= 0);
+    table = so->table;
+    mask = so->mask;
+    while (i <= mask && (table[i].key == NULL || table[i].key == dummy))
+        i++;
+    *pos_ptr = i+1;
+    if (i > mask)
+        return 0;
+    assert(table[i].key != NULL);
+    *entry_ptr = &table[i];
+    return 1;
 }
 
 static void
 set_dealloc(PySetObject *so)
 {
-	register setentry *entry;
-	Py_ssize_t fill = so->fill;
-	PyObject_GC_UnTrack(so);
-	Py_TRASHCAN_SAFE_BEGIN(so)
-	if (so->weakreflist != NULL)
-		PyObject_ClearWeakRefs((PyObject *) so);
+    register setentry *entry;
+    Py_ssize_t fill = so->fill;
+    PyObject_GC_UnTrack(so);
+    Py_TRASHCAN_SAFE_BEGIN(so)
+    if (so->weakreflist != NULL)
+        PyObject_ClearWeakRefs((PyObject *) so);
 
-	for (entry = so->table; fill > 0; entry++) {
-		if (entry->key) {
-			--fill;
-			Py_DECREF(entry->key);
-		}
-	}
-	if (so->table != so->smalltable)
-		PyMem_DEL(so->table);
-	if (numfree < PySet_MAXFREELIST && PyAnySet_CheckExact(so))
-		free_list[numfree++] = so;
-	else 
-		Py_TYPE(so)->tp_free(so);
-	Py_TRASHCAN_SAFE_END(so)
+    for (entry = so->table; fill > 0; entry++) {
+        if (entry->key) {
+            --fill;
+            Py_DECREF(entry->key);
+        }
+    }
+    if (so->table != so->smalltable)
+        PyMem_DEL(so->table);
+    if (numfree < PySet_MAXFREELIST && PyAnySet_CheckExact(so))
+        free_list[numfree++] = so;
+    else
+        Py_TYPE(so)->tp_free(so);
+    Py_TRASHCAN_SAFE_END(so)
 }
 
 static int
 set_tp_print(PySetObject *so, FILE *fp, int flags)
 {
-	setentry *entry;
-	Py_ssize_t pos=0;
-	char *emit = "";	/* No separator emitted on first pass */
-	char *separator = ", ";
-	int status = Py_ReprEnter((PyObject*)so);
+    setentry *entry;
+    Py_ssize_t pos=0;
+    char *emit = "";            /* No separator emitted on first pass */
+    char *separator = ", ";
+    int status = Py_ReprEnter((PyObject*)so);
 
-	if (status != 0) {
-		if (status < 0)
-			return status;
-		Py_BEGIN_ALLOW_THREADS
-		fprintf(fp, "%s(...)", so->ob_type->tp_name);
-		Py_END_ALLOW_THREADS
-		return 0;
-	}        
+    if (status != 0) {
+        if (status < 0)
+            return status;
+        Py_BEGIN_ALLOW_THREADS
+        fprintf(fp, "%s(...)", so->ob_type->tp_name);
+        Py_END_ALLOW_THREADS
+        return 0;
+    }
 
-	Py_BEGIN_ALLOW_THREADS
-	fprintf(fp, "%s([", so->ob_type->tp_name);
-	Py_END_ALLOW_THREADS
-	while (set_next(so, &pos, &entry)) {
-		Py_BEGIN_ALLOW_THREADS
-		fputs(emit, fp);
-		Py_END_ALLOW_THREADS
-		emit = separator;
-		if (PyObject_Print(entry->key, fp, 0) != 0) {
-			Py_ReprLeave((PyObject*)so);
-			return -1;
-		}
-	}
-	Py_BEGIN_ALLOW_THREADS
-	fputs("])", fp);
-	Py_END_ALLOW_THREADS
-	Py_ReprLeave((PyObject*)so);        
-	return 0;
+    Py_BEGIN_ALLOW_THREADS
+    fprintf(fp, "%s([", so->ob_type->tp_name);
+    Py_END_ALLOW_THREADS
+    while (set_next(so, &pos, &entry)) {
+        Py_BEGIN_ALLOW_THREADS
+        fputs(emit, fp);
+        Py_END_ALLOW_THREADS
+        emit = separator;
+        if (PyObject_Print(entry->key, fp, 0) != 0) {
+            Py_ReprLeave((PyObject*)so);
+            return -1;
+        }
+    }
+    Py_BEGIN_ALLOW_THREADS
+    fputs("])", fp);
+    Py_END_ALLOW_THREADS
+    Py_ReprLeave((PyObject*)so);
+    return 0;
 }
 
 static PyObject *
 set_repr(PySetObject *so)
 {
-	PyObject *keys, *result=NULL, *listrepr;
-	int status = Py_ReprEnter((PyObject*)so);
+    PyObject *keys, *result=NULL, *listrepr;
+    int status = Py_ReprEnter((PyObject*)so);
 
-	if (status != 0) {
-		if (status < 0)
-			return NULL;
-		return PyString_FromFormat("%s(...)", so->ob_type->tp_name);
-	}
+    if (status != 0) {
+        if (status < 0)
+            return NULL;
+        return PyString_FromFormat("%s(...)", so->ob_type->tp_name);
+    }
 
-	keys = PySequence_List((PyObject *)so);
-	if (keys == NULL)
-		goto done;
-	listrepr = PyObject_Repr(keys);
-	Py_DECREF(keys);
-	if (listrepr == NULL)
-		goto done;
+    keys = PySequence_List((PyObject *)so);
+    if (keys == NULL)
+        goto done;
+    listrepr = PyObject_Repr(keys);
+    Py_DECREF(keys);
+    if (listrepr == NULL)
+        goto done;
 
-	result = PyString_FromFormat("%s(%s)", so->ob_type->tp_name,
-		PyString_AS_STRING(listrepr));
-	Py_DECREF(listrepr);
+    result = PyString_FromFormat("%s(%s)", so->ob_type->tp_name,
+        PyString_AS_STRING(listrepr));
+    Py_DECREF(listrepr);
 done:
-	Py_ReprLeave((PyObject*)so);
-	return result;
+    Py_ReprLeave((PyObject*)so);
+    return result;
 }
 
 static Py_ssize_t
 set_len(PyObject *so)
 {
-	return ((PySetObject *)so)->used;
+    return ((PySetObject *)so)->used;
 }
 
 static int
 set_merge(PySetObject *so, PyObject *otherset)
 {
-	PySetObject *other;
-	register Py_ssize_t i;
-	register setentry *entry;
+    PySetObject *other;
+    register Py_ssize_t i;
+    register setentry *entry;
 
-	assert (PyAnySet_Check(so));
-	assert (PyAnySet_Check(otherset));
+    assert (PyAnySet_Check(so));
+    assert (PyAnySet_Check(otherset));
 
-	other = (PySetObject*)otherset;
-	if (other == so || other->used == 0)
-		/* a.update(a) or a.update({}); nothing to do */
-		return 0;
-	/* Do one big resize at the start, rather than
-	 * incrementally resizing as we insert new keys.  Expect
-	 * that there will be no (or few) overlapping keys.
-	 */
-	if ((so->fill + other->used)*3 >= (so->mask+1)*2) {
-	   if (set_table_resize(so, (so->used + other->used)*2) != 0)
-		   return -1;
-	}
-	for (i = 0; i <= other->mask; i++) {
-		entry = &other->table[i];
-		if (entry->key != NULL && 
-		    entry->key != dummy) {
-			Py_INCREF(entry->key);
-			if (set_insert_key(so, entry->key, entry->hash) == -1) {
-				Py_DECREF(entry->key);
-				return -1;
-			}
-		}
-	}
-	return 0;
+    other = (PySetObject*)otherset;
+    if (other == so || other->used == 0)
+        /* a.update(a) or a.update({}); nothing to do */
+        return 0;
+    /* Do one big resize at the start, rather than
+     * incrementally resizing as we insert new keys.  Expect
+     * that there will be no (or few) overlapping keys.
+     */
+    if ((so->fill + other->used)*3 >= (so->mask+1)*2) {
+       if (set_table_resize(so, (so->used + other->used)*2) != 0)
+           return -1;
+    }
+    for (i = 0; i <= other->mask; i++) {
+        entry = &other->table[i];
+        if (entry->key != NULL &&
+            entry->key != dummy) {
+            Py_INCREF(entry->key);
+            if (set_insert_key(so, entry->key, entry->hash) == -1) {
+                Py_DECREF(entry->key);
+                return -1;
+            }
+        }
+    }
+    return 0;
 }
 
 static int
 set_contains_key(PySetObject *so, PyObject *key)
 {
-	long hash;
-	setentry *entry;
+    long hash;
+    setentry *entry;
 
-	if (!PyString_CheckExact(key) ||
-	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
-		hash = PyObject_Hash(key);
-		if (hash == -1)
-			return -1;
-	}
-	entry = (so->lookup)(so, key, hash);
-	if (entry == NULL)
-		return -1;
-	key = entry->key;
-	return key != NULL && key != dummy;
+    if (!PyString_CheckExact(key) ||
+        (hash = ((PyStringObject *) key)->ob_shash) == -1) {
+        hash = PyObject_Hash(key);
+        if (hash == -1)
+            return -1;
+    }
+    entry = (so->lookup)(so, key, hash);
+    if (entry == NULL)
+        return -1;
+    key = entry->key;
+    return key != NULL && key != dummy;
 }
 
 static int
 set_contains_entry(PySetObject *so, setentry *entry)
 {
-	PyObject *key;
-	setentry *lu_entry;
+    PyObject *key;
+    setentry *lu_entry;
 
-	lu_entry = (so->lookup)(so, entry->key, entry->hash);
-	if (lu_entry == NULL)
-		return -1;
-	key = lu_entry->key; 
-	return key != NULL && key != dummy;
+    lu_entry = (so->lookup)(so, entry->key, entry->hash);
+    if (lu_entry == NULL)
+        return -1;
+    key = lu_entry->key;
+    return key != NULL && key != dummy;
 }
 
 static PyObject *
 set_pop(PySetObject *so)
 {
-	register Py_ssize_t i = 0;
-	register setentry *entry;
-	PyObject *key;
+    register Py_ssize_t i = 0;
+    register setentry *entry;
+    PyObject *key;
 
-	assert (PyAnySet_Check(so));
-	if (so->used == 0) {
-		PyErr_SetString(PyExc_KeyError, "pop from an empty set");
-		return NULL;
-	}
+    assert (PyAnySet_Check(so));
+    if (so->used == 0) {
+        PyErr_SetString(PyExc_KeyError, "pop from an empty set");
+        return NULL;
+    }
 
-	/* Set entry to "the first" unused or dummy set entry.  We abuse
-	 * the hash field of slot 0 to hold a search finger:
-	 * If slot 0 has a value, use slot 0.
-	 * Else slot 0 is being used to hold a search finger,
-	 * and we use its hash value as the first index to look.
-	 */
-	entry = &so->table[0];
-	if (entry->key == NULL || entry->key == dummy) {
-		i = entry->hash;
-		/* The hash field may be a real hash value, or it may be a
-		 * legit search finger, or it may be a once-legit search
-		 * finger that's out of bounds now because it wrapped around
-		 * or the table shrunk -- simply make sure it's in bounds now.
-		 */
-		if (i > so->mask || i < 1)
-			i = 1;	/* skip slot 0 */
-		while ((entry = &so->table[i])->key == NULL || entry->key==dummy) {
-			i++;
-			if (i > so->mask)
-				i = 1;
-		}
-	}
-	key = entry->key;
-	Py_INCREF(dummy);
-	entry->key = dummy;
-	so->used--;
-	so->table[0].hash = i + 1;  /* next place to start */
-	return key;
+    /* Set entry to "the first" unused or dummy set entry.  We abuse
+     * the hash field of slot 0 to hold a search finger:
+     * If slot 0 has a value, use slot 0.
+     * Else slot 0 is being used to hold a search finger,
+     * and we use its hash value as the first index to look.
+     */
+    entry = &so->table[0];
+    if (entry->key == NULL || entry->key == dummy) {
+        i = entry->hash;
+        /* The hash field may be a real hash value, or it may be a
+         * legit search finger, or it may be a once-legit search
+         * finger that's out of bounds now because it wrapped around
+         * or the table shrunk -- simply make sure it's in bounds now.
+         */
+        if (i > so->mask || i < 1)
+            i = 1;              /* skip slot 0 */
+        while ((entry = &so->table[i])->key == NULL || entry->key==dummy) {
+            i++;
+            if (i > so->mask)
+                i = 1;
+        }
+    }
+    key = entry->key;
+    Py_INCREF(dummy);
+    entry->key = dummy;
+    so->used--;
+    so->table[0].hash = i + 1;  /* next place to start */
+    return key;
 }
 
 PyDoc_STRVAR(pop_doc, "Remove and return an arbitrary set element.\n\
@@ -760,277 +760,277 @@
 static int
 set_traverse(PySetObject *so, visitproc visit, void *arg)
 {
-	Py_ssize_t pos = 0;
-	setentry *entry;
+    Py_ssize_t pos = 0;
+    setentry *entry;
 
-	while (set_next(so, &pos, &entry))
-		Py_VISIT(entry->key);
-	return 0;
+    while (set_next(so, &pos, &entry))
+        Py_VISIT(entry->key);
+    return 0;
 }
 
 static long
 frozenset_hash(PyObject *self)
 {
-	PySetObject *so = (PySetObject *)self;
-	long h, hash = 1927868237L;
-	setentry *entry;
-	Py_ssize_t pos = 0;
+    PySetObject *so = (PySetObject *)self;
+    long h, hash = 1927868237L;
+    setentry *entry;
+    Py_ssize_t pos = 0;
 
-	if (so->hash != -1)
-		return so->hash;
+    if (so->hash != -1)
+        return so->hash;
 
-	hash *= PySet_GET_SIZE(self) + 1;
-	while (set_next(so, &pos, &entry)) {
-		/* Work to increase the bit dispersion for closely spaced hash
-		   values.  The is important because some use cases have many 
-		   combinations of a small number of elements with nearby 
-		   hashes so that many distinct combinations collapse to only 
-		   a handful of distinct hash values. */
-		h = entry->hash;
-		hash ^= (h ^ (h << 16) ^ 89869747L)  * 3644798167u;
-	}
-	hash = hash * 69069L + 907133923L;
-	if (hash == -1)
-		hash = 590923713L;
-	so->hash = hash;
-	return hash;
+    hash *= PySet_GET_SIZE(self) + 1;
+    while (set_next(so, &pos, &entry)) {
+        /* Work to increase the bit dispersion for closely spaced hash
+           values.  The is important because some use cases have many
+           combinations of a small number of elements with nearby
+           hashes so that many distinct combinations collapse to only
+           a handful of distinct hash values. */
+        h = entry->hash;
+        hash ^= (h ^ (h << 16) ^ 89869747L)  * 3644798167u;
+    }
+    hash = hash * 69069L + 907133923L;
+    if (hash == -1)
+        hash = 590923713L;
+    so->hash = hash;
+    return hash;
 }
 
 /***** Set iterator type ***********************************************/
 
 typedef struct {
-	PyObject_HEAD
-	PySetObject *si_set; /* Set to NULL when iterator is exhausted */
-	Py_ssize_t si_used;
-	Py_ssize_t si_pos;
-	Py_ssize_t len;
+    PyObject_HEAD
+    PySetObject *si_set; /* Set to NULL when iterator is exhausted */
+    Py_ssize_t si_used;
+    Py_ssize_t si_pos;
+    Py_ssize_t len;
 } setiterobject;
 
 static void
 setiter_dealloc(setiterobject *si)
 {
-	Py_XDECREF(si->si_set);
-	PyObject_GC_Del(si);
+    Py_XDECREF(si->si_set);
+    PyObject_GC_Del(si);
 }
 
 static int
 setiter_traverse(setiterobject *si, visitproc visit, void *arg)
 {
-	Py_VISIT(si->si_set);
-	return 0;
+    Py_VISIT(si->si_set);
+    return 0;
 }
 
 static PyObject *
 setiter_len(setiterobject *si)
 {
-	Py_ssize_t len = 0;
-	if (si->si_set != NULL && si->si_used == si->si_set->used)
-		len = si->len;
-	return PyInt_FromLong(len);
+    Py_ssize_t len = 0;
+    if (si->si_set != NULL && si->si_used == si->si_set->used)
+        len = si->len;
+    return PyInt_FromLong(len);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
 
 static PyMethodDef setiter_methods[] = {
-	{"__length_hint__", (PyCFunction)setiter_len, METH_NOARGS, length_hint_doc},
- 	{NULL,		NULL}		/* sentinel */
+    {"__length_hint__", (PyCFunction)setiter_len, METH_NOARGS, length_hint_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyObject *setiter_iternext(setiterobject *si)
 {
-	PyObject *key;
-	register Py_ssize_t i, mask;
-	register setentry *entry;
-	PySetObject *so = si->si_set;
+    PyObject *key;
+    register Py_ssize_t i, mask;
+    register setentry *entry;
+    PySetObject *so = si->si_set;
 
-	if (so == NULL)
-		return NULL;
-	assert (PyAnySet_Check(so));
+    if (so == NULL)
+        return NULL;
+    assert (PyAnySet_Check(so));
 
-	if (si->si_used != so->used) {
-		PyErr_SetString(PyExc_RuntimeError,
-				"Set changed size during iteration");
-		si->si_used = -1; /* Make this state sticky */
-		return NULL;
-	}
+    if (si->si_used != so->used) {
+        PyErr_SetString(PyExc_RuntimeError,
+                        "Set changed size during iteration");
+        si->si_used = -1; /* Make this state sticky */
+        return NULL;
+    }
 
-	i = si->si_pos;
-	assert(i>=0);
-	entry = so->table;
-	mask = so->mask;
-	while (i <= mask && (entry[i].key == NULL || entry[i].key == dummy))
-		i++;
-	si->si_pos = i+1;
-	if (i > mask)
-		goto fail;
-	si->len--;
-	key = entry[i].key;
-	Py_INCREF(key);
-	return key;
+    i = si->si_pos;
+    assert(i>=0);
+    entry = so->table;
+    mask = so->mask;
+    while (i <= mask && (entry[i].key == NULL || entry[i].key == dummy))
+        i++;
+    si->si_pos = i+1;
+    if (i > mask)
+        goto fail;
+    si->len--;
+    key = entry[i].key;
+    Py_INCREF(key);
+    return key;
 
 fail:
-	Py_DECREF(so);
-	si->si_set = NULL;
-	return NULL;
+    Py_DECREF(so);
+    si->si_set = NULL;
+    return NULL;
 }
 
 static PyTypeObject PySetIter_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"setiterator",				/* tp_name */
-	sizeof(setiterobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)setiter_dealloc, 		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
- 	0,					/* tp_doc */
- 	(traverseproc)setiter_traverse,		/* tp_traverse */
- 	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)setiter_iternext,		/* tp_iternext */
-	setiter_methods,			/* tp_methods */
-	0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "setiterator",                              /* tp_name */
+    sizeof(setiterobject),                      /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)setiter_dealloc,                /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)setiter_traverse,             /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)setiter_iternext,             /* tp_iternext */
+    setiter_methods,                            /* tp_methods */
+    0,
 };
 
 static PyObject *
 set_iter(PySetObject *so)
 {
-	setiterobject *si = PyObject_GC_New(setiterobject, &PySetIter_Type);
-	if (si == NULL)
-		return NULL;
-	Py_INCREF(so);
-	si->si_set = so;
-	si->si_used = so->used;
-	si->si_pos = 0;
-	si->len = so->used;
-	_PyObject_GC_TRACK(si);
-	return (PyObject *)si;
+    setiterobject *si = PyObject_GC_New(setiterobject, &PySetIter_Type);
+    if (si == NULL)
+        return NULL;
+    Py_INCREF(so);
+    si->si_set = so;
+    si->si_used = so->used;
+    si->si_pos = 0;
+    si->len = so->used;
+    _PyObject_GC_TRACK(si);
+    return (PyObject *)si;
 }
 
 static int
 set_update_internal(PySetObject *so, PyObject *other)
 {
-	PyObject *key, *it;
+    PyObject *key, *it;
 
-	if (PyAnySet_Check(other))
-		return set_merge(so, other);
+    if (PyAnySet_Check(other))
+        return set_merge(so, other);
 
-	if (PyDict_CheckExact(other)) {
-		PyObject *value;
-		Py_ssize_t pos = 0;
-		long hash;
-		Py_ssize_t dictsize = PyDict_Size(other);
+    if (PyDict_CheckExact(other)) {
+        PyObject *value;
+        Py_ssize_t pos = 0;
+        long hash;
+        Py_ssize_t dictsize = PyDict_Size(other);
 
-		/* Do one big resize at the start, rather than
-		* incrementally resizing as we insert new keys.  Expect
-		* that there will be no (or few) overlapping keys.
-		*/
-		if (dictsize == -1)
-			return -1;
-		if ((so->fill + dictsize)*3 >= (so->mask+1)*2) {
-			if (set_table_resize(so, (so->used + dictsize)*2) != 0)
-				return -1;
-		}
-		while (_PyDict_Next(other, &pos, &key, &value, &hash)) {
-			setentry an_entry;
+        /* Do one big resize at the start, rather than
+        * incrementally resizing as we insert new keys.  Expect
+        * that there will be no (or few) overlapping keys.
+        */
+        if (dictsize == -1)
+            return -1;
+        if ((so->fill + dictsize)*3 >= (so->mask+1)*2) {
+            if (set_table_resize(so, (so->used + dictsize)*2) != 0)
+                return -1;
+        }
+        while (_PyDict_Next(other, &pos, &key, &value, &hash)) {
+            setentry an_entry;
 
-			an_entry.hash = hash;
-			an_entry.key = key;
-			if (set_add_entry(so, &an_entry) == -1)
-				return -1;
-		}
-		return 0;
-	}
+            an_entry.hash = hash;
+            an_entry.key = key;
+            if (set_add_entry(so, &an_entry) == -1)
+                return -1;
+        }
+        return 0;
+    }
 
-	it = PyObject_GetIter(other);
-	if (it == NULL)
-		return -1;
+    it = PyObject_GetIter(other);
+    if (it == NULL)
+        return -1;
 
-	while ((key = PyIter_Next(it)) != NULL) {
-                if (set_add_key(so, key) == -1) {
-			Py_DECREF(it);
-			Py_DECREF(key);
-			return -1;
-                } 
-		Py_DECREF(key);
-	}
-	Py_DECREF(it);
-	if (PyErr_Occurred())
-		return -1;
-	return 0;
+    while ((key = PyIter_Next(it)) != NULL) {
+        if (set_add_key(so, key) == -1) {
+            Py_DECREF(it);
+            Py_DECREF(key);
+            return -1;
+        }
+        Py_DECREF(key);
+    }
+    Py_DECREF(it);
+    if (PyErr_Occurred())
+        return -1;
+    return 0;
 }
 
 static PyObject *
 set_update(PySetObject *so, PyObject *args)
 {
-	Py_ssize_t i;
+    Py_ssize_t i;
 
-	for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
-		PyObject *other = PyTuple_GET_ITEM(args, i);
-		if (set_update_internal(so, other) == -1)
-			return NULL;
-	}
-	Py_RETURN_NONE;
+    for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
+        PyObject *other = PyTuple_GET_ITEM(args, i);
+        if (set_update_internal(so, other) == -1)
+            return NULL;
+    }
+    Py_RETURN_NONE;
 }
 
-PyDoc_STRVAR(update_doc, 
+PyDoc_STRVAR(update_doc,
 "Update a set with the union of itself and others.");
 
 static PyObject *
 make_new_set(PyTypeObject *type, PyObject *iterable)
 {
-	register PySetObject *so = NULL;
+    register PySetObject *so = NULL;
 
-	if (dummy == NULL) { /* Auto-initialize dummy */
-		dummy = PyString_FromString("<dummy key>");
-		if (dummy == NULL)
-			return NULL;
-	}
+    if (dummy == NULL) { /* Auto-initialize dummy */
+        dummy = PyString_FromString("<dummy key>");
+        if (dummy == NULL)
+            return NULL;
+    }
 
-	/* create PySetObject structure */
-	if (numfree &&
-	    (type == &PySet_Type  ||  type == &PyFrozenSet_Type)) {
-		so = free_list[--numfree];
-		assert (so != NULL && PyAnySet_CheckExact(so));
-		Py_TYPE(so) = type;
-		_Py_NewReference((PyObject *)so);
-		EMPTY_TO_MINSIZE(so);
-		PyObject_GC_Track(so);
-	} else {
-		so = (PySetObject *)type->tp_alloc(type, 0);
-		if (so == NULL)
-			return NULL;
-		/* tp_alloc has already zeroed the structure */
-		assert(so->table == NULL && so->fill == 0 && so->used == 0);
-		INIT_NONZERO_SET_SLOTS(so);
-	}
+    /* create PySetObject structure */
+    if (numfree &&
+        (type == &PySet_Type  ||  type == &PyFrozenSet_Type)) {
+        so = free_list[--numfree];
+        assert (so != NULL && PyAnySet_CheckExact(so));
+        Py_TYPE(so) = type;
+        _Py_NewReference((PyObject *)so);
+        EMPTY_TO_MINSIZE(so);
+        PyObject_GC_Track(so);
+    } else {
+        so = (PySetObject *)type->tp_alloc(type, 0);
+        if (so == NULL)
+            return NULL;
+        /* tp_alloc has already zeroed the structure */
+        assert(so->table == NULL && so->fill == 0 && so->used == 0);
+        INIT_NONZERO_SET_SLOTS(so);
+    }
 
-	so->lookup = set_lookkey_string;
-	so->weakreflist = NULL;
+    so->lookup = set_lookkey_string;
+    so->weakreflist = NULL;
 
-	if (iterable != NULL) {
-		if (set_update_internal(so, iterable) == -1) {
-			Py_DECREF(so);
-			return NULL;
-		}
-	}
+    if (iterable != NULL) {
+        if (set_update_internal(so, iterable) == -1) {
+            Py_DECREF(so);
+            return NULL;
+        }
+    }
 
-	return (PyObject *)so;
+    return (PyObject *)so;
 }
 
 /* The empty frozenset is a singleton */
@@ -1039,56 +1039,56 @@
 static PyObject *
 frozenset_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *iterable = NULL, *result;
+    PyObject *iterable = NULL, *result;
 
-	if (type == &PyFrozenSet_Type && !_PyArg_NoKeywords("frozenset()", kwds))
-		return NULL;
+    if (type == &PyFrozenSet_Type && !_PyArg_NoKeywords("frozenset()", kwds))
+        return NULL;
 
-	if (!PyArg_UnpackTuple(args, type->tp_name, 0, 1, &iterable))
-		return NULL;
+    if (!PyArg_UnpackTuple(args, type->tp_name, 0, 1, &iterable))
+        return NULL;
 
-	if (type != &PyFrozenSet_Type)
-		return make_new_set(type, iterable);
+    if (type != &PyFrozenSet_Type)
+        return make_new_set(type, iterable);
 
-	if (iterable != NULL) {
-		/* frozenset(f) is idempotent */
-		if (PyFrozenSet_CheckExact(iterable)) {
-			Py_INCREF(iterable);
-			return iterable;
-		}
-		result = make_new_set(type, iterable);
-		if (result == NULL || PySet_GET_SIZE(result))
-			return result;
-		Py_DECREF(result);
-	}
-	/* The empty frozenset is a singleton */
-	if (emptyfrozenset == NULL)
-		emptyfrozenset = make_new_set(type, NULL);
-	Py_XINCREF(emptyfrozenset);
-	return emptyfrozenset;
+    if (iterable != NULL) {
+        /* frozenset(f) is idempotent */
+        if (PyFrozenSet_CheckExact(iterable)) {
+            Py_INCREF(iterable);
+            return iterable;
+        }
+        result = make_new_set(type, iterable);
+        if (result == NULL || PySet_GET_SIZE(result))
+            return result;
+        Py_DECREF(result);
+    }
+    /* The empty frozenset is a singleton */
+    if (emptyfrozenset == NULL)
+        emptyfrozenset = make_new_set(type, NULL);
+    Py_XINCREF(emptyfrozenset);
+    return emptyfrozenset;
 }
 
 void
 PySet_Fini(void)
 {
-	PySetObject *so;
+    PySetObject *so;
 
-	while (numfree) {
-		numfree--;
-		so = free_list[numfree];
-		PyObject_GC_Del(so);
-	}
-	Py_CLEAR(dummy);
-	Py_CLEAR(emptyfrozenset);
+    while (numfree) {
+        numfree--;
+        so = free_list[numfree];
+        PyObject_GC_Del(so);
+    }
+    Py_CLEAR(dummy);
+    Py_CLEAR(emptyfrozenset);
 }
 
 static PyObject *
 set_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	if (type == &PySet_Type && !_PyArg_NoKeywords("set()", kwds))
-		return NULL;
-	
-	return make_new_set(type, NULL);
+    if (type == &PySet_Type && !_PyArg_NoKeywords("set()", kwds))
+        return NULL;
+
+    return make_new_set(type, NULL);
 }
 
 /* set_swap_bodies() switches the contents of any two sets by moving their
@@ -1098,64 +1098,64 @@
      t=set(a); a.clear(); a.update(b); b.clear(); b.update(t); del t
 
    The function always succeeds and it leaves both objects in a stable state.
-   Useful for creating temporary frozensets from sets for membership testing 
+   Useful for creating temporary frozensets from sets for membership testing
    in __contains__(), discard(), and remove().  Also useful for operations
-   that update in-place (by allowing an intermediate result to be swapped 
+   that update in-place (by allowing an intermediate result to be swapped
    into one of the original inputs).
 */
 
 static void
 set_swap_bodies(PySetObject *a, PySetObject *b)
 {
-	Py_ssize_t t;
-	setentry *u;
-	setentry *(*f)(PySetObject *so, PyObject *key, long hash);
-	setentry tab[PySet_MINSIZE];
-	long h;
+    Py_ssize_t t;
+    setentry *u;
+    setentry *(*f)(PySetObject *so, PyObject *key, long hash);
+    setentry tab[PySet_MINSIZE];
+    long h;
 
-	t = a->fill;     a->fill   = b->fill;        b->fill  = t;
-	t = a->used;     a->used   = b->used;        b->used  = t;
-	t = a->mask;     a->mask   = b->mask;        b->mask  = t;
+    t = a->fill;     a->fill   = b->fill;        b->fill  = t;
+    t = a->used;     a->used   = b->used;        b->used  = t;
+    t = a->mask;     a->mask   = b->mask;        b->mask  = t;
 
-	u = a->table;
-	if (a->table == a->smalltable)
-		u = b->smalltable;
-	a->table  = b->table;
-	if (b->table == b->smalltable)
-		a->table = a->smalltable;
-	b->table = u;
+    u = a->table;
+    if (a->table == a->smalltable)
+        u = b->smalltable;
+    a->table  = b->table;
+    if (b->table == b->smalltable)
+        a->table = a->smalltable;
+    b->table = u;
 
-	f = a->lookup;   a->lookup = b->lookup;      b->lookup = f;
+    f = a->lookup;   a->lookup = b->lookup;      b->lookup = f;
 
-	if (a->table == a->smalltable || b->table == b->smalltable) {
-		memcpy(tab, a->smalltable, sizeof(tab));
-		memcpy(a->smalltable, b->smalltable, sizeof(tab));
-		memcpy(b->smalltable, tab, sizeof(tab));
-	}
+    if (a->table == a->smalltable || b->table == b->smalltable) {
+        memcpy(tab, a->smalltable, sizeof(tab));
+        memcpy(a->smalltable, b->smalltable, sizeof(tab));
+        memcpy(b->smalltable, tab, sizeof(tab));
+    }
 
-	if (PyType_IsSubtype(Py_TYPE(a), &PyFrozenSet_Type)  &&
-	    PyType_IsSubtype(Py_TYPE(b), &PyFrozenSet_Type)) {
-		h = a->hash;     a->hash = b->hash;  b->hash = h;
-	} else {
-		a->hash = -1;
-		b->hash = -1;
-	}
+    if (PyType_IsSubtype(Py_TYPE(a), &PyFrozenSet_Type)  &&
+        PyType_IsSubtype(Py_TYPE(b), &PyFrozenSet_Type)) {
+        h = a->hash;     a->hash = b->hash;  b->hash = h;
+    } else {
+        a->hash = -1;
+        b->hash = -1;
+    }
 }
 
 static PyObject *
 set_copy(PySetObject *so)
 {
-	return make_new_set(Py_TYPE(so), (PyObject *)so);
+    return make_new_set(Py_TYPE(so), (PyObject *)so);
 }
 
 static PyObject *
 frozenset_copy(PySetObject *so)
 {
-	if (PyFrozenSet_CheckExact(so)) {
-		Py_INCREF(so);
-		return (PyObject *)so;
-	}
-	return set_copy(so);
+    if (PyFrozenSet_CheckExact(so)) {
+        Py_INCREF(so);
+        return (PyObject *)so;
+    }
+    return set_copy(so);
 }
 
 PyDoc_STRVAR(copy_doc, "Return a shallow copy of a set.");
@@ -1163,8 +1163,8 @@
 static PyObject *
 set_clear(PySetObject *so)
 {
-	set_clear_internal(so);
-	Py_RETURN_NONE;
+    set_clear_internal(so);
+    Py_RETURN_NONE;
 }
 
 PyDoc_STRVAR(clear_doc, "Remove all elements from this set.");
@@ -1172,24 +1172,24 @@
 static PyObject *
 set_union(PySetObject *so, PyObject *args)
 {
-	PySetObject *result;
-	PyObject *other;
-	Py_ssize_t i;
+    PySetObject *result;
+    PyObject *other;
+    Py_ssize_t i;
 
-	result = (PySetObject *)set_copy(so);
-	if (result == NULL)
-		return NULL;
+    result = (PySetObject *)set_copy(so);
+    if (result == NULL)
+        return NULL;
 
-	for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
-		other = PyTuple_GET_ITEM(args, i);
-		if ((PyObject *)so == other)
-			continue;
-		if (set_update_internal(result, other) == -1) {
-			Py_DECREF(result);
-			return NULL;
-		}
-	}
-	return (PyObject *)result;
+    for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
+        other = PyTuple_GET_ITEM(args, i);
+        if ((PyObject *)so == other)
+            continue;
+        if (set_update_internal(result, other) == -1) {
+            Py_DECREF(result);
+            return NULL;
+        }
+    }
+    return (PyObject *)result;
 }
 
 PyDoc_STRVAR(union_doc,
@@ -1200,142 +1200,142 @@
 static PyObject *
 set_or(PySetObject *so, PyObject *other)
 {
-	PySetObject *result;
+    PySetObject *result;
 
-	if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
+    if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 
-	result = (PySetObject *)set_copy(so);
-	if (result == NULL)
-		return NULL;
-	if ((PyObject *)so == other)
-		return (PyObject *)result;
-	if (set_update_internal(result, other) == -1) {
-		Py_DECREF(result);
-		return NULL;
-	}
-	return (PyObject *)result;
+    result = (PySetObject *)set_copy(so);
+    if (result == NULL)
+        return NULL;
+    if ((PyObject *)so == other)
+        return (PyObject *)result;
+    if (set_update_internal(result, other) == -1) {
+        Py_DECREF(result);
+        return NULL;
+    }
+    return (PyObject *)result;
 }
 
 static PyObject *
 set_ior(PySetObject *so, PyObject *other)
 {
-	if (!PyAnySet_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	if (set_update_internal(so, other) == -1)
-		return NULL;
-	Py_INCREF(so);
-	return (PyObject *)so;
+    if (!PyAnySet_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    if (set_update_internal(so, other) == -1)
+        return NULL;
+    Py_INCREF(so);
+    return (PyObject *)so;
 }
 
 static PyObject *
 set_intersection(PySetObject *so, PyObject *other)
 {
-	PySetObject *result;
-	PyObject *key, *it, *tmp;
+    PySetObject *result;
+    PyObject *key, *it, *tmp;
 
-	if ((PyObject *)so == other)
-		return set_copy(so);
+    if ((PyObject *)so == other)
+        return set_copy(so);
 
-	result = (PySetObject *)make_new_set(Py_TYPE(so), NULL);
-	if (result == NULL)
-		return NULL;
+    result = (PySetObject *)make_new_set(Py_TYPE(so), NULL);
+    if (result == NULL)
+        return NULL;
 
-	if (PyAnySet_Check(other)) {		
-		Py_ssize_t pos = 0;
-		setentry *entry;
+    if (PyAnySet_Check(other)) {
+        Py_ssize_t pos = 0;
+        setentry *entry;
 
-		if (PySet_GET_SIZE(other) > PySet_GET_SIZE(so)) {
-			tmp = (PyObject *)so;
-			so = (PySetObject *)other;
-			other = tmp;
-		}
+        if (PySet_GET_SIZE(other) > PySet_GET_SIZE(so)) {
+            tmp = (PyObject *)so;
+            so = (PySetObject *)other;
+            other = tmp;
+        }
 
-		while (set_next((PySetObject *)other, &pos, &entry)) {
-			int rv = set_contains_entry(so, entry);
-			if (rv == -1) {
-				Py_DECREF(result);
-				return NULL;
-			}
-			if (rv) {
-				if (set_add_entry(result, entry) == -1) {
-					Py_DECREF(result);
-					return NULL;
-				}
-			}
-		}
-		return (PyObject *)result;
-	}
+        while (set_next((PySetObject *)other, &pos, &entry)) {
+            int rv = set_contains_entry(so, entry);
+            if (rv == -1) {
+                Py_DECREF(result);
+                return NULL;
+            }
+            if (rv) {
+                if (set_add_entry(result, entry) == -1) {
+                    Py_DECREF(result);
+                    return NULL;
+                }
+            }
+        }
+        return (PyObject *)result;
+    }
 
-	it = PyObject_GetIter(other);
-	if (it == NULL) {
-		Py_DECREF(result);
-		return NULL;
-	}
+    it = PyObject_GetIter(other);
+    if (it == NULL) {
+        Py_DECREF(result);
+        return NULL;
+    }
 
-	while ((key = PyIter_Next(it)) != NULL) {
-		int rv;
-		setentry entry;
-		long hash = PyObject_Hash(key);
+    while ((key = PyIter_Next(it)) != NULL) {
+        int rv;
+        setentry entry;
+        long hash = PyObject_Hash(key);
 
-		if (hash == -1) {
-			Py_DECREF(it);
-			Py_DECREF(result);
-			Py_DECREF(key);
-			return NULL;
-		}
-		entry.hash = hash;
-		entry.key = key;
-		rv = set_contains_entry(so, &entry);
-		if (rv == -1) {
-			Py_DECREF(it);
-			Py_DECREF(result);
-			Py_DECREF(key);
-			return NULL;
-		}
-		if (rv) {
-			if (set_add_entry(result, &entry) == -1) {
-				Py_DECREF(it);
-				Py_DECREF(result);
-				Py_DECREF(key);
-				return NULL;
-			}
-		}
-		Py_DECREF(key);
-	}
-	Py_DECREF(it);
-	if (PyErr_Occurred()) {
-		Py_DECREF(result);
-		return NULL;
-	}
-	return (PyObject *)result;
+        if (hash == -1) {
+            Py_DECREF(it);
+            Py_DECREF(result);
+            Py_DECREF(key);
+            return NULL;
+        }
+        entry.hash = hash;
+        entry.key = key;
+        rv = set_contains_entry(so, &entry);
+        if (rv == -1) {
+            Py_DECREF(it);
+            Py_DECREF(result);
+            Py_DECREF(key);
+            return NULL;
+        }
+        if (rv) {
+            if (set_add_entry(result, &entry) == -1) {
+                Py_DECREF(it);
+                Py_DECREF(result);
+                Py_DECREF(key);
+                return NULL;
+            }
+        }
+        Py_DECREF(key);
+    }
+    Py_DECREF(it);
+    if (PyErr_Occurred()) {
+        Py_DECREF(result);
+        return NULL;
+    }
+    return (PyObject *)result;
 }
 
 static PyObject *
 set_intersection_multi(PySetObject *so, PyObject *args)
 {
-	Py_ssize_t i;
-	PyObject *result = (PyObject *)so;
+    Py_ssize_t i;
+    PyObject *result = (PyObject *)so;
 
-	if (PyTuple_GET_SIZE(args) == 0)
-		return set_copy(so);
+    if (PyTuple_GET_SIZE(args) == 0)
+        return set_copy(so);
 
-	Py_INCREF(so);
-	for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
-		PyObject *other = PyTuple_GET_ITEM(args, i);
-		PyObject *newresult = set_intersection((PySetObject *)result, other);
-		if (newresult == NULL) {
-			Py_DECREF(result);
-			return NULL;
-		}
-		Py_DECREF(result);
-		result = newresult;
-	}
-	return result;
+    Py_INCREF(so);
+    for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
+        PyObject *other = PyTuple_GET_ITEM(args, i);
+        PyObject *newresult = set_intersection((PySetObject *)result, other);
+        if (newresult == NULL) {
+            Py_DECREF(result);
+            return NULL;
+        }
+        Py_DECREF(result);
+        result = newresult;
+    }
+    return result;
 }
 
 PyDoc_STRVAR(intersection_doc,
@@ -1346,27 +1346,27 @@
 static PyObject *
 set_intersection_update(PySetObject *so, PyObject *other)
 {
-	PyObject *tmp;
+    PyObject *tmp;
 
-	tmp = set_intersection(so, other);
-	if (tmp == NULL)
-		return NULL;
-	set_swap_bodies(so, (PySetObject *)tmp);
-	Py_DECREF(tmp);
-	Py_RETURN_NONE;
+    tmp = set_intersection(so, other);
+    if (tmp == NULL)
+        return NULL;
+    set_swap_bodies(so, (PySetObject *)tmp);
+    Py_DECREF(tmp);
+    Py_RETURN_NONE;
 }
 
 static PyObject *
 set_intersection_update_multi(PySetObject *so, PyObject *args)
 {
-	PyObject *tmp;
+    PyObject *tmp;
 
-	tmp = set_intersection_multi(so, args);
-	if (tmp == NULL)
-		return NULL;
-	set_swap_bodies(so, (PySetObject *)tmp);
-	Py_DECREF(tmp);
-	Py_RETURN_NONE;
+    tmp = set_intersection_multi(so, args);
+    if (tmp == NULL)
+        return NULL;
+    set_swap_bodies(so, (PySetObject *)tmp);
+    Py_DECREF(tmp);
+    Py_RETURN_NONE;
 }
 
 PyDoc_STRVAR(intersection_update_doc,
@@ -1375,92 +1375,92 @@
 static PyObject *
 set_and(PySetObject *so, PyObject *other)
 {
-	if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	return set_intersection(so, other);
+    if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    return set_intersection(so, other);
 }
 
 static PyObject *
 set_iand(PySetObject *so, PyObject *other)
 {
-	PyObject *result;
+    PyObject *result;
 
-	if (!PyAnySet_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	result = set_intersection_update(so, other);
-	if (result == NULL)
-		return NULL;
-	Py_DECREF(result);
-	Py_INCREF(so);
-	return (PyObject *)so;
+    if (!PyAnySet_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    result = set_intersection_update(so, other);
+    if (result == NULL)
+        return NULL;
+    Py_DECREF(result);
+    Py_INCREF(so);
+    return (PyObject *)so;
 }
 
 static PyObject *
 set_isdisjoint(PySetObject *so, PyObject *other)
 {
-	PyObject *key, *it, *tmp;
+    PyObject *key, *it, *tmp;
 
-	if ((PyObject *)so == other) {
-		if (PySet_GET_SIZE(so) == 0)
-			Py_RETURN_TRUE;
-		else
-			Py_RETURN_FALSE;
-	}
+    if ((PyObject *)so == other) {
+        if (PySet_GET_SIZE(so) == 0)
+            Py_RETURN_TRUE;
+        else
+            Py_RETURN_FALSE;
+    }
 
-	if (PyAnySet_CheckExact(other)) {		
-		Py_ssize_t pos = 0;
-		setentry *entry;
+    if (PyAnySet_CheckExact(other)) {
+        Py_ssize_t pos = 0;
+        setentry *entry;
 
-		if (PySet_GET_SIZE(other) > PySet_GET_SIZE(so)) {
-			tmp = (PyObject *)so;
-			so = (PySetObject *)other;
-			other = tmp;
-		}
-		while (set_next((PySetObject *)other, &pos, &entry)) {
-			int rv = set_contains_entry(so, entry);
-			if (rv == -1)
-				return NULL;
-			if (rv)
-				Py_RETURN_FALSE;
-		}
-		Py_RETURN_TRUE;
-	}
+        if (PySet_GET_SIZE(other) > PySet_GET_SIZE(so)) {
+            tmp = (PyObject *)so;
+            so = (PySetObject *)other;
+            other = tmp;
+        }
+        while (set_next((PySetObject *)other, &pos, &entry)) {
+            int rv = set_contains_entry(so, entry);
+            if (rv == -1)
+                return NULL;
+            if (rv)
+                Py_RETURN_FALSE;
+        }
+        Py_RETURN_TRUE;
+    }
 
-	it = PyObject_GetIter(other);
-	if (it == NULL)
-		return NULL;
+    it = PyObject_GetIter(other);
+    if (it == NULL)
+        return NULL;
 
-	while ((key = PyIter_Next(it)) != NULL) {
-		int rv;
-		setentry entry;
-		long hash = PyObject_Hash(key);
+    while ((key = PyIter_Next(it)) != NULL) {
+        int rv;
+        setentry entry;
+        long hash = PyObject_Hash(key);
 
-		if (hash == -1) {
-			Py_DECREF(key);
-			Py_DECREF(it);
-			return NULL;
-		}
-		entry.hash = hash;
-		entry.key = key;
-		rv = set_contains_entry(so, &entry);
-		Py_DECREF(key);
-		if (rv == -1) {
-			Py_DECREF(it);
-			return NULL;
-		}
-		if (rv) {
-			Py_DECREF(it);
-			Py_RETURN_FALSE;
-		}
-	}
-	Py_DECREF(it);
-	if (PyErr_Occurred())
-		return NULL;
-	Py_RETURN_TRUE;
+        if (hash == -1) {
+            Py_DECREF(key);
+            Py_DECREF(it);
+            return NULL;
+        }
+        entry.hash = hash;
+        entry.key = key;
+        rv = set_contains_entry(so, &entry);
+        Py_DECREF(key);
+        if (rv == -1) {
+            Py_DECREF(it);
+            return NULL;
+        }
+        if (rv) {
+            Py_DECREF(it);
+            Py_RETURN_FALSE;
+        }
+    }
+    Py_DECREF(it);
+    if (PyErr_Occurred())
+        return NULL;
+    Py_RETURN_TRUE;
 }
 
 PyDoc_STRVAR(isdisjoint_doc,
@@ -1469,51 +1469,51 @@
 static int
 set_difference_update_internal(PySetObject *so, PyObject *other)
 {
-	if ((PyObject *)so == other)
-		return set_clear_internal(so);
-	
-	if (PyAnySet_Check(other)) {
-		setentry *entry;
-		Py_ssize_t pos = 0;
+    if ((PyObject *)so == other)
+        return set_clear_internal(so);
 
-		while (set_next((PySetObject *)other, &pos, &entry))
-			if (set_discard_entry(so, entry) == -1)
-				return -1;
-	} else {
-		PyObject *key, *it;
-		it = PyObject_GetIter(other);
-		if (it == NULL)
-			return -1;
+    if (PyAnySet_Check(other)) {
+        setentry *entry;
+        Py_ssize_t pos = 0;
 
-		while ((key = PyIter_Next(it)) != NULL) {
-			if (set_discard_key(so, key) == -1) {
-				Py_DECREF(it);
-				Py_DECREF(key);
-				return -1;
-			}
-			Py_DECREF(key);
-		}
-		Py_DECREF(it);
-		if (PyErr_Occurred())
-			return -1;
-	}
-	/* If more than 1/5 are dummies, then resize them away. */
-	if ((so->fill - so->used) * 5 < so->mask)
-		return 0;
-	return set_table_resize(so, so->used>50000 ? so->used*2 : so->used*4);
+        while (set_next((PySetObject *)other, &pos, &entry))
+            if (set_discard_entry(so, entry) == -1)
+                return -1;
+    } else {
+        PyObject *key, *it;
+        it = PyObject_GetIter(other);
+        if (it == NULL)
+            return -1;
+
+        while ((key = PyIter_Next(it)) != NULL) {
+            if (set_discard_key(so, key) == -1) {
+                Py_DECREF(it);
+                Py_DECREF(key);
+                return -1;
+            }
+            Py_DECREF(key);
+        }
+        Py_DECREF(it);
+        if (PyErr_Occurred())
+            return -1;
+    }
+    /* If more than 1/5 are dummies, then resize them away. */
+    if ((so->fill - so->used) * 5 < so->mask)
+        return 0;
+    return set_table_resize(so, so->used>50000 ? so->used*2 : so->used*4);
 }
 
 static PyObject *
 set_difference_update(PySetObject *so, PyObject *args)
 {
-	Py_ssize_t i;
+    Py_ssize_t i;
 
-	for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
-		PyObject *other = PyTuple_GET_ITEM(args, i);
-		if (set_difference_update_internal(so, other) == -1)
-			return NULL;
-	}
-	Py_RETURN_NONE;
+    for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
+        PyObject *other = PyTuple_GET_ITEM(args, i);
+        if (set_difference_update_internal(so, other) == -1)
+            return NULL;
+    }
+    Py_RETURN_NONE;
 }
 
 PyDoc_STRVAR(difference_update_doc,
@@ -1522,77 +1522,77 @@
 static PyObject *
 set_difference(PySetObject *so, PyObject *other)
 {
-	PyObject *result;
-	setentry *entry;
-	Py_ssize_t pos = 0;
+    PyObject *result;
+    setentry *entry;
+    Py_ssize_t pos = 0;
 
-	if (!PyAnySet_Check(other)  && !PyDict_CheckExact(other)) {
-		result = set_copy(so);
-		if (result == NULL)
-			return NULL;
-		if (set_difference_update_internal((PySetObject *)result, other) != -1)
-			return result;
-		Py_DECREF(result);
-		return NULL;
-	}
-	
-	result = make_new_set(Py_TYPE(so), NULL);
-	if (result == NULL)
-		return NULL;
+    if (!PyAnySet_Check(other)  && !PyDict_CheckExact(other)) {
+        result = set_copy(so);
+        if (result == NULL)
+            return NULL;
+        if (set_difference_update_internal((PySetObject *)result, other) != -1)
+            return result;
+        Py_DECREF(result);
+        return NULL;
+    }
 
-	if (PyDict_CheckExact(other)) {
-		while (set_next(so, &pos, &entry)) {
-			setentry entrycopy;
-			entrycopy.hash = entry->hash;
-			entrycopy.key = entry->key;
-			if (!_PyDict_Contains(other, entry->key, entry->hash)) {
-				if (set_add_entry((PySetObject *)result, &entrycopy) == -1) {
-					Py_DECREF(result);
-					return NULL;
-				}
-			}
-		}
-		return result;
-	}
+    result = make_new_set(Py_TYPE(so), NULL);
+    if (result == NULL)
+        return NULL;
 
-	while (set_next(so, &pos, &entry)) {
-		int rv = set_contains_entry((PySetObject *)other, entry);
-		if (rv == -1) {
-			Py_DECREF(result);
-			return NULL;
-		}
-		if (!rv) {
-			if (set_add_entry((PySetObject *)result, entry) == -1) {
-				Py_DECREF(result);
-				return NULL;
-			}
-		}
-	}
-	return result;
+    if (PyDict_CheckExact(other)) {
+        while (set_next(so, &pos, &entry)) {
+            setentry entrycopy;
+            entrycopy.hash = entry->hash;
+            entrycopy.key = entry->key;
+            if (!_PyDict_Contains(other, entry->key, entry->hash)) {
+                if (set_add_entry((PySetObject *)result, &entrycopy) == -1) {
+                    Py_DECREF(result);
+                    return NULL;
+                }
+            }
+        }
+        return result;
+    }
+
+    while (set_next(so, &pos, &entry)) {
+        int rv = set_contains_entry((PySetObject *)other, entry);
+        if (rv == -1) {
+            Py_DECREF(result);
+            return NULL;
+        }
+        if (!rv) {
+            if (set_add_entry((PySetObject *)result, entry) == -1) {
+                Py_DECREF(result);
+                return NULL;
+            }
+        }
+    }
+    return result;
 }
 
 static PyObject *
 set_difference_multi(PySetObject *so, PyObject *args)
 {
-	Py_ssize_t i;
-	PyObject *result, *other;
+    Py_ssize_t i;
+    PyObject *result, *other;
 
-	if (PyTuple_GET_SIZE(args) == 0)
-		return set_copy(so);
+    if (PyTuple_GET_SIZE(args) == 0)
+        return set_copy(so);
 
-	other = PyTuple_GET_ITEM(args, 0);
-	result = set_difference(so, other);
-	if (result == NULL)
-		return NULL;
+    other = PyTuple_GET_ITEM(args, 0);
+    result = set_difference(so, other);
+    if (result == NULL)
+        return NULL;
 
-	for (i=1 ; i<PyTuple_GET_SIZE(args) ; i++) {
-		other = PyTuple_GET_ITEM(args, i);
-		if (set_difference_update_internal((PySetObject *)result, other) == -1) {
-			Py_DECREF(result);
-			return NULL;
-		}
-	}
-	return result;
+    for (i=1 ; i<PyTuple_GET_SIZE(args) ; i++) {
+        other = PyTuple_GET_ITEM(args, i);
+        if (set_difference_update_internal((PySetObject *)result, other) == -1) {
+            Py_DECREF(result);
+            return NULL;
+        }
+    }
+    return result;
 }
 
 PyDoc_STRVAR(difference_doc,
@@ -1602,81 +1602,81 @@
 static PyObject *
 set_sub(PySetObject *so, PyObject *other)
 {
-	if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	return set_difference(so, other);
+    if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    return set_difference(so, other);
 }
 
 static PyObject *
 set_isub(PySetObject *so, PyObject *other)
 {
-	if (!PyAnySet_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	if (set_difference_update_internal(so, other) == -1)
-		return NULL;
-	Py_INCREF(so);
-	return (PyObject *)so;
+    if (!PyAnySet_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    if (set_difference_update_internal(so, other) == -1)
+        return NULL;
+    Py_INCREF(so);
+    return (PyObject *)so;
 }
 
 static PyObject *
 set_symmetric_difference_update(PySetObject *so, PyObject *other)
 {
-	PySetObject *otherset;
-	PyObject *key;
-	Py_ssize_t pos = 0;
-	setentry *entry;
+    PySetObject *otherset;
+    PyObject *key;
+    Py_ssize_t pos = 0;
+    setentry *entry;
 
-	if ((PyObject *)so == other)
-		return set_clear(so);
+    if ((PyObject *)so == other)
+        return set_clear(so);
 
-	if (PyDict_CheckExact(other)) {
-		PyObject *value;
-		int rv;
-		long hash;
-		while (_PyDict_Next(other, &pos, &key, &value, &hash)) {
-			setentry an_entry;
+    if (PyDict_CheckExact(other)) {
+        PyObject *value;
+        int rv;
+        long hash;
+        while (_PyDict_Next(other, &pos, &key, &value, &hash)) {
+            setentry an_entry;
 
-			an_entry.hash = hash;
-			an_entry.key = key;
-			rv = set_discard_entry(so, &an_entry);
-			if (rv == -1)
-				return NULL;
-			if (rv == DISCARD_NOTFOUND) {
-				if (set_add_entry(so, &an_entry) == -1)
-					return NULL;
-			}
-		}
-		Py_RETURN_NONE;
-	}
+            an_entry.hash = hash;
+            an_entry.key = key;
+            rv = set_discard_entry(so, &an_entry);
+            if (rv == -1)
+                return NULL;
+            if (rv == DISCARD_NOTFOUND) {
+                if (set_add_entry(so, &an_entry) == -1)
+                    return NULL;
+            }
+        }
+        Py_RETURN_NONE;
+    }
 
-	if (PyAnySet_Check(other)) {
-		Py_INCREF(other);
-		otherset = (PySetObject *)other;
-	} else {
-		otherset = (PySetObject *)make_new_set(Py_TYPE(so), other);
-		if (otherset == NULL)
-			return NULL;
-	}
+    if (PyAnySet_Check(other)) {
+        Py_INCREF(other);
+        otherset = (PySetObject *)other;
+    } else {
+        otherset = (PySetObject *)make_new_set(Py_TYPE(so), other);
+        if (otherset == NULL)
+            return NULL;
+    }
 
-	while (set_next(otherset, &pos, &entry)) {
-		int rv = set_discard_entry(so, entry);
-		if (rv == -1) {
-			Py_DECREF(otherset);
-			return NULL;
-		}
-		if (rv == DISCARD_NOTFOUND) {
-			if (set_add_entry(so, entry) == -1) {
-				Py_DECREF(otherset);
-				return NULL;
-			}
-		}
-	}
-	Py_DECREF(otherset);
-	Py_RETURN_NONE;
+    while (set_next(otherset, &pos, &entry)) {
+        int rv = set_discard_entry(so, entry);
+        if (rv == -1) {
+            Py_DECREF(otherset);
+            return NULL;
+        }
+        if (rv == DISCARD_NOTFOUND) {
+            if (set_add_entry(so, entry) == -1) {
+                Py_DECREF(otherset);
+                return NULL;
+            }
+        }
+    }
+    Py_DECREF(otherset);
+    Py_RETURN_NONE;
 }
 
 PyDoc_STRVAR(symmetric_difference_update_doc,
@@ -1685,17 +1685,17 @@
 static PyObject *
 set_symmetric_difference(PySetObject *so, PyObject *other)
 {
-	PyObject *rv;
-	PySetObject *otherset;
+    PyObject *rv;
+    PySetObject *otherset;
 
-	otherset = (PySetObject *)make_new_set(Py_TYPE(so), other);
-	if (otherset == NULL)
-		return NULL;
-	rv = set_symmetric_difference_update(otherset, (PyObject *)so);
-	if (rv == NULL)
-		return NULL;
-	Py_DECREF(rv);
-	return (PyObject *)otherset;
+    otherset = (PySetObject *)make_new_set(Py_TYPE(so), other);
+    if (otherset == NULL)
+        return NULL;
+    rv = set_symmetric_difference_update(otherset, (PyObject *)so);
+    if (rv == NULL)
+        return NULL;
+    Py_DECREF(rv);
+    return (PyObject *)otherset;
 }
 
 PyDoc_STRVAR(symmetric_difference_doc,
@@ -1706,56 +1706,56 @@
 static PyObject *
 set_xor(PySetObject *so, PyObject *other)
 {
-	if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	return set_symmetric_difference(so, other);
+    if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    return set_symmetric_difference(so, other);
 }
 
 static PyObject *
 set_ixor(PySetObject *so, PyObject *other)
 {
-	PyObject *result;
+    PyObject *result;
 
-	if (!PyAnySet_Check(other)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	result = set_symmetric_difference_update(so, other);
-	if (result == NULL)
-		return NULL;
-	Py_DECREF(result);
-	Py_INCREF(so);
-	return (PyObject *)so;
+    if (!PyAnySet_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    result = set_symmetric_difference_update(so, other);
+    if (result == NULL)
+        return NULL;
+    Py_DECREF(result);
+    Py_INCREF(so);
+    return (PyObject *)so;
 }
 
 static PyObject *
 set_issubset(PySetObject *so, PyObject *other)
 {
-	setentry *entry;
-	Py_ssize_t pos = 0;
+    setentry *entry;
+    Py_ssize_t pos = 0;
 
-	if (!PyAnySet_Check(other)) {
-		PyObject *tmp, *result;
-		tmp = make_new_set(&PySet_Type, other);
-		if (tmp == NULL)
-			return NULL;
-		result = set_issubset(so, tmp);
-		Py_DECREF(tmp);
-		return result;
-	}
-	if (PySet_GET_SIZE(so) > PySet_GET_SIZE(other)) 
-		Py_RETURN_FALSE;
+    if (!PyAnySet_Check(other)) {
+        PyObject *tmp, *result;
+        tmp = make_new_set(&PySet_Type, other);
+        if (tmp == NULL)
+            return NULL;
+        result = set_issubset(so, tmp);
+        Py_DECREF(tmp);
+        return result;
+    }
+    if (PySet_GET_SIZE(so) > PySet_GET_SIZE(other))
+        Py_RETURN_FALSE;
 
-	while (set_next(so, &pos, &entry)) {
-		int rv = set_contains_entry((PySetObject *)other, entry);
-		if (rv == -1)
-			return NULL;
-		if (!rv)
-			Py_RETURN_FALSE;
-	}
-	Py_RETURN_TRUE;
+    while (set_next(so, &pos, &entry)) {
+        int rv = set_contains_entry((PySetObject *)other, entry);
+        if (rv == -1)
+            return NULL;
+        if (!rv)
+            Py_RETURN_FALSE;
+    }
+    Py_RETURN_TRUE;
 }
 
 PyDoc_STRVAR(issubset_doc, "Report whether another set contains this set.");
@@ -1763,17 +1763,17 @@
 static PyObject *
 set_issuperset(PySetObject *so, PyObject *other)
 {
-	PyObject *tmp, *result;
+    PyObject *tmp, *result;
 
-	if (!PyAnySet_Check(other)) {
-		tmp = make_new_set(&PySet_Type, other);
-		if (tmp == NULL)
-			return NULL;
-		result = set_issuperset(so, tmp);
-		Py_DECREF(tmp);
-		return result;
-	}
-	return set_issubset((PySetObject *)other, (PyObject *)so);
+    if (!PyAnySet_Check(other)) {
+        tmp = make_new_set(&PySet_Type, other);
+        if (tmp == NULL)
+            return NULL;
+        result = set_issuperset(so, tmp);
+        Py_DECREF(tmp);
+        return result;
+    }
+    return set_issubset((PySetObject *)other, (PyObject *)so);
 }
 
 PyDoc_STRVAR(issuperset_doc, "Report whether this set contains another set.");
@@ -1781,65 +1781,65 @@
 static PyObject *
 set_richcompare(PySetObject *v, PyObject *w, int op)
 {
-	PyObject *r1, *r2;
+    PyObject *r1, *r2;
 
-	if(!PyAnySet_Check(w)) {
-		if (op == Py_EQ)
-			Py_RETURN_FALSE;
-		if (op == Py_NE)
-			Py_RETURN_TRUE;
-		PyErr_SetString(PyExc_TypeError, "can only compare to a set");
-		return NULL;
-	}
-	switch (op) {
-	case Py_EQ:
-		if (PySet_GET_SIZE(v) != PySet_GET_SIZE(w))
-			Py_RETURN_FALSE;
-		if (v->hash != -1  &&
-		    ((PySetObject *)w)->hash != -1 &&
-		    v->hash != ((PySetObject *)w)->hash)
-			Py_RETURN_FALSE;
-		return set_issubset(v, w);
-	case Py_NE:
-		r1 = set_richcompare(v, w, Py_EQ);
-		if (r1 == NULL)
-			return NULL;
-		r2 = PyBool_FromLong(PyObject_Not(r1));
-		Py_DECREF(r1);
-		return r2;
-	case Py_LE:
-		return set_issubset(v, w);
-	case Py_GE:
-		return set_issuperset(v, w);
-	case Py_LT:
-		if (PySet_GET_SIZE(v) >= PySet_GET_SIZE(w))
-			Py_RETURN_FALSE;		
-		return set_issubset(v, w);
-	case Py_GT:
-		if (PySet_GET_SIZE(v) <= PySet_GET_SIZE(w))
-			Py_RETURN_FALSE;
-		return set_issuperset(v, w);
-	}
-	Py_INCREF(Py_NotImplemented);
-	return Py_NotImplemented;
+    if(!PyAnySet_Check(w)) {
+        if (op == Py_EQ)
+            Py_RETURN_FALSE;
+        if (op == Py_NE)
+            Py_RETURN_TRUE;
+        PyErr_SetString(PyExc_TypeError, "can only compare to a set");
+        return NULL;
+    }
+    switch (op) {
+    case Py_EQ:
+        if (PySet_GET_SIZE(v) != PySet_GET_SIZE(w))
+            Py_RETURN_FALSE;
+        if (v->hash != -1  &&
+            ((PySetObject *)w)->hash != -1 &&
+            v->hash != ((PySetObject *)w)->hash)
+            Py_RETURN_FALSE;
+        return set_issubset(v, w);
+    case Py_NE:
+        r1 = set_richcompare(v, w, Py_EQ);
+        if (r1 == NULL)
+            return NULL;
+        r2 = PyBool_FromLong(PyObject_Not(r1));
+        Py_DECREF(r1);
+        return r2;
+    case Py_LE:
+        return set_issubset(v, w);
+    case Py_GE:
+        return set_issuperset(v, w);
+    case Py_LT:
+        if (PySet_GET_SIZE(v) >= PySet_GET_SIZE(w))
+            Py_RETURN_FALSE;
+        return set_issubset(v, w);
+    case Py_GT:
+        if (PySet_GET_SIZE(v) <= PySet_GET_SIZE(w))
+            Py_RETURN_FALSE;
+        return set_issuperset(v, w);
+    }
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
 }
 
 static int
 set_nocmp(PyObject *self, PyObject *other)
 {
-	PyErr_SetString(PyExc_TypeError, "cannot compare sets using cmp()");
-	return -1;
+    PyErr_SetString(PyExc_TypeError, "cannot compare sets using cmp()");
+    return -1;
 }
 
 static PyObject *
 set_add(PySetObject *so, PyObject *key)
 {
-	if (set_add_key(so, key) == -1)
-		return NULL;
-	Py_RETURN_NONE;
+    if (set_add_key(so, key) == -1)
+        return NULL;
+    Py_RETURN_NONE;
 }
 
-PyDoc_STRVAR(add_doc, 
+PyDoc_STRVAR(add_doc,
 "Add an element to a set.\n\
 \n\
 This has no effect if the element is already present.");
@@ -1847,34 +1847,34 @@
 static int
 set_contains(PySetObject *so, PyObject *key)
 {
-	PyObject *tmpkey;
-	int rv;
+    PyObject *tmpkey;
+    int rv;
 
-	rv = set_contains_key(so, key);
-	if (rv == -1) {
-		if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
-			return -1;
-		PyErr_Clear();
-		tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
-		if (tmpkey == NULL)
-			return -1;
-		set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
-		rv = set_contains(so, tmpkey);
-		set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
-		Py_DECREF(tmpkey);
-	}
-	return rv;
+    rv = set_contains_key(so, key);
+    if (rv == -1) {
+        if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
+            return -1;
+        PyErr_Clear();
+        tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
+        if (tmpkey == NULL)
+            return -1;
+        set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
+        rv = set_contains(so, tmpkey);
+        set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
+        Py_DECREF(tmpkey);
+    }
+    return rv;
 }
 
 static PyObject *
 set_direct_contains(PySetObject *so, PyObject *key)
 {
-	long result;
+    long result;
 
-	result = set_contains(so, key);
-	if (result == -1)
-		return NULL;
-	return PyBool_FromLong(result);
+    result = set_contains(so, key);
+    if (result == -1)
+        return NULL;
+    return PyBool_FromLong(result);
 }
 
 PyDoc_STRVAR(contains_doc, "x.__contains__(y) <==> y in x.");
@@ -1882,30 +1882,30 @@
 static PyObject *
 set_remove(PySetObject *so, PyObject *key)
 {
-	PyObject *tmpkey;
-	int rv;
+    PyObject *tmpkey;
+    int rv;
 
-	rv = set_discard_key(so, key);
-	if (rv == -1) {
-		if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
-			return NULL;
-		PyErr_Clear();
-		tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
-		if (tmpkey == NULL)
-			return NULL;
-		set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
-		rv = set_discard_key(so, tmpkey);
-		set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
-		Py_DECREF(tmpkey);
-		if (rv == -1)
-			return NULL;
-	} 
+    rv = set_discard_key(so, key);
+    if (rv == -1) {
+        if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
+            return NULL;
+        PyErr_Clear();
+        tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
+        if (tmpkey == NULL)
+            return NULL;
+        set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
+        rv = set_discard_key(so, tmpkey);
+        set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
+        Py_DECREF(tmpkey);
+        if (rv == -1)
+            return NULL;
+    }
 
-	if (rv == DISCARD_NOTFOUND) {
-		set_key_error(key);
-		return NULL;
-	}
-	Py_RETURN_NONE;
+    if (rv == DISCARD_NOTFOUND) {
+        set_key_error(key);
+        return NULL;
+    }
+    Py_RETURN_NONE;
 }
 
 PyDoc_STRVAR(remove_doc,
@@ -1916,54 +1916,54 @@
 static PyObject *
 set_discard(PySetObject *so, PyObject *key)
 {
-	PyObject *tmpkey, *result;
-	int rv;
+    PyObject *tmpkey, *result;
+    int rv;
 
-	rv = set_discard_key(so, key);
-	if (rv == -1) {
-		if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
-			return NULL;
-		PyErr_Clear();
-		tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
-		if (tmpkey == NULL)
-			return NULL;
-		set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
-		result = set_discard(so, tmpkey);
-		set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
-		Py_DECREF(tmpkey);
-		return result;
-	}
-	Py_RETURN_NONE;
+    rv = set_discard_key(so, key);
+    if (rv == -1) {
+        if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
+            return NULL;
+        PyErr_Clear();
+        tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
+        if (tmpkey == NULL)
+            return NULL;
+        set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
+        result = set_discard(so, tmpkey);
+        set_swap_bodies((PySetObject *)tmpkey, (PySetObject *)key);
+        Py_DECREF(tmpkey);
+        return result;
+    }
+    Py_RETURN_NONE;
 }
 
 PyDoc_STRVAR(discard_doc,
 "Remove an element from a set if it is a member.\n\
 \n\
-If the element is not a member, do nothing."); 
+If the element is not a member, do nothing.");
 
 static PyObject *
 set_reduce(PySetObject *so)
 {
-	PyObject *keys=NULL, *args=NULL, *result=NULL, *dict=NULL;
+    PyObject *keys=NULL, *args=NULL, *result=NULL, *dict=NULL;
 
-	keys = PySequence_List((PyObject *)so);
-	if (keys == NULL)
-		goto done;
-	args = PyTuple_Pack(1, keys);
-	if (args == NULL)
-		goto done;
-	dict = PyObject_GetAttrString((PyObject *)so, "__dict__");
-	if (dict == NULL) {
-		PyErr_Clear();
-		dict = Py_None;
-		Py_INCREF(dict);
-	}
-	result = PyTuple_Pack(3, Py_TYPE(so), args, dict);
+    keys = PySequence_List((PyObject *)so);
+    if (keys == NULL)
+        goto done;
+    args = PyTuple_Pack(1, keys);
+    if (args == NULL)
+        goto done;
+    dict = PyObject_GetAttrString((PyObject *)so, "__dict__");
+    if (dict == NULL) {
+        PyErr_Clear();
+        dict = Py_None;
+        Py_INCREF(dict);
+    }
+    result = PyTuple_Pack(3, Py_TYPE(so), args, dict);
 done:
-	Py_XDECREF(args);
-	Py_XDECREF(keys);
-	Py_XDECREF(dict);
-	return result;
+    Py_XDECREF(args);
+    Py_XDECREF(keys);
+    Py_XDECREF(dict);
+    return result;
 }
 
 PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
@@ -1971,42 +1971,42 @@
 static PyObject *
 set_sizeof(PySetObject *so)
 {
-	Py_ssize_t res;
+    Py_ssize_t res;
 
-	res = sizeof(PySetObject);
-	if (so->table != so->smalltable)
-		res = res + (so->mask + 1) * sizeof(setentry);
-	return PyInt_FromSsize_t(res);
+    res = sizeof(PySetObject);
+    if (so->table != so->smalltable)
+        res = res + (so->mask + 1) * sizeof(setentry);
+    return PyInt_FromSsize_t(res);
 }
 
 PyDoc_STRVAR(sizeof_doc, "S.__sizeof__() -> size of S in memory, in bytes");
 static int
 set_init(PySetObject *self, PyObject *args, PyObject *kwds)
 {
-	PyObject *iterable = NULL;
+    PyObject *iterable = NULL;
 
-	if (!PyAnySet_Check(self))
-		return -1;
-	if (PySet_Check(self) && !_PyArg_NoKeywords("set()", kwds))
-		return -1;
-	if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable))
-		return -1;
-	set_clear_internal(self);
-	self->hash = -1;
-	if (iterable == NULL)
-		return 0;
-	return set_update_internal(self, iterable);
+    if (!PyAnySet_Check(self))
+        return -1;
+    if (PySet_Check(self) && !_PyArg_NoKeywords("set()", kwds))
+        return -1;
+    if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable))
+        return -1;
+    set_clear_internal(self);
+    self->hash = -1;
+    if (iterable == NULL)
+        return 0;
+    return set_update_internal(self, iterable);
 }
 
 static PySequenceMethods set_as_sequence = {
-	set_len,			/* sq_length */
-	0,				/* sq_concat */
-	0,				/* sq_repeat */
-	0,				/* sq_item */
-	0,				/* sq_slice */
-	0,				/* sq_ass_item */
-	0,				/* sq_ass_slice */
-	(objobjproc)set_contains,	/* sq_contains */
+    set_len,                            /* sq_length */
+    0,                                  /* sq_concat */
+    0,                                  /* sq_repeat */
+    0,                                  /* sq_item */
+    0,                                  /* sq_slice */
+    0,                                  /* sq_ass_item */
+    0,                                  /* sq_ass_slice */
+    (objobjproc)set_contains,           /* sq_contains */
 };
 
 /* set object ********************************************************/
@@ -2019,88 +2019,88 @@
 #endif
 
 static PyMethodDef set_methods[] = {
-	{"add",		(PyCFunction)set_add,		METH_O,
-	 add_doc},
-	{"clear",	(PyCFunction)set_clear,		METH_NOARGS,
-	 clear_doc},
-	{"__contains__",(PyCFunction)set_direct_contains,	METH_O | METH_COEXIST,
-	 contains_doc},
-	{"copy",	(PyCFunction)set_copy,		METH_NOARGS,
-	 copy_doc},
-	{"discard",	(PyCFunction)set_discard,	METH_O,
-	 discard_doc},
-	{"difference",	(PyCFunction)set_difference_multi,	METH_VARARGS,
-	 difference_doc},
-	{"difference_update",	(PyCFunction)set_difference_update,	METH_VARARGS,
-	 difference_update_doc},
-	{"intersection",(PyCFunction)set_intersection_multi,	METH_VARARGS,
-	 intersection_doc},
-	{"intersection_update",(PyCFunction)set_intersection_update_multi,	METH_VARARGS,
-	 intersection_update_doc},
-	{"isdisjoint",	(PyCFunction)set_isdisjoint,	METH_O,
-	 isdisjoint_doc},
-	{"issubset",	(PyCFunction)set_issubset,	METH_O,
-	 issubset_doc},
-	{"issuperset",	(PyCFunction)set_issuperset,	METH_O,
-	 issuperset_doc},
-	{"pop",		(PyCFunction)set_pop,		METH_NOARGS,
-	 pop_doc},
-	{"__reduce__",	(PyCFunction)set_reduce,	METH_NOARGS,
-	 reduce_doc},
-	{"remove",	(PyCFunction)set_remove,	METH_O,
-	 remove_doc},
-	{"__sizeof__",	(PyCFunction)set_sizeof,	METH_NOARGS,
-	 sizeof_doc},
-	{"symmetric_difference",(PyCFunction)set_symmetric_difference,	METH_O,
-	 symmetric_difference_doc},
-	{"symmetric_difference_update",(PyCFunction)set_symmetric_difference_update,	METH_O,
-	 symmetric_difference_update_doc},
+    {"add",             (PyCFunction)set_add,           METH_O,
+     add_doc},
+    {"clear",           (PyCFunction)set_clear,         METH_NOARGS,
+     clear_doc},
+    {"__contains__",(PyCFunction)set_direct_contains,           METH_O | METH_COEXIST,
+     contains_doc},
+    {"copy",            (PyCFunction)set_copy,          METH_NOARGS,
+     copy_doc},
+    {"discard",         (PyCFunction)set_discard,       METH_O,
+     discard_doc},
+    {"difference",      (PyCFunction)set_difference_multi,      METH_VARARGS,
+     difference_doc},
+    {"difference_update",       (PyCFunction)set_difference_update,     METH_VARARGS,
+     difference_update_doc},
+    {"intersection",(PyCFunction)set_intersection_multi,        METH_VARARGS,
+     intersection_doc},
+    {"intersection_update",(PyCFunction)set_intersection_update_multi,          METH_VARARGS,
+     intersection_update_doc},
+    {"isdisjoint",      (PyCFunction)set_isdisjoint,    METH_O,
+     isdisjoint_doc},
+    {"issubset",        (PyCFunction)set_issubset,      METH_O,
+     issubset_doc},
+    {"issuperset",      (PyCFunction)set_issuperset,    METH_O,
+     issuperset_doc},
+    {"pop",             (PyCFunction)set_pop,           METH_NOARGS,
+     pop_doc},
+    {"__reduce__",      (PyCFunction)set_reduce,        METH_NOARGS,
+     reduce_doc},
+    {"remove",          (PyCFunction)set_remove,        METH_O,
+     remove_doc},
+    {"__sizeof__",      (PyCFunction)set_sizeof,        METH_NOARGS,
+     sizeof_doc},
+    {"symmetric_difference",(PyCFunction)set_symmetric_difference,      METH_O,
+     symmetric_difference_doc},
+    {"symmetric_difference_update",(PyCFunction)set_symmetric_difference_update,        METH_O,
+     symmetric_difference_update_doc},
 #ifdef Py_DEBUG
-	{"test_c_api",	(PyCFunction)test_c_api,	METH_NOARGS,
-	 test_c_api_doc},
+    {"test_c_api",      (PyCFunction)test_c_api,        METH_NOARGS,
+     test_c_api_doc},
 #endif
-	{"union",	(PyCFunction)set_union,		METH_VARARGS,
-	 union_doc},
-	{"update",	(PyCFunction)set_update,	METH_VARARGS,
-	 update_doc},
-	{NULL,		NULL}	/* sentinel */
+    {"union",           (PyCFunction)set_union,         METH_VARARGS,
+     union_doc},
+    {"update",          (PyCFunction)set_update,        METH_VARARGS,
+     update_doc},
+    {NULL,              NULL}   /* sentinel */
 };
 
 static PyNumberMethods set_as_number = {
-	0,				/*nb_add*/
-	(binaryfunc)set_sub,		/*nb_subtract*/
-	0,				/*nb_multiply*/
-	0,				/*nb_divide*/
-	0,				/*nb_remainder*/
-	0,				/*nb_divmod*/
-	0,				/*nb_power*/
-	0,				/*nb_negative*/
-	0,				/*nb_positive*/
-	0,				/*nb_absolute*/
-	0,				/*nb_nonzero*/
-	0,				/*nb_invert*/
-	0,				/*nb_lshift*/
-	0,				/*nb_rshift*/
-	(binaryfunc)set_and,		/*nb_and*/
-	(binaryfunc)set_xor,		/*nb_xor*/
-	(binaryfunc)set_or,		/*nb_or*/
-	0,				/*nb_coerce*/
-	0,				/*nb_int*/
-	0,				/*nb_long*/
-	0,				/*nb_float*/
-	0,				/*nb_oct*/
-	0, 				/*nb_hex*/
-	0,				/*nb_inplace_add*/
-	(binaryfunc)set_isub,		/*nb_inplace_subtract*/
-	0,				/*nb_inplace_multiply*/
-	0,				/*nb_inplace_divide*/
-	0,				/*nb_inplace_remainder*/
-	0,				/*nb_inplace_power*/
-	0,				/*nb_inplace_lshift*/
-	0,				/*nb_inplace_rshift*/
-	(binaryfunc)set_iand,		/*nb_inplace_and*/
-	(binaryfunc)set_ixor,		/*nb_inplace_xor*/
-	(binaryfunc)set_ior,		/*nb_inplace_or*/
+    0,                                  /*nb_add*/
+    (binaryfunc)set_sub,                /*nb_subtract*/
+    0,                                  /*nb_multiply*/
+    0,                                  /*nb_divide*/
+    0,                                  /*nb_remainder*/
+    0,                                  /*nb_divmod*/
+    0,                                  /*nb_power*/
+    0,                                  /*nb_negative*/
+    0,                                  /*nb_positive*/
+    0,                                  /*nb_absolute*/
+    0,                                  /*nb_nonzero*/
+    0,                                  /*nb_invert*/
+    0,                                  /*nb_lshift*/
+    0,                                  /*nb_rshift*/
+    (binaryfunc)set_and,                /*nb_and*/
+    (binaryfunc)set_xor,                /*nb_xor*/
+    (binaryfunc)set_or,                 /*nb_or*/
+    0,                                  /*nb_coerce*/
+    0,                                  /*nb_int*/
+    0,                                  /*nb_long*/
+    0,                                  /*nb_float*/
+    0,                                  /*nb_oct*/
+    0,                                  /*nb_hex*/
+    0,                                  /*nb_inplace_add*/
+    (binaryfunc)set_isub,               /*nb_inplace_subtract*/
+    0,                                  /*nb_inplace_multiply*/
+    0,                                  /*nb_inplace_divide*/
+    0,                                  /*nb_inplace_remainder*/
+    0,                                  /*nb_inplace_power*/
+    0,                                  /*nb_inplace_lshift*/
+    0,                                  /*nb_inplace_rshift*/
+    (binaryfunc)set_iand,               /*nb_inplace_and*/
+    (binaryfunc)set_ixor,               /*nb_inplace_xor*/
+    (binaryfunc)set_ior,                /*nb_inplace_or*/
 };
 
 PyDoc_STRVAR(set_doc,
@@ -2110,96 +2110,96 @@
 Build an unordered collection of unique elements.");
 
 PyTypeObject PySet_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"set",				/* tp_name */
-	sizeof(PySetObject),		/* tp_basicsize */
-	0,				/* tp_itemsize */
-	/* methods */
-	(destructor)set_dealloc,	/* tp_dealloc */
-	(printfunc)set_tp_print,	/* tp_print */
-	0,				/* tp_getattr */
-	0,				/* tp_setattr */
-	set_nocmp,			/* tp_compare */
-	(reprfunc)set_repr,		/* tp_repr */
-	&set_as_number,			/* tp_as_number */
-	&set_as_sequence,		/* tp_as_sequence */
-	0,				/* tp_as_mapping */
-	(hashfunc)PyObject_HashNotImplemented,	/* tp_hash */
-	0,				/* tp_call */
-	0,				/* tp_str */
-	PyObject_GenericGetAttr,	/* tp_getattro */
-	0,				/* tp_setattro */
-	0,				/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_CHECKTYPES |
-		Py_TPFLAGS_BASETYPE,	/* tp_flags */
-	set_doc,			/* tp_doc */
-	(traverseproc)set_traverse,	/* tp_traverse */
-	(inquiry)set_clear_internal,	/* tp_clear */
-	(richcmpfunc)set_richcompare,	/* tp_richcompare */
-	offsetof(PySetObject, weakreflist),	/* tp_weaklistoffset */
-	(getiterfunc)set_iter,	/* tp_iter */
-	0,				/* tp_iternext */
-	set_methods,			/* tp_methods */
-	0,				/* tp_members */
-	0,				/* tp_getset */
-	0,				/* tp_base */
-	0,				/* tp_dict */
-	0,				/* tp_descr_get */
-	0,				/* tp_descr_set */
-	0,				/* tp_dictoffset */
-	(initproc)set_init,		/* tp_init */
-	PyType_GenericAlloc,		/* tp_alloc */
-	set_new,			/* tp_new */
-	PyObject_GC_Del,		/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "set",                              /* tp_name */
+    sizeof(PySetObject),                /* tp_basicsize */
+    0,                                  /* tp_itemsize */
+    /* methods */
+    (destructor)set_dealloc,            /* tp_dealloc */
+    (printfunc)set_tp_print,            /* tp_print */
+    0,                                  /* tp_getattr */
+    0,                                  /* tp_setattr */
+    set_nocmp,                          /* tp_compare */
+    (reprfunc)set_repr,                 /* tp_repr */
+    &set_as_number,                     /* tp_as_number */
+    &set_as_sequence,                   /* tp_as_sequence */
+    0,                                  /* tp_as_mapping */
+    (hashfunc)PyObject_HashNotImplemented,      /* tp_hash */
+    0,                                  /* tp_call */
+    0,                                  /* tp_str */
+    PyObject_GenericGetAttr,            /* tp_getattro */
+    0,                                  /* tp_setattro */
+    0,                                  /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_CHECKTYPES |
+        Py_TPFLAGS_BASETYPE,            /* tp_flags */
+    set_doc,                            /* tp_doc */
+    (traverseproc)set_traverse,         /* tp_traverse */
+    (inquiry)set_clear_internal,        /* tp_clear */
+    (richcmpfunc)set_richcompare,       /* tp_richcompare */
+    offsetof(PySetObject, weakreflist),         /* tp_weaklistoffset */
+    (getiterfunc)set_iter,      /* tp_iter */
+    0,                                  /* tp_iternext */
+    set_methods,                        /* tp_methods */
+    0,                                  /* tp_members */
+    0,                                  /* tp_getset */
+    0,                                  /* tp_base */
+    0,                                  /* tp_dict */
+    0,                                  /* tp_descr_get */
+    0,                                  /* tp_descr_set */
+    0,                                  /* tp_dictoffset */
+    (initproc)set_init,                 /* tp_init */
+    PyType_GenericAlloc,                /* tp_alloc */
+    set_new,                            /* tp_new */
+    PyObject_GC_Del,                    /* tp_free */
 };
 
 /* frozenset object ********************************************************/
 
 
 static PyMethodDef frozenset_methods[] = {
-	{"__contains__",(PyCFunction)set_direct_contains,	METH_O | METH_COEXIST,
-	 contains_doc},
-	{"copy",	(PyCFunction)frozenset_copy,	METH_NOARGS,
-	 copy_doc},
-	{"difference",	(PyCFunction)set_difference_multi,	METH_VARARGS,
-	 difference_doc},
-	{"intersection",(PyCFunction)set_intersection_multi,	METH_VARARGS,
-	 intersection_doc},
-	{"isdisjoint",	(PyCFunction)set_isdisjoint,	METH_O,
-	 isdisjoint_doc},
-	{"issubset",	(PyCFunction)set_issubset,	METH_O,
-	 issubset_doc},
-	{"issuperset",	(PyCFunction)set_issuperset,	METH_O,
-	 issuperset_doc},
-	{"__reduce__",	(PyCFunction)set_reduce,	METH_NOARGS,
-	 reduce_doc},
-	{"__sizeof__",	(PyCFunction)set_sizeof,	METH_NOARGS,
-	 sizeof_doc},
-	{"symmetric_difference",(PyCFunction)set_symmetric_difference,	METH_O,
-	 symmetric_difference_doc},
-	{"union",	(PyCFunction)set_union,		METH_VARARGS,
-	 union_doc},
-	{NULL,		NULL}	/* sentinel */
+    {"__contains__",(PyCFunction)set_direct_contains,           METH_O | METH_COEXIST,
+     contains_doc},
+    {"copy",            (PyCFunction)frozenset_copy,    METH_NOARGS,
+     copy_doc},
+    {"difference",      (PyCFunction)set_difference_multi,      METH_VARARGS,
+     difference_doc},
+    {"intersection",(PyCFunction)set_intersection_multi,        METH_VARARGS,
+     intersection_doc},
+    {"isdisjoint",      (PyCFunction)set_isdisjoint,    METH_O,
+     isdisjoint_doc},
+    {"issubset",        (PyCFunction)set_issubset,      METH_O,
+     issubset_doc},
+    {"issuperset",      (PyCFunction)set_issuperset,    METH_O,
+     issuperset_doc},
+    {"__reduce__",      (PyCFunction)set_reduce,        METH_NOARGS,
+     reduce_doc},
+    {"__sizeof__",      (PyCFunction)set_sizeof,        METH_NOARGS,
+     sizeof_doc},
+    {"symmetric_difference",(PyCFunction)set_symmetric_difference,      METH_O,
+     symmetric_difference_doc},
+    {"union",           (PyCFunction)set_union,         METH_VARARGS,
+     union_doc},
+    {NULL,              NULL}   /* sentinel */
 };
 
 static PyNumberMethods frozenset_as_number = {
-	0,				/*nb_add*/
-	(binaryfunc)set_sub,		/*nb_subtract*/
-	0,				/*nb_multiply*/
-	0,				/*nb_divide*/
-	0,				/*nb_remainder*/
-	0,				/*nb_divmod*/
-	0,				/*nb_power*/
-	0,				/*nb_negative*/
-	0,				/*nb_positive*/
-	0,				/*nb_absolute*/
-	0,				/*nb_nonzero*/
-	0,				/*nb_invert*/
-	0,				/*nb_lshift*/
-	0,				/*nb_rshift*/
-	(binaryfunc)set_and,		/*nb_and*/
-	(binaryfunc)set_xor,		/*nb_xor*/
-	(binaryfunc)set_or,		/*nb_or*/
+    0,                                  /*nb_add*/
+    (binaryfunc)set_sub,                /*nb_subtract*/
+    0,                                  /*nb_multiply*/
+    0,                                  /*nb_divide*/
+    0,                                  /*nb_remainder*/
+    0,                                  /*nb_divmod*/
+    0,                                  /*nb_power*/
+    0,                                  /*nb_negative*/
+    0,                                  /*nb_positive*/
+    0,                                  /*nb_absolute*/
+    0,                                  /*nb_nonzero*/
+    0,                                  /*nb_invert*/
+    0,                                  /*nb_lshift*/
+    0,                                  /*nb_rshift*/
+    (binaryfunc)set_and,                /*nb_and*/
+    (binaryfunc)set_xor,                /*nb_xor*/
+    (binaryfunc)set_or,                 /*nb_or*/
 };
 
 PyDoc_STRVAR(frozenset_doc,
@@ -2209,47 +2209,47 @@
 Build an immutable unordered collection of unique elements.");
 
 PyTypeObject PyFrozenSet_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"frozenset",			/* tp_name */
-	sizeof(PySetObject),		/* tp_basicsize */
-	0,				/* tp_itemsize */
-	/* methods */
-	(destructor)set_dealloc,	/* tp_dealloc */
-	(printfunc)set_tp_print,	/* tp_print */
-	0,				/* tp_getattr */
-	0,				/* tp_setattr */
-	set_nocmp,			/* tp_compare */
-	(reprfunc)set_repr,		/* tp_repr */
-	&frozenset_as_number,		/* tp_as_number */
-	&set_as_sequence,		/* tp_as_sequence */
-	0,				/* tp_as_mapping */
-	frozenset_hash,			/* tp_hash */
-	0,				/* tp_call */
-	0,				/* tp_str */
-	PyObject_GenericGetAttr,	/* tp_getattro */
-	0,				/* tp_setattro */
-	0,				/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_CHECKTYPES |
-		Py_TPFLAGS_BASETYPE,	/* tp_flags */
-	frozenset_doc,			/* tp_doc */
-	(traverseproc)set_traverse,	/* tp_traverse */
-	(inquiry)set_clear_internal,	/* tp_clear */
-	(richcmpfunc)set_richcompare,	/* tp_richcompare */
-	offsetof(PySetObject, weakreflist),	/* tp_weaklistoffset */
-	(getiterfunc)set_iter,		/* tp_iter */
-	0,				/* tp_iternext */
-	frozenset_methods,		/* tp_methods */
-	0,				/* tp_members */
-	0,				/* tp_getset */
-	0,				/* tp_base */
-	0,				/* tp_dict */
-	0,				/* tp_descr_get */
-	0,				/* tp_descr_set */
-	0,				/* tp_dictoffset */
-	0,				/* tp_init */
-	PyType_GenericAlloc,		/* tp_alloc */
-	frozenset_new,			/* tp_new */
-	PyObject_GC_Del,		/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "frozenset",                        /* tp_name */
+    sizeof(PySetObject),                /* tp_basicsize */
+    0,                                  /* tp_itemsize */
+    /* methods */
+    (destructor)set_dealloc,            /* tp_dealloc */
+    (printfunc)set_tp_print,            /* tp_print */
+    0,                                  /* tp_getattr */
+    0,                                  /* tp_setattr */
+    set_nocmp,                          /* tp_compare */
+    (reprfunc)set_repr,                 /* tp_repr */
+    &frozenset_as_number,               /* tp_as_number */
+    &set_as_sequence,                   /* tp_as_sequence */
+    0,                                  /* tp_as_mapping */
+    frozenset_hash,                     /* tp_hash */
+    0,                                  /* tp_call */
+    0,                                  /* tp_str */
+    PyObject_GenericGetAttr,            /* tp_getattro */
+    0,                                  /* tp_setattro */
+    0,                                  /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_CHECKTYPES |
+        Py_TPFLAGS_BASETYPE,            /* tp_flags */
+    frozenset_doc,                      /* tp_doc */
+    (traverseproc)set_traverse,         /* tp_traverse */
+    (inquiry)set_clear_internal,        /* tp_clear */
+    (richcmpfunc)set_richcompare,       /* tp_richcompare */
+    offsetof(PySetObject, weakreflist),         /* tp_weaklistoffset */
+    (getiterfunc)set_iter,              /* tp_iter */
+    0,                                  /* tp_iternext */
+    frozenset_methods,                  /* tp_methods */
+    0,                                  /* tp_members */
+    0,                                  /* tp_getset */
+    0,                                  /* tp_base */
+    0,                                  /* tp_dict */
+    0,                                  /* tp_descr_get */
+    0,                                  /* tp_descr_set */
+    0,                                  /* tp_dictoffset */
+    0,                                  /* tp_init */
+    PyType_GenericAlloc,                /* tp_alloc */
+    frozenset_new,                      /* tp_new */
+    PyObject_GC_Del,                    /* tp_free */
 };
 
 
@@ -2258,252 +2258,252 @@
 PyObject *
 PySet_New(PyObject *iterable)
 {
-	return make_new_set(&PySet_Type, iterable);
+    return make_new_set(&PySet_Type, iterable);
 }
 
 PyObject *
 PyFrozenSet_New(PyObject *iterable)
 {
-	return make_new_set(&PyFrozenSet_Type, iterable);
+    return make_new_set(&PyFrozenSet_Type, iterable);
 }
 
 Py_ssize_t
 PySet_Size(PyObject *anyset)
 {
-	if (!PyAnySet_Check(anyset)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return PySet_GET_SIZE(anyset);
+    if (!PyAnySet_Check(anyset)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return PySet_GET_SIZE(anyset);
 }
 
 int
 PySet_Clear(PyObject *set)
 {
-	if (!PySet_Check(set)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return set_clear_internal((PySetObject *)set);
+    if (!PySet_Check(set)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return set_clear_internal((PySetObject *)set);
 }
 
 int
 PySet_Contains(PyObject *anyset, PyObject *key)
 {
-	if (!PyAnySet_Check(anyset)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return set_contains_key((PySetObject *)anyset, key);
+    if (!PyAnySet_Check(anyset)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return set_contains_key((PySetObject *)anyset, key);
 }
 
 int
 PySet_Discard(PyObject *set, PyObject *key)
 {
-	if (!PySet_Check(set)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return set_discard_key((PySetObject *)set, key);
+    if (!PySet_Check(set)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return set_discard_key((PySetObject *)set, key);
 }
 
 int
 PySet_Add(PyObject *anyset, PyObject *key)
 {
-	if (!PySet_Check(anyset) && 
-	    (!PyFrozenSet_Check(anyset) || Py_REFCNT(anyset) != 1)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return set_add_key((PySetObject *)anyset, key);
+    if (!PySet_Check(anyset) &&
+        (!PyFrozenSet_Check(anyset) || Py_REFCNT(anyset) != 1)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return set_add_key((PySetObject *)anyset, key);
 }
 
 int
 _PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **key)
 {
-	setentry *entry_ptr;
+    setentry *entry_ptr;
 
-	if (!PyAnySet_Check(set)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (set_next((PySetObject *)set, pos, &entry_ptr) == 0)
-		return 0;
-	*key = entry_ptr->key;
-	return 1;
+    if (!PyAnySet_Check(set)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (set_next((PySetObject *)set, pos, &entry_ptr) == 0)
+        return 0;
+    *key = entry_ptr->key;
+    return 1;
 }
 
 int
 _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, long *hash)
 {
-	setentry *entry;
+    setentry *entry;
 
-	if (!PyAnySet_Check(set)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (set_next((PySetObject *)set, pos, &entry) == 0)
-		return 0;
-	*key = entry->key;
-	*hash = entry->hash;
-	return 1;
+    if (!PyAnySet_Check(set)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (set_next((PySetObject *)set, pos, &entry) == 0)
+        return 0;
+    *key = entry->key;
+    *hash = entry->hash;
+    return 1;
 }
 
 PyObject *
 PySet_Pop(PyObject *set)
 {
-	if (!PySet_Check(set)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return set_pop((PySetObject *)set);
+    if (!PySet_Check(set)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return set_pop((PySetObject *)set);
 }
 
 int
 _PySet_Update(PyObject *set, PyObject *iterable)
 {
-	if (!PySet_Check(set)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	return set_update_internal((PySetObject *)set, iterable);
+    if (!PySet_Check(set)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    return set_update_internal((PySetObject *)set, iterable);
 }
 
 #ifdef Py_DEBUG
 
-/* Test code to be called with any three element set. 
+/* Test code to be called with any three element set.
    Returns True and original set is restored. */
 
-#define assertRaises(call_return_value, exception)		\
-	do {							\
-		assert(call_return_value);			\
-		assert(PyErr_ExceptionMatches(exception));	\
-		PyErr_Clear();					\
-	} while(0)
+#define assertRaises(call_return_value, exception)              \
+    do {                                                        \
+        assert(call_return_value);                              \
+        assert(PyErr_ExceptionMatches(exception));              \
+        PyErr_Clear();                                          \
+    } while(0)
 
 static PyObject *
 test_c_api(PySetObject *so)
 {
-	Py_ssize_t count;
-	char *s;
-	Py_ssize_t i;
-	PyObject *elem=NULL, *dup=NULL, *t, *f, *dup2, *x;
-	PyObject *ob = (PyObject *)so;
-	PyObject *str;
+    Py_ssize_t count;
+    char *s;
+    Py_ssize_t i;
+    PyObject *elem=NULL, *dup=NULL, *t, *f, *dup2, *x;
+    PyObject *ob = (PyObject *)so;
+    PyObject *str;
 
-	/* Verify preconditions */
-	assert(PyAnySet_Check(ob));
-	assert(PyAnySet_CheckExact(ob));
-	assert(!PyFrozenSet_CheckExact(ob));
+    /* Verify preconditions */
+    assert(PyAnySet_Check(ob));
+    assert(PyAnySet_CheckExact(ob));
+    assert(!PyFrozenSet_CheckExact(ob));
 
-	/* so.clear(); so |= set("abc"); */
-	str = PyString_FromString("abc");
-	if (str == NULL)
-		return NULL;
-	set_clear_internal(so);
-	if (set_update_internal(so, str) == -1) {
-		Py_DECREF(str);
-		return NULL;
-	}
-	Py_DECREF(str);
+    /* so.clear(); so |= set("abc"); */
+    str = PyString_FromString("abc");
+    if (str == NULL)
+        return NULL;
+    set_clear_internal(so);
+    if (set_update_internal(so, str) == -1) {
+        Py_DECREF(str);
+        return NULL;
+    }
+    Py_DECREF(str);
 
-	/* Exercise type/size checks */
-	assert(PySet_Size(ob) == 3);
-	assert(PySet_GET_SIZE(ob) == 3);
+    /* Exercise type/size checks */
+    assert(PySet_Size(ob) == 3);
+    assert(PySet_GET_SIZE(ob) == 3);
 
-	/* Raise TypeError for non-iterable constructor arguments */
-	assertRaises(PySet_New(Py_None) == NULL, PyExc_TypeError);
-	assertRaises(PyFrozenSet_New(Py_None) == NULL, PyExc_TypeError);
+    /* Raise TypeError for non-iterable constructor arguments */
+    assertRaises(PySet_New(Py_None) == NULL, PyExc_TypeError);
+    assertRaises(PyFrozenSet_New(Py_None) == NULL, PyExc_TypeError);
 
-	/* Raise TypeError for unhashable key */
-	dup = PySet_New(ob);
-	assertRaises(PySet_Discard(ob, dup) == -1, PyExc_TypeError);
-	assertRaises(PySet_Contains(ob, dup) == -1, PyExc_TypeError);
-	assertRaises(PySet_Add(ob, dup) == -1, PyExc_TypeError);
+    /* Raise TypeError for unhashable key */
+    dup = PySet_New(ob);
+    assertRaises(PySet_Discard(ob, dup) == -1, PyExc_TypeError);
+    assertRaises(PySet_Contains(ob, dup) == -1, PyExc_TypeError);
+    assertRaises(PySet_Add(ob, dup) == -1, PyExc_TypeError);
 
-	/* Exercise successful pop, contains, add, and discard */
-	elem = PySet_Pop(ob);
-	assert(PySet_Contains(ob, elem) == 0);
-	assert(PySet_GET_SIZE(ob) == 2);
-	assert(PySet_Add(ob, elem) == 0);
-	assert(PySet_Contains(ob, elem) == 1);
-	assert(PySet_GET_SIZE(ob) == 3);
-	assert(PySet_Discard(ob, elem) == 1);
-	assert(PySet_GET_SIZE(ob) == 2);
-	assert(PySet_Discard(ob, elem) == 0);
-	assert(PySet_GET_SIZE(ob) == 2);
+    /* Exercise successful pop, contains, add, and discard */
+    elem = PySet_Pop(ob);
+    assert(PySet_Contains(ob, elem) == 0);
+    assert(PySet_GET_SIZE(ob) == 2);
+    assert(PySet_Add(ob, elem) == 0);
+    assert(PySet_Contains(ob, elem) == 1);
+    assert(PySet_GET_SIZE(ob) == 3);
+    assert(PySet_Discard(ob, elem) == 1);
+    assert(PySet_GET_SIZE(ob) == 2);
+    assert(PySet_Discard(ob, elem) == 0);
+    assert(PySet_GET_SIZE(ob) == 2);
 
-	/* Exercise clear */
-	dup2 = PySet_New(dup);
-	assert(PySet_Clear(dup2) == 0);
-	assert(PySet_Size(dup2) == 0);
-	Py_DECREF(dup2);
+    /* Exercise clear */
+    dup2 = PySet_New(dup);
+    assert(PySet_Clear(dup2) == 0);
+    assert(PySet_Size(dup2) == 0);
+    Py_DECREF(dup2);
 
-	/* Raise SystemError on clear or update of frozen set */
-	f = PyFrozenSet_New(dup);
-	assertRaises(PySet_Clear(f) == -1, PyExc_SystemError);
-	assertRaises(_PySet_Update(f, dup) == -1, PyExc_SystemError);
-	assert(PySet_Add(f, elem) == 0);
-	Py_INCREF(f);
-	assertRaises(PySet_Add(f, elem) == -1, PyExc_SystemError);
-	Py_DECREF(f);
-	Py_DECREF(f);
+    /* Raise SystemError on clear or update of frozen set */
+    f = PyFrozenSet_New(dup);
+    assertRaises(PySet_Clear(f) == -1, PyExc_SystemError);
+    assertRaises(_PySet_Update(f, dup) == -1, PyExc_SystemError);
+    assert(PySet_Add(f, elem) == 0);
+    Py_INCREF(f);
+    assertRaises(PySet_Add(f, elem) == -1, PyExc_SystemError);
+    Py_DECREF(f);
+    Py_DECREF(f);
 
-	/* Exercise direct iteration */
-	i = 0, count = 0;
-	while (_PySet_Next((PyObject *)dup, &i, &x)) {
-		s = PyString_AsString(x);
-		assert(s && (s[0] == 'a' || s[0] == 'b' || s[0] == 'c'));
-		count++;
-	}
-	assert(count == 3);
+    /* Exercise direct iteration */
+    i = 0, count = 0;
+    while (_PySet_Next((PyObject *)dup, &i, &x)) {
+        s = PyString_AsString(x);
+        assert(s && (s[0] == 'a' || s[0] == 'b' || s[0] == 'c'));
+        count++;
+    }
+    assert(count == 3);
 
-	/* Exercise updates */
-	dup2 = PySet_New(NULL);
-	assert(_PySet_Update(dup2, dup) == 0);
-	assert(PySet_Size(dup2) == 3);
-	assert(_PySet_Update(dup2, dup) == 0);
-	assert(PySet_Size(dup2) == 3);
-	Py_DECREF(dup2);
+    /* Exercise updates */
+    dup2 = PySet_New(NULL);
+    assert(_PySet_Update(dup2, dup) == 0);
+    assert(PySet_Size(dup2) == 3);
+    assert(_PySet_Update(dup2, dup) == 0);
+    assert(PySet_Size(dup2) == 3);
+    Py_DECREF(dup2);
 
-	/* Raise SystemError when self argument is not a set or frozenset. */
-	t = PyTuple_New(0);
-	assertRaises(PySet_Size(t) == -1, PyExc_SystemError);
-	assertRaises(PySet_Contains(t, elem) == -1, PyExc_SystemError);
-	Py_DECREF(t);
+    /* Raise SystemError when self argument is not a set or frozenset. */
+    t = PyTuple_New(0);
+    assertRaises(PySet_Size(t) == -1, PyExc_SystemError);
+    assertRaises(PySet_Contains(t, elem) == -1, PyExc_SystemError);
+    Py_DECREF(t);
 
-	/* Raise SystemError when self argument is not a set. */
-	f = PyFrozenSet_New(dup);
-	assert(PySet_Size(f) == 3);
-	assert(PyFrozenSet_CheckExact(f));
-	assertRaises(PySet_Discard(f, elem) == -1, PyExc_SystemError);
-	assertRaises(PySet_Pop(f) == NULL, PyExc_SystemError);
-	Py_DECREF(f);
+    /* Raise SystemError when self argument is not a set. */
+    f = PyFrozenSet_New(dup);
+    assert(PySet_Size(f) == 3);
+    assert(PyFrozenSet_CheckExact(f));
+    assertRaises(PySet_Discard(f, elem) == -1, PyExc_SystemError);
+    assertRaises(PySet_Pop(f) == NULL, PyExc_SystemError);
+    Py_DECREF(f);
 
-	/* Raise KeyError when popping from an empty set */
-	assert(PyNumber_InPlaceSubtract(ob, ob) == ob);
-	Py_DECREF(ob);
-	assert(PySet_GET_SIZE(ob) == 0);
-	assertRaises(PySet_Pop(ob) == NULL, PyExc_KeyError);
+    /* Raise KeyError when popping from an empty set */
+    assert(PyNumber_InPlaceSubtract(ob, ob) == ob);
+    Py_DECREF(ob);
+    assert(PySet_GET_SIZE(ob) == 0);
+    assertRaises(PySet_Pop(ob) == NULL, PyExc_KeyError);
 
-	/* Restore the set from the copy using the PyNumber API */
-	assert(PyNumber_InPlaceOr(ob, dup) == ob);
-	Py_DECREF(ob);
+    /* Restore the set from the copy using the PyNumber API */
+    assert(PyNumber_InPlaceOr(ob, dup) == ob);
+    Py_DECREF(ob);
 
-	/* Verify constructors accept NULL arguments */
-	f = PySet_New(NULL);
-	assert(f != NULL);
-	assert(PySet_GET_SIZE(f) == 0);
-	Py_DECREF(f);
-	f = PyFrozenSet_New(NULL);
-	assert(f != NULL);
-	assert(PyFrozenSet_CheckExact(f));
-	assert(PySet_GET_SIZE(f) == 0);
-	Py_DECREF(f);
+    /* Verify constructors accept NULL arguments */
+    f = PySet_New(NULL);
+    assert(f != NULL);
+    assert(PySet_GET_SIZE(f) == 0);
+    Py_DECREF(f);
+    f = PyFrozenSet_New(NULL);
+    assert(f != NULL);
+    assert(PyFrozenSet_CheckExact(f));
+    assert(PySet_GET_SIZE(f) == 0);
+    Py_DECREF(f);
 
-	Py_DECREF(elem);
-	Py_DECREF(dup);
-	Py_RETURN_TRUE;
+    Py_DECREF(elem);
+    Py_DECREF(dup);
+    Py_RETURN_TRUE;
 }
 
 #undef assertRaises
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 2eb3941..d1fe052 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -7,7 +7,7 @@
 for this file.
 */
 
-/* 
+/*
 Py_Ellipsis encodes the '...' rubber index token. It is similar to
 the Py_NoneStruct in that there is no way to create other objects of
 this type and there is exactly one in existence.
@@ -19,35 +19,35 @@
 static PyObject *
 ellipsis_repr(PyObject *op)
 {
-	return PyString_FromString("Ellipsis");
+    return PyString_FromString("Ellipsis");
 }
 
 PyTypeObject PyEllipsis_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"ellipsis",			/* tp_name */
-	0,				/* tp_basicsize */
-	0,				/* tp_itemsize */
-	0, /*never called*/		/* tp_dealloc */
-	0,				/* tp_print */
-	0,				/* tp_getattr */
-	0,				/* tp_setattr */
-	0,				/* tp_compare */
-	ellipsis_repr,			/* tp_repr */
-	0,				/* tp_as_number */
-	0,				/* tp_as_sequence */
-	0,				/* tp_as_mapping */
-	0,				/* tp_hash */
-	0,				/* tp_call */
-	0,				/* tp_str */
-	PyObject_GenericGetAttr,	/* tp_getattro */
-	0,				/* tp_setattro */
-	0,				/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,		/* tp_flags */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "ellipsis",                         /* tp_name */
+    0,                                  /* tp_basicsize */
+    0,                                  /* tp_itemsize */
+    0, /*never called*/                 /* tp_dealloc */
+    0,                                  /* tp_print */
+    0,                                  /* tp_getattr */
+    0,                                  /* tp_setattr */
+    0,                                  /* tp_compare */
+    ellipsis_repr,                      /* tp_repr */
+    0,                                  /* tp_as_number */
+    0,                                  /* tp_as_sequence */
+    0,                                  /* tp_as_mapping */
+    0,                                  /* tp_hash */
+    0,                                  /* tp_call */
+    0,                                  /* tp_str */
+    PyObject_GenericGetAttr,            /* tp_getattro */
+    0,                                  /* tp_setattro */
+    0,                                  /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,                 /* tp_flags */
 };
 
 PyObject _Py_EllipsisObject = {
-	_PyObject_EXTRA_INIT
-	1, &PyEllipsis_Type
+    _PyObject_EXTRA_INIT
+    1, &PyEllipsis_Type
 };
 
 
@@ -60,154 +60,154 @@
 PyObject *
 PySlice_New(PyObject *start, PyObject *stop, PyObject *step)
 {
-	PySliceObject *obj = PyObject_New(PySliceObject, &PySlice_Type);
+    PySliceObject *obj = PyObject_New(PySliceObject, &PySlice_Type);
 
-	if (obj == NULL)
-		return NULL;
+    if (obj == NULL)
+        return NULL;
 
-	if (step == NULL) step = Py_None;
-	Py_INCREF(step);
-	if (start == NULL) start = Py_None;
-	Py_INCREF(start);
-	if (stop == NULL) stop = Py_None;
-	Py_INCREF(stop);
+    if (step == NULL) step = Py_None;
+    Py_INCREF(step);
+    if (start == NULL) start = Py_None;
+    Py_INCREF(start);
+    if (stop == NULL) stop = Py_None;
+    Py_INCREF(stop);
 
-	obj->step = step;
-	obj->start = start;
-	obj->stop = stop;
+    obj->step = step;
+    obj->start = start;
+    obj->stop = stop;
 
-	return (PyObject *) obj;
+    return (PyObject *) obj;
 }
 
 PyObject *
 _PySlice_FromIndices(Py_ssize_t istart, Py_ssize_t istop)
 {
-	PyObject *start, *end, *slice;
-	start = PyInt_FromSsize_t(istart);
-	if (!start)
-		return NULL;
-	end = PyInt_FromSsize_t(istop);
-	if (!end) {
-		Py_DECREF(start);
-		return NULL;
-	}
+    PyObject *start, *end, *slice;
+    start = PyInt_FromSsize_t(istart);
+    if (!start)
+        return NULL;
+    end = PyInt_FromSsize_t(istop);
+    if (!end) {
+        Py_DECREF(start);
+        return NULL;
+    }
 
-	slice = PySlice_New(start, end, NULL);
-	Py_DECREF(start);
-	Py_DECREF(end);
-	return slice;
+    slice = PySlice_New(start, end, NULL);
+    Py_DECREF(start);
+    Py_DECREF(end);
+    return slice;
 }
 
 int
 PySlice_GetIndices(PySliceObject *r, Py_ssize_t length,
                    Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step)
 {
-	/* XXX support long ints */
-	if (r->step == Py_None) {
-		*step = 1;
-	} else {
-		if (!PyInt_Check(r->step) && !PyLong_Check(r->step)) return -1;
-		*step = PyInt_AsSsize_t(r->step);
-	}
-	if (r->start == Py_None) {
-		*start = *step < 0 ? length-1 : 0;
-	} else {
-		if (!PyInt_Check(r->start) && !PyLong_Check(r->step)) return -1;
-		*start = PyInt_AsSsize_t(r->start);
-		if (*start < 0) *start += length;
-	}
-	if (r->stop == Py_None) {
-		*stop = *step < 0 ? -1 : length;
-	} else {
-		if (!PyInt_Check(r->stop) && !PyLong_Check(r->step)) return -1;
-		*stop = PyInt_AsSsize_t(r->stop);
-		if (*stop < 0) *stop += length;
-	}
-	if (*stop > length) return -1;
-	if (*start >= length) return -1;
-	if (*step == 0) return -1;
-	return 0;
+    /* XXX support long ints */
+    if (r->step == Py_None) {
+        *step = 1;
+    } else {
+        if (!PyInt_Check(r->step) && !PyLong_Check(r->step)) return -1;
+        *step = PyInt_AsSsize_t(r->step);
+    }
+    if (r->start == Py_None) {
+        *start = *step < 0 ? length-1 : 0;
+    } else {
+        if (!PyInt_Check(r->start) && !PyLong_Check(r->step)) return -1;
+        *start = PyInt_AsSsize_t(r->start);
+        if (*start < 0) *start += length;
+    }
+    if (r->stop == Py_None) {
+        *stop = *step < 0 ? -1 : length;
+    } else {
+        if (!PyInt_Check(r->stop) && !PyLong_Check(r->step)) return -1;
+        *stop = PyInt_AsSsize_t(r->stop);
+        if (*stop < 0) *stop += length;
+    }
+    if (*stop > length) return -1;
+    if (*start >= length) return -1;
+    if (*step == 0) return -1;
+    return 0;
 }
 
 int
 PySlice_GetIndicesEx(PySliceObject *r, Py_ssize_t length,
-		     Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength)
+                     Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength)
 {
-	/* this is harder to get right than you might think */
+    /* this is harder to get right than you might think */
 
-	Py_ssize_t defstart, defstop;
+    Py_ssize_t defstart, defstop;
 
-	if (r->step == Py_None) {
-		*step = 1;
-	} 
-	else {
-		if (!_PyEval_SliceIndex(r->step, step)) return -1;
-		if (*step == 0) {
-			PyErr_SetString(PyExc_ValueError,
-					"slice step cannot be zero");
-			return -1;
-		}
-	}
+    if (r->step == Py_None) {
+        *step = 1;
+    }
+    else {
+        if (!_PyEval_SliceIndex(r->step, step)) return -1;
+        if (*step == 0) {
+            PyErr_SetString(PyExc_ValueError,
+                            "slice step cannot be zero");
+            return -1;
+        }
+    }
 
-	defstart = *step < 0 ? length-1 : 0;
-	defstop = *step < 0 ? -1 : length;
+    defstart = *step < 0 ? length-1 : 0;
+    defstop = *step < 0 ? -1 : length;
 
-	if (r->start == Py_None) {
-		*start = defstart;
-	}
-	else {
-		if (!_PyEval_SliceIndex(r->start, start)) return -1;
-		if (*start < 0) *start += length;
-		if (*start < 0) *start = (*step < 0) ? -1 : 0;
-		if (*start >= length) 
-			*start = (*step < 0) ? length - 1 : length;
-	}
+    if (r->start == Py_None) {
+        *start = defstart;
+    }
+    else {
+        if (!_PyEval_SliceIndex(r->start, start)) return -1;
+        if (*start < 0) *start += length;
+        if (*start < 0) *start = (*step < 0) ? -1 : 0;
+        if (*start >= length)
+            *start = (*step < 0) ? length - 1 : length;
+    }
 
-	if (r->stop == Py_None) {
-		*stop = defstop;
-	}
-	else {
-		if (!_PyEval_SliceIndex(r->stop, stop)) return -1;
-		if (*stop < 0) *stop += length;
-		if (*stop < 0) *stop = (*step < 0) ? -1 : 0;
-		if (*stop >= length)
-			*stop = (*step < 0) ? length - 1 : length;
-	}
+    if (r->stop == Py_None) {
+        *stop = defstop;
+    }
+    else {
+        if (!_PyEval_SliceIndex(r->stop, stop)) return -1;
+        if (*stop < 0) *stop += length;
+        if (*stop < 0) *stop = (*step < 0) ? -1 : 0;
+        if (*stop >= length)
+            *stop = (*step < 0) ? length - 1 : length;
+    }
 
-	if ((*step < 0 && *stop >= *start) 
-	    || (*step > 0 && *start >= *stop)) {
-		*slicelength = 0;
-	}
-	else if (*step < 0) {
-		*slicelength = (*stop-*start+1)/(*step)+1;
-	}
-	else {
-		*slicelength = (*stop-*start-1)/(*step)+1;
-	}
+    if ((*step < 0 && *stop >= *start)
+        || (*step > 0 && *start >= *stop)) {
+        *slicelength = 0;
+    }
+    else if (*step < 0) {
+        *slicelength = (*stop-*start+1)/(*step)+1;
+    }
+    else {
+        *slicelength = (*stop-*start-1)/(*step)+1;
+    }
 
-	return 0;
+    return 0;
 }
 
 static PyObject *
 slice_new(PyTypeObject *type, PyObject *args, PyObject *kw)
 {
-	PyObject *start, *stop, *step;
+    PyObject *start, *stop, *step;
 
-	start = stop = step = NULL;
+    start = stop = step = NULL;
 
-	if (!_PyArg_NoKeywords("slice()", kw))
-		return NULL;
+    if (!_PyArg_NoKeywords("slice()", kw))
+        return NULL;
 
-	if (!PyArg_UnpackTuple(args, "slice", 1, 3, &start, &stop, &step))
-		return NULL;
+    if (!PyArg_UnpackTuple(args, "slice", 1, 3, &start, &stop, &step))
+        return NULL;
 
-	/* This swapping of stop and start is to maintain similarity with
-	   range(). */
-	if (stop == NULL) {
-		stop = start;
-		start = NULL;
-	}
-	return PySlice_New(start, stop, step);
+    /* This swapping of stop and start is to maintain similarity with
+       range(). */
+    if (stop == NULL) {
+        stop = start;
+        start = NULL;
+    }
+    return PySlice_New(start, stop, step);
 }
 
 PyDoc_STRVAR(slice_doc,
@@ -218,53 +218,53 @@
 static void
 slice_dealloc(PySliceObject *r)
 {
-	Py_DECREF(r->step);
-	Py_DECREF(r->start);
-	Py_DECREF(r->stop);
-	PyObject_Del(r);
+    Py_DECREF(r->step);
+    Py_DECREF(r->start);
+    Py_DECREF(r->stop);
+    PyObject_Del(r);
 }
 
 static PyObject *
 slice_repr(PySliceObject *r)
 {
-	PyObject *s, *comma;
+    PyObject *s, *comma;
 
-	s = PyString_FromString("slice(");
-	comma = PyString_FromString(", ");
-	PyString_ConcatAndDel(&s, PyObject_Repr(r->start));
-	PyString_Concat(&s, comma);
-	PyString_ConcatAndDel(&s, PyObject_Repr(r->stop));
-	PyString_Concat(&s, comma);
-	PyString_ConcatAndDel(&s, PyObject_Repr(r->step));
-	PyString_ConcatAndDel(&s, PyString_FromString(")"));
-	Py_DECREF(comma);
-	return s;
+    s = PyString_FromString("slice(");
+    comma = PyString_FromString(", ");
+    PyString_ConcatAndDel(&s, PyObject_Repr(r->start));
+    PyString_Concat(&s, comma);
+    PyString_ConcatAndDel(&s, PyObject_Repr(r->stop));
+    PyString_Concat(&s, comma);
+    PyString_ConcatAndDel(&s, PyObject_Repr(r->step));
+    PyString_ConcatAndDel(&s, PyString_FromString(")"));
+    Py_DECREF(comma);
+    return s;
 }
 
 static PyMemberDef slice_members[] = {
-	{"start", T_OBJECT, offsetof(PySliceObject, start), READONLY},
-	{"stop", T_OBJECT, offsetof(PySliceObject, stop), READONLY},
-	{"step", T_OBJECT, offsetof(PySliceObject, step), READONLY},
-	{0}
+    {"start", T_OBJECT, offsetof(PySliceObject, start), READONLY},
+    {"stop", T_OBJECT, offsetof(PySliceObject, stop), READONLY},
+    {"step", T_OBJECT, offsetof(PySliceObject, step), READONLY},
+    {0}
 };
 
 static PyObject*
 slice_indices(PySliceObject* self, PyObject* len)
 {
-	Py_ssize_t ilen, start, stop, step, slicelength;
+    Py_ssize_t ilen, start, stop, step, slicelength;
 
-	ilen = PyNumber_AsSsize_t(len, PyExc_OverflowError);
+    ilen = PyNumber_AsSsize_t(len, PyExc_OverflowError);
 
-	if (ilen == -1 && PyErr_Occurred()) {
-		return NULL;
-	}
+    if (ilen == -1 && PyErr_Occurred()) {
+        return NULL;
+    }
 
-	if (PySlice_GetIndicesEx(self, ilen, &start, &stop, 
-				 &step, &slicelength) < 0) {
-		return NULL;
-	}
+    if (PySlice_GetIndicesEx(self, ilen, &start, &stop,
+                             &step, &slicelength) < 0) {
+        return NULL;
+    }
 
-	return Py_BuildValue("(nnn)", start, stop, step);
+    return Py_BuildValue("(nnn)", start, stop, step);
 }
 
 PyDoc_STRVAR(slice_indices_doc,
@@ -278,84 +278,84 @@
 static PyObject *
 slice_reduce(PySliceObject* self)
 {
-	return Py_BuildValue("O(OOO)", Py_TYPE(self), self->start, self->stop, self->step);
+    return Py_BuildValue("O(OOO)", Py_TYPE(self), self->start, self->stop, self->step);
 }
 
 PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
 
 static PyMethodDef slice_methods[] = {
-	{"indices",	(PyCFunction)slice_indices,
-	 METH_O,	slice_indices_doc},
-	{"__reduce__",	(PyCFunction)slice_reduce,
-	 METH_NOARGS,	reduce_doc},
-	{NULL, NULL}
+    {"indices",         (PyCFunction)slice_indices,
+     METH_O,            slice_indices_doc},
+    {"__reduce__",      (PyCFunction)slice_reduce,
+     METH_NOARGS,       reduce_doc},
+    {NULL, NULL}
 };
 
 static int
 slice_compare(PySliceObject *v, PySliceObject *w)
 {
-	int result = 0;
+    int result = 0;
 
-        if (v == w)
-		return 0;
+    if (v == w)
+        return 0;
 
-	if (PyObject_Cmp(v->start, w->start, &result) < 0)
-	    return -2;
-	if (result != 0)
-		return result;
-	if (PyObject_Cmp(v->stop, w->stop, &result) < 0)
-	    return -2;
-	if (result != 0)
-		return result;
-	if (PyObject_Cmp(v->step, w->step, &result) < 0)
-	    return -2;
-	return result;
+    if (PyObject_Cmp(v->start, w->start, &result) < 0)
+        return -2;
+    if (result != 0)
+        return result;
+    if (PyObject_Cmp(v->stop, w->stop, &result) < 0)
+        return -2;
+    if (result != 0)
+        return result;
+    if (PyObject_Cmp(v->step, w->step, &result) < 0)
+        return -2;
+    return result;
 }
 
 static long
 slice_hash(PySliceObject *v)
 {
-	PyErr_SetString(PyExc_TypeError, "unhashable type");
-	return -1L;
+    PyErr_SetString(PyExc_TypeError, "unhashable type");
+    return -1L;
 }
 
 PyTypeObject PySlice_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"slice",		/* Name of this type */
-	sizeof(PySliceObject),	/* Basic object size */
-	0,			/* Item size for varobject */
-	(destructor)slice_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	(cmpfunc)slice_compare, 		/* tp_compare */
-	(reprfunc)slice_repr,   		/* tp_repr */
-	0,					/* tp_as_number */
-	0,	    				/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	(hashfunc)slice_hash,			/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,			/* tp_flags */
-	slice_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	slice_methods,				/* tp_methods */
-	slice_members,				/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	slice_new,				/* tp_new */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "slice",                    /* Name of this type */
+    sizeof(PySliceObject),      /* Basic object size */
+    0,                          /* Item size for varobject */
+    (destructor)slice_dealloc,                  /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    (cmpfunc)slice_compare,                     /* tp_compare */
+    (reprfunc)slice_repr,                       /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)slice_hash,                       /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,                         /* tp_flags */
+    slice_doc,                                  /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    slice_methods,                              /* tp_methods */
+    slice_members,                              /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    slice_new,                                  /* tp_new */
 };
diff --git a/Objects/stringlib/string_format.h b/Objects/stringlib/string_format.h
index ee6533e..0aafb14 100644
--- a/Objects/stringlib/string_format.h
+++ b/Objects/stringlib/string_format.h
@@ -563,15 +563,15 @@
     PyObject *format_spec_object = NULL;
     PyObject *(*formatter)(PyObject *, STRINGLIB_CHAR *, Py_ssize_t) = NULL;
     STRINGLIB_CHAR* format_spec_start = format_spec->ptr ?
-	    format_spec->ptr : NULL;
+            format_spec->ptr : NULL;
     Py_ssize_t format_spec_len = format_spec->ptr ?
-	    format_spec->end - format_spec->ptr : 0;
+            format_spec->end - format_spec->ptr : 0;
 
     /* If we know the type exactly, skip the lookup of __format__ and just
        call the formatter directly. */
 #if STRINGLIB_IS_UNICODE
     if (PyUnicode_CheckExact(fieldobj))
-	formatter = _PyUnicode_FormatAdvanced;
+        formatter = _PyUnicode_FormatAdvanced;
     /* Unfortunately, there's a problem with checking for int, long,
        and float here.  If we're being included as unicode, their
        formatters expect string format_spec args.  For now, just skip
@@ -579,29 +579,29 @@
        hassle. */
 #else
     if (PyString_CheckExact(fieldobj))
-	formatter = _PyBytes_FormatAdvanced;
+        formatter = _PyBytes_FormatAdvanced;
     else if (PyInt_CheckExact(fieldobj))
-	formatter =_PyInt_FormatAdvanced;
+        formatter =_PyInt_FormatAdvanced;
     else if (PyLong_CheckExact(fieldobj))
-	formatter =_PyLong_FormatAdvanced;
+        formatter =_PyLong_FormatAdvanced;
     else if (PyFloat_CheckExact(fieldobj))
-	formatter = _PyFloat_FormatAdvanced;
+        formatter = _PyFloat_FormatAdvanced;
 #endif
 
     if (formatter) {
-	/* we know exactly which formatter will be called when __format__ is
-	   looked up, so call it directly, instead. */
-	result = formatter(fieldobj, format_spec_start, format_spec_len);
+        /* we know exactly which formatter will be called when __format__ is
+           looked up, so call it directly, instead. */
+        result = formatter(fieldobj, format_spec_start, format_spec_len);
     }
     else {
-	/* We need to create an object out of the pointers we have, because
-	   __format__ takes a string/unicode object for format_spec. */
-	format_spec_object = STRINGLIB_NEW(format_spec_start,
-					   format_spec_len);
-	if (format_spec_object == NULL)
-	    goto done;
+        /* We need to create an object out of the pointers we have, because
+           __format__ takes a string/unicode object for format_spec. */
+        format_spec_object = STRINGLIB_NEW(format_spec_start,
+                                           format_spec_len);
+        if (format_spec_object == NULL)
+            goto done;
 
-	result = PyObject_Format(fieldobj, format_spec_object);
+        result = PyObject_Format(fieldobj, format_spec_object);
     }
     if (result == NULL)
         goto done;
@@ -614,11 +614,11 @@
     /* Convert result to our type.  We could be str, and result could
        be unicode */
     {
-	PyObject *tmp = STRINGLIB_TOSTR(result);
-	if (tmp == NULL)
-	    goto done;
-	Py_DECREF(result);
-	result = tmp;
+        PyObject *tmp = STRINGLIB_TOSTR(result);
+        if (tmp == NULL)
+            goto done;
+        Py_DECREF(result);
+        result = tmp;
     }
 #endif
 
@@ -849,17 +849,17 @@
     case 's':
         return STRINGLIB_TOSTR(obj);
     default:
-	if (conversion > 32 && conversion < 127) {
-		/* It's the ASCII subrange; casting to char is safe
-		   (assuming the execution character set is an ASCII
-		   superset). */
-        	PyErr_Format(PyExc_ValueError,
+        if (conversion > 32 && conversion < 127) {
+                /* It's the ASCII subrange; casting to char is safe
+                   (assuming the execution character set is an ASCII
+                   superset). */
+                PyErr_Format(PyExc_ValueError,
                      "Unknown conversion specifier %c",
                      (char)conversion);
-	} else
-		PyErr_Format(PyExc_ValueError,
-		     "Unknown conversion specifier \\x%x",
-		     (unsigned int)conversion);
+        } else
+                PyErr_Format(PyExc_ValueError,
+                     "Unknown conversion specifier \\x%x",
+                     (unsigned int)conversion);
         return NULL;
     }
 }
@@ -1124,7 +1124,7 @@
             Py_INCREF(conversion_str);
         }
         else
-	    conversion_str = STRINGLIB_NEW(&conversion, 1);
+            conversion_str = STRINGLIB_NEW(&conversion, 1);
         if (conversion_str == NULL)
             goto done;
 
@@ -1140,39 +1140,39 @@
 }
 
 static PyMethodDef formatteriter_methods[] = {
-    {NULL,		NULL}		/* sentinel */
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyTypeObject PyFormatterIter_Type = {
     PyVarObject_HEAD_INIT(&PyType_Type, 0)
-    "formatteriterator",		/* tp_name */
-    sizeof(formatteriterobject),	/* tp_basicsize */
-    0,					/* tp_itemsize */
+    "formatteriterator",                /* tp_name */
+    sizeof(formatteriterobject),        /* tp_basicsize */
+    0,                                  /* tp_itemsize */
     /* methods */
-    (destructor)formatteriter_dealloc,	/* tp_dealloc */
-    0,					/* tp_print */
-    0,					/* tp_getattr */
-    0,					/* tp_setattr */
-    0,					/* tp_compare */
-    0,					/* tp_repr */
-    0,					/* tp_as_number */
-    0,					/* tp_as_sequence */
-    0,					/* tp_as_mapping */
-    0,					/* tp_hash */
-    0,					/* tp_call */
-    0,					/* tp_str */
-    PyObject_GenericGetAttr,		/* tp_getattro */
-    0,					/* tp_setattro */
-    0,					/* tp_as_buffer */
-    Py_TPFLAGS_DEFAULT,			/* tp_flags */
-    0,					/* tp_doc */
-    0,					/* tp_traverse */
-    0,					/* tp_clear */
-    0,					/* tp_richcompare */
-    0,					/* tp_weaklistoffset */
-    PyObject_SelfIter,			/* tp_iter */
-    (iternextfunc)formatteriter_next,	/* tp_iternext */
-    formatteriter_methods,		/* tp_methods */
+    (destructor)formatteriter_dealloc,  /* tp_dealloc */
+    0,                                  /* tp_print */
+    0,                                  /* tp_getattr */
+    0,                                  /* tp_setattr */
+    0,                                  /* tp_compare */
+    0,                                  /* tp_repr */
+    0,                                  /* tp_as_number */
+    0,                                  /* tp_as_sequence */
+    0,                                  /* tp_as_mapping */
+    0,                                  /* tp_hash */
+    0,                                  /* tp_call */
+    0,                                  /* tp_str */
+    PyObject_GenericGetAttr,            /* tp_getattro */
+    0,                                  /* tp_setattro */
+    0,                                  /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,                 /* tp_flags */
+    0,                                  /* tp_doc */
+    0,                                  /* tp_traverse */
+    0,                                  /* tp_clear */
+    0,                                  /* tp_richcompare */
+    0,                                  /* tp_weaklistoffset */
+    PyObject_SelfIter,                  /* tp_iter */
+    (iternextfunc)formatteriter_next,   /* tp_iternext */
+    formatteriter_methods,              /* tp_methods */
     0,
 };
 
@@ -1273,39 +1273,39 @@
 }
 
 static PyMethodDef fieldnameiter_methods[] = {
-    {NULL,		NULL}		/* sentinel */
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyTypeObject PyFieldNameIter_Type = {
     PyVarObject_HEAD_INIT(&PyType_Type, 0)
-    "fieldnameiterator",		/* tp_name */
-    sizeof(fieldnameiterobject),	/* tp_basicsize */
-    0,					/* tp_itemsize */
+    "fieldnameiterator",                /* tp_name */
+    sizeof(fieldnameiterobject),        /* tp_basicsize */
+    0,                                  /* tp_itemsize */
     /* methods */
-    (destructor)fieldnameiter_dealloc,	/* tp_dealloc */
-    0,					/* tp_print */
-    0,					/* tp_getattr */
-    0,					/* tp_setattr */
-    0,					/* tp_compare */
-    0,					/* tp_repr */
-    0,					/* tp_as_number */
-    0,					/* tp_as_sequence */
-    0,					/* tp_as_mapping */
-    0,					/* tp_hash */
-    0,					/* tp_call */
-    0,					/* tp_str */
-    PyObject_GenericGetAttr,		/* tp_getattro */
-    0,					/* tp_setattro */
-    0,					/* tp_as_buffer */
-    Py_TPFLAGS_DEFAULT,			/* tp_flags */
-    0,					/* tp_doc */
-    0,					/* tp_traverse */
-    0,					/* tp_clear */
-    0,					/* tp_richcompare */
-    0,					/* tp_weaklistoffset */
-    PyObject_SelfIter,			/* tp_iter */
-    (iternextfunc)fieldnameiter_next,	/* tp_iternext */
-    fieldnameiter_methods,		/* tp_methods */
+    (destructor)fieldnameiter_dealloc,  /* tp_dealloc */
+    0,                                  /* tp_print */
+    0,                                  /* tp_getattr */
+    0,                                  /* tp_setattr */
+    0,                                  /* tp_compare */
+    0,                                  /* tp_repr */
+    0,                                  /* tp_as_number */
+    0,                                  /* tp_as_sequence */
+    0,                                  /* tp_as_mapping */
+    0,                                  /* tp_hash */
+    0,                                  /* tp_call */
+    0,                                  /* tp_str */
+    PyObject_GenericGetAttr,            /* tp_getattro */
+    0,                                  /* tp_setattro */
+    0,                                  /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,                 /* tp_flags */
+    0,                                  /* tp_doc */
+    0,                                  /* tp_traverse */
+    0,                                  /* tp_clear */
+    0,                                  /* tp_richcompare */
+    0,                                  /* tp_weaklistoffset */
+    PyObject_SelfIter,                  /* tp_iter */
+    (iternextfunc)fieldnameiter_next,   /* tp_iternext */
+    fieldnameiter_methods,              /* tp_methods */
     0};
 
 /* unicode_formatter_field_name_split is used to implement
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index abb1d3a..0fbc01c 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -60,402 +60,402 @@
 PyObject *
 PyString_FromStringAndSize(const char *str, Py_ssize_t size)
 {
-	register PyStringObject *op;
-	if (size < 0) {
-		PyErr_SetString(PyExc_SystemError,
-		    "Negative size passed to PyString_FromStringAndSize");
-		return NULL;
-	}
-	if (size == 0 && (op = nullstring) != NULL) {
+    register PyStringObject *op;
+    if (size < 0) {
+        PyErr_SetString(PyExc_SystemError,
+            "Negative size passed to PyString_FromStringAndSize");
+        return NULL;
+    }
+    if (size == 0 && (op = nullstring) != NULL) {
 #ifdef COUNT_ALLOCS
-		null_strings++;
+        null_strings++;
 #endif
-		Py_INCREF(op);
-		return (PyObject *)op;
-	}
-	if (size == 1 && str != NULL &&
-	    (op = characters[*str & UCHAR_MAX]) != NULL)
-	{
+        Py_INCREF(op);
+        return (PyObject *)op;
+    }
+    if (size == 1 && str != NULL &&
+        (op = characters[*str & UCHAR_MAX]) != NULL)
+    {
 #ifdef COUNT_ALLOCS
-		one_strings++;
+        one_strings++;
 #endif
-		Py_INCREF(op);
-		return (PyObject *)op;
-	}
+        Py_INCREF(op);
+        return (PyObject *)op;
+    }
 
-	if (size > PY_SSIZE_T_MAX - PyStringObject_SIZE) {
-		PyErr_SetString(PyExc_OverflowError, "string is too large");
-		return NULL;
-	}
+    if (size > PY_SSIZE_T_MAX - PyStringObject_SIZE) {
+        PyErr_SetString(PyExc_OverflowError, "string is too large");
+        return NULL;
+    }
 
-	/* Inline PyObject_NewVar */
-	op = (PyStringObject *)PyObject_MALLOC(PyStringObject_SIZE + size);
-	if (op == NULL)
-		return PyErr_NoMemory();
-	PyObject_INIT_VAR(op, &PyString_Type, size);
-	op->ob_shash = -1;
-	op->ob_sstate = SSTATE_NOT_INTERNED;
-	if (str != NULL)
-		Py_MEMCPY(op->ob_sval, str, size);
-	op->ob_sval[size] = '\0';
-	/* share short strings */
-	if (size == 0) {
-		PyObject *t = (PyObject *)op;
-		PyString_InternInPlace(&t);
-		op = (PyStringObject *)t;
-		nullstring = op;
-		Py_INCREF(op);
-	} else if (size == 1 && str != NULL) {
-		PyObject *t = (PyObject *)op;
-		PyString_InternInPlace(&t);
-		op = (PyStringObject *)t;
-		characters[*str & UCHAR_MAX] = op;
-		Py_INCREF(op);
-	}
-	return (PyObject *) op;
+    /* Inline PyObject_NewVar */
+    op = (PyStringObject *)PyObject_MALLOC(PyStringObject_SIZE + size);
+    if (op == NULL)
+        return PyErr_NoMemory();
+    PyObject_INIT_VAR(op, &PyString_Type, size);
+    op->ob_shash = -1;
+    op->ob_sstate = SSTATE_NOT_INTERNED;
+    if (str != NULL)
+        Py_MEMCPY(op->ob_sval, str, size);
+    op->ob_sval[size] = '\0';
+    /* share short strings */
+    if (size == 0) {
+        PyObject *t = (PyObject *)op;
+        PyString_InternInPlace(&t);
+        op = (PyStringObject *)t;
+        nullstring = op;
+        Py_INCREF(op);
+    } else if (size == 1 && str != NULL) {
+        PyObject *t = (PyObject *)op;
+        PyString_InternInPlace(&t);
+        op = (PyStringObject *)t;
+        characters[*str & UCHAR_MAX] = op;
+        Py_INCREF(op);
+    }
+    return (PyObject *) op;
 }
 
 PyObject *
 PyString_FromString(const char *str)
 {
-	register size_t size;
-	register PyStringObject *op;
+    register size_t size;
+    register PyStringObject *op;
 
-	assert(str != NULL);
-	size = strlen(str);
-	if (size > PY_SSIZE_T_MAX - PyStringObject_SIZE) {
-		PyErr_SetString(PyExc_OverflowError,
-			"string is too long for a Python string");
-		return NULL;
-	}
-	if (size == 0 && (op = nullstring) != NULL) {
+    assert(str != NULL);
+    size = strlen(str);
+    if (size > PY_SSIZE_T_MAX - PyStringObject_SIZE) {
+        PyErr_SetString(PyExc_OverflowError,
+            "string is too long for a Python string");
+        return NULL;
+    }
+    if (size == 0 && (op = nullstring) != NULL) {
 #ifdef COUNT_ALLOCS
-		null_strings++;
+        null_strings++;
 #endif
-		Py_INCREF(op);
-		return (PyObject *)op;
-	}
-	if (size == 1 && (op = characters[*str & UCHAR_MAX]) != NULL) {
+        Py_INCREF(op);
+        return (PyObject *)op;
+    }
+    if (size == 1 && (op = characters[*str & UCHAR_MAX]) != NULL) {
 #ifdef COUNT_ALLOCS
-		one_strings++;
+        one_strings++;
 #endif
-		Py_INCREF(op);
-		return (PyObject *)op;
-	}
+        Py_INCREF(op);
+        return (PyObject *)op;
+    }
 
-	/* Inline PyObject_NewVar */
-	op = (PyStringObject *)PyObject_MALLOC(PyStringObject_SIZE + size);
-	if (op == NULL)
-		return PyErr_NoMemory();
-	PyObject_INIT_VAR(op, &PyString_Type, size);
-	op->ob_shash = -1;
-	op->ob_sstate = SSTATE_NOT_INTERNED;
-	Py_MEMCPY(op->ob_sval, str, size+1);
-	/* share short strings */
-	if (size == 0) {
-		PyObject *t = (PyObject *)op;
-		PyString_InternInPlace(&t);
-		op = (PyStringObject *)t;
-		nullstring = op;
-		Py_INCREF(op);
-	} else if (size == 1) {
-		PyObject *t = (PyObject *)op;
-		PyString_InternInPlace(&t);
-		op = (PyStringObject *)t;
-		characters[*str & UCHAR_MAX] = op;
-		Py_INCREF(op);
-	}
-	return (PyObject *) op;
+    /* Inline PyObject_NewVar */
+    op = (PyStringObject *)PyObject_MALLOC(PyStringObject_SIZE + size);
+    if (op == NULL)
+        return PyErr_NoMemory();
+    PyObject_INIT_VAR(op, &PyString_Type, size);
+    op->ob_shash = -1;
+    op->ob_sstate = SSTATE_NOT_INTERNED;
+    Py_MEMCPY(op->ob_sval, str, size+1);
+    /* share short strings */
+    if (size == 0) {
+        PyObject *t = (PyObject *)op;
+        PyString_InternInPlace(&t);
+        op = (PyStringObject *)t;
+        nullstring = op;
+        Py_INCREF(op);
+    } else if (size == 1) {
+        PyObject *t = (PyObject *)op;
+        PyString_InternInPlace(&t);
+        op = (PyStringObject *)t;
+        characters[*str & UCHAR_MAX] = op;
+        Py_INCREF(op);
+    }
+    return (PyObject *) op;
 }
 
 PyObject *
 PyString_FromFormatV(const char *format, va_list vargs)
 {
-	va_list count;
-	Py_ssize_t n = 0;
-	const char* f;
-	char *s;
-	PyObject* string;
+    va_list count;
+    Py_ssize_t n = 0;
+    const char* f;
+    char *s;
+    PyObject* string;
 
 #ifdef VA_LIST_IS_ARRAY
-	Py_MEMCPY(count, vargs, sizeof(va_list));
+    Py_MEMCPY(count, vargs, sizeof(va_list));
 #else
 #ifdef  __va_copy
-	__va_copy(count, vargs);
+    __va_copy(count, vargs);
 #else
-	count = vargs;
+    count = vargs;
 #endif
 #endif
-	/* step 1: figure out how large a buffer we need */
-	for (f = format; *f; f++) {
-		if (*f == '%') {
+    /* step 1: figure out how large a buffer we need */
+    for (f = format; *f; f++) {
+        if (*f == '%') {
 #ifdef HAVE_LONG_LONG
-			int longlongflag = 0;
+            int longlongflag = 0;
 #endif
-			const char* p = f;
-			while (*++f && *f != '%' && !isalpha(Py_CHARMASK(*f)))
-				;
+            const char* p = f;
+            while (*++f && *f != '%' && !isalpha(Py_CHARMASK(*f)))
+                ;
 
-			/* skip the 'l' or 'z' in {%ld, %zd, %lu, %zu} since
-			 * they don't affect the amount of space we reserve.
-			 */
-			if (*f == 'l') {
-				if (f[1] == 'd' || f[1] == 'u') {
-					++f;
-				}
+            /* skip the 'l' or 'z' in {%ld, %zd, %lu, %zu} since
+             * they don't affect the amount of space we reserve.
+             */
+            if (*f == 'l') {
+                if (f[1] == 'd' || f[1] == 'u') {
+                    ++f;
+                }
 #ifdef HAVE_LONG_LONG
-				else if (f[1] == 'l' &&
-					 (f[2] == 'd' || f[2] == 'u')) {
-					longlongflag = 1;
-					f += 2;
-				}
+                else if (f[1] == 'l' &&
+                         (f[2] == 'd' || f[2] == 'u')) {
+                    longlongflag = 1;
+                    f += 2;
+                }
 #endif
-			}
-			else if (*f == 'z' && (f[1] == 'd' || f[1] == 'u')) {
-				++f;
-			}
+            }
+            else if (*f == 'z' && (f[1] == 'd' || f[1] == 'u')) {
+                ++f;
+            }
 
-			switch (*f) {
-			case 'c':
-				(void)va_arg(count, int);
-				/* fall through... */
-			case '%':
-				n++;
-				break;
-			case 'd': case 'u': case 'i': case 'x':
-				(void) va_arg(count, int);
+            switch (*f) {
+            case 'c':
+                (void)va_arg(count, int);
+                /* fall through... */
+            case '%':
+                n++;
+                break;
+            case 'd': case 'u': case 'i': case 'x':
+                (void) va_arg(count, int);
 #ifdef HAVE_LONG_LONG
-				/* Need at most
-				   ceil(log10(256)*SIZEOF_LONG_LONG) digits,
-				   plus 1 for the sign.  53/22 is an upper
-				   bound for log10(256). */
-				if (longlongflag)
-					n += 2 + (SIZEOF_LONG_LONG*53-1) / 22;
-				else
+                /* Need at most
+                   ceil(log10(256)*SIZEOF_LONG_LONG) digits,
+                   plus 1 for the sign.  53/22 is an upper
+                   bound for log10(256). */
+                if (longlongflag)
+                    n += 2 + (SIZEOF_LONG_LONG*53-1) / 22;
+                else
 #endif
-					/* 20 bytes is enough to hold a 64-bit
-					   integer.  Decimal takes the most
-					   space.  This isn't enough for
-					   octal. */
-					n += 20;
+                    /* 20 bytes is enough to hold a 64-bit
+                       integer.  Decimal takes the most
+                       space.  This isn't enough for
+                       octal. */
+                    n += 20;
 
-				break;
-			case 's':
-				s = va_arg(count, char*);
-				n += strlen(s);
-				break;
-			case 'p':
-				(void) va_arg(count, int);
-				/* maximum 64-bit pointer representation:
-				 * 0xffffffffffffffff
-				 * so 19 characters is enough.
-				 * XXX I count 18 -- what's the extra for?
-				 */
-				n += 19;
-				break;
-			default:
-				/* if we stumble upon an unknown
-				   formatting code, copy the rest of
-				   the format string to the output
-				   string. (we cannot just skip the
-				   code, since there's no way to know
-				   what's in the argument list) */
-				n += strlen(p);
-				goto expand;
-			}
-		} else
-			n++;
-	}
+                break;
+            case 's':
+                s = va_arg(count, char*);
+                n += strlen(s);
+                break;
+            case 'p':
+                (void) va_arg(count, int);
+                /* maximum 64-bit pointer representation:
+                 * 0xffffffffffffffff
+                 * so 19 characters is enough.
+                 * XXX I count 18 -- what's the extra for?
+                 */
+                n += 19;
+                break;
+            default:
+                /* if we stumble upon an unknown
+                   formatting code, copy the rest of
+                   the format string to the output
+                   string. (we cannot just skip the
+                   code, since there's no way to know
+                   what's in the argument list) */
+                n += strlen(p);
+                goto expand;
+            }
+        } else
+            n++;
+    }
  expand:
-	/* step 2: fill the buffer */
-	/* Since we've analyzed how much space we need for the worst case,
-	   use sprintf directly instead of the slower PyOS_snprintf. */
-	string = PyString_FromStringAndSize(NULL, n);
-	if (!string)
-		return NULL;
+    /* step 2: fill the buffer */
+    /* Since we've analyzed how much space we need for the worst case,
+       use sprintf directly instead of the slower PyOS_snprintf. */
+    string = PyString_FromStringAndSize(NULL, n);
+    if (!string)
+        return NULL;
 
-	s = PyString_AsString(string);
+    s = PyString_AsString(string);
 
-	for (f = format; *f; f++) {
-		if (*f == '%') {
-			const char* p = f++;
-			Py_ssize_t i;
-			int longflag = 0;
+    for (f = format; *f; f++) {
+        if (*f == '%') {
+            const char* p = f++;
+            Py_ssize_t i;
+            int longflag = 0;
 #ifdef HAVE_LONG_LONG
-			int longlongflag = 0;
+            int longlongflag = 0;
 #endif
-			int size_tflag = 0;
-			/* parse the width.precision part (we're only
-			   interested in the precision value, if any) */
-			n = 0;
-			while (isdigit(Py_CHARMASK(*f)))
-				n = (n*10) + *f++ - '0';
-			if (*f == '.') {
-				f++;
-				n = 0;
-				while (isdigit(Py_CHARMASK(*f)))
-					n = (n*10) + *f++ - '0';
-			}
-			while (*f && *f != '%' && !isalpha(Py_CHARMASK(*f)))
-				f++;
-			/* Handle %ld, %lu, %lld and %llu. */
-			if (*f == 'l') {
-				if (f[1] == 'd' || f[1] == 'u') {
-					longflag = 1;
-					++f;
-				}
+            int size_tflag = 0;
+            /* parse the width.precision part (we're only
+               interested in the precision value, if any) */
+            n = 0;
+            while (isdigit(Py_CHARMASK(*f)))
+                n = (n*10) + *f++ - '0';
+            if (*f == '.') {
+                f++;
+                n = 0;
+                while (isdigit(Py_CHARMASK(*f)))
+                    n = (n*10) + *f++ - '0';
+            }
+            while (*f && *f != '%' && !isalpha(Py_CHARMASK(*f)))
+                f++;
+            /* Handle %ld, %lu, %lld and %llu. */
+            if (*f == 'l') {
+                if (f[1] == 'd' || f[1] == 'u') {
+                    longflag = 1;
+                    ++f;
+                }
 #ifdef HAVE_LONG_LONG
-				else if (f[1] == 'l' &&
-					 (f[2] == 'd' || f[2] == 'u')) {
-					longlongflag = 1;
-					f += 2;
-				}
+                else if (f[1] == 'l' &&
+                         (f[2] == 'd' || f[2] == 'u')) {
+                    longlongflag = 1;
+                    f += 2;
+                }
 #endif
-			}
-			/* handle the size_t flag. */
-			else if (*f == 'z' && (f[1] == 'd' || f[1] == 'u')) {
-				size_tflag = 1;
-				++f;
-			}
+            }
+            /* handle the size_t flag. */
+            else if (*f == 'z' && (f[1] == 'd' || f[1] == 'u')) {
+                size_tflag = 1;
+                ++f;
+            }
 
-			switch (*f) {
-			case 'c':
-				*s++ = va_arg(vargs, int);
-				break;
-			case 'd':
-				if (longflag)
-					sprintf(s, "%ld", va_arg(vargs, long));
+            switch (*f) {
+            case 'c':
+                *s++ = va_arg(vargs, int);
+                break;
+            case 'd':
+                if (longflag)
+                    sprintf(s, "%ld", va_arg(vargs, long));
 #ifdef HAVE_LONG_LONG
-				else if (longlongflag)
-					sprintf(s, "%" PY_FORMAT_LONG_LONG "d",
-						va_arg(vargs, PY_LONG_LONG));
+                else if (longlongflag)
+                    sprintf(s, "%" PY_FORMAT_LONG_LONG "d",
+                        va_arg(vargs, PY_LONG_LONG));
 #endif
-				else if (size_tflag)
-					sprintf(s, "%" PY_FORMAT_SIZE_T "d",
-					        va_arg(vargs, Py_ssize_t));
-				else
-					sprintf(s, "%d", va_arg(vargs, int));
-				s += strlen(s);
-				break;
-			case 'u':
-				if (longflag)
-					sprintf(s, "%lu",
-						va_arg(vargs, unsigned long));
+                else if (size_tflag)
+                    sprintf(s, "%" PY_FORMAT_SIZE_T "d",
+                        va_arg(vargs, Py_ssize_t));
+                else
+                    sprintf(s, "%d", va_arg(vargs, int));
+                s += strlen(s);
+                break;
+            case 'u':
+                if (longflag)
+                    sprintf(s, "%lu",
+                        va_arg(vargs, unsigned long));
 #ifdef HAVE_LONG_LONG
-				else if (longlongflag)
-					sprintf(s, "%" PY_FORMAT_LONG_LONG "u",
-						va_arg(vargs, PY_LONG_LONG));
+                else if (longlongflag)
+                    sprintf(s, "%" PY_FORMAT_LONG_LONG "u",
+                        va_arg(vargs, PY_LONG_LONG));
 #endif
-				else if (size_tflag)
-					sprintf(s, "%" PY_FORMAT_SIZE_T "u",
-					        va_arg(vargs, size_t));
-				else
-					sprintf(s, "%u",
-						va_arg(vargs, unsigned int));
-				s += strlen(s);
-				break;
-			case 'i':
-				sprintf(s, "%i", va_arg(vargs, int));
-				s += strlen(s);
-				break;
-			case 'x':
-				sprintf(s, "%x", va_arg(vargs, int));
-				s += strlen(s);
-				break;
-			case 's':
-				p = va_arg(vargs, char*);
-				i = strlen(p);
-				if (n > 0 && i > n)
-					i = n;
-				Py_MEMCPY(s, p, i);
-				s += i;
-				break;
-			case 'p':
-				sprintf(s, "%p", va_arg(vargs, void*));
-				/* %p is ill-defined:  ensure leading 0x. */
-				if (s[1] == 'X')
-					s[1] = 'x';
-				else if (s[1] != 'x') {
-					memmove(s+2, s, strlen(s)+1);
-					s[0] = '0';
-					s[1] = 'x';
-				}
-				s += strlen(s);
-				break;
-			case '%':
-				*s++ = '%';
-				break;
-			default:
-				strcpy(s, p);
-				s += strlen(s);
-				goto end;
-			}
-		} else
-			*s++ = *f;
-	}
+                else if (size_tflag)
+                    sprintf(s, "%" PY_FORMAT_SIZE_T "u",
+                        va_arg(vargs, size_t));
+                else
+                    sprintf(s, "%u",
+                        va_arg(vargs, unsigned int));
+                s += strlen(s);
+                break;
+            case 'i':
+                sprintf(s, "%i", va_arg(vargs, int));
+                s += strlen(s);
+                break;
+            case 'x':
+                sprintf(s, "%x", va_arg(vargs, int));
+                s += strlen(s);
+                break;
+            case 's':
+                p = va_arg(vargs, char*);
+                i = strlen(p);
+                if (n > 0 && i > n)
+                    i = n;
+                Py_MEMCPY(s, p, i);
+                s += i;
+                break;
+            case 'p':
+                sprintf(s, "%p", va_arg(vargs, void*));
+                /* %p is ill-defined:  ensure leading 0x. */
+                if (s[1] == 'X')
+                    s[1] = 'x';
+                else if (s[1] != 'x') {
+                    memmove(s+2, s, strlen(s)+1);
+                    s[0] = '0';
+                    s[1] = 'x';
+                }
+                s += strlen(s);
+                break;
+            case '%':
+                *s++ = '%';
+                break;
+            default:
+                strcpy(s, p);
+                s += strlen(s);
+                goto end;
+            }
+        } else
+            *s++ = *f;
+    }
 
  end:
-	if (_PyString_Resize(&string, s - PyString_AS_STRING(string)))
-		return NULL;
-	return string;
+    if (_PyString_Resize(&string, s - PyString_AS_STRING(string)))
+        return NULL;
+    return string;
 }
 
 PyObject *
 PyString_FromFormat(const char *format, ...)
 {
-	PyObject* ret;
-	va_list vargs;
+    PyObject* ret;
+    va_list vargs;
 
 #ifdef HAVE_STDARG_PROTOTYPES
-	va_start(vargs, format);
+    va_start(vargs, format);
 #else
-	va_start(vargs);
+    va_start(vargs);
 #endif
-	ret = PyString_FromFormatV(format, vargs);
-	va_end(vargs);
-	return ret;
+    ret = PyString_FromFormatV(format, vargs);
+    va_end(vargs);
+    return ret;
 }
 
 
 PyObject *PyString_Decode(const char *s,
-			  Py_ssize_t size,
-			  const char *encoding,
-			  const char *errors)
+                          Py_ssize_t size,
+                          const char *encoding,
+                          const char *errors)
 {
     PyObject *v, *str;
 
     str = PyString_FromStringAndSize(s, size);
     if (str == NULL)
-	return NULL;
+    return NULL;
     v = PyString_AsDecodedString(str, encoding, errors);
     Py_DECREF(str);
     return v;
 }
 
 PyObject *PyString_AsDecodedObject(PyObject *str,
-				   const char *encoding,
-				   const char *errors)
+                                   const char *encoding,
+                                   const char *errors)
 {
     PyObject *v;
 
     if (!PyString_Check(str)) {
-        PyErr_BadArgument();
-        goto onError;
+    PyErr_BadArgument();
+    goto onError;
     }
 
     if (encoding == NULL) {
 #ifdef Py_USING_UNICODE
-	encoding = PyUnicode_GetDefaultEncoding();
+    encoding = PyUnicode_GetDefaultEncoding();
 #else
-	PyErr_SetString(PyExc_ValueError, "no encoding specified");
-	goto onError;
+    PyErr_SetString(PyExc_ValueError, "no encoding specified");
+    goto onError;
 #endif
     }
 
     /* Decode via the codec registry */
     v = PyCodec_Decode(str, encoding, errors);
     if (v == NULL)
-        goto onError;
+    goto onError;
 
     return v;
 
@@ -464,31 +464,31 @@
 }
 
 PyObject *PyString_AsDecodedString(PyObject *str,
-				   const char *encoding,
-				   const char *errors)
+                                   const char *encoding,
+                                   const char *errors)
 {
     PyObject *v;
 
     v = PyString_AsDecodedObject(str, encoding, errors);
     if (v == NULL)
-        goto onError;
+    goto onError;
 
 #ifdef Py_USING_UNICODE
     /* Convert Unicode to a string using the default encoding */
     if (PyUnicode_Check(v)) {
-	PyObject *temp = v;
-	v = PyUnicode_AsEncodedString(v, NULL, NULL);
-	Py_DECREF(temp);
-	if (v == NULL)
-	    goto onError;
+    PyObject *temp = v;
+    v = PyUnicode_AsEncodedString(v, NULL, NULL);
+    Py_DECREF(temp);
+    if (v == NULL)
+        goto onError;
     }
 #endif
     if (!PyString_Check(v)) {
-        PyErr_Format(PyExc_TypeError,
-                     "decoder did not return a string object (type=%.400s)",
-                     Py_TYPE(v)->tp_name);
-        Py_DECREF(v);
-        goto onError;
+    PyErr_Format(PyExc_TypeError,
+                 "decoder did not return a string object (type=%.400s)",
+                 Py_TYPE(v)->tp_name);
+    Py_DECREF(v);
+    goto onError;
     }
 
     return v;
@@ -498,44 +498,44 @@
 }
 
 PyObject *PyString_Encode(const char *s,
-			  Py_ssize_t size,
-			  const char *encoding,
-			  const char *errors)
+                          Py_ssize_t size,
+                          const char *encoding,
+                          const char *errors)
 {
     PyObject *v, *str;
 
     str = PyString_FromStringAndSize(s, size);
     if (str == NULL)
-	return NULL;
+    return NULL;
     v = PyString_AsEncodedString(str, encoding, errors);
     Py_DECREF(str);
     return v;
 }
 
 PyObject *PyString_AsEncodedObject(PyObject *str,
-				   const char *encoding,
-				   const char *errors)
+                                   const char *encoding,
+                                   const char *errors)
 {
     PyObject *v;
 
     if (!PyString_Check(str)) {
-        PyErr_BadArgument();
-        goto onError;
+    PyErr_BadArgument();
+    goto onError;
     }
 
     if (encoding == NULL) {
 #ifdef Py_USING_UNICODE
-	encoding = PyUnicode_GetDefaultEncoding();
+    encoding = PyUnicode_GetDefaultEncoding();
 #else
-	PyErr_SetString(PyExc_ValueError, "no encoding specified");
-	goto onError;
+    PyErr_SetString(PyExc_ValueError, "no encoding specified");
+    goto onError;
 #endif
     }
 
     /* Encode via the codec registry */
     v = PyCodec_Encode(str, encoding, errors);
     if (v == NULL)
-        goto onError;
+    goto onError;
 
     return v;
 
@@ -544,31 +544,31 @@
 }
 
 PyObject *PyString_AsEncodedString(PyObject *str,
-				   const char *encoding,
-				   const char *errors)
+                                   const char *encoding,
+                                   const char *errors)
 {
     PyObject *v;
 
     v = PyString_AsEncodedObject(str, encoding, errors);
     if (v == NULL)
-        goto onError;
+    goto onError;
 
 #ifdef Py_USING_UNICODE
     /* Convert Unicode to a string using the default encoding */
     if (PyUnicode_Check(v)) {
-	PyObject *temp = v;
-	v = PyUnicode_AsEncodedString(v, NULL, NULL);
-	Py_DECREF(temp);
-	if (v == NULL)
-	    goto onError;
+    PyObject *temp = v;
+    v = PyUnicode_AsEncodedString(v, NULL, NULL);
+    Py_DECREF(temp);
+    if (v == NULL)
+        goto onError;
     }
 #endif
     if (!PyString_Check(v)) {
-        PyErr_Format(PyExc_TypeError,
-                     "encoder did not return a string object (type=%.400s)",
-                     Py_TYPE(v)->tp_name);
-        Py_DECREF(v);
-        goto onError;
+    PyErr_Format(PyExc_TypeError,
+                 "encoder did not return a string object (type=%.400s)",
+                 Py_TYPE(v)->tp_name);
+    Py_DECREF(v);
+    goto onError;
     }
 
     return v;
@@ -580,25 +580,25 @@
 static void
 string_dealloc(PyObject *op)
 {
-	switch (PyString_CHECK_INTERNED(op)) {
-		case SSTATE_NOT_INTERNED:
-			break;
+    switch (PyString_CHECK_INTERNED(op)) {
+        case SSTATE_NOT_INTERNED:
+            break;
 
-		case SSTATE_INTERNED_MORTAL:
-			/* revive dead object temporarily for DelItem */
-			Py_REFCNT(op) = 3;
-			if (PyDict_DelItem(interned, op) != 0)
-				Py_FatalError(
-					"deletion of interned string failed");
-			break;
+        case SSTATE_INTERNED_MORTAL:
+            /* revive dead object temporarily for DelItem */
+            Py_REFCNT(op) = 3;
+            if (PyDict_DelItem(interned, op) != 0)
+                Py_FatalError(
+                    "deletion of interned string failed");
+            break;
 
-		case SSTATE_INTERNED_IMMORTAL:
-			Py_FatalError("Immortal interned string died.");
+        case SSTATE_INTERNED_IMMORTAL:
+            Py_FatalError("Immortal interned string died.");
 
-		default:
-			Py_FatalError("Inconsistent interned string state.");
-	}
-	Py_TYPE(op)->tp_free(op);
+        default:
+            Py_FatalError("Inconsistent interned string state.");
+    }
+    Py_TYPE(op)->tp_free(op);
 }
 
 /* Unescape a backslash-escaped string. If unicode is non-zero,
@@ -607,153 +607,153 @@
    specified encoding.  */
 
 PyObject *PyString_DecodeEscape(const char *s,
-				Py_ssize_t len,
-				const char *errors,
-				Py_ssize_t unicode,
-				const char *recode_encoding)
+                                Py_ssize_t len,
+                                const char *errors,
+                                Py_ssize_t unicode,
+                                const char *recode_encoding)
 {
-	int c;
-	char *p, *buf;
-	const char *end;
-	PyObject *v;
-	Py_ssize_t newlen = recode_encoding ? 4*len:len;
-	v = PyString_FromStringAndSize((char *)NULL, newlen);
-	if (v == NULL)
-		return NULL;
-	p = buf = PyString_AsString(v);
-	end = s + len;
-	while (s < end) {
-		if (*s != '\\') {
-		  non_esc:
+    int c;
+    char *p, *buf;
+    const char *end;
+    PyObject *v;
+    Py_ssize_t newlen = recode_encoding ? 4*len:len;
+    v = PyString_FromStringAndSize((char *)NULL, newlen);
+    if (v == NULL)
+        return NULL;
+    p = buf = PyString_AsString(v);
+    end = s + len;
+    while (s < end) {
+        if (*s != '\\') {
+          non_esc:
 #ifdef Py_USING_UNICODE
-			if (recode_encoding && (*s & 0x80)) {
-				PyObject *u, *w;
-				char *r;
-				const char* t;
-				Py_ssize_t rn;
-				t = s;
-				/* Decode non-ASCII bytes as UTF-8. */
-				while (t < end && (*t & 0x80)) t++;
-				u = PyUnicode_DecodeUTF8(s, t - s, errors);
-				if(!u) goto failed;
+            if (recode_encoding && (*s & 0x80)) {
+                PyObject *u, *w;
+                char *r;
+                const char* t;
+                Py_ssize_t rn;
+                t = s;
+                /* Decode non-ASCII bytes as UTF-8. */
+                while (t < end && (*t & 0x80)) t++;
+                u = PyUnicode_DecodeUTF8(s, t - s, errors);
+                if(!u) goto failed;
 
-				/* Recode them in target encoding. */
-				w = PyUnicode_AsEncodedString(
-					u, recode_encoding, errors);
-				Py_DECREF(u);
-				if (!w)	goto failed;
+                /* Recode them in target encoding. */
+                w = PyUnicode_AsEncodedString(
+                    u, recode_encoding, errors);
+                Py_DECREF(u);
+                if (!w)                 goto failed;
 
-				/* Append bytes to output buffer. */
-				assert(PyString_Check(w));
-				r = PyString_AS_STRING(w);
-				rn = PyString_GET_SIZE(w);
-				Py_MEMCPY(p, r, rn);
-				p += rn;
-				Py_DECREF(w);
-				s = t;
-			} else {
-				*p++ = *s++;
-			}
+                /* Append bytes to output buffer. */
+                assert(PyString_Check(w));
+                r = PyString_AS_STRING(w);
+                rn = PyString_GET_SIZE(w);
+                Py_MEMCPY(p, r, rn);
+                p += rn;
+                Py_DECREF(w);
+                s = t;
+            } else {
+                *p++ = *s++;
+            }
 #else
-			*p++ = *s++;
+            *p++ = *s++;
 #endif
-			continue;
-		}
-		s++;
-                if (s==end) {
-			PyErr_SetString(PyExc_ValueError,
-					"Trailing \\ in string");
-			goto failed;
-		}
-		switch (*s++) {
-		/* XXX This assumes ASCII! */
-		case '\n': break;
-		case '\\': *p++ = '\\'; break;
-		case '\'': *p++ = '\''; break;
-		case '\"': *p++ = '\"'; break;
-		case 'b': *p++ = '\b'; break;
-		case 'f': *p++ = '\014'; break; /* FF */
-		case 't': *p++ = '\t'; break;
-		case 'n': *p++ = '\n'; break;
-		case 'r': *p++ = '\r'; break;
-		case 'v': *p++ = '\013'; break; /* VT */
-		case 'a': *p++ = '\007'; break; /* BEL, not classic C */
-		case '0': case '1': case '2': case '3':
-		case '4': case '5': case '6': case '7':
-			c = s[-1] - '0';
-			if (s < end && '0' <= *s && *s <= '7') {
-				c = (c<<3) + *s++ - '0';
-				if (s < end && '0' <= *s && *s <= '7')
-					c = (c<<3) + *s++ - '0';
-			}
-			*p++ = c;
-			break;
-		case 'x':
-			if (s+1 < end &&
-                            isxdigit(Py_CHARMASK(s[0])) &&
-			    isxdigit(Py_CHARMASK(s[1])))
-                        {
-				unsigned int x = 0;
-				c = Py_CHARMASK(*s);
-				s++;
-				if (isdigit(c))
-					x = c - '0';
-				else if (islower(c))
-					x = 10 + c - 'a';
-				else
-					x = 10 + c - 'A';
-				x = x << 4;
-				c = Py_CHARMASK(*s);
-				s++;
-				if (isdigit(c))
-					x += c - '0';
-				else if (islower(c))
-					x += 10 + c - 'a';
-				else
-					x += 10 + c - 'A';
-				*p++ = x;
-				break;
-			}
-			if (!errors || strcmp(errors, "strict") == 0) {
-				PyErr_SetString(PyExc_ValueError,
-						"invalid \\x escape");
-				goto failed;
-			}
-			if (strcmp(errors, "replace") == 0) {
-				*p++ = '?';
-			} else if (strcmp(errors, "ignore") == 0)
-				/* do nothing */;
-			else {
-				PyErr_Format(PyExc_ValueError,
-					     "decoding error; "
-					     "unknown error handling code: %.400s",
-					     errors);
-				goto failed;
-			}
+            continue;
+        }
+        s++;
+        if (s==end) {
+            PyErr_SetString(PyExc_ValueError,
+                            "Trailing \\ in string");
+            goto failed;
+        }
+        switch (*s++) {
+        /* XXX This assumes ASCII! */
+        case '\n': break;
+        case '\\': *p++ = '\\'; break;
+        case '\'': *p++ = '\''; break;
+        case '\"': *p++ = '\"'; break;
+        case 'b': *p++ = '\b'; break;
+        case 'f': *p++ = '\014'; break; /* FF */
+        case 't': *p++ = '\t'; break;
+        case 'n': *p++ = '\n'; break;
+        case 'r': *p++ = '\r'; break;
+        case 'v': *p++ = '\013'; break; /* VT */
+        case 'a': *p++ = '\007'; break; /* BEL, not classic C */
+        case '0': case '1': case '2': case '3':
+        case '4': case '5': case '6': case '7':
+            c = s[-1] - '0';
+            if (s < end && '0' <= *s && *s <= '7') {
+                c = (c<<3) + *s++ - '0';
+                if (s < end && '0' <= *s && *s <= '7')
+                    c = (c<<3) + *s++ - '0';
+            }
+            *p++ = c;
+            break;
+        case 'x':
+            if (s+1 < end &&
+                isxdigit(Py_CHARMASK(s[0])) &&
+                isxdigit(Py_CHARMASK(s[1])))
+            {
+                unsigned int x = 0;
+                c = Py_CHARMASK(*s);
+                s++;
+                if (isdigit(c))
+                    x = c - '0';
+                else if (islower(c))
+                    x = 10 + c - 'a';
+                else
+                    x = 10 + c - 'A';
+                x = x << 4;
+                c = Py_CHARMASK(*s);
+                s++;
+                if (isdigit(c))
+                    x += c - '0';
+                else if (islower(c))
+                    x += 10 + c - 'a';
+                else
+                    x += 10 + c - 'A';
+                *p++ = x;
+                break;
+            }
+            if (!errors || strcmp(errors, "strict") == 0) {
+                PyErr_SetString(PyExc_ValueError,
+                                "invalid \\x escape");
+                goto failed;
+            }
+            if (strcmp(errors, "replace") == 0) {
+                *p++ = '?';
+            } else if (strcmp(errors, "ignore") == 0)
+                /* do nothing */;
+            else {
+                PyErr_Format(PyExc_ValueError,
+                             "decoding error; "
+                             "unknown error handling code: %.400s",
+                             errors);
+                goto failed;
+            }
 #ifndef Py_USING_UNICODE
-		case 'u':
-		case 'U':
-		case 'N':
-			if (unicode) {
-				PyErr_SetString(PyExc_ValueError,
-					  "Unicode escapes not legal "
-					  "when Unicode disabled");
-				goto failed;
-			}
+        case 'u':
+        case 'U':
+        case 'N':
+            if (unicode) {
+                PyErr_SetString(PyExc_ValueError,
+                          "Unicode escapes not legal "
+                          "when Unicode disabled");
+                goto failed;
+            }
 #endif
-		default:
-			*p++ = '\\';
-			s--;
-			goto non_esc; /* an arbitry number of unescaped
-					 UTF-8 bytes may follow. */
-		}
-	}
-	if (p-buf < newlen && _PyString_Resize(&v, p - buf))
-		goto failed;
-	return v;
+        default:
+            *p++ = '\\';
+            s--;
+            goto non_esc; /* an arbitry number of unescaped
+                             UTF-8 bytes may follow. */
+        }
+    }
+    if (p-buf < newlen && _PyString_Resize(&v, p - buf))
+        goto failed;
+    return v;
   failed:
-	Py_DECREF(v);
-	return NULL;
+    Py_DECREF(v);
+    return NULL;
 }
 
 /* -------------------------------------------------------------------- */
@@ -762,75 +762,75 @@
 static Py_ssize_t
 string_getsize(register PyObject *op)
 {
-    	char *s;
-    	Py_ssize_t len;
-	if (PyString_AsStringAndSize(op, &s, &len))
-		return -1;
-	return len;
+    char *s;
+    Py_ssize_t len;
+    if (PyString_AsStringAndSize(op, &s, &len))
+        return -1;
+    return len;
 }
 
 static /*const*/ char *
 string_getbuffer(register PyObject *op)
 {
-    	char *s;
-    	Py_ssize_t len;
-	if (PyString_AsStringAndSize(op, &s, &len))
-		return NULL;
-	return s;
+    char *s;
+    Py_ssize_t len;
+    if (PyString_AsStringAndSize(op, &s, &len))
+        return NULL;
+    return s;
 }
 
 Py_ssize_t
 PyString_Size(register PyObject *op)
 {
-	if (!PyString_Check(op))
-		return string_getsize(op);
-	return Py_SIZE(op);
+    if (!PyString_Check(op))
+        return string_getsize(op);
+    return Py_SIZE(op);
 }
 
 /*const*/ char *
 PyString_AsString(register PyObject *op)
 {
-	if (!PyString_Check(op))
-		return string_getbuffer(op);
-	return ((PyStringObject *)op) -> ob_sval;
+    if (!PyString_Check(op))
+        return string_getbuffer(op);
+    return ((PyStringObject *)op) -> ob_sval;
 }
 
 int
 PyString_AsStringAndSize(register PyObject *obj,
-			 register char **s,
-			 register Py_ssize_t *len)
+                         register char **s,
+                         register Py_ssize_t *len)
 {
-	if (s == NULL) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
+    if (s == NULL) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
 
-	if (!PyString_Check(obj)) {
+    if (!PyString_Check(obj)) {
 #ifdef Py_USING_UNICODE
-		if (PyUnicode_Check(obj)) {
-			obj = _PyUnicode_AsDefaultEncodedString(obj, NULL);
-			if (obj == NULL)
-				return -1;
-		}
-		else
+        if (PyUnicode_Check(obj)) {
+            obj = _PyUnicode_AsDefaultEncodedString(obj, NULL);
+            if (obj == NULL)
+                return -1;
+        }
+        else
 #endif
-		{
-			PyErr_Format(PyExc_TypeError,
-				     "expected string or Unicode object, "
-				     "%.200s found", Py_TYPE(obj)->tp_name);
-			return -1;
-		}
-	}
+        {
+            PyErr_Format(PyExc_TypeError,
+                         "expected string or Unicode object, "
+                         "%.200s found", Py_TYPE(obj)->tp_name);
+            return -1;
+        }
+    }
 
-	*s = PyString_AS_STRING(obj);
-	if (len != NULL)
-		*len = PyString_GET_SIZE(obj);
-	else if (strlen(*s) != (size_t)PyString_GET_SIZE(obj)) {
-		PyErr_SetString(PyExc_TypeError,
-				"expected string without null bytes");
-		return -1;
-	}
-	return 0;
+    *s = PyString_AS_STRING(obj);
+    if (len != NULL)
+        *len = PyString_GET_SIZE(obj);
+    else if (strlen(*s) != (size_t)PyString_GET_SIZE(obj)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "expected string without null bytes");
+        return -1;
+    }
+    return 0;
 }
 
 /* -------------------------------------------------------------------- */
@@ -852,568 +852,568 @@
 static int
 string_print(PyStringObject *op, FILE *fp, int flags)
 {
-	Py_ssize_t i, str_len;
-	char c;
-	int quote;
+    Py_ssize_t i, str_len;
+    char c;
+    int quote;
 
-	/* XXX Ought to check for interrupts when writing long strings */
-	if (! PyString_CheckExact(op)) {
-		int ret;
-		/* A str subclass may have its own __str__ method. */
-		op = (PyStringObject *) PyObject_Str((PyObject *)op);
-		if (op == NULL)
-			return -1;
-		ret = string_print(op, fp, flags);
-		Py_DECREF(op);
-		return ret;
-	}
-	if (flags & Py_PRINT_RAW) {
-		char *data = op->ob_sval;
-		Py_ssize_t size = Py_SIZE(op);
-		Py_BEGIN_ALLOW_THREADS
-		while (size > INT_MAX) {
-			/* Very long strings cannot be written atomically.
-			 * But don't write exactly INT_MAX bytes at a time
-			 * to avoid memory aligment issues.
-			 */
-			const int chunk_size = INT_MAX & ~0x3FFF;
-			fwrite(data, 1, chunk_size, fp);
-			data += chunk_size;
-			size -= chunk_size;
-		}
+    /* XXX Ought to check for interrupts when writing long strings */
+    if (! PyString_CheckExact(op)) {
+        int ret;
+        /* A str subclass may have its own __str__ method. */
+        op = (PyStringObject *) PyObject_Str((PyObject *)op);
+        if (op == NULL)
+            return -1;
+        ret = string_print(op, fp, flags);
+        Py_DECREF(op);
+        return ret;
+    }
+    if (flags & Py_PRINT_RAW) {
+        char *data = op->ob_sval;
+        Py_ssize_t size = Py_SIZE(op);
+        Py_BEGIN_ALLOW_THREADS
+        while (size > INT_MAX) {
+            /* Very long strings cannot be written atomically.
+             * But don't write exactly INT_MAX bytes at a time
+             * to avoid memory aligment issues.
+             */
+            const int chunk_size = INT_MAX & ~0x3FFF;
+            fwrite(data, 1, chunk_size, fp);
+            data += chunk_size;
+            size -= chunk_size;
+        }
 #ifdef __VMS
-                if (size) fwrite(data, (int)size, 1, fp);
+        if (size) fwrite(data, (int)size, 1, fp);
 #else
-                fwrite(data, 1, (int)size, fp);
+        fwrite(data, 1, (int)size, fp);
 #endif
-		Py_END_ALLOW_THREADS
-		return 0;
-	}
+        Py_END_ALLOW_THREADS
+        return 0;
+    }
 
-	/* figure out which quote to use; single is preferred */
-	quote = '\'';
-	if (memchr(op->ob_sval, '\'', Py_SIZE(op)) &&
-	    !memchr(op->ob_sval, '"', Py_SIZE(op)))
-		quote = '"';
+    /* figure out which quote to use; single is preferred */
+    quote = '\'';
+    if (memchr(op->ob_sval, '\'', Py_SIZE(op)) &&
+        !memchr(op->ob_sval, '"', Py_SIZE(op)))
+        quote = '"';
 
-	str_len = Py_SIZE(op);
-	Py_BEGIN_ALLOW_THREADS
-	fputc(quote, fp);
-	for (i = 0; i < str_len; i++) {
-		/* Since strings are immutable and the caller should have a
-		reference, accessing the interal buffer should not be an issue
-		with the GIL released. */
-		c = op->ob_sval[i];
-		if (c == quote || c == '\\')
-			fprintf(fp, "\\%c", c);
-                else if (c == '\t')
-                        fprintf(fp, "\\t");
-                else if (c == '\n')
-                        fprintf(fp, "\\n");
-                else if (c == '\r')
-                        fprintf(fp, "\\r");
-		else if (c < ' ' || c >= 0x7f)
-			fprintf(fp, "\\x%02x", c & 0xff);
-		else
-			fputc(c, fp);
-	}
-	fputc(quote, fp);
-	Py_END_ALLOW_THREADS
-	return 0;
+    str_len = Py_SIZE(op);
+    Py_BEGIN_ALLOW_THREADS
+    fputc(quote, fp);
+    for (i = 0; i < str_len; i++) {
+        /* Since strings are immutable and the caller should have a
+        reference, accessing the interal buffer should not be an issue
+        with the GIL released. */
+        c = op->ob_sval[i];
+        if (c == quote || c == '\\')
+            fprintf(fp, "\\%c", c);
+        else if (c == '\t')
+            fprintf(fp, "\\t");
+        else if (c == '\n')
+            fprintf(fp, "\\n");
+        else if (c == '\r')
+            fprintf(fp, "\\r");
+        else if (c < ' ' || c >= 0x7f)
+            fprintf(fp, "\\x%02x", c & 0xff);
+        else
+            fputc(c, fp);
+    }
+    fputc(quote, fp);
+    Py_END_ALLOW_THREADS
+    return 0;
 }
 
 PyObject *
 PyString_Repr(PyObject *obj, int smartquotes)
 {
-	register PyStringObject* op = (PyStringObject*) obj;
-	size_t newsize = 2 + 4 * Py_SIZE(op);
-	PyObject *v;
-	if (newsize > PY_SSIZE_T_MAX || newsize / 4 != Py_SIZE(op)) {
-		PyErr_SetString(PyExc_OverflowError,
-			"string is too large to make repr");
-                return NULL;
-	}
-	v = PyString_FromStringAndSize((char *)NULL, newsize);
-	if (v == NULL) {
-		return NULL;
-	}
-	else {
-		register Py_ssize_t i;
-		register char c;
-		register char *p;
-		int quote;
+    register PyStringObject* op = (PyStringObject*) obj;
+    size_t newsize = 2 + 4 * Py_SIZE(op);
+    PyObject *v;
+    if (newsize > PY_SSIZE_T_MAX || newsize / 4 != Py_SIZE(op)) {
+        PyErr_SetString(PyExc_OverflowError,
+            "string is too large to make repr");
+        return NULL;
+    }
+    v = PyString_FromStringAndSize((char *)NULL, newsize);
+    if (v == NULL) {
+        return NULL;
+    }
+    else {
+        register Py_ssize_t i;
+        register char c;
+        register char *p;
+        int quote;
 
-		/* figure out which quote to use; single is preferred */
-		quote = '\'';
-		if (smartquotes &&
-		    memchr(op->ob_sval, '\'', Py_SIZE(op)) &&
-		    !memchr(op->ob_sval, '"', Py_SIZE(op)))
-			quote = '"';
+        /* figure out which quote to use; single is preferred */
+        quote = '\'';
+        if (smartquotes &&
+            memchr(op->ob_sval, '\'', Py_SIZE(op)) &&
+            !memchr(op->ob_sval, '"', Py_SIZE(op)))
+            quote = '"';
 
-		p = PyString_AS_STRING(v);
-		*p++ = quote;
-		for (i = 0; i < Py_SIZE(op); i++) {
-			/* There's at least enough room for a hex escape
-			   and a closing quote. */
-			assert(newsize - (p - PyString_AS_STRING(v)) >= 5);
-			c = op->ob_sval[i];
-			if (c == quote || c == '\\')
-				*p++ = '\\', *p++ = c;
-			else if (c == '\t')
-				*p++ = '\\', *p++ = 't';
-			else if (c == '\n')
-				*p++ = '\\', *p++ = 'n';
-			else if (c == '\r')
-				*p++ = '\\', *p++ = 'r';
-			else if (c < ' ' || c >= 0x7f) {
-				/* For performance, we don't want to call
-				   PyOS_snprintf here (extra layers of
-				   function call). */
-				sprintf(p, "\\x%02x", c & 0xff);
-                                p += 4;
-			}
-			else
-				*p++ = c;
-		}
-		assert(newsize - (p - PyString_AS_STRING(v)) >= 1);
-		*p++ = quote;
-		*p = '\0';
-		if (_PyString_Resize(&v, (p - PyString_AS_STRING(v))))
-			return NULL;
-		return v;
-	}
+        p = PyString_AS_STRING(v);
+        *p++ = quote;
+        for (i = 0; i < Py_SIZE(op); i++) {
+            /* There's at least enough room for a hex escape
+               and a closing quote. */
+            assert(newsize - (p - PyString_AS_STRING(v)) >= 5);
+            c = op->ob_sval[i];
+            if (c == quote || c == '\\')
+                *p++ = '\\', *p++ = c;
+            else if (c == '\t')
+                *p++ = '\\', *p++ = 't';
+            else if (c == '\n')
+                *p++ = '\\', *p++ = 'n';
+            else if (c == '\r')
+                *p++ = '\\', *p++ = 'r';
+            else if (c < ' ' || c >= 0x7f) {
+                /* For performance, we don't want to call
+                   PyOS_snprintf here (extra layers of
+                   function call). */
+                sprintf(p, "\\x%02x", c & 0xff);
+                p += 4;
+            }
+            else
+                *p++ = c;
+        }
+        assert(newsize - (p - PyString_AS_STRING(v)) >= 1);
+        *p++ = quote;
+        *p = '\0';
+        if (_PyString_Resize(&v, (p - PyString_AS_STRING(v))))
+            return NULL;
+        return v;
+    }
 }
 
 static PyObject *
 string_repr(PyObject *op)
 {
-	return PyString_Repr(op, 1);
+    return PyString_Repr(op, 1);
 }
 
 static PyObject *
 string_str(PyObject *s)
 {
-	assert(PyString_Check(s));
-	if (PyString_CheckExact(s)) {
-		Py_INCREF(s);
-		return s;
-	}
-	else {
-		/* Subtype -- return genuine string with the same value. */
-		PyStringObject *t = (PyStringObject *) s;
-		return PyString_FromStringAndSize(t->ob_sval, Py_SIZE(t));
-	}
+    assert(PyString_Check(s));
+    if (PyString_CheckExact(s)) {
+        Py_INCREF(s);
+        return s;
+    }
+    else {
+        /* Subtype -- return genuine string with the same value. */
+        PyStringObject *t = (PyStringObject *) s;
+        return PyString_FromStringAndSize(t->ob_sval, Py_SIZE(t));
+    }
 }
 
 static Py_ssize_t
 string_length(PyStringObject *a)
 {
-	return Py_SIZE(a);
+    return Py_SIZE(a);
 }
 
 static PyObject *
 string_concat(register PyStringObject *a, register PyObject *bb)
 {
-	register Py_ssize_t size;
-	register PyStringObject *op;
-	if (!PyString_Check(bb)) {
+    register Py_ssize_t size;
+    register PyStringObject *op;
+    if (!PyString_Check(bb)) {
 #ifdef Py_USING_UNICODE
-		if (PyUnicode_Check(bb))
-		    return PyUnicode_Concat((PyObject *)a, bb);
+        if (PyUnicode_Check(bb))
+            return PyUnicode_Concat((PyObject *)a, bb);
 #endif
-		if (PyByteArray_Check(bb))
-		    return PyByteArray_Concat((PyObject *)a, bb);
-		PyErr_Format(PyExc_TypeError,
-			     "cannot concatenate 'str' and '%.200s' objects",
-			     Py_TYPE(bb)->tp_name);
-		return NULL;
-	}
+        if (PyByteArray_Check(bb))
+            return PyByteArray_Concat((PyObject *)a, bb);
+        PyErr_Format(PyExc_TypeError,
+                     "cannot concatenate 'str' and '%.200s' objects",
+                     Py_TYPE(bb)->tp_name);
+        return NULL;
+    }
 #define b ((PyStringObject *)bb)
-	/* Optimize cases with empty left or right operand */
-	if ((Py_SIZE(a) == 0 || Py_SIZE(b) == 0) &&
-	    PyString_CheckExact(a) && PyString_CheckExact(b)) {
-		if (Py_SIZE(a) == 0) {
-			Py_INCREF(bb);
-			return bb;
-		}
-		Py_INCREF(a);
-		return (PyObject *)a;
-	}
-	size = Py_SIZE(a) + Py_SIZE(b);
-	/* Check that string sizes are not negative, to prevent an
-	   overflow in cases where we are passed incorrectly-created
-	   strings with negative lengths (due to a bug in other code).
-        */
-	if (Py_SIZE(a) < 0 || Py_SIZE(b) < 0 ||
-	    Py_SIZE(a) > PY_SSIZE_T_MAX - Py_SIZE(b)) {
-		PyErr_SetString(PyExc_OverflowError,
-				"strings are too large to concat");
-		return NULL;
-	}
+    /* Optimize cases with empty left or right operand */
+    if ((Py_SIZE(a) == 0 || Py_SIZE(b) == 0) &&
+        PyString_CheckExact(a) && PyString_CheckExact(b)) {
+        if (Py_SIZE(a) == 0) {
+            Py_INCREF(bb);
+            return bb;
+        }
+        Py_INCREF(a);
+        return (PyObject *)a;
+    }
+    size = Py_SIZE(a) + Py_SIZE(b);
+    /* Check that string sizes are not negative, to prevent an
+       overflow in cases where we are passed incorrectly-created
+       strings with negative lengths (due to a bug in other code).
+    */
+    if (Py_SIZE(a) < 0 || Py_SIZE(b) < 0 ||
+        Py_SIZE(a) > PY_SSIZE_T_MAX - Py_SIZE(b)) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "strings are too large to concat");
+        return NULL;
+    }
 
-	/* Inline PyObject_NewVar */
-	if (size > PY_SSIZE_T_MAX - PyStringObject_SIZE) {
-		PyErr_SetString(PyExc_OverflowError,
-				"strings are too large to concat");
-		return NULL;
-	}
-	op = (PyStringObject *)PyObject_MALLOC(PyStringObject_SIZE + size);
-	if (op == NULL)
-		return PyErr_NoMemory();
-	PyObject_INIT_VAR(op, &PyString_Type, size);
-	op->ob_shash = -1;
-	op->ob_sstate = SSTATE_NOT_INTERNED;
-	Py_MEMCPY(op->ob_sval, a->ob_sval, Py_SIZE(a));
-	Py_MEMCPY(op->ob_sval + Py_SIZE(a), b->ob_sval, Py_SIZE(b));
-	op->ob_sval[size] = '\0';
-	return (PyObject *) op;
+    /* Inline PyObject_NewVar */
+    if (size > PY_SSIZE_T_MAX - PyStringObject_SIZE) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "strings are too large to concat");
+        return NULL;
+    }
+    op = (PyStringObject *)PyObject_MALLOC(PyStringObject_SIZE + size);
+    if (op == NULL)
+        return PyErr_NoMemory();
+    PyObject_INIT_VAR(op, &PyString_Type, size);
+    op->ob_shash = -1;
+    op->ob_sstate = SSTATE_NOT_INTERNED;
+    Py_MEMCPY(op->ob_sval, a->ob_sval, Py_SIZE(a));
+    Py_MEMCPY(op->ob_sval + Py_SIZE(a), b->ob_sval, Py_SIZE(b));
+    op->ob_sval[size] = '\0';
+    return (PyObject *) op;
 #undef b
 }
 
 static PyObject *
 string_repeat(register PyStringObject *a, register Py_ssize_t n)
 {
-	register Py_ssize_t i;
-	register Py_ssize_t j;
-	register Py_ssize_t size;
-	register PyStringObject *op;
-	size_t nbytes;
-	if (n < 0)
-		n = 0;
-	/* watch out for overflows:  the size can overflow int,
-	 * and the # of bytes needed can overflow size_t
-	 */
-	size = Py_SIZE(a) * n;
-	if (n && size / n != Py_SIZE(a)) {
-		PyErr_SetString(PyExc_OverflowError,
-			"repeated string is too long");
-		return NULL;
-	}
-	if (size == Py_SIZE(a) && PyString_CheckExact(a)) {
-		Py_INCREF(a);
-		return (PyObject *)a;
-	}
-	nbytes = (size_t)size;
-	if (nbytes + PyStringObject_SIZE <= nbytes) {
-		PyErr_SetString(PyExc_OverflowError,
-			"repeated string is too long");
-		return NULL;
-	}
-	op = (PyStringObject *)PyObject_MALLOC(PyStringObject_SIZE + nbytes);
-	if (op == NULL)
-		return PyErr_NoMemory();
-	PyObject_INIT_VAR(op, &PyString_Type, size);
-	op->ob_shash = -1;
-	op->ob_sstate = SSTATE_NOT_INTERNED;
-	op->ob_sval[size] = '\0';
-	if (Py_SIZE(a) == 1 && n > 0) {
-		memset(op->ob_sval, a->ob_sval[0] , n);
-		return (PyObject *) op;
-	}
-	i = 0;
-	if (i < size) {
-		Py_MEMCPY(op->ob_sval, a->ob_sval, Py_SIZE(a));
-		i = Py_SIZE(a);
-	}
-	while (i < size) {
-		j = (i <= size-i)  ?  i  :  size-i;
-		Py_MEMCPY(op->ob_sval+i, op->ob_sval, j);
-		i += j;
-	}
-	return (PyObject *) op;
+    register Py_ssize_t i;
+    register Py_ssize_t j;
+    register Py_ssize_t size;
+    register PyStringObject *op;
+    size_t nbytes;
+    if (n < 0)
+        n = 0;
+    /* watch out for overflows:  the size can overflow int,
+     * and the # of bytes needed can overflow size_t
+     */
+    size = Py_SIZE(a) * n;
+    if (n && size / n != Py_SIZE(a)) {
+        PyErr_SetString(PyExc_OverflowError,
+            "repeated string is too long");
+        return NULL;
+    }
+    if (size == Py_SIZE(a) && PyString_CheckExact(a)) {
+        Py_INCREF(a);
+        return (PyObject *)a;
+    }
+    nbytes = (size_t)size;
+    if (nbytes + PyStringObject_SIZE <= nbytes) {
+        PyErr_SetString(PyExc_OverflowError,
+            "repeated string is too long");
+        return NULL;
+    }
+    op = (PyStringObject *)PyObject_MALLOC(PyStringObject_SIZE + nbytes);
+    if (op == NULL)
+        return PyErr_NoMemory();
+    PyObject_INIT_VAR(op, &PyString_Type, size);
+    op->ob_shash = -1;
+    op->ob_sstate = SSTATE_NOT_INTERNED;
+    op->ob_sval[size] = '\0';
+    if (Py_SIZE(a) == 1 && n > 0) {
+        memset(op->ob_sval, a->ob_sval[0] , n);
+        return (PyObject *) op;
+    }
+    i = 0;
+    if (i < size) {
+        Py_MEMCPY(op->ob_sval, a->ob_sval, Py_SIZE(a));
+        i = Py_SIZE(a);
+    }
+    while (i < size) {
+        j = (i <= size-i)  ?  i  :  size-i;
+        Py_MEMCPY(op->ob_sval+i, op->ob_sval, j);
+        i += j;
+    }
+    return (PyObject *) op;
 }
 
 /* String slice a[i:j] consists of characters a[i] ... a[j-1] */
 
 static PyObject *
 string_slice(register PyStringObject *a, register Py_ssize_t i,
-	     register Py_ssize_t j)
+             register Py_ssize_t j)
      /* j -- may be negative! */
 {
-	if (i < 0)
-		i = 0;
-	if (j < 0)
-		j = 0; /* Avoid signed/unsigned bug in next line */
-	if (j > Py_SIZE(a))
-		j = Py_SIZE(a);
-	if (i == 0 && j == Py_SIZE(a) && PyString_CheckExact(a)) {
-		/* It's the same as a */
-		Py_INCREF(a);
-		return (PyObject *)a;
-	}
-	if (j < i)
-		j = i;
-	return PyString_FromStringAndSize(a->ob_sval + i, j-i);
+    if (i < 0)
+        i = 0;
+    if (j < 0)
+        j = 0; /* Avoid signed/unsigned bug in next line */
+    if (j > Py_SIZE(a))
+        j = Py_SIZE(a);
+    if (i == 0 && j == Py_SIZE(a) && PyString_CheckExact(a)) {
+        /* It's the same as a */
+        Py_INCREF(a);
+        return (PyObject *)a;
+    }
+    if (j < i)
+        j = i;
+    return PyString_FromStringAndSize(a->ob_sval + i, j-i);
 }
 
 static int
 string_contains(PyObject *str_obj, PyObject *sub_obj)
 {
-	if (!PyString_CheckExact(sub_obj)) {
+    if (!PyString_CheckExact(sub_obj)) {
 #ifdef Py_USING_UNICODE
-		if (PyUnicode_Check(sub_obj))
-			return PyUnicode_Contains(str_obj, sub_obj);
+        if (PyUnicode_Check(sub_obj))
+            return PyUnicode_Contains(str_obj, sub_obj);
 #endif
-		if (!PyString_Check(sub_obj)) {
-			PyErr_Format(PyExc_TypeError,
-			    "'in <string>' requires string as left operand, "
-			    "not %.200s", Py_TYPE(sub_obj)->tp_name);
-			return -1;
-		}
-	}
+        if (!PyString_Check(sub_obj)) {
+            PyErr_Format(PyExc_TypeError,
+                "'in <string>' requires string as left operand, "
+                "not %.200s", Py_TYPE(sub_obj)->tp_name);
+            return -1;
+        }
+    }
 
-	return stringlib_contains_obj(str_obj, sub_obj);
+    return stringlib_contains_obj(str_obj, sub_obj);
 }
 
 static PyObject *
 string_item(PyStringObject *a, register Py_ssize_t i)
 {
-	char pchar;
-	PyObject *v;
-	if (i < 0 || i >= Py_SIZE(a)) {
-		PyErr_SetString(PyExc_IndexError, "string index out of range");
-		return NULL;
-	}
-	pchar = a->ob_sval[i];
-	v = (PyObject *)characters[pchar & UCHAR_MAX];
-	if (v == NULL)
-		v = PyString_FromStringAndSize(&pchar, 1);
-	else {
+    char pchar;
+    PyObject *v;
+    if (i < 0 || i >= Py_SIZE(a)) {
+        PyErr_SetString(PyExc_IndexError, "string index out of range");
+        return NULL;
+    }
+    pchar = a->ob_sval[i];
+    v = (PyObject *)characters[pchar & UCHAR_MAX];
+    if (v == NULL)
+        v = PyString_FromStringAndSize(&pchar, 1);
+    else {
 #ifdef COUNT_ALLOCS
-		one_strings++;
+        one_strings++;
 #endif
-		Py_INCREF(v);
-	}
-	return v;
+        Py_INCREF(v);
+    }
+    return v;
 }
 
 static PyObject*
 string_richcompare(PyStringObject *a, PyStringObject *b, int op)
 {
-	int c;
-	Py_ssize_t len_a, len_b;
-	Py_ssize_t min_len;
-	PyObject *result;
+    int c;
+    Py_ssize_t len_a, len_b;
+    Py_ssize_t min_len;
+    PyObject *result;
 
-	/* Make sure both arguments are strings. */
-	if (!(PyString_Check(a) && PyString_Check(b))) {
-		result = Py_NotImplemented;
-		goto out;
-	}
-	if (a == b) {
-		switch (op) {
-		case Py_EQ:case Py_LE:case Py_GE:
-			result = Py_True;
-			goto out;
-		case Py_NE:case Py_LT:case Py_GT:
-			result = Py_False;
-			goto out;
-		}
-	}
-	if (op == Py_EQ) {
-		/* Supporting Py_NE here as well does not save
-		   much time, since Py_NE is rarely used.  */
-		if (Py_SIZE(a) == Py_SIZE(b)
-		    && (a->ob_sval[0] == b->ob_sval[0]
-			&& memcmp(a->ob_sval, b->ob_sval, Py_SIZE(a)) == 0)) {
-			result = Py_True;
-		} else {
-			result = Py_False;
-		}
-		goto out;
-	}
-	len_a = Py_SIZE(a); len_b = Py_SIZE(b);
-	min_len = (len_a < len_b) ? len_a : len_b;
-	if (min_len > 0) {
-		c = Py_CHARMASK(*a->ob_sval) - Py_CHARMASK(*b->ob_sval);
-		if (c==0)
-			c = memcmp(a->ob_sval, b->ob_sval, min_len);
-	} else
-		c = 0;
-	if (c == 0)
-		c = (len_a < len_b) ? -1 : (len_a > len_b) ? 1 : 0;
-	switch (op) {
-	case Py_LT: c = c <  0; break;
-	case Py_LE: c = c <= 0; break;
-	case Py_EQ: assert(0);  break; /* unreachable */
-	case Py_NE: c = c != 0; break;
-	case Py_GT: c = c >  0; break;
-	case Py_GE: c = c >= 0; break;
-	default:
-		result = Py_NotImplemented;
-		goto out;
-	}
-	result = c ? Py_True : Py_False;
+    /* Make sure both arguments are strings. */
+    if (!(PyString_Check(a) && PyString_Check(b))) {
+        result = Py_NotImplemented;
+        goto out;
+    }
+    if (a == b) {
+        switch (op) {
+        case Py_EQ:case Py_LE:case Py_GE:
+            result = Py_True;
+            goto out;
+        case Py_NE:case Py_LT:case Py_GT:
+            result = Py_False;
+            goto out;
+        }
+    }
+    if (op == Py_EQ) {
+        /* Supporting Py_NE here as well does not save
+           much time, since Py_NE is rarely used.  */
+        if (Py_SIZE(a) == Py_SIZE(b)
+            && (a->ob_sval[0] == b->ob_sval[0]
+            && memcmp(a->ob_sval, b->ob_sval, Py_SIZE(a)) == 0)) {
+            result = Py_True;
+        } else {
+            result = Py_False;
+        }
+        goto out;
+    }
+    len_a = Py_SIZE(a); len_b = Py_SIZE(b);
+    min_len = (len_a < len_b) ? len_a : len_b;
+    if (min_len > 0) {
+        c = Py_CHARMASK(*a->ob_sval) - Py_CHARMASK(*b->ob_sval);
+        if (c==0)
+            c = memcmp(a->ob_sval, b->ob_sval, min_len);
+    } else
+        c = 0;
+    if (c == 0)
+        c = (len_a < len_b) ? -1 : (len_a > len_b) ? 1 : 0;
+    switch (op) {
+    case Py_LT: c = c <  0; break;
+    case Py_LE: c = c <= 0; break;
+    case Py_EQ: assert(0);  break; /* unreachable */
+    case Py_NE: c = c != 0; break;
+    case Py_GT: c = c >  0; break;
+    case Py_GE: c = c >= 0; break;
+    default:
+        result = Py_NotImplemented;
+        goto out;
+    }
+    result = c ? Py_True : Py_False;
   out:
-	Py_INCREF(result);
-	return result;
+    Py_INCREF(result);
+    return result;
 }
 
 int
 _PyString_Eq(PyObject *o1, PyObject *o2)
 {
-	PyStringObject *a = (PyStringObject*) o1;
-	PyStringObject *b = (PyStringObject*) o2;
-        return Py_SIZE(a) == Py_SIZE(b)
-          && *a->ob_sval == *b->ob_sval
-          && memcmp(a->ob_sval, b->ob_sval, Py_SIZE(a)) == 0;
+    PyStringObject *a = (PyStringObject*) o1;
+    PyStringObject *b = (PyStringObject*) o2;
+    return Py_SIZE(a) == Py_SIZE(b)
+      && *a->ob_sval == *b->ob_sval
+      && memcmp(a->ob_sval, b->ob_sval, Py_SIZE(a)) == 0;
 }
 
 static long
 string_hash(PyStringObject *a)
 {
-	register Py_ssize_t len;
-	register unsigned char *p;
-	register long x;
+    register Py_ssize_t len;
+    register unsigned char *p;
+    register long x;
 
-	if (a->ob_shash != -1)
-		return a->ob_shash;
-	len = Py_SIZE(a);
-	p = (unsigned char *) a->ob_sval;
-	x = *p << 7;
-	while (--len >= 0)
-		x = (1000003*x) ^ *p++;
-	x ^= Py_SIZE(a);
-	if (x == -1)
-		x = -2;
-	a->ob_shash = x;
-	return x;
+    if (a->ob_shash != -1)
+        return a->ob_shash;
+    len = Py_SIZE(a);
+    p = (unsigned char *) a->ob_sval;
+    x = *p << 7;
+    while (--len >= 0)
+        x = (1000003*x) ^ *p++;
+    x ^= Py_SIZE(a);
+    if (x == -1)
+        x = -2;
+    a->ob_shash = x;
+    return x;
 }
 
 static PyObject*
 string_subscript(PyStringObject* self, PyObject* item)
 {
-	if (PyIndex_Check(item)) {
-		Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
-		if (i == -1 && PyErr_Occurred())
-			return NULL;
-		if (i < 0)
-			i += PyString_GET_SIZE(self);
-		return string_item(self, i);
-	}
-	else if (PySlice_Check(item)) {
-		Py_ssize_t start, stop, step, slicelength, cur, i;
-		char* source_buf;
-		char* result_buf;
-		PyObject* result;
+    if (PyIndex_Check(item)) {
+        Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
+        if (i == -1 && PyErr_Occurred())
+            return NULL;
+        if (i < 0)
+            i += PyString_GET_SIZE(self);
+        return string_item(self, i);
+    }
+    else if (PySlice_Check(item)) {
+        Py_ssize_t start, stop, step, slicelength, cur, i;
+        char* source_buf;
+        char* result_buf;
+        PyObject* result;
 
-		if (PySlice_GetIndicesEx((PySliceObject*)item,
-				 PyString_GET_SIZE(self),
-				 &start, &stop, &step, &slicelength) < 0) {
-			return NULL;
-		}
+        if (PySlice_GetIndicesEx((PySliceObject*)item,
+                         PyString_GET_SIZE(self),
+                         &start, &stop, &step, &slicelength) < 0) {
+            return NULL;
+        }
 
-		if (slicelength <= 0) {
-			return PyString_FromStringAndSize("", 0);
-		}
-		else if (start == 0 && step == 1 &&
-			 slicelength == PyString_GET_SIZE(self) &&
-			 PyString_CheckExact(self)) {
-			Py_INCREF(self);
-			return (PyObject *)self;
-		}
-		else if (step == 1) {
-			return PyString_FromStringAndSize(
-				PyString_AS_STRING(self) + start,
-				slicelength);
-		}
-		else {
-			source_buf = PyString_AsString((PyObject*)self);
-			result_buf = (char *)PyMem_Malloc(slicelength);
-			if (result_buf == NULL)
-				return PyErr_NoMemory();
+        if (slicelength <= 0) {
+            return PyString_FromStringAndSize("", 0);
+        }
+        else if (start == 0 && step == 1 &&
+                 slicelength == PyString_GET_SIZE(self) &&
+                 PyString_CheckExact(self)) {
+            Py_INCREF(self);
+            return (PyObject *)self;
+        }
+        else if (step == 1) {
+            return PyString_FromStringAndSize(
+                PyString_AS_STRING(self) + start,
+                slicelength);
+        }
+        else {
+            source_buf = PyString_AsString((PyObject*)self);
+            result_buf = (char *)PyMem_Malloc(slicelength);
+            if (result_buf == NULL)
+                return PyErr_NoMemory();
 
-			for (cur = start, i = 0; i < slicelength;
-			     cur += step, i++) {
-				result_buf[i] = source_buf[cur];
-			}
+            for (cur = start, i = 0; i < slicelength;
+                 cur += step, i++) {
+                result_buf[i] = source_buf[cur];
+            }
 
-			result = PyString_FromStringAndSize(result_buf,
-							    slicelength);
-			PyMem_Free(result_buf);
-			return result;
-		}
-	}
-	else {
-		PyErr_Format(PyExc_TypeError,
-			     "string indices must be integers, not %.200s",
-			     Py_TYPE(item)->tp_name);
-		return NULL;
-	}
+            result = PyString_FromStringAndSize(result_buf,
+                                                slicelength);
+            PyMem_Free(result_buf);
+            return result;
+        }
+    }
+    else {
+        PyErr_Format(PyExc_TypeError,
+                     "string indices must be integers, not %.200s",
+                     Py_TYPE(item)->tp_name);
+        return NULL;
+    }
 }
 
 static Py_ssize_t
 string_buffer_getreadbuf(PyStringObject *self, Py_ssize_t index, const void **ptr)
 {
-	if ( index != 0 ) {
-		PyErr_SetString(PyExc_SystemError,
-				"accessing non-existent string segment");
-		return -1;
-	}
-	*ptr = (void *)self->ob_sval;
-	return Py_SIZE(self);
+    if ( index != 0 ) {
+        PyErr_SetString(PyExc_SystemError,
+                        "accessing non-existent string segment");
+        return -1;
+    }
+    *ptr = (void *)self->ob_sval;
+    return Py_SIZE(self);
 }
 
 static Py_ssize_t
 string_buffer_getwritebuf(PyStringObject *self, Py_ssize_t index, const void **ptr)
 {
-	PyErr_SetString(PyExc_TypeError,
-			"Cannot use string as modifiable buffer");
-	return -1;
+    PyErr_SetString(PyExc_TypeError,
+                    "Cannot use string as modifiable buffer");
+    return -1;
 }
 
 static Py_ssize_t
 string_buffer_getsegcount(PyStringObject *self, Py_ssize_t *lenp)
 {
-	if ( lenp )
-		*lenp = Py_SIZE(self);
-	return 1;
+    if ( lenp )
+        *lenp = Py_SIZE(self);
+    return 1;
 }
 
 static Py_ssize_t
 string_buffer_getcharbuf(PyStringObject *self, Py_ssize_t index, const char **ptr)
 {
-	if ( index != 0 ) {
-		PyErr_SetString(PyExc_SystemError,
-				"accessing non-existent string segment");
-		return -1;
-	}
-	*ptr = self->ob_sval;
-	return Py_SIZE(self);
+    if ( index != 0 ) {
+        PyErr_SetString(PyExc_SystemError,
+                        "accessing non-existent string segment");
+        return -1;
+    }
+    *ptr = self->ob_sval;
+    return Py_SIZE(self);
 }
 
 static int
 string_buffer_getbuffer(PyStringObject *self, Py_buffer *view, int flags)
 {
-	return PyBuffer_FillInfo(view, (PyObject*)self,
-				 (void *)self->ob_sval, Py_SIZE(self),
-				 1, flags);
+    return PyBuffer_FillInfo(view, (PyObject*)self,
+                             (void *)self->ob_sval, Py_SIZE(self),
+                             1, flags);
 }
 
 static PySequenceMethods string_as_sequence = {
-	(lenfunc)string_length, /*sq_length*/
-	(binaryfunc)string_concat, /*sq_concat*/
-	(ssizeargfunc)string_repeat, /*sq_repeat*/
-	(ssizeargfunc)string_item, /*sq_item*/
-	(ssizessizeargfunc)string_slice, /*sq_slice*/
-	0,		/*sq_ass_item*/
-	0,		/*sq_ass_slice*/
-	(objobjproc)string_contains /*sq_contains*/
+    (lenfunc)string_length, /*sq_length*/
+    (binaryfunc)string_concat, /*sq_concat*/
+    (ssizeargfunc)string_repeat, /*sq_repeat*/
+    (ssizeargfunc)string_item, /*sq_item*/
+    (ssizessizeargfunc)string_slice, /*sq_slice*/
+    0,                  /*sq_ass_item*/
+    0,                  /*sq_ass_slice*/
+    (objobjproc)string_contains /*sq_contains*/
 };
 
 static PyMappingMethods string_as_mapping = {
-	(lenfunc)string_length,
-	(binaryfunc)string_subscript,
-	0,
+    (lenfunc)string_length,
+    (binaryfunc)string_subscript,
+    0,
 };
 
 static PyBufferProcs string_as_buffer = {
-	(readbufferproc)string_buffer_getreadbuf,
-	(writebufferproc)string_buffer_getwritebuf,
-	(segcountproc)string_buffer_getsegcount,
-	(charbufferproc)string_buffer_getcharbuf,
-	(getbufferproc)string_buffer_getbuffer,
-	0, /* XXX */
+    (readbufferproc)string_buffer_getreadbuf,
+    (writebufferproc)string_buffer_getwritebuf,
+    (segcountproc)string_buffer_getsegcount,
+    (charbufferproc)string_buffer_getcharbuf,
+    (getbufferproc)string_buffer_getbuffer,
+    0, /* XXX */
 };
 
 
@@ -1439,29 +1439,29 @@
 static PyObject *
 string_split(PyStringObject *self, PyObject *args)
 {
-	Py_ssize_t len = PyString_GET_SIZE(self), n;
-	Py_ssize_t maxsplit = -1;
-	const char *s = PyString_AS_STRING(self), *sub;
-	PyObject *subobj = Py_None;
+    Py_ssize_t len = PyString_GET_SIZE(self), n;
+    Py_ssize_t maxsplit = -1;
+    const char *s = PyString_AS_STRING(self), *sub;
+    PyObject *subobj = Py_None;
 
-	if (!PyArg_ParseTuple(args, "|On:split", &subobj, &maxsplit))
-		return NULL;
-	if (maxsplit < 0)
-		maxsplit = PY_SSIZE_T_MAX;
-	if (subobj == Py_None)
-		return stringlib_split_whitespace((PyObject*) self, s, len, maxsplit);
-	if (PyString_Check(subobj)) {
-		sub = PyString_AS_STRING(subobj);
-		n = PyString_GET_SIZE(subobj);
-	}
+    if (!PyArg_ParseTuple(args, "|On:split", &subobj, &maxsplit))
+        return NULL;
+    if (maxsplit < 0)
+        maxsplit = PY_SSIZE_T_MAX;
+    if (subobj == Py_None)
+        return stringlib_split_whitespace((PyObject*) self, s, len, maxsplit);
+    if (PyString_Check(subobj)) {
+        sub = PyString_AS_STRING(subobj);
+        n = PyString_GET_SIZE(subobj);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(subobj))
-		return PyUnicode_Split((PyObject *)self, subobj, maxsplit);
+    else if (PyUnicode_Check(subobj))
+        return PyUnicode_Split((PyObject *)self, subobj, maxsplit);
 #endif
-	else if (PyObject_AsCharBuffer(subobj, &sub, &n))
-		return NULL;
+    else if (PyObject_AsCharBuffer(subobj, &sub, &n))
+        return NULL;
 
-	return stringlib_split((PyObject*) self, s, len, sub, n, maxsplit);
+    return stringlib_split((PyObject*) self, s, len, sub, n, maxsplit);
 }
 
 PyDoc_STRVAR(partition__doc__,
@@ -1474,25 +1474,25 @@
 static PyObject *
 string_partition(PyStringObject *self, PyObject *sep_obj)
 {
-	const char *sep;
-	Py_ssize_t sep_len;
+    const char *sep;
+    Py_ssize_t sep_len;
 
-	if (PyString_Check(sep_obj)) {
-		sep = PyString_AS_STRING(sep_obj);
-		sep_len = PyString_GET_SIZE(sep_obj);
-	}
+    if (PyString_Check(sep_obj)) {
+        sep = PyString_AS_STRING(sep_obj);
+        sep_len = PyString_GET_SIZE(sep_obj);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(sep_obj))
-		return PyUnicode_Partition((PyObject *) self, sep_obj);
+    else if (PyUnicode_Check(sep_obj))
+        return PyUnicode_Partition((PyObject *) self, sep_obj);
 #endif
-	else if (PyObject_AsCharBuffer(sep_obj, &sep, &sep_len))
-		return NULL;
+    else if (PyObject_AsCharBuffer(sep_obj, &sep, &sep_len))
+        return NULL;
 
-	return stringlib_partition(
-		(PyObject*) self,
-		PyString_AS_STRING(self), PyString_GET_SIZE(self),
-		sep_obj, sep, sep_len
-		);
+    return stringlib_partition(
+        (PyObject*) self,
+        PyString_AS_STRING(self), PyString_GET_SIZE(self),
+        sep_obj, sep, sep_len
+        );
 }
 
 PyDoc_STRVAR(rpartition__doc__,
@@ -1505,25 +1505,25 @@
 static PyObject *
 string_rpartition(PyStringObject *self, PyObject *sep_obj)
 {
-	const char *sep;
-	Py_ssize_t sep_len;
+    const char *sep;
+    Py_ssize_t sep_len;
 
-	if (PyString_Check(sep_obj)) {
-		sep = PyString_AS_STRING(sep_obj);
-		sep_len = PyString_GET_SIZE(sep_obj);
-	}
+    if (PyString_Check(sep_obj)) {
+        sep = PyString_AS_STRING(sep_obj);
+        sep_len = PyString_GET_SIZE(sep_obj);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(sep_obj))
-		return PyUnicode_RPartition((PyObject *) self, sep_obj);
+    else if (PyUnicode_Check(sep_obj))
+        return PyUnicode_RPartition((PyObject *) self, sep_obj);
 #endif
-	else if (PyObject_AsCharBuffer(sep_obj, &sep, &sep_len))
-		return NULL;
+    else if (PyObject_AsCharBuffer(sep_obj, &sep, &sep_len))
+        return NULL;
 
-	return stringlib_rpartition(
-		(PyObject*) self,
-		PyString_AS_STRING(self), PyString_GET_SIZE(self),
-		sep_obj, sep, sep_len
-		);
+    return stringlib_rpartition(
+        (PyObject*) self,
+        PyString_AS_STRING(self), PyString_GET_SIZE(self),
+        sep_obj, sep, sep_len
+        );
 }
 
 PyDoc_STRVAR(rsplit__doc__,
@@ -1538,29 +1538,29 @@
 static PyObject *
 string_rsplit(PyStringObject *self, PyObject *args)
 {
-	Py_ssize_t len = PyString_GET_SIZE(self), n;
-	Py_ssize_t maxsplit = -1;
-	const char *s = PyString_AS_STRING(self), *sub;
-	PyObject *subobj = Py_None;
+    Py_ssize_t len = PyString_GET_SIZE(self), n;
+    Py_ssize_t maxsplit = -1;
+    const char *s = PyString_AS_STRING(self), *sub;
+    PyObject *subobj = Py_None;
 
-	if (!PyArg_ParseTuple(args, "|On:rsplit", &subobj, &maxsplit))
-		return NULL;
-	if (maxsplit < 0)
-		maxsplit = PY_SSIZE_T_MAX;
-	if (subobj == Py_None)
-		return stringlib_rsplit_whitespace((PyObject*) self, s, len, maxsplit);
-	if (PyString_Check(subobj)) {
-		sub = PyString_AS_STRING(subobj);
-		n = PyString_GET_SIZE(subobj);
-	}
+    if (!PyArg_ParseTuple(args, "|On:rsplit", &subobj, &maxsplit))
+        return NULL;
+    if (maxsplit < 0)
+        maxsplit = PY_SSIZE_T_MAX;
+    if (subobj == Py_None)
+        return stringlib_rsplit_whitespace((PyObject*) self, s, len, maxsplit);
+    if (PyString_Check(subobj)) {
+        sub = PyString_AS_STRING(subobj);
+        n = PyString_GET_SIZE(subobj);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(subobj))
-		return PyUnicode_RSplit((PyObject *)self, subobj, maxsplit);
+    else if (PyUnicode_Check(subobj))
+        return PyUnicode_RSplit((PyObject *)self, subobj, maxsplit);
 #endif
-	else if (PyObject_AsCharBuffer(subobj, &sub, &n))
-		return NULL;
+    else if (PyObject_AsCharBuffer(subobj, &sub, &n))
+        return NULL;
 
-	return stringlib_rsplit((PyObject*) self, s, len, sub, n, maxsplit);
+    return stringlib_rsplit((PyObject*) self, s, len, sub, n, maxsplit);
 }
 
 
@@ -1573,167 +1573,167 @@
 static PyObject *
 string_join(PyStringObject *self, PyObject *orig)
 {
-	char *sep = PyString_AS_STRING(self);
-	const Py_ssize_t seplen = PyString_GET_SIZE(self);
-	PyObject *res = NULL;
-	char *p;
-	Py_ssize_t seqlen = 0;
-	size_t sz = 0;
-	Py_ssize_t i;
-	PyObject *seq, *item;
+    char *sep = PyString_AS_STRING(self);
+    const Py_ssize_t seplen = PyString_GET_SIZE(self);
+    PyObject *res = NULL;
+    char *p;
+    Py_ssize_t seqlen = 0;
+    size_t sz = 0;
+    Py_ssize_t i;
+    PyObject *seq, *item;
 
-	seq = PySequence_Fast(orig, "");
-	if (seq == NULL) {
-		return NULL;
-	}
+    seq = PySequence_Fast(orig, "");
+    if (seq == NULL) {
+        return NULL;
+    }
 
-	seqlen = PySequence_Size(seq);
-	if (seqlen == 0) {
-		Py_DECREF(seq);
-		return PyString_FromString("");
-	}
-	if (seqlen == 1) {
-		item = PySequence_Fast_GET_ITEM(seq, 0);
-		if (PyString_CheckExact(item) || PyUnicode_CheckExact(item)) {
-			Py_INCREF(item);
-			Py_DECREF(seq);
-			return item;
-		}
-	}
+    seqlen = PySequence_Size(seq);
+    if (seqlen == 0) {
+        Py_DECREF(seq);
+        return PyString_FromString("");
+    }
+    if (seqlen == 1) {
+        item = PySequence_Fast_GET_ITEM(seq, 0);
+        if (PyString_CheckExact(item) || PyUnicode_CheckExact(item)) {
+            Py_INCREF(item);
+            Py_DECREF(seq);
+            return item;
+        }
+    }
 
-	/* There are at least two things to join, or else we have a subclass
-	 * of the builtin types in the sequence.
-	 * Do a pre-pass to figure out the total amount of space we'll
-	 * need (sz), see whether any argument is absurd, and defer to
-	 * the Unicode join if appropriate.
-	 */
-	for (i = 0; i < seqlen; i++) {
-		const size_t old_sz = sz;
-		item = PySequence_Fast_GET_ITEM(seq, i);
-		if (!PyString_Check(item)){
+    /* There are at least two things to join, or else we have a subclass
+     * of the builtin types in the sequence.
+     * Do a pre-pass to figure out the total amount of space we'll
+     * need (sz), see whether any argument is absurd, and defer to
+     * the Unicode join if appropriate.
+     */
+    for (i = 0; i < seqlen; i++) {
+        const size_t old_sz = sz;
+        item = PySequence_Fast_GET_ITEM(seq, i);
+        if (!PyString_Check(item)){
 #ifdef Py_USING_UNICODE
-			if (PyUnicode_Check(item)) {
-				/* Defer to Unicode join.
-				 * CAUTION:  There's no gurantee that the
-				 * original sequence can be iterated over
-				 * again, so we must pass seq here.
-				 */
-				PyObject *result;
-				result = PyUnicode_Join((PyObject *)self, seq);
-				Py_DECREF(seq);
-				return result;
-			}
+            if (PyUnicode_Check(item)) {
+                /* Defer to Unicode join.
+                 * CAUTION:  There's no gurantee that the
+                 * original sequence can be iterated over
+                 * again, so we must pass seq here.
+                 */
+                PyObject *result;
+                result = PyUnicode_Join((PyObject *)self, seq);
+                Py_DECREF(seq);
+                return result;
+            }
 #endif
-			PyErr_Format(PyExc_TypeError,
-				     "sequence item %zd: expected string,"
-				     " %.80s found",
-				     i, Py_TYPE(item)->tp_name);
-			Py_DECREF(seq);
-			return NULL;
-		}
-		sz += PyString_GET_SIZE(item);
-		if (i != 0)
-			sz += seplen;
-		if (sz < old_sz || sz > PY_SSIZE_T_MAX) {
-			PyErr_SetString(PyExc_OverflowError,
-				"join() result is too long for a Python string");
-			Py_DECREF(seq);
-			return NULL;
-		}
-	}
+            PyErr_Format(PyExc_TypeError,
+                         "sequence item %zd: expected string,"
+                         " %.80s found",
+                         i, Py_TYPE(item)->tp_name);
+            Py_DECREF(seq);
+            return NULL;
+        }
+        sz += PyString_GET_SIZE(item);
+        if (i != 0)
+            sz += seplen;
+        if (sz < old_sz || sz > PY_SSIZE_T_MAX) {
+            PyErr_SetString(PyExc_OverflowError,
+                "join() result is too long for a Python string");
+            Py_DECREF(seq);
+            return NULL;
+        }
+    }
 
-	/* Allocate result space. */
-	res = PyString_FromStringAndSize((char*)NULL, sz);
-	if (res == NULL) {
-		Py_DECREF(seq);
-		return NULL;
-	}
+    /* Allocate result space. */
+    res = PyString_FromStringAndSize((char*)NULL, sz);
+    if (res == NULL) {
+        Py_DECREF(seq);
+        return NULL;
+    }
 
-	/* Catenate everything. */
-	p = PyString_AS_STRING(res);
-	for (i = 0; i < seqlen; ++i) {
-		size_t n;
-		item = PySequence_Fast_GET_ITEM(seq, i);
-		n = PyString_GET_SIZE(item);
-		Py_MEMCPY(p, PyString_AS_STRING(item), n);
-		p += n;
-		if (i < seqlen - 1) {
-			Py_MEMCPY(p, sep, seplen);
-			p += seplen;
-		}
-	}
+    /* Catenate everything. */
+    p = PyString_AS_STRING(res);
+    for (i = 0; i < seqlen; ++i) {
+        size_t n;
+        item = PySequence_Fast_GET_ITEM(seq, i);
+        n = PyString_GET_SIZE(item);
+        Py_MEMCPY(p, PyString_AS_STRING(item), n);
+        p += n;
+        if (i < seqlen - 1) {
+            Py_MEMCPY(p, sep, seplen);
+            p += seplen;
+        }
+    }
 
-	Py_DECREF(seq);
-	return res;
+    Py_DECREF(seq);
+    return res;
 }
 
 PyObject *
 _PyString_Join(PyObject *sep, PyObject *x)
 {
-	assert(sep != NULL && PyString_Check(sep));
-	assert(x != NULL);
-	return string_join((PyStringObject *)sep, x);
+    assert(sep != NULL && PyString_Check(sep));
+    assert(x != NULL);
+    return string_join((PyStringObject *)sep, x);
 }
 
 /* helper macro to fixup start/end slice values */
 #define ADJUST_INDICES(start, end, len)         \
-	if (end > len)                          \
-	    end = len;                          \
-	else if (end < 0) {                     \
-	    end += len;                         \
-	    if (end < 0)                        \
-	        end = 0;                        \
-	}                                       \
-	if (start < 0) {                        \
-	    start += len;                       \
-	    if (start < 0)                      \
-	        start = 0;                      \
-	}
+    if (end > len)                          \
+        end = len;                          \
+    else if (end < 0) {                     \
+        end += len;                         \
+        if (end < 0)                        \
+        end = 0;                        \
+    }                                       \
+    if (start < 0) {                        \
+        start += len;                       \
+        if (start < 0)                      \
+        start = 0;                      \
+    }
 
 Py_LOCAL_INLINE(Py_ssize_t)
 string_find_internal(PyStringObject *self, PyObject *args, int dir)
 {
-	PyObject *subobj;
-	const char *sub;
-	Py_ssize_t sub_len;
-	Py_ssize_t start=0, end=PY_SSIZE_T_MAX;
-	PyObject *obj_start=Py_None, *obj_end=Py_None;
+    PyObject *subobj;
+    const char *sub;
+    Py_ssize_t sub_len;
+    Py_ssize_t start=0, end=PY_SSIZE_T_MAX;
+    PyObject *obj_start=Py_None, *obj_end=Py_None;
 
-	if (!PyArg_ParseTuple(args, "O|OO:find/rfind/index/rindex", &subobj,
-		&obj_start, &obj_end))
-		return -2;
-	/* To support None in "start" and "end" arguments, meaning
-	   the same as if they were not passed.
-	*/
-	if (obj_start != Py_None)
-		if (!_PyEval_SliceIndex(obj_start, &start))
-	        return -2;
-	if (obj_end != Py_None)
-		if (!_PyEval_SliceIndex(obj_end, &end))
-	        return -2;
+    if (!PyArg_ParseTuple(args, "O|OO:find/rfind/index/rindex", &subobj,
+        &obj_start, &obj_end))
+        return -2;
+    /* To support None in "start" and "end" arguments, meaning
+       the same as if they were not passed.
+    */
+    if (obj_start != Py_None)
+        if (!_PyEval_SliceIndex(obj_start, &start))
+        return -2;
+    if (obj_end != Py_None)
+        if (!_PyEval_SliceIndex(obj_end, &end))
+        return -2;
 
-	if (PyString_Check(subobj)) {
-		sub = PyString_AS_STRING(subobj);
-		sub_len = PyString_GET_SIZE(subobj);
-	}
+    if (PyString_Check(subobj)) {
+        sub = PyString_AS_STRING(subobj);
+        sub_len = PyString_GET_SIZE(subobj);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(subobj))
-		return PyUnicode_Find(
-			(PyObject *)self, subobj, start, end, dir);
+    else if (PyUnicode_Check(subobj))
+        return PyUnicode_Find(
+            (PyObject *)self, subobj, start, end, dir);
 #endif
-	else if (PyObject_AsCharBuffer(subobj, &sub, &sub_len))
-		/* XXX - the "expected a character buffer object" is pretty
-		   confusing for a non-expert.  remap to something else ? */
-		return -2;
+    else if (PyObject_AsCharBuffer(subobj, &sub, &sub_len))
+        /* XXX - the "expected a character buffer object" is pretty
+           confusing for a non-expert.  remap to something else ? */
+        return -2;
 
-	if (dir > 0)
-		return stringlib_find_slice(
-			PyString_AS_STRING(self), PyString_GET_SIZE(self),
-			sub, sub_len, start, end);
-	else
-		return stringlib_rfind_slice(
-			PyString_AS_STRING(self), PyString_GET_SIZE(self),
-			sub, sub_len, start, end);
+    if (dir > 0)
+        return stringlib_find_slice(
+            PyString_AS_STRING(self), PyString_GET_SIZE(self),
+            sub, sub_len, start, end);
+    else
+        return stringlib_rfind_slice(
+            PyString_AS_STRING(self), PyString_GET_SIZE(self),
+            sub, sub_len, start, end);
 }
 
 
@@ -1749,10 +1749,10 @@
 static PyObject *
 string_find(PyStringObject *self, PyObject *args)
 {
-	Py_ssize_t result = string_find_internal(self, args, +1);
-	if (result == -2)
-		return NULL;
-	return PyInt_FromSsize_t(result);
+    Py_ssize_t result = string_find_internal(self, args, +1);
+    if (result == -2)
+        return NULL;
+    return PyInt_FromSsize_t(result);
 }
 
 
@@ -1764,15 +1764,15 @@
 static PyObject *
 string_index(PyStringObject *self, PyObject *args)
 {
-	Py_ssize_t result = string_find_internal(self, args, +1);
-	if (result == -2)
-		return NULL;
-	if (result == -1) {
-		PyErr_SetString(PyExc_ValueError,
-				"substring not found");
-		return NULL;
-	}
-	return PyInt_FromSsize_t(result);
+    Py_ssize_t result = string_find_internal(self, args, +1);
+    if (result == -2)
+        return NULL;
+    if (result == -1) {
+        PyErr_SetString(PyExc_ValueError,
+                        "substring not found");
+        return NULL;
+    }
+    return PyInt_FromSsize_t(result);
 }
 
 
@@ -1788,10 +1788,10 @@
 static PyObject *
 string_rfind(PyStringObject *self, PyObject *args)
 {
-	Py_ssize_t result = string_find_internal(self, args, -1);
-	if (result == -2)
-		return NULL;
-	return PyInt_FromSsize_t(result);
+    Py_ssize_t result = string_find_internal(self, args, -1);
+    if (result == -2)
+        return NULL;
+    return PyInt_FromSsize_t(result);
 }
 
 
@@ -1803,115 +1803,115 @@
 static PyObject *
 string_rindex(PyStringObject *self, PyObject *args)
 {
-	Py_ssize_t result = string_find_internal(self, args, -1);
-	if (result == -2)
-		return NULL;
-	if (result == -1) {
-		PyErr_SetString(PyExc_ValueError,
-				"substring not found");
-		return NULL;
-	}
-	return PyInt_FromSsize_t(result);
+    Py_ssize_t result = string_find_internal(self, args, -1);
+    if (result == -2)
+        return NULL;
+    if (result == -1) {
+        PyErr_SetString(PyExc_ValueError,
+                        "substring not found");
+        return NULL;
+    }
+    return PyInt_FromSsize_t(result);
 }
 
 
 Py_LOCAL_INLINE(PyObject *)
 do_xstrip(PyStringObject *self, int striptype, PyObject *sepobj)
 {
-	char *s = PyString_AS_STRING(self);
-	Py_ssize_t len = PyString_GET_SIZE(self);
-	char *sep = PyString_AS_STRING(sepobj);
-	Py_ssize_t seplen = PyString_GET_SIZE(sepobj);
-	Py_ssize_t i, j;
+    char *s = PyString_AS_STRING(self);
+    Py_ssize_t len = PyString_GET_SIZE(self);
+    char *sep = PyString_AS_STRING(sepobj);
+    Py_ssize_t seplen = PyString_GET_SIZE(sepobj);
+    Py_ssize_t i, j;
 
-	i = 0;
-	if (striptype != RIGHTSTRIP) {
-		while (i < len && memchr(sep, Py_CHARMASK(s[i]), seplen)) {
-			i++;
-		}
-	}
+    i = 0;
+    if (striptype != RIGHTSTRIP) {
+        while (i < len && memchr(sep, Py_CHARMASK(s[i]), seplen)) {
+            i++;
+        }
+    }
 
-	j = len;
-	if (striptype != LEFTSTRIP) {
-		do {
-			j--;
-		} while (j >= i && memchr(sep, Py_CHARMASK(s[j]), seplen));
-		j++;
-	}
+    j = len;
+    if (striptype != LEFTSTRIP) {
+        do {
+            j--;
+        } while (j >= i && memchr(sep, Py_CHARMASK(s[j]), seplen));
+        j++;
+    }
 
-	if (i == 0 && j == len && PyString_CheckExact(self)) {
-		Py_INCREF(self);
-		return (PyObject*)self;
-	}
-	else
-		return PyString_FromStringAndSize(s+i, j-i);
+    if (i == 0 && j == len && PyString_CheckExact(self)) {
+        Py_INCREF(self);
+        return (PyObject*)self;
+    }
+    else
+        return PyString_FromStringAndSize(s+i, j-i);
 }
 
 
 Py_LOCAL_INLINE(PyObject *)
 do_strip(PyStringObject *self, int striptype)
 {
-	char *s = PyString_AS_STRING(self);
-	Py_ssize_t len = PyString_GET_SIZE(self), i, j;
+    char *s = PyString_AS_STRING(self);
+    Py_ssize_t len = PyString_GET_SIZE(self), i, j;
 
-	i = 0;
-	if (striptype != RIGHTSTRIP) {
-		while (i < len && isspace(Py_CHARMASK(s[i]))) {
-			i++;
-		}
-	}
+    i = 0;
+    if (striptype != RIGHTSTRIP) {
+        while (i < len && isspace(Py_CHARMASK(s[i]))) {
+            i++;
+        }
+    }
 
-	j = len;
-	if (striptype != LEFTSTRIP) {
-		do {
-			j--;
-		} while (j >= i && isspace(Py_CHARMASK(s[j])));
-		j++;
-	}
+    j = len;
+    if (striptype != LEFTSTRIP) {
+        do {
+            j--;
+        } while (j >= i && isspace(Py_CHARMASK(s[j])));
+        j++;
+    }
 
-	if (i == 0 && j == len && PyString_CheckExact(self)) {
-		Py_INCREF(self);
-		return (PyObject*)self;
-	}
-	else
-		return PyString_FromStringAndSize(s+i, j-i);
+    if (i == 0 && j == len && PyString_CheckExact(self)) {
+        Py_INCREF(self);
+        return (PyObject*)self;
+    }
+    else
+        return PyString_FromStringAndSize(s+i, j-i);
 }
 
 
 Py_LOCAL_INLINE(PyObject *)
 do_argstrip(PyStringObject *self, int striptype, PyObject *args)
 {
-	PyObject *sep = NULL;
+    PyObject *sep = NULL;
 
-	if (!PyArg_ParseTuple(args, (char *)stripformat[striptype], &sep))
-		return NULL;
+    if (!PyArg_ParseTuple(args, (char *)stripformat[striptype], &sep))
+        return NULL;
 
-	if (sep != NULL && sep != Py_None) {
-		if (PyString_Check(sep))
-			return do_xstrip(self, striptype, sep);
+    if (sep != NULL && sep != Py_None) {
+        if (PyString_Check(sep))
+            return do_xstrip(self, striptype, sep);
 #ifdef Py_USING_UNICODE
-		else if (PyUnicode_Check(sep)) {
-			PyObject *uniself = PyUnicode_FromObject((PyObject *)self);
-			PyObject *res;
-			if (uniself==NULL)
-				return NULL;
-			res = _PyUnicode_XStrip((PyUnicodeObject *)uniself,
-				striptype, sep);
-			Py_DECREF(uniself);
-			return res;
-		}
+        else if (PyUnicode_Check(sep)) {
+            PyObject *uniself = PyUnicode_FromObject((PyObject *)self);
+            PyObject *res;
+            if (uniself==NULL)
+                return NULL;
+            res = _PyUnicode_XStrip((PyUnicodeObject *)uniself,
+                striptype, sep);
+            Py_DECREF(uniself);
+            return res;
+        }
 #endif
-		PyErr_Format(PyExc_TypeError,
+        PyErr_Format(PyExc_TypeError,
 #ifdef Py_USING_UNICODE
-			     "%s arg must be None, str or unicode",
+                     "%s arg must be None, str or unicode",
 #else
-			     "%s arg must be None or str",
+                     "%s arg must be None or str",
 #endif
-			     STRIPNAME(striptype));
-		return NULL;
-	}
+                     STRIPNAME(striptype));
+        return NULL;
+    }
 
-	return do_strip(self, striptype);
+    return do_strip(self, striptype);
 }
 
 
@@ -1926,10 +1926,10 @@
 static PyObject *
 string_strip(PyStringObject *self, PyObject *args)
 {
-	if (PyTuple_GET_SIZE(args) == 0)
-		return do_strip(self, BOTHSTRIP); /* Common case */
-	else
-		return do_argstrip(self, BOTHSTRIP, args);
+    if (PyTuple_GET_SIZE(args) == 0)
+        return do_strip(self, BOTHSTRIP); /* Common case */
+    else
+        return do_argstrip(self, BOTHSTRIP, args);
 }
 
 
@@ -1943,10 +1943,10 @@
 static PyObject *
 string_lstrip(PyStringObject *self, PyObject *args)
 {
-	if (PyTuple_GET_SIZE(args) == 0)
-		return do_strip(self, LEFTSTRIP); /* Common case */
-	else
-		return do_argstrip(self, LEFTSTRIP, args);
+    if (PyTuple_GET_SIZE(args) == 0)
+        return do_strip(self, LEFTSTRIP); /* Common case */
+    else
+        return do_argstrip(self, LEFTSTRIP, args);
 }
 
 
@@ -1960,10 +1960,10 @@
 static PyObject *
 string_rstrip(PyStringObject *self, PyObject *args)
 {
-	if (PyTuple_GET_SIZE(args) == 0)
-		return do_strip(self, RIGHTSTRIP); /* Common case */
-	else
-		return do_argstrip(self, RIGHTSTRIP, args);
+    if (PyTuple_GET_SIZE(args) == 0)
+        return do_strip(self, RIGHTSTRIP); /* Common case */
+    else
+        return do_argstrip(self, RIGHTSTRIP, args);
 }
 
 
@@ -1980,25 +1980,25 @@
 static PyObject *
 string_lower(PyStringObject *self)
 {
-	char *s;
-	Py_ssize_t i, n = PyString_GET_SIZE(self);
-	PyObject *newobj;
+    char *s;
+    Py_ssize_t i, n = PyString_GET_SIZE(self);
+    PyObject *newobj;
 
-	newobj = PyString_FromStringAndSize(NULL, n);
-	if (!newobj)
-		return NULL;
+    newobj = PyString_FromStringAndSize(NULL, n);
+    if (!newobj)
+        return NULL;
 
-	s = PyString_AS_STRING(newobj);
+    s = PyString_AS_STRING(newobj);
 
-	Py_MEMCPY(s, PyString_AS_STRING(self), n);
+    Py_MEMCPY(s, PyString_AS_STRING(self), n);
 
-	for (i = 0; i < n; i++) {
-		int c = Py_CHARMASK(s[i]);
-		if (isupper(c))
-			s[i] = _tolower(c);
-	}
+    for (i = 0; i < n; i++) {
+        int c = Py_CHARMASK(s[i]);
+        if (isupper(c))
+            s[i] = _tolower(c);
+    }
 
-	return newobj;
+    return newobj;
 }
 
 PyDoc_STRVAR(upper__doc__,
@@ -2013,25 +2013,25 @@
 static PyObject *
 string_upper(PyStringObject *self)
 {
-	char *s;
-	Py_ssize_t i, n = PyString_GET_SIZE(self);
-	PyObject *newobj;
+    char *s;
+    Py_ssize_t i, n = PyString_GET_SIZE(self);
+    PyObject *newobj;
 
-	newobj = PyString_FromStringAndSize(NULL, n);
-	if (!newobj)
-		return NULL;
+    newobj = PyString_FromStringAndSize(NULL, n);
+    if (!newobj)
+        return NULL;
 
-	s = PyString_AS_STRING(newobj);
+    s = PyString_AS_STRING(newobj);
 
-	Py_MEMCPY(s, PyString_AS_STRING(self), n);
+    Py_MEMCPY(s, PyString_AS_STRING(self), n);
 
-	for (i = 0; i < n; i++) {
-		int c = Py_CHARMASK(s[i]);
-		if (islower(c))
-			s[i] = _toupper(c);
-	}
+    for (i = 0; i < n; i++) {
+        int c = Py_CHARMASK(s[i]);
+        if (islower(c))
+            s[i] = _toupper(c);
+    }
 
-	return newobj;
+    return newobj;
 }
 
 PyDoc_STRVAR(title__doc__,
@@ -2043,30 +2043,30 @@
 static PyObject*
 string_title(PyStringObject *self)
 {
-	char *s = PyString_AS_STRING(self), *s_new;
-	Py_ssize_t i, n = PyString_GET_SIZE(self);
-	int previous_is_cased = 0;
-	PyObject *newobj;
+    char *s = PyString_AS_STRING(self), *s_new;
+    Py_ssize_t i, n = PyString_GET_SIZE(self);
+    int previous_is_cased = 0;
+    PyObject *newobj;
 
-	newobj = PyString_FromStringAndSize(NULL, n);
-	if (newobj == NULL)
-		return NULL;
-	s_new = PyString_AsString(newobj);
-	for (i = 0; i < n; i++) {
-		int c = Py_CHARMASK(*s++);
-		if (islower(c)) {
-			if (!previous_is_cased)
-			    c = toupper(c);
-			previous_is_cased = 1;
-		} else if (isupper(c)) {
-			if (previous_is_cased)
-			    c = tolower(c);
-			previous_is_cased = 1;
-		} else
-			previous_is_cased = 0;
-		*s_new++ = c;
-	}
-	return newobj;
+    newobj = PyString_FromStringAndSize(NULL, n);
+    if (newobj == NULL)
+        return NULL;
+    s_new = PyString_AsString(newobj);
+    for (i = 0; i < n; i++) {
+        int c = Py_CHARMASK(*s++);
+        if (islower(c)) {
+            if (!previous_is_cased)
+                c = toupper(c);
+            previous_is_cased = 1;
+        } else if (isupper(c)) {
+            if (previous_is_cased)
+                c = tolower(c);
+            previous_is_cased = 1;
+        } else
+            previous_is_cased = 0;
+        *s_new++ = c;
+    }
+    return newobj;
 }
 
 PyDoc_STRVAR(capitalize__doc__,
@@ -2078,31 +2078,31 @@
 static PyObject *
 string_capitalize(PyStringObject *self)
 {
-	char *s = PyString_AS_STRING(self), *s_new;
-	Py_ssize_t i, n = PyString_GET_SIZE(self);
-	PyObject *newobj;
+    char *s = PyString_AS_STRING(self), *s_new;
+    Py_ssize_t i, n = PyString_GET_SIZE(self);
+    PyObject *newobj;
 
-	newobj = PyString_FromStringAndSize(NULL, n);
-	if (newobj == NULL)
-		return NULL;
-	s_new = PyString_AsString(newobj);
-	if (0 < n) {
-		int c = Py_CHARMASK(*s++);
-		if (islower(c))
-			*s_new = toupper(c);
-		else
-			*s_new = c;
-		s_new++;
-	}
-	for (i = 1; i < n; i++) {
-		int c = Py_CHARMASK(*s++);
-		if (isupper(c))
-			*s_new = tolower(c);
-		else
-			*s_new = c;
-		s_new++;
-	}
-	return newobj;
+    newobj = PyString_FromStringAndSize(NULL, n);
+    if (newobj == NULL)
+        return NULL;
+    s_new = PyString_AsString(newobj);
+    if (0 < n) {
+        int c = Py_CHARMASK(*s++);
+        if (islower(c))
+            *s_new = toupper(c);
+        else
+            *s_new = c;
+        s_new++;
+    }
+    for (i = 1; i < n; i++) {
+        int c = Py_CHARMASK(*s++);
+        if (isupper(c))
+            *s_new = tolower(c);
+        else
+            *s_new = c;
+        s_new++;
+    }
+    return newobj;
 }
 
 
@@ -2116,37 +2116,37 @@
 static PyObject *
 string_count(PyStringObject *self, PyObject *args)
 {
-	PyObject *sub_obj;
-	const char *str = PyString_AS_STRING(self), *sub;
-	Py_ssize_t sub_len;
-	Py_ssize_t start = 0, end = PY_SSIZE_T_MAX;
+    PyObject *sub_obj;
+    const char *str = PyString_AS_STRING(self), *sub;
+    Py_ssize_t sub_len;
+    Py_ssize_t start = 0, end = PY_SSIZE_T_MAX;
 
-	if (!PyArg_ParseTuple(args, "O|O&O&:count", &sub_obj,
-		_PyEval_SliceIndex, &start, _PyEval_SliceIndex, &end))
-		return NULL;
+    if (!PyArg_ParseTuple(args, "O|O&O&:count", &sub_obj,
+        _PyEval_SliceIndex, &start, _PyEval_SliceIndex, &end))
+        return NULL;
 
-	if (PyString_Check(sub_obj)) {
-		sub = PyString_AS_STRING(sub_obj);
-		sub_len = PyString_GET_SIZE(sub_obj);
-	}
+    if (PyString_Check(sub_obj)) {
+        sub = PyString_AS_STRING(sub_obj);
+        sub_len = PyString_GET_SIZE(sub_obj);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(sub_obj)) {
-		Py_ssize_t count;
-		count = PyUnicode_Count((PyObject *)self, sub_obj, start, end);
-		if (count == -1)
-			return NULL;
-		else
-		    	return PyInt_FromSsize_t(count);
-	}
+    else if (PyUnicode_Check(sub_obj)) {
+        Py_ssize_t count;
+        count = PyUnicode_Count((PyObject *)self, sub_obj, start, end);
+        if (count == -1)
+            return NULL;
+        else
+            return PyInt_FromSsize_t(count);
+    }
 #endif
-	else if (PyObject_AsCharBuffer(sub_obj, &sub, &sub_len))
-		return NULL;
+    else if (PyObject_AsCharBuffer(sub_obj, &sub, &sub_len))
+        return NULL;
 
-	ADJUST_INDICES(start, end, PyString_GET_SIZE(self));
+    ADJUST_INDICES(start, end, PyString_GET_SIZE(self));
 
-	return PyInt_FromSsize_t(
-		stringlib_count(str + start, end - start, sub, sub_len, PY_SSIZE_T_MAX)
-		);
+    return PyInt_FromSsize_t(
+        stringlib_count(str + start, end - start, sub, sub_len, PY_SSIZE_T_MAX)
+        );
 }
 
 PyDoc_STRVAR(swapcase__doc__,
@@ -2158,27 +2158,27 @@
 static PyObject *
 string_swapcase(PyStringObject *self)
 {
-	char *s = PyString_AS_STRING(self), *s_new;
-	Py_ssize_t i, n = PyString_GET_SIZE(self);
-	PyObject *newobj;
+    char *s = PyString_AS_STRING(self), *s_new;
+    Py_ssize_t i, n = PyString_GET_SIZE(self);
+    PyObject *newobj;
 
-	newobj = PyString_FromStringAndSize(NULL, n);
-	if (newobj == NULL)
-		return NULL;
-	s_new = PyString_AsString(newobj);
-	for (i = 0; i < n; i++) {
-		int c = Py_CHARMASK(*s++);
-		if (islower(c)) {
-			*s_new = toupper(c);
-		}
-		else if (isupper(c)) {
-			*s_new = tolower(c);
-		}
-		else
-			*s_new = c;
-		s_new++;
-	}
-	return newobj;
+    newobj = PyString_FromStringAndSize(NULL, n);
+    if (newobj == NULL)
+        return NULL;
+    s_new = PyString_AsString(newobj);
+    for (i = 0; i < n; i++) {
+        int c = Py_CHARMASK(*s++);
+        if (islower(c)) {
+            *s_new = toupper(c);
+        }
+        else if (isupper(c)) {
+            *s_new = tolower(c);
+        }
+        else
+            *s_new = c;
+        s_new++;
+    }
+    return newobj;
 }
 
 
@@ -2193,124 +2193,124 @@
 static PyObject *
 string_translate(PyStringObject *self, PyObject *args)
 {
-	register char *input, *output;
-	const char *table;
-	register Py_ssize_t i, c, changed = 0;
-	PyObject *input_obj = (PyObject*)self;
-	const char *output_start, *del_table=NULL;
-	Py_ssize_t inlen, tablen, dellen = 0;
-	PyObject *result;
-	int trans_table[256];
-	PyObject *tableobj, *delobj = NULL;
+    register char *input, *output;
+    const char *table;
+    register Py_ssize_t i, c, changed = 0;
+    PyObject *input_obj = (PyObject*)self;
+    const char *output_start, *del_table=NULL;
+    Py_ssize_t inlen, tablen, dellen = 0;
+    PyObject *result;
+    int trans_table[256];
+    PyObject *tableobj, *delobj = NULL;
 
-	if (!PyArg_UnpackTuple(args, "translate", 1, 2,
-			      &tableobj, &delobj))
-		return NULL;
+    if (!PyArg_UnpackTuple(args, "translate", 1, 2,
+                          &tableobj, &delobj))
+        return NULL;
 
-	if (PyString_Check(tableobj)) {
-		table = PyString_AS_STRING(tableobj);
-		tablen = PyString_GET_SIZE(tableobj);
-	}
-	else if (tableobj == Py_None) {
-		table = NULL;
-		tablen = 256;
-	}
+    if (PyString_Check(tableobj)) {
+        table = PyString_AS_STRING(tableobj);
+        tablen = PyString_GET_SIZE(tableobj);
+    }
+    else if (tableobj == Py_None) {
+        table = NULL;
+        tablen = 256;
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(tableobj)) {
-		/* Unicode .translate() does not support the deletechars
-		   parameter; instead a mapping to None will cause characters
-		   to be deleted. */
-		if (delobj != NULL) {
-			PyErr_SetString(PyExc_TypeError,
-			"deletions are implemented differently for unicode");
-			return NULL;
-		}
-		return PyUnicode_Translate((PyObject *)self, tableobj, NULL);
-	}
+    else if (PyUnicode_Check(tableobj)) {
+        /* Unicode .translate() does not support the deletechars
+           parameter; instead a mapping to None will cause characters
+           to be deleted. */
+        if (delobj != NULL) {
+            PyErr_SetString(PyExc_TypeError,
+            "deletions are implemented differently for unicode");
+            return NULL;
+        }
+        return PyUnicode_Translate((PyObject *)self, tableobj, NULL);
+    }
 #endif
-	else if (PyObject_AsCharBuffer(tableobj, &table, &tablen))
-		return NULL;
+    else if (PyObject_AsCharBuffer(tableobj, &table, &tablen))
+        return NULL;
 
-	if (tablen != 256) {
-		PyErr_SetString(PyExc_ValueError,
-		  "translation table must be 256 characters long");
-		return NULL;
-	}
+    if (tablen != 256) {
+        PyErr_SetString(PyExc_ValueError,
+          "translation table must be 256 characters long");
+        return NULL;
+    }
 
-	if (delobj != NULL) {
-		if (PyString_Check(delobj)) {
-			del_table = PyString_AS_STRING(delobj);
-			dellen = PyString_GET_SIZE(delobj);
-		}
+    if (delobj != NULL) {
+        if (PyString_Check(delobj)) {
+            del_table = PyString_AS_STRING(delobj);
+            dellen = PyString_GET_SIZE(delobj);
+        }
 #ifdef Py_USING_UNICODE
-		else if (PyUnicode_Check(delobj)) {
-			PyErr_SetString(PyExc_TypeError,
-			"deletions are implemented differently for unicode");
-			return NULL;
-		}
+        else if (PyUnicode_Check(delobj)) {
+            PyErr_SetString(PyExc_TypeError,
+            "deletions are implemented differently for unicode");
+            return NULL;
+        }
 #endif
-		else if (PyObject_AsCharBuffer(delobj, &del_table, &dellen))
-			return NULL;
-	}
-	else {
-		del_table = NULL;
-		dellen = 0;
-	}
+        else if (PyObject_AsCharBuffer(delobj, &del_table, &dellen))
+            return NULL;
+    }
+    else {
+        del_table = NULL;
+        dellen = 0;
+    }
 
-	inlen = PyString_GET_SIZE(input_obj);
-	result = PyString_FromStringAndSize((char *)NULL, inlen);
-	if (result == NULL)
-		return NULL;
-	output_start = output = PyString_AsString(result);
-	input = PyString_AS_STRING(input_obj);
+    inlen = PyString_GET_SIZE(input_obj);
+    result = PyString_FromStringAndSize((char *)NULL, inlen);
+    if (result == NULL)
+        return NULL;
+    output_start = output = PyString_AsString(result);
+    input = PyString_AS_STRING(input_obj);
 
-	if (dellen == 0 && table != NULL) {
-		/* If no deletions are required, use faster code */
-		for (i = inlen; --i >= 0; ) {
-			c = Py_CHARMASK(*input++);
-			if (Py_CHARMASK((*output++ = table[c])) != c)
-				changed = 1;
-		}
-		if (changed || !PyString_CheckExact(input_obj))
-			return result;
-		Py_DECREF(result);
-		Py_INCREF(input_obj);
-		return input_obj;
-	}
+    if (dellen == 0 && table != NULL) {
+        /* If no deletions are required, use faster code */
+        for (i = inlen; --i >= 0; ) {
+            c = Py_CHARMASK(*input++);
+            if (Py_CHARMASK((*output++ = table[c])) != c)
+                changed = 1;
+        }
+        if (changed || !PyString_CheckExact(input_obj))
+            return result;
+        Py_DECREF(result);
+        Py_INCREF(input_obj);
+        return input_obj;
+    }
 
-	if (table == NULL) {
-		for (i = 0; i < 256; i++)
-			trans_table[i] = Py_CHARMASK(i);
-	} else {
-		for (i = 0; i < 256; i++)
-			trans_table[i] = Py_CHARMASK(table[i]);
-	}
+    if (table == NULL) {
+        for (i = 0; i < 256; i++)
+            trans_table[i] = Py_CHARMASK(i);
+    } else {
+        for (i = 0; i < 256; i++)
+            trans_table[i] = Py_CHARMASK(table[i]);
+    }
 
-	for (i = 0; i < dellen; i++)
-		trans_table[(int) Py_CHARMASK(del_table[i])] = -1;
+    for (i = 0; i < dellen; i++)
+        trans_table[(int) Py_CHARMASK(del_table[i])] = -1;
 
-	for (i = inlen; --i >= 0; ) {
-		c = Py_CHARMASK(*input++);
-		if (trans_table[c] != -1)
-			if (Py_CHARMASK(*output++ = (char)trans_table[c]) == c)
-				continue;
-		changed = 1;
-	}
-	if (!changed && PyString_CheckExact(input_obj)) {
-		Py_DECREF(result);
-		Py_INCREF(input_obj);
-		return input_obj;
-	}
-	/* Fix the size of the resulting string */
-	if (inlen > 0 && _PyString_Resize(&result, output - output_start))
-		return NULL;
-	return result;
+    for (i = inlen; --i >= 0; ) {
+        c = Py_CHARMASK(*input++);
+        if (trans_table[c] != -1)
+            if (Py_CHARMASK(*output++ = (char)trans_table[c]) == c)
+                continue;
+        changed = 1;
+    }
+    if (!changed && PyString_CheckExact(input_obj)) {
+        Py_DECREF(result);
+        Py_INCREF(input_obj);
+        return input_obj;
+    }
+    /* Fix the size of the resulting string */
+    if (inlen > 0 && _PyString_Resize(&result, output - output_start))
+        return NULL;
+    return result;
 }
 
 
 /* find and count characters and substrings */
 
-#define findchar(target, target_len, c)				\
+#define findchar(target, target_len, c)                         \
   ((char *)memchr((const void *)(target), c, target_len))
 
 /* String ops must return a string.  */
@@ -2318,29 +2318,29 @@
 Py_LOCAL(PyStringObject *)
 return_self(PyStringObject *self)
 {
-	if (PyString_CheckExact(self)) {
-		Py_INCREF(self);
-		return self;
-	}
-	return (PyStringObject *)PyString_FromStringAndSize(
-		PyString_AS_STRING(self),
-		PyString_GET_SIZE(self));
+    if (PyString_CheckExact(self)) {
+        Py_INCREF(self);
+        return self;
+    }
+    return (PyStringObject *)PyString_FromStringAndSize(
+        PyString_AS_STRING(self),
+        PyString_GET_SIZE(self));
 }
 
 Py_LOCAL_INLINE(Py_ssize_t)
 countchar(const char *target, int target_len, char c, Py_ssize_t maxcount)
 {
-	Py_ssize_t count=0;
-	const char *start=target;
-	const char *end=target+target_len;
+    Py_ssize_t count=0;
+    const char *start=target;
+    const char *end=target+target_len;
 
-	while ( (start=findchar(start, end-start, c)) != NULL ) {
-		count++;
-		if (count >= maxcount)
-			break;
-		start += 1;
-	}
-	return count;
+    while ( (start=findchar(start, end-start, c)) != NULL ) {
+        count++;
+        if (count >= maxcount)
+            break;
+        start += 1;
+    }
+    return count;
 }
 
 
@@ -2349,460 +2349,460 @@
 /* len(self)>=1, from="", len(to)>=1, maxcount>=1 */
 Py_LOCAL(PyStringObject *)
 replace_interleave(PyStringObject *self,
-		   const char *to_s, Py_ssize_t to_len,
-		   Py_ssize_t maxcount)
+                   const char *to_s, Py_ssize_t to_len,
+                   Py_ssize_t maxcount)
 {
-	char *self_s, *result_s;
-	Py_ssize_t self_len, result_len;
-	Py_ssize_t count, i, product;
-	PyStringObject *result;
+    char *self_s, *result_s;
+    Py_ssize_t self_len, result_len;
+    Py_ssize_t count, i, product;
+    PyStringObject *result;
 
-	self_len = PyString_GET_SIZE(self);
+    self_len = PyString_GET_SIZE(self);
 
-	/* 1 at the end plus 1 after every character */
-	count = self_len+1;
-	if (maxcount < count) 
-		count = maxcount;
+    /* 1 at the end plus 1 after every character */
+    count = self_len+1;
+    if (maxcount < count)
+        count = maxcount;
 
-	/* Check for overflow */
-	/*   result_len = count * to_len + self_len; */
-	product = count * to_len;
-	if (product / to_len != count) {
-		PyErr_SetString(PyExc_OverflowError,
-				"replace string is too long");
-		return NULL;
-	}
-	result_len = product + self_len;
-	if (result_len < 0) {
-		PyErr_SetString(PyExc_OverflowError,
-				"replace string is too long");
-		return NULL;
-	}
-  
-	if (! (result = (PyStringObject *)
-	                 PyString_FromStringAndSize(NULL, result_len)) )
-		return NULL;
+    /* Check for overflow */
+    /*   result_len = count * to_len + self_len; */
+    product = count * to_len;
+    if (product / to_len != count) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "replace string is too long");
+        return NULL;
+    }
+    result_len = product + self_len;
+    if (result_len < 0) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "replace string is too long");
+        return NULL;
+    }
 
-	self_s = PyString_AS_STRING(self);
-	result_s = PyString_AS_STRING(result);
+    if (! (result = (PyStringObject *)
+                     PyString_FromStringAndSize(NULL, result_len)) )
+        return NULL;
 
-	/* TODO: special case single character, which doesn't need memcpy */
+    self_s = PyString_AS_STRING(self);
+    result_s = PyString_AS_STRING(result);
 
-	/* Lay the first one down (guaranteed this will occur) */
-	Py_MEMCPY(result_s, to_s, to_len);
-	result_s += to_len;
-	count -= 1;
-  
-	for (i=0; i<count; i++) {
-		*result_s++ = *self_s++;
-		Py_MEMCPY(result_s, to_s, to_len);
-		result_s += to_len;
-	}
+    /* TODO: special case single character, which doesn't need memcpy */
 
-	/* Copy the rest of the original string */
-	Py_MEMCPY(result_s, self_s, self_len-i);
+    /* Lay the first one down (guaranteed this will occur) */
+    Py_MEMCPY(result_s, to_s, to_len);
+    result_s += to_len;
+    count -= 1;
 
-	return result;
+    for (i=0; i<count; i++) {
+        *result_s++ = *self_s++;
+        Py_MEMCPY(result_s, to_s, to_len);
+        result_s += to_len;
+    }
+
+    /* Copy the rest of the original string */
+    Py_MEMCPY(result_s, self_s, self_len-i);
+
+    return result;
 }
 
 /* Special case for deleting a single character */
 /* len(self)>=1, len(from)==1, to="", maxcount>=1 */
 Py_LOCAL(PyStringObject *)
 replace_delete_single_character(PyStringObject *self,
-				char from_c, Py_ssize_t maxcount)
+                                char from_c, Py_ssize_t maxcount)
 {
-	char *self_s, *result_s;
-	char *start, *next, *end;
-	Py_ssize_t self_len, result_len;
-	Py_ssize_t count;
-	PyStringObject *result;
+    char *self_s, *result_s;
+    char *start, *next, *end;
+    Py_ssize_t self_len, result_len;
+    Py_ssize_t count;
+    PyStringObject *result;
 
-	self_len = PyString_GET_SIZE(self);
-	self_s = PyString_AS_STRING(self);
+    self_len = PyString_GET_SIZE(self);
+    self_s = PyString_AS_STRING(self);
 
-	count = countchar(self_s, self_len, from_c, maxcount);
-	if (count == 0) {
-		return return_self(self);
-	}
-  
-	result_len = self_len - count;  /* from_len == 1 */
-	assert(result_len>=0);
+    count = countchar(self_s, self_len, from_c, maxcount);
+    if (count == 0) {
+        return return_self(self);
+    }
 
-	if ( (result = (PyStringObject *)
-	                PyString_FromStringAndSize(NULL, result_len)) == NULL)
-		return NULL;
-	result_s = PyString_AS_STRING(result);
+    result_len = self_len - count;  /* from_len == 1 */
+    assert(result_len>=0);
 
-	start = self_s;
-	end = self_s + self_len;
-	while (count-- > 0) {
-		next = findchar(start, end-start, from_c);
-		if (next == NULL)
-			break;
-		Py_MEMCPY(result_s, start, next-start);
-		result_s += (next-start);
-		start = next+1;
-	}
-	Py_MEMCPY(result_s, start, end-start);
+    if ( (result = (PyStringObject *)
+                    PyString_FromStringAndSize(NULL, result_len)) == NULL)
+        return NULL;
+    result_s = PyString_AS_STRING(result);
 
-	return result;
+    start = self_s;
+    end = self_s + self_len;
+    while (count-- > 0) {
+        next = findchar(start, end-start, from_c);
+        if (next == NULL)
+            break;
+        Py_MEMCPY(result_s, start, next-start);
+        result_s += (next-start);
+        start = next+1;
+    }
+    Py_MEMCPY(result_s, start, end-start);
+
+    return result;
 }
 
 /* len(self)>=1, len(from)>=2, to="", maxcount>=1 */
 
 Py_LOCAL(PyStringObject *)
 replace_delete_substring(PyStringObject *self,
-			 const char *from_s, Py_ssize_t from_len,
-			 Py_ssize_t maxcount) {
-	char *self_s, *result_s;
-	char *start, *next, *end;
-	Py_ssize_t self_len, result_len;
-	Py_ssize_t count, offset;
-	PyStringObject *result;
+                         const char *from_s, Py_ssize_t from_len,
+                         Py_ssize_t maxcount) {
+    char *self_s, *result_s;
+    char *start, *next, *end;
+    Py_ssize_t self_len, result_len;
+    Py_ssize_t count, offset;
+    PyStringObject *result;
 
-	self_len = PyString_GET_SIZE(self);
-	self_s = PyString_AS_STRING(self);
+    self_len = PyString_GET_SIZE(self);
+    self_s = PyString_AS_STRING(self);
 
-	count = stringlib_count(self_s, self_len,
-	                        from_s, from_len,
-	                        maxcount);
+    count = stringlib_count(self_s, self_len,
+                            from_s, from_len,
+                            maxcount);
 
-	if (count == 0) {
-		/* no matches */
-		return return_self(self);
-	}
+    if (count == 0) {
+        /* no matches */
+        return return_self(self);
+    }
 
-	result_len = self_len - (count * from_len);
-	assert (result_len>=0);
+    result_len = self_len - (count * from_len);
+    assert (result_len>=0);
 
-	if ( (result = (PyStringObject *)
-	      PyString_FromStringAndSize(NULL, result_len)) == NULL )
-		return NULL;
+    if ( (result = (PyStringObject *)
+          PyString_FromStringAndSize(NULL, result_len)) == NULL )
+        return NULL;
 
-	result_s = PyString_AS_STRING(result);
+    result_s = PyString_AS_STRING(result);
 
-	start = self_s;
-	end = self_s + self_len;
-	while (count-- > 0) {
-		offset = stringlib_find(start, end-start,
-		                        from_s, from_len,
-		                        0);
-		if (offset == -1)
-			break;
-		next = start + offset;
+    start = self_s;
+    end = self_s + self_len;
+    while (count-- > 0) {
+        offset = stringlib_find(start, end-start,
+                                from_s, from_len,
+                                0);
+        if (offset == -1)
+            break;
+        next = start + offset;
 
-		Py_MEMCPY(result_s, start, next-start);
+        Py_MEMCPY(result_s, start, next-start);
 
-		result_s += (next-start);
-		start = next+from_len;
-	}
-	Py_MEMCPY(result_s, start, end-start);
-	return result;
+        result_s += (next-start);
+        start = next+from_len;
+    }
+    Py_MEMCPY(result_s, start, end-start);
+    return result;
 }
 
 /* len(self)>=1, len(from)==len(to)==1, maxcount>=1 */
 Py_LOCAL(PyStringObject *)
 replace_single_character_in_place(PyStringObject *self,
-				  char from_c, char to_c,
-				  Py_ssize_t maxcount)
+                                  char from_c, char to_c,
+                                  Py_ssize_t maxcount)
 {
-	char *self_s, *result_s, *start, *end, *next;
-	Py_ssize_t self_len;
-	PyStringObject *result;
+    char *self_s, *result_s, *start, *end, *next;
+    Py_ssize_t self_len;
+    PyStringObject *result;
 
-	/* The result string will be the same size */
-	self_s = PyString_AS_STRING(self);
-	self_len = PyString_GET_SIZE(self);
+    /* The result string will be the same size */
+    self_s = PyString_AS_STRING(self);
+    self_len = PyString_GET_SIZE(self);
 
-	next = findchar(self_s, self_len, from_c);
+    next = findchar(self_s, self_len, from_c);
 
-	if (next == NULL) {
-		/* No matches; return the original string */
-		return return_self(self);
-	}
+    if (next == NULL) {
+        /* No matches; return the original string */
+        return return_self(self);
+    }
 
-	/* Need to make a new string */
-	result = (PyStringObject *) PyString_FromStringAndSize(NULL, self_len);
-	if (result == NULL)
-		return NULL;
-	result_s = PyString_AS_STRING(result);
-	Py_MEMCPY(result_s, self_s, self_len);
+    /* Need to make a new string */
+    result = (PyStringObject *) PyString_FromStringAndSize(NULL, self_len);
+    if (result == NULL)
+        return NULL;
+    result_s = PyString_AS_STRING(result);
+    Py_MEMCPY(result_s, self_s, self_len);
 
-	/* change everything in-place, starting with this one */
-	start =  result_s + (next-self_s);
-	*start = to_c;
-	start++;
-	end = result_s + self_len;
+    /* change everything in-place, starting with this one */
+    start =  result_s + (next-self_s);
+    *start = to_c;
+    start++;
+    end = result_s + self_len;
 
-	while (--maxcount > 0) {
-		next = findchar(start, end-start, from_c);
-		if (next == NULL)
-			break;
-		*next = to_c;
-		start = next+1;
-	}
+    while (--maxcount > 0) {
+        next = findchar(start, end-start, from_c);
+        if (next == NULL)
+            break;
+        *next = to_c;
+        start = next+1;
+    }
 
-	return result;
+    return result;
 }
 
 /* len(self)>=1, len(from)==len(to)>=2, maxcount>=1 */
 Py_LOCAL(PyStringObject *)
 replace_substring_in_place(PyStringObject *self,
-			   const char *from_s, Py_ssize_t from_len,
-			   const char *to_s, Py_ssize_t to_len,
-			   Py_ssize_t maxcount)
+                           const char *from_s, Py_ssize_t from_len,
+                           const char *to_s, Py_ssize_t to_len,
+                           Py_ssize_t maxcount)
 {
-	char *result_s, *start, *end;
-	char *self_s;
-	Py_ssize_t self_len, offset;
-	PyStringObject *result;
+    char *result_s, *start, *end;
+    char *self_s;
+    Py_ssize_t self_len, offset;
+    PyStringObject *result;
 
-	/* The result string will be the same size */
+    /* The result string will be the same size */
 
-	self_s = PyString_AS_STRING(self);
-	self_len = PyString_GET_SIZE(self);
+    self_s = PyString_AS_STRING(self);
+    self_len = PyString_GET_SIZE(self);
 
-	offset = stringlib_find(self_s, self_len,
-	                        from_s, from_len,
-	                        0);
-	if (offset == -1) {
-		/* No matches; return the original string */
-		return return_self(self);
-	}
+    offset = stringlib_find(self_s, self_len,
+                            from_s, from_len,
+                            0);
+    if (offset == -1) {
+        /* No matches; return the original string */
+        return return_self(self);
+    }
 
-	/* Need to make a new string */
-	result = (PyStringObject *) PyString_FromStringAndSize(NULL, self_len);
-	if (result == NULL)
-		return NULL;
-	result_s = PyString_AS_STRING(result);
-	Py_MEMCPY(result_s, self_s, self_len);
+    /* Need to make a new string */
+    result = (PyStringObject *) PyString_FromStringAndSize(NULL, self_len);
+    if (result == NULL)
+        return NULL;
+    result_s = PyString_AS_STRING(result);
+    Py_MEMCPY(result_s, self_s, self_len);
 
-	/* change everything in-place, starting with this one */
-	start =  result_s + offset;
-	Py_MEMCPY(start, to_s, from_len);
-	start += from_len;
-	end = result_s + self_len;
+    /* change everything in-place, starting with this one */
+    start =  result_s + offset;
+    Py_MEMCPY(start, to_s, from_len);
+    start += from_len;
+    end = result_s + self_len;
 
-	while ( --maxcount > 0) {
-		offset = stringlib_find(start, end-start,
-		                        from_s, from_len,
-		                        0);
-		if (offset==-1)
-			break;
-		Py_MEMCPY(start+offset, to_s, from_len);
-		start += offset+from_len;
-	}
+    while ( --maxcount > 0) {
+        offset = stringlib_find(start, end-start,
+                                from_s, from_len,
+                                0);
+        if (offset==-1)
+            break;
+        Py_MEMCPY(start+offset, to_s, from_len);
+        start += offset+from_len;
+    }
 
-	return result;
+    return result;
 }
 
 /* len(self)>=1, len(from)==1, len(to)>=2, maxcount>=1 */
 Py_LOCAL(PyStringObject *)
 replace_single_character(PyStringObject *self,
-			 char from_c,
-			 const char *to_s, Py_ssize_t to_len,
-			 Py_ssize_t maxcount)
+                         char from_c,
+                         const char *to_s, Py_ssize_t to_len,
+                         Py_ssize_t maxcount)
 {
-	char *self_s, *result_s;
-	char *start, *next, *end;
-	Py_ssize_t self_len, result_len;
-	Py_ssize_t count, product;
-	PyStringObject *result;
+    char *self_s, *result_s;
+    char *start, *next, *end;
+    Py_ssize_t self_len, result_len;
+    Py_ssize_t count, product;
+    PyStringObject *result;
 
-	self_s = PyString_AS_STRING(self);
-	self_len = PyString_GET_SIZE(self);
+    self_s = PyString_AS_STRING(self);
+    self_len = PyString_GET_SIZE(self);
 
-	count = countchar(self_s, self_len, from_c, maxcount);
-	if (count == 0) {
-		/* no matches, return unchanged */
-		return return_self(self);
-	}
+    count = countchar(self_s, self_len, from_c, maxcount);
+    if (count == 0) {
+        /* no matches, return unchanged */
+        return return_self(self);
+    }
 
-	/* use the difference between current and new, hence the "-1" */
-	/*   result_len = self_len + count * (to_len-1)  */
-	product = count * (to_len-1);
-	if (product / (to_len-1) != count) {
-		PyErr_SetString(PyExc_OverflowError, "replace string is too long");
-		return NULL;
-	}
-	result_len = self_len + product;
-	if (result_len < 0) {
-		PyErr_SetString(PyExc_OverflowError, "replace string is too long");
-		return NULL;
-	}
+    /* use the difference between current and new, hence the "-1" */
+    /*   result_len = self_len + count * (to_len-1)  */
+    product = count * (to_len-1);
+    if (product / (to_len-1) != count) {
+        PyErr_SetString(PyExc_OverflowError, "replace string is too long");
+        return NULL;
+    }
+    result_len = self_len + product;
+    if (result_len < 0) {
+        PyErr_SetString(PyExc_OverflowError, "replace string is too long");
+        return NULL;
+    }
 
-	if ( (result = (PyStringObject *)
-	      PyString_FromStringAndSize(NULL, result_len)) == NULL)
-		return NULL;
-	result_s = PyString_AS_STRING(result);
+    if ( (result = (PyStringObject *)
+          PyString_FromStringAndSize(NULL, result_len)) == NULL)
+        return NULL;
+    result_s = PyString_AS_STRING(result);
 
-	start = self_s;
-	end = self_s + self_len;
-	while (count-- > 0) {
-		next = findchar(start, end-start, from_c);
-		if (next == NULL) 
-			break;
+    start = self_s;
+    end = self_s + self_len;
+    while (count-- > 0) {
+        next = findchar(start, end-start, from_c);
+        if (next == NULL)
+            break;
 
-		if (next == start) {
-			/* replace with the 'to' */
-			Py_MEMCPY(result_s, to_s, to_len);
-			result_s += to_len;
-			start += 1;
-		} else {
-			/* copy the unchanged old then the 'to' */
-			Py_MEMCPY(result_s, start, next-start);
-			result_s += (next-start);
-			Py_MEMCPY(result_s, to_s, to_len);
-			result_s += to_len;
-			start = next+1;
-		}
-	}
-	/* Copy the remainder of the remaining string */
-	Py_MEMCPY(result_s, start, end-start);
+        if (next == start) {
+            /* replace with the 'to' */
+            Py_MEMCPY(result_s, to_s, to_len);
+            result_s += to_len;
+            start += 1;
+        } else {
+            /* copy the unchanged old then the 'to' */
+            Py_MEMCPY(result_s, start, next-start);
+            result_s += (next-start);
+            Py_MEMCPY(result_s, to_s, to_len);
+            result_s += to_len;
+            start = next+1;
+        }
+    }
+    /* Copy the remainder of the remaining string */
+    Py_MEMCPY(result_s, start, end-start);
 
-	return result;
+    return result;
 }
 
 /* len(self)>=1, len(from)>=2, len(to)>=2, maxcount>=1 */
 Py_LOCAL(PyStringObject *)
 replace_substring(PyStringObject *self,
-		  const char *from_s, Py_ssize_t from_len,
-		  const char *to_s, Py_ssize_t to_len,
-		  Py_ssize_t maxcount) {
-	char *self_s, *result_s;
-	char *start, *next, *end;
-	Py_ssize_t self_len, result_len;
-	Py_ssize_t count, offset, product;
-	PyStringObject *result;
+                  const char *from_s, Py_ssize_t from_len,
+                  const char *to_s, Py_ssize_t to_len,
+                  Py_ssize_t maxcount) {
+    char *self_s, *result_s;
+    char *start, *next, *end;
+    Py_ssize_t self_len, result_len;
+    Py_ssize_t count, offset, product;
+    PyStringObject *result;
 
-	self_s = PyString_AS_STRING(self);
-	self_len = PyString_GET_SIZE(self);
+    self_s = PyString_AS_STRING(self);
+    self_len = PyString_GET_SIZE(self);
 
-	count = stringlib_count(self_s, self_len,
-	                        from_s, from_len,
-	                        maxcount);
+    count = stringlib_count(self_s, self_len,
+                            from_s, from_len,
+                            maxcount);
 
-	if (count == 0) {
-		/* no matches, return unchanged */
-		return return_self(self);
-	}
+    if (count == 0) {
+        /* no matches, return unchanged */
+        return return_self(self);
+    }
 
-	/* Check for overflow */
-	/*    result_len = self_len + count * (to_len-from_len) */
-	product = count * (to_len-from_len);
-	if (product / (to_len-from_len) != count) {
-		PyErr_SetString(PyExc_OverflowError, "replace string is too long");
-		return NULL;
-	}
-	result_len = self_len + product;
-	if (result_len < 0) {
-		PyErr_SetString(PyExc_OverflowError, "replace string is too long");
-		return NULL;
-	}
+    /* Check for overflow */
+    /*    result_len = self_len + count * (to_len-from_len) */
+    product = count * (to_len-from_len);
+    if (product / (to_len-from_len) != count) {
+        PyErr_SetString(PyExc_OverflowError, "replace string is too long");
+        return NULL;
+    }
+    result_len = self_len + product;
+    if (result_len < 0) {
+        PyErr_SetString(PyExc_OverflowError, "replace string is too long");
+        return NULL;
+    }
 
-	if ( (result = (PyStringObject *)
-	      PyString_FromStringAndSize(NULL, result_len)) == NULL)
-		return NULL;
-	result_s = PyString_AS_STRING(result);
+    if ( (result = (PyStringObject *)
+          PyString_FromStringAndSize(NULL, result_len)) == NULL)
+        return NULL;
+    result_s = PyString_AS_STRING(result);
 
-	start = self_s;
-	end = self_s + self_len;
-	while (count-- > 0) {
-		offset = stringlib_find(start, end-start,
-		                        from_s, from_len,
-		                        0);
-		if (offset == -1)
-			break;
-		next = start+offset;
-		if (next == start) {
-			/* replace with the 'to' */
-			Py_MEMCPY(result_s, to_s, to_len);
-			result_s += to_len;
-			start += from_len;
-		} else {
-			/* copy the unchanged old then the 'to' */
-			Py_MEMCPY(result_s, start, next-start);
-			result_s += (next-start);
-			Py_MEMCPY(result_s, to_s, to_len);
-			result_s += to_len;
-			start = next+from_len;
-		}
-	}
-	/* Copy the remainder of the remaining string */
-	Py_MEMCPY(result_s, start, end-start);
+    start = self_s;
+    end = self_s + self_len;
+    while (count-- > 0) {
+        offset = stringlib_find(start, end-start,
+                                from_s, from_len,
+                                0);
+        if (offset == -1)
+            break;
+        next = start+offset;
+        if (next == start) {
+            /* replace with the 'to' */
+            Py_MEMCPY(result_s, to_s, to_len);
+            result_s += to_len;
+            start += from_len;
+        } else {
+            /* copy the unchanged old then the 'to' */
+            Py_MEMCPY(result_s, start, next-start);
+            result_s += (next-start);
+            Py_MEMCPY(result_s, to_s, to_len);
+            result_s += to_len;
+            start = next+from_len;
+        }
+    }
+    /* Copy the remainder of the remaining string */
+    Py_MEMCPY(result_s, start, end-start);
 
-	return result;
+    return result;
 }
 
 
 Py_LOCAL(PyStringObject *)
 replace(PyStringObject *self,
-	const char *from_s, Py_ssize_t from_len,
-	const char *to_s, Py_ssize_t to_len,
-	Py_ssize_t maxcount)
+    const char *from_s, Py_ssize_t from_len,
+    const char *to_s, Py_ssize_t to_len,
+    Py_ssize_t maxcount)
 {
-	if (maxcount < 0) {
-		maxcount = PY_SSIZE_T_MAX;
-	} else if (maxcount == 0 || PyString_GET_SIZE(self) == 0) {
-		/* nothing to do; return the original string */
-		return return_self(self);
-	}
+    if (maxcount < 0) {
+        maxcount = PY_SSIZE_T_MAX;
+    } else if (maxcount == 0 || PyString_GET_SIZE(self) == 0) {
+        /* nothing to do; return the original string */
+        return return_self(self);
+    }
 
-	if (maxcount == 0 ||
-	    (from_len == 0 && to_len == 0)) {
-		/* nothing to do; return the original string */
-		return return_self(self);
-	}
+    if (maxcount == 0 ||
+        (from_len == 0 && to_len == 0)) {
+        /* nothing to do; return the original string */
+        return return_self(self);
+    }
 
-	/* Handle zero-length special cases */
+    /* Handle zero-length special cases */
 
-	if (from_len == 0) {
-		/* insert the 'to' string everywhere.   */
-		/*    >>> "Python".replace("", ".")     */
-		/*    '.P.y.t.h.o.n.'                   */
-		return replace_interleave(self, to_s, to_len, maxcount);
-	}
+    if (from_len == 0) {
+        /* insert the 'to' string everywhere.   */
+        /*    >>> "Python".replace("", ".")     */
+        /*    '.P.y.t.h.o.n.'                   */
+        return replace_interleave(self, to_s, to_len, maxcount);
+    }
 
-	/* Except for "".replace("", "A") == "A" there is no way beyond this */
-	/* point for an empty self string to generate a non-empty string */
-	/* Special case so the remaining code always gets a non-empty string */
-	if (PyString_GET_SIZE(self) == 0) {
-		return return_self(self);
-	}
+    /* Except for "".replace("", "A") == "A" there is no way beyond this */
+    /* point for an empty self string to generate a non-empty string */
+    /* Special case so the remaining code always gets a non-empty string */
+    if (PyString_GET_SIZE(self) == 0) {
+        return return_self(self);
+    }
 
-	if (to_len == 0) {
-		/* delete all occurances of 'from' string */
-		if (from_len == 1) {
-			return replace_delete_single_character(
-				self, from_s[0], maxcount);
-		} else {
-			return replace_delete_substring(self, from_s, from_len, maxcount);
-		}
-	}
+    if (to_len == 0) {
+        /* delete all occurances of 'from' string */
+        if (from_len == 1) {
+            return replace_delete_single_character(
+                self, from_s[0], maxcount);
+        } else {
+            return replace_delete_substring(self, from_s, from_len, maxcount);
+        }
+    }
 
-	/* Handle special case where both strings have the same length */
+    /* Handle special case where both strings have the same length */
 
-	if (from_len == to_len) {
-		if (from_len == 1) {
-			return replace_single_character_in_place(
-				self,
-				from_s[0],
-				to_s[0],
-				maxcount);
-		} else {
-			return replace_substring_in_place(
-				self, from_s, from_len, to_s, to_len, maxcount);
-		}
-	}
+    if (from_len == to_len) {
+        if (from_len == 1) {
+            return replace_single_character_in_place(
+                self,
+                from_s[0],
+                to_s[0],
+                maxcount);
+        } else {
+            return replace_substring_in_place(
+                self, from_s, from_len, to_s, to_len, maxcount);
+        }
+    }
 
-	/* Otherwise use the more generic algorithms */
-	if (from_len == 1) {
-		return replace_single_character(self, from_s[0],
-						to_s, to_len, maxcount);
-	} else {
-		/* len('from')>=2, len('to')>=1 */
-		return replace_substring(self, from_s, from_len, to_s, to_len, maxcount);
-	}
+    /* Otherwise use the more generic algorithms */
+    if (from_len == 1) {
+        return replace_single_character(self, from_s[0],
+                                        to_s, to_len, maxcount);
+    } else {
+        /* len('from')>=2, len('to')>=1 */
+        return replace_substring(self, from_s, from_len, to_s, to_len, maxcount);
+    }
 }
 
 PyDoc_STRVAR(replace__doc__,
@@ -2815,41 +2815,41 @@
 static PyObject *
 string_replace(PyStringObject *self, PyObject *args)
 {
-	Py_ssize_t count = -1;
-	PyObject *from, *to;
-	const char *from_s, *to_s;
-	Py_ssize_t from_len, to_len;
+    Py_ssize_t count = -1;
+    PyObject *from, *to;
+    const char *from_s, *to_s;
+    Py_ssize_t from_len, to_len;
 
-	if (!PyArg_ParseTuple(args, "OO|n:replace", &from, &to, &count))
-		return NULL;
+    if (!PyArg_ParseTuple(args, "OO|n:replace", &from, &to, &count))
+        return NULL;
 
-	if (PyString_Check(from)) {
-		from_s = PyString_AS_STRING(from);
-		from_len = PyString_GET_SIZE(from);
-	}
+    if (PyString_Check(from)) {
+        from_s = PyString_AS_STRING(from);
+        from_len = PyString_GET_SIZE(from);
+    }
 #ifdef Py_USING_UNICODE
-	if (PyUnicode_Check(from))
-		return PyUnicode_Replace((PyObject *)self,
-					 from, to, count);
+    if (PyUnicode_Check(from))
+        return PyUnicode_Replace((PyObject *)self,
+                                 from, to, count);
 #endif
-	else if (PyObject_AsCharBuffer(from, &from_s, &from_len))
-		return NULL;
+    else if (PyObject_AsCharBuffer(from, &from_s, &from_len))
+        return NULL;
 
-	if (PyString_Check(to)) {
-		to_s = PyString_AS_STRING(to);
-		to_len = PyString_GET_SIZE(to);
-	}
+    if (PyString_Check(to)) {
+        to_s = PyString_AS_STRING(to);
+        to_len = PyString_GET_SIZE(to);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(to))
-		return PyUnicode_Replace((PyObject *)self,
-					 from, to, count);
+    else if (PyUnicode_Check(to))
+        return PyUnicode_Replace((PyObject *)self,
+                                 from, to, count);
 #endif
-	else if (PyObject_AsCharBuffer(to, &to_s, &to_len))
-		return NULL;
+    else if (PyObject_AsCharBuffer(to, &to_s, &to_len))
+        return NULL;
 
-	return (PyObject *)replace((PyStringObject *) self,
-				   from_s, from_len,
-				   to_s, to_len, count);
+    return (PyObject *)replace((PyStringObject *) self,
+                               from_s, from_len,
+                               to_s, to_len, count);
 }
 
 /** End DALKE **/
@@ -2860,43 +2860,43 @@
  */
 Py_LOCAL(int)
 _string_tailmatch(PyStringObject *self, PyObject *substr, Py_ssize_t start,
-		  Py_ssize_t end, int direction)
+                  Py_ssize_t end, int direction)
 {
-	Py_ssize_t len = PyString_GET_SIZE(self);
-	Py_ssize_t slen;
-	const char* sub;
-	const char* str;
+    Py_ssize_t len = PyString_GET_SIZE(self);
+    Py_ssize_t slen;
+    const char* sub;
+    const char* str;
 
-	if (PyString_Check(substr)) {
-		sub = PyString_AS_STRING(substr);
-		slen = PyString_GET_SIZE(substr);
-	}
+    if (PyString_Check(substr)) {
+        sub = PyString_AS_STRING(substr);
+        slen = PyString_GET_SIZE(substr);
+    }
 #ifdef Py_USING_UNICODE
-	else if (PyUnicode_Check(substr))
-		return PyUnicode_Tailmatch((PyObject *)self,
-					   substr, start, end, direction);
+    else if (PyUnicode_Check(substr))
+        return PyUnicode_Tailmatch((PyObject *)self,
+                                   substr, start, end, direction);
 #endif
-	else if (PyObject_AsCharBuffer(substr, &sub, &slen))
-		return -1;
-	str = PyString_AS_STRING(self);
+    else if (PyObject_AsCharBuffer(substr, &sub, &slen))
+        return -1;
+    str = PyString_AS_STRING(self);
 
-	ADJUST_INDICES(start, end, len);
+    ADJUST_INDICES(start, end, len);
 
-	if (direction < 0) {
-		/* startswith */
-		if (start+slen > len)
-			return 0;
-	} else {
-		/* endswith */
-		if (end-start < slen || start > len)
-			return 0;
+    if (direction < 0) {
+        /* startswith */
+        if (start+slen > len)
+            return 0;
+    } else {
+        /* endswith */
+        if (end-start < slen || start > len)
+            return 0;
 
-		if (end-slen > start)
-			start = end - slen;
-	}
-	if (end-start >= slen)
-		return ! memcmp(str+start, sub, slen);
-	return 0;
+        if (end-slen > start)
+            start = end - slen;
+    }
+    if (end-start >= slen)
+        return ! memcmp(str+start, sub, slen);
+    return 0;
 }
 
 
@@ -2911,33 +2911,33 @@
 static PyObject *
 string_startswith(PyStringObject *self, PyObject *args)
 {
-	Py_ssize_t start = 0;
-	Py_ssize_t end = PY_SSIZE_T_MAX;
-	PyObject *subobj;
-	int result;
+    Py_ssize_t start = 0;
+    Py_ssize_t end = PY_SSIZE_T_MAX;
+    PyObject *subobj;
+    int result;
 
-	if (!PyArg_ParseTuple(args, "O|O&O&:startswith", &subobj,
-		_PyEval_SliceIndex, &start, _PyEval_SliceIndex, &end))
-		return NULL;
-	if (PyTuple_Check(subobj)) {
-		Py_ssize_t i;
-		for (i = 0; i < PyTuple_GET_SIZE(subobj); i++) {
-			result = _string_tailmatch(self,
-					PyTuple_GET_ITEM(subobj, i),
-					start, end, -1);
-			if (result == -1)
-				return NULL;
-			else if (result) {
-				Py_RETURN_TRUE;
-			}
-		}
-		Py_RETURN_FALSE;
-	}
-	result = _string_tailmatch(self, subobj, start, end, -1);
-	if (result == -1)
-		return NULL;
-	else
-		return PyBool_FromLong(result);
+    if (!PyArg_ParseTuple(args, "O|O&O&:startswith", &subobj,
+        _PyEval_SliceIndex, &start, _PyEval_SliceIndex, &end))
+        return NULL;
+    if (PyTuple_Check(subobj)) {
+        Py_ssize_t i;
+        for (i = 0; i < PyTuple_GET_SIZE(subobj); i++) {
+            result = _string_tailmatch(self,
+                            PyTuple_GET_ITEM(subobj, i),
+                            start, end, -1);
+            if (result == -1)
+                return NULL;
+            else if (result) {
+                Py_RETURN_TRUE;
+            }
+        }
+        Py_RETURN_FALSE;
+    }
+    result = _string_tailmatch(self, subobj, start, end, -1);
+    if (result == -1)
+        return NULL;
+    else
+        return PyBool_FromLong(result);
 }
 
 
@@ -2952,33 +2952,33 @@
 static PyObject *
 string_endswith(PyStringObject *self, PyObject *args)
 {
-	Py_ssize_t start = 0;
-	Py_ssize_t end = PY_SSIZE_T_MAX;
-	PyObject *subobj;
-	int result;
+    Py_ssize_t start = 0;
+    Py_ssize_t end = PY_SSIZE_T_MAX;
+    PyObject *subobj;
+    int result;
 
-	if (!PyArg_ParseTuple(args, "O|O&O&:endswith", &subobj,
-		_PyEval_SliceIndex, &start, _PyEval_SliceIndex, &end))
-		return NULL;
-	if (PyTuple_Check(subobj)) {
-		Py_ssize_t i;
-		for (i = 0; i < PyTuple_GET_SIZE(subobj); i++) {
-			result = _string_tailmatch(self,
-					PyTuple_GET_ITEM(subobj, i),
-					start, end, +1);
-			if (result == -1)
-				return NULL;
-			else if (result) {
-				Py_RETURN_TRUE;
-			}
-		}
-		Py_RETURN_FALSE;
-	}
-	result = _string_tailmatch(self, subobj, start, end, +1);
-	if (result == -1)
-		return NULL;
-	else
-		return PyBool_FromLong(result);
+    if (!PyArg_ParseTuple(args, "O|O&O&:endswith", &subobj,
+        _PyEval_SliceIndex, &start, _PyEval_SliceIndex, &end))
+        return NULL;
+    if (PyTuple_Check(subobj)) {
+        Py_ssize_t i;
+        for (i = 0; i < PyTuple_GET_SIZE(subobj); i++) {
+            result = _string_tailmatch(self,
+                            PyTuple_GET_ITEM(subobj, i),
+                            start, end, +1);
+            if (result == -1)
+                return NULL;
+            else if (result) {
+                Py_RETURN_TRUE;
+            }
+        }
+        Py_RETURN_FALSE;
+    }
+    result = _string_tailmatch(self, subobj, start, end, +1);
+    if (result == -1)
+        return NULL;
+    else
+        return PyBool_FromLong(result);
 }
 
 
@@ -3001,18 +3001,18 @@
     PyObject *v;
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:encode",
-				     kwlist, &encoding, &errors))
-        return NULL;
+                                     kwlist, &encoding, &errors))
+    return NULL;
     v = PyString_AsEncodedObject((PyObject *)self, encoding, errors);
     if (v == NULL)
-        goto onError;
+    goto onError;
     if (!PyString_Check(v) && !PyUnicode_Check(v)) {
-        PyErr_Format(PyExc_TypeError,
-                     "encoder did not return a string/unicode object "
-                     "(type=%.400s)",
-                     Py_TYPE(v)->tp_name);
-        Py_DECREF(v);
-        return NULL;
+    PyErr_Format(PyExc_TypeError,
+                 "encoder did not return a string/unicode object "
+                 "(type=%.400s)",
+                 Py_TYPE(v)->tp_name);
+    Py_DECREF(v);
+    return NULL;
     }
     return v;
 
@@ -3040,18 +3040,18 @@
     PyObject *v;
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode",
-				     kwlist, &encoding, &errors))
-        return NULL;
+                                     kwlist, &encoding, &errors))
+    return NULL;
     v = PyString_AsDecodedObject((PyObject *)self, encoding, errors);
     if (v == NULL)
-        goto onError;
+    goto onError;
     if (!PyString_Check(v) && !PyUnicode_Check(v)) {
-        PyErr_Format(PyExc_TypeError,
-                     "decoder did not return a string/unicode object "
-                     "(type=%.400s)",
-                     Py_TYPE(v)->tp_name);
-        Py_DECREF(v);
-        return NULL;
+    PyErr_Format(PyExc_TypeError,
+                 "decoder did not return a string/unicode object "
+                 "(type=%.400s)",
+                 Py_TYPE(v)->tp_name);
+    Py_DECREF(v);
+    return NULL;
     }
     return v;
 
@@ -3076,65 +3076,65 @@
     int tabsize = 8;
 
     if (!PyArg_ParseTuple(args, "|i:expandtabs", &tabsize))
-	return NULL;
+    return NULL;
 
     /* First pass: determine size of output string */
     i = 0; /* chars up to and including most recent \n or \r */
     j = 0; /* chars since most recent \n or \r (use in tab calculations) */
     e = PyString_AS_STRING(self) + PyString_GET_SIZE(self); /* end of input */
     for (p = PyString_AS_STRING(self); p < e; p++)
-        if (*p == '\t') {
-	    if (tabsize > 0) {
-		incr = tabsize - (j % tabsize);
-		if (j > PY_SSIZE_T_MAX - incr)
-		    goto overflow1;
-		j += incr;
-            }
-	}
-        else {
-	    if (j > PY_SSIZE_T_MAX - 1)
-		goto overflow1;
-            j++;
-            if (*p == '\n' || *p == '\r') {
-		if (i > PY_SSIZE_T_MAX - j)
-		    goto overflow1;
-                i += j;
-                j = 0;
-            }
+    if (*p == '\t') {
+        if (tabsize > 0) {
+        incr = tabsize - (j % tabsize);
+        if (j > PY_SSIZE_T_MAX - incr)
+            goto overflow1;
+        j += incr;
         }
+    }
+    else {
+        if (j > PY_SSIZE_T_MAX - 1)
+        goto overflow1;
+        j++;
+        if (*p == '\n' || *p == '\r') {
+        if (i > PY_SSIZE_T_MAX - j)
+            goto overflow1;
+        i += j;
+        j = 0;
+        }
+    }
 
     if (i > PY_SSIZE_T_MAX - j)
-	goto overflow1;
+    goto overflow1;
 
     /* Second pass: create output string and fill it */
     u = PyString_FromStringAndSize(NULL, i + j);
     if (!u)
-        return NULL;
+    return NULL;
 
     j = 0; /* same as in first pass */
     q = PyString_AS_STRING(u); /* next output char */
     qe = PyString_AS_STRING(u) + PyString_GET_SIZE(u); /* end of output */
 
     for (p = PyString_AS_STRING(self); p < e; p++)
-        if (*p == '\t') {
-	    if (tabsize > 0) {
-		i = tabsize - (j % tabsize);
-		j += i;
-		while (i--) {
-		    if (q >= qe)
-			goto overflow2;
-		    *q++ = ' ';
-		}
-	    }
-	}
-	else {
-	    if (q >= qe)
-		goto overflow2;
-	    *q++ = *p;
-            j++;
-            if (*p == '\n' || *p == '\r')
-                j = 0;
+    if (*p == '\t') {
+        if (tabsize > 0) {
+        i = tabsize - (j % tabsize);
+        j += i;
+        while (i--) {
+            if (q >= qe)
+            goto overflow2;
+            *q++ = ' ';
         }
+        }
+    }
+    else {
+        if (q >= qe)
+        goto overflow2;
+        *q++ = *p;
+        j++;
+        if (*p == '\n' || *p == '\r')
+        j = 0;
+    }
 
     return u;
 
@@ -3151,26 +3151,26 @@
     PyObject *u;
 
     if (left < 0)
-        left = 0;
+    left = 0;
     if (right < 0)
-        right = 0;
+    right = 0;
 
     if (left == 0 && right == 0 && PyString_CheckExact(self)) {
-        Py_INCREF(self);
-        return (PyObject *)self;
+    Py_INCREF(self);
+    return (PyObject *)self;
     }
 
     u = PyString_FromStringAndSize(NULL,
-				   left + PyString_GET_SIZE(self) + right);
+                                   left + PyString_GET_SIZE(self) + right);
     if (u) {
-        if (left)
-            memset(PyString_AS_STRING(u), fill, left);
-        Py_MEMCPY(PyString_AS_STRING(u) + left,
-	       PyString_AS_STRING(self),
-	       PyString_GET_SIZE(self));
-        if (right)
-            memset(PyString_AS_STRING(u) + left + PyString_GET_SIZE(self),
-		   fill, right);
+    if (left)
+        memset(PyString_AS_STRING(u), fill, left);
+    Py_MEMCPY(PyString_AS_STRING(u) + left,
+           PyString_AS_STRING(self),
+           PyString_GET_SIZE(self));
+    if (right)
+        memset(PyString_AS_STRING(u) + left + PyString_GET_SIZE(self),
+           fill, right);
     }
 
     return u;
@@ -3189,11 +3189,11 @@
     char fillchar = ' ';
 
     if (!PyArg_ParseTuple(args, "n|c:ljust", &width, &fillchar))
-        return NULL;
+    return NULL;
 
     if (PyString_GET_SIZE(self) >= width && PyString_CheckExact(self)) {
-        Py_INCREF(self);
-        return (PyObject*) self;
+    Py_INCREF(self);
+    return (PyObject*) self;
     }
 
     return pad(self, 0, width - PyString_GET_SIZE(self), fillchar);
@@ -3213,11 +3213,11 @@
     char fillchar = ' ';
 
     if (!PyArg_ParseTuple(args, "n|c:rjust", &width, &fillchar))
-        return NULL;
+    return NULL;
 
     if (PyString_GET_SIZE(self) >= width && PyString_CheckExact(self)) {
-        Py_INCREF(self);
-        return (PyObject*) self;
+    Py_INCREF(self);
+    return (PyObject*) self;
     }
 
     return pad(self, width - PyString_GET_SIZE(self), 0, fillchar);
@@ -3238,11 +3238,11 @@
     char fillchar = ' ';
 
     if (!PyArg_ParseTuple(args, "n|c:center", &width, &fillchar))
-        return NULL;
+    return NULL;
 
     if (PyString_GET_SIZE(self) >= width && PyString_CheckExact(self)) {
-        Py_INCREF(self);
-        return (PyObject*) self;
+    Py_INCREF(self);
+    return (PyObject*) self;
     }
 
     marg = width - PyString_GET_SIZE(self);
@@ -3266,18 +3266,18 @@
     Py_ssize_t width;
 
     if (!PyArg_ParseTuple(args, "n:zfill", &width))
-        return NULL;
+    return NULL;
 
     if (PyString_GET_SIZE(self) >= width) {
-        if (PyString_CheckExact(self)) {
-            Py_INCREF(self);
-            return (PyObject*) self;
-        }
-        else
-            return PyString_FromStringAndSize(
-                PyString_AS_STRING(self),
-                PyString_GET_SIZE(self)
-            );
+    if (PyString_CheckExact(self)) {
+        Py_INCREF(self);
+        return (PyObject*) self;
+    }
+    else
+        return PyString_FromStringAndSize(
+        PyString_AS_STRING(self),
+        PyString_GET_SIZE(self)
+        );
     }
 
     fill = width - PyString_GET_SIZE(self);
@@ -3285,13 +3285,13 @@
     s = pad(self, fill, 0, '0');
 
     if (s == NULL)
-        return NULL;
+    return NULL;
 
     p = PyString_AS_STRING(s);
     if (p[fill] == '+' || p[fill] == '-') {
-        /* move sign to beginning of string */
-        p[0] = p[fill];
-        p[fill] = '0';
+    /* move sign to beginning of string */
+    p[0] = p[fill];
+    p[fill] = '0';
     }
 
     return (PyObject*) s;
@@ -3307,22 +3307,22 @@
 string_isspace(PyStringObject *self)
 {
     register const unsigned char *p
-        = (unsigned char *) PyString_AS_STRING(self);
+    = (unsigned char *) PyString_AS_STRING(self);
     register const unsigned char *e;
 
     /* Shortcut for single character strings */
     if (PyString_GET_SIZE(self) == 1 &&
-	isspace(*p))
-	return PyBool_FromLong(1);
+    isspace(*p))
+    return PyBool_FromLong(1);
 
     /* Special case for empty strings */
     if (PyString_GET_SIZE(self) == 0)
-	return PyBool_FromLong(0);
+    return PyBool_FromLong(0);
 
     e = p + PyString_GET_SIZE(self);
     for (; p < e; p++) {
-	if (!isspace(*p))
-	    return PyBool_FromLong(0);
+    if (!isspace(*p))
+        return PyBool_FromLong(0);
     }
     return PyBool_FromLong(1);
 }
@@ -3338,22 +3338,22 @@
 string_isalpha(PyStringObject *self)
 {
     register const unsigned char *p
-        = (unsigned char *) PyString_AS_STRING(self);
+    = (unsigned char *) PyString_AS_STRING(self);
     register const unsigned char *e;
 
     /* Shortcut for single character strings */
     if (PyString_GET_SIZE(self) == 1 &&
-	isalpha(*p))
-	return PyBool_FromLong(1);
+    isalpha(*p))
+    return PyBool_FromLong(1);
 
     /* Special case for empty strings */
     if (PyString_GET_SIZE(self) == 0)
-	return PyBool_FromLong(0);
+    return PyBool_FromLong(0);
 
     e = p + PyString_GET_SIZE(self);
     for (; p < e; p++) {
-	if (!isalpha(*p))
-	    return PyBool_FromLong(0);
+    if (!isalpha(*p))
+        return PyBool_FromLong(0);
     }
     return PyBool_FromLong(1);
 }
@@ -3369,22 +3369,22 @@
 string_isalnum(PyStringObject *self)
 {
     register const unsigned char *p
-        = (unsigned char *) PyString_AS_STRING(self);
+    = (unsigned char *) PyString_AS_STRING(self);
     register const unsigned char *e;
 
     /* Shortcut for single character strings */
     if (PyString_GET_SIZE(self) == 1 &&
-	isalnum(*p))
-	return PyBool_FromLong(1);
+    isalnum(*p))
+    return PyBool_FromLong(1);
 
     /* Special case for empty strings */
     if (PyString_GET_SIZE(self) == 0)
-	return PyBool_FromLong(0);
+    return PyBool_FromLong(0);
 
     e = p + PyString_GET_SIZE(self);
     for (; p < e; p++) {
-	if (!isalnum(*p))
-	    return PyBool_FromLong(0);
+    if (!isalnum(*p))
+        return PyBool_FromLong(0);
     }
     return PyBool_FromLong(1);
 }
@@ -3400,22 +3400,22 @@
 string_isdigit(PyStringObject *self)
 {
     register const unsigned char *p
-        = (unsigned char *) PyString_AS_STRING(self);
+    = (unsigned char *) PyString_AS_STRING(self);
     register const unsigned char *e;
 
     /* Shortcut for single character strings */
     if (PyString_GET_SIZE(self) == 1 &&
-	isdigit(*p))
-	return PyBool_FromLong(1);
+    isdigit(*p))
+    return PyBool_FromLong(1);
 
     /* Special case for empty strings */
     if (PyString_GET_SIZE(self) == 0)
-	return PyBool_FromLong(0);
+    return PyBool_FromLong(0);
 
     e = p + PyString_GET_SIZE(self);
     for (; p < e; p++) {
-	if (!isdigit(*p))
-	    return PyBool_FromLong(0);
+    if (!isdigit(*p))
+        return PyBool_FromLong(0);
     }
     return PyBool_FromLong(1);
 }
@@ -3431,25 +3431,25 @@
 string_islower(PyStringObject *self)
 {
     register const unsigned char *p
-        = (unsigned char *) PyString_AS_STRING(self);
+    = (unsigned char *) PyString_AS_STRING(self);
     register const unsigned char *e;
     int cased;
 
     /* Shortcut for single character strings */
     if (PyString_GET_SIZE(self) == 1)
-	return PyBool_FromLong(islower(*p) != 0);
+    return PyBool_FromLong(islower(*p) != 0);
 
     /* Special case for empty strings */
     if (PyString_GET_SIZE(self) == 0)
-	return PyBool_FromLong(0);
+    return PyBool_FromLong(0);
 
     e = p + PyString_GET_SIZE(self);
     cased = 0;
     for (; p < e; p++) {
-	if (isupper(*p))
-	    return PyBool_FromLong(0);
-	else if (!cased && islower(*p))
-	    cased = 1;
+    if (isupper(*p))
+        return PyBool_FromLong(0);
+    else if (!cased && islower(*p))
+        cased = 1;
     }
     return PyBool_FromLong(cased);
 }
@@ -3465,25 +3465,25 @@
 string_isupper(PyStringObject *self)
 {
     register const unsigned char *p
-        = (unsigned char *) PyString_AS_STRING(self);
+    = (unsigned char *) PyString_AS_STRING(self);
     register const unsigned char *e;
     int cased;
 
     /* Shortcut for single character strings */
     if (PyString_GET_SIZE(self) == 1)
-	return PyBool_FromLong(isupper(*p) != 0);
+    return PyBool_FromLong(isupper(*p) != 0);
 
     /* Special case for empty strings */
     if (PyString_GET_SIZE(self) == 0)
-	return PyBool_FromLong(0);
+    return PyBool_FromLong(0);
 
     e = p + PyString_GET_SIZE(self);
     cased = 0;
     for (; p < e; p++) {
-	if (islower(*p))
-	    return PyBool_FromLong(0);
-	else if (!cased && isupper(*p))
-	    cased = 1;
+    if (islower(*p))
+        return PyBool_FromLong(0);
+    else if (!cased && isupper(*p))
+        cased = 1;
     }
     return PyBool_FromLong(cased);
 }
@@ -3501,38 +3501,38 @@
 string_istitle(PyStringObject *self, PyObject *uncased)
 {
     register const unsigned char *p
-        = (unsigned char *) PyString_AS_STRING(self);
+    = (unsigned char *) PyString_AS_STRING(self);
     register const unsigned char *e;
     int cased, previous_is_cased;
 
     /* Shortcut for single character strings */
     if (PyString_GET_SIZE(self) == 1)
-	return PyBool_FromLong(isupper(*p) != 0);
+    return PyBool_FromLong(isupper(*p) != 0);
 
     /* Special case for empty strings */
     if (PyString_GET_SIZE(self) == 0)
-	return PyBool_FromLong(0);
+    return PyBool_FromLong(0);
 
     e = p + PyString_GET_SIZE(self);
     cased = 0;
     previous_is_cased = 0;
     for (; p < e; p++) {
-	register const unsigned char ch = *p;
+    register const unsigned char ch = *p;
 
-	if (isupper(ch)) {
-	    if (previous_is_cased)
-		return PyBool_FromLong(0);
-	    previous_is_cased = 1;
-	    cased = 1;
-	}
-	else if (islower(ch)) {
-	    if (!previous_is_cased)
-		return PyBool_FromLong(0);
-	    previous_is_cased = 1;
-	    cased = 1;
-	}
-	else
-	    previous_is_cased = 0;
+    if (isupper(ch)) {
+        if (previous_is_cased)
+        return PyBool_FromLong(0);
+        previous_is_cased = 1;
+        cased = 1;
+    }
+    else if (islower(ch)) {
+        if (!previous_is_cased)
+        return PyBool_FromLong(0);
+        previous_is_cased = 1;
+        cased = 1;
+    }
+    else
+        previous_is_cased = 0;
     }
     return PyBool_FromLong(cased);
 }
@@ -3551,12 +3551,12 @@
     int keepends = 0;
 
     if (!PyArg_ParseTuple(args, "|i:splitlines", &keepends))
-        return NULL;
+    return NULL;
 
     return stringlib_splitlines(
-        (PyObject*) self, PyString_AS_STRING(self), PyString_GET_SIZE(self),
-        keepends
-        );
+    (PyObject*) self, PyString_AS_STRING(self), PyString_GET_SIZE(self),
+    keepends
+    );
 }
 
 PyDoc_STRVAR(sizeof__doc__,
@@ -3565,15 +3565,15 @@
 static PyObject *
 string_sizeof(PyStringObject *v)
 {
-	Py_ssize_t res;
-	res = PyStringObject_SIZE + PyString_GET_SIZE(v) * Py_TYPE(v)->tp_itemsize;
-	return PyInt_FromSsize_t(res);
+    Py_ssize_t res;
+    res = PyStringObject_SIZE + PyString_GET_SIZE(v) * Py_TYPE(v)->tp_itemsize;
+    return PyInt_FromSsize_t(res);
 }
 
 static PyObject *
 string_getnewargs(PyStringObject *v)
 {
-	return Py_BuildValue("(s#)", v->ob_sval, Py_SIZE(v));
+    return Py_BuildValue("(s#)", v->ob_sval, Py_SIZE(v));
 }
 
 
@@ -3594,20 +3594,20 @@
     /* If 2.x, convert format_spec to the same type as value */
     /* This is to allow things like u''.format('') */
     if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
-        goto done;
+    goto done;
     if (!(PyString_Check(format_spec) || PyUnicode_Check(format_spec))) {
-        PyErr_Format(PyExc_TypeError, "__format__ arg must be str "
-		     "or unicode, not %s", Py_TYPE(format_spec)->tp_name);
-	goto done;
+    PyErr_Format(PyExc_TypeError, "__format__ arg must be str "
+                 "or unicode, not %s", Py_TYPE(format_spec)->tp_name);
+    goto done;
     }
     tmp = PyObject_Str(format_spec);
     if (tmp == NULL)
-        goto done;
+    goto done;
     format_spec = tmp;
 
     result = _PyBytes_FormatAdvanced(self,
-				     PyString_AS_STRING(format_spec),
-				     PyString_GET_SIZE(format_spec));
+                                     PyString_AS_STRING(format_spec),
+                                     PyString_GET_SIZE(format_spec));
 done:
     Py_XDECREF(tmp);
     return result;
@@ -3621,61 +3621,61 @@
 
 static PyMethodDef
 string_methods[] = {
-	/* Counterparts of the obsolete stropmodule functions; except
-	   string.maketrans(). */
-	{"join", (PyCFunction)string_join, METH_O, join__doc__},
-	{"split", (PyCFunction)string_split, METH_VARARGS, split__doc__},
-	{"rsplit", (PyCFunction)string_rsplit, METH_VARARGS, rsplit__doc__},
-	{"lower", (PyCFunction)string_lower, METH_NOARGS, lower__doc__},
-	{"upper", (PyCFunction)string_upper, METH_NOARGS, upper__doc__},
-	{"islower", (PyCFunction)string_islower, METH_NOARGS, islower__doc__},
-	{"isupper", (PyCFunction)string_isupper, METH_NOARGS, isupper__doc__},
-	{"isspace", (PyCFunction)string_isspace, METH_NOARGS, isspace__doc__},
-	{"isdigit", (PyCFunction)string_isdigit, METH_NOARGS, isdigit__doc__},
-	{"istitle", (PyCFunction)string_istitle, METH_NOARGS, istitle__doc__},
-	{"isalpha", (PyCFunction)string_isalpha, METH_NOARGS, isalpha__doc__},
-	{"isalnum", (PyCFunction)string_isalnum, METH_NOARGS, isalnum__doc__},
-	{"capitalize", (PyCFunction)string_capitalize, METH_NOARGS,
-	 capitalize__doc__},
-	{"count", (PyCFunction)string_count, METH_VARARGS, count__doc__},
-	{"endswith", (PyCFunction)string_endswith, METH_VARARGS,
-	 endswith__doc__},
-	{"partition", (PyCFunction)string_partition, METH_O, partition__doc__},
-	{"find", (PyCFunction)string_find, METH_VARARGS, find__doc__},
-	{"index", (PyCFunction)string_index, METH_VARARGS, index__doc__},
-	{"lstrip", (PyCFunction)string_lstrip, METH_VARARGS, lstrip__doc__},
-	{"replace", (PyCFunction)string_replace, METH_VARARGS, replace__doc__},
-	{"rfind", (PyCFunction)string_rfind, METH_VARARGS, rfind__doc__},
-	{"rindex", (PyCFunction)string_rindex, METH_VARARGS, rindex__doc__},
-	{"rstrip", (PyCFunction)string_rstrip, METH_VARARGS, rstrip__doc__},
-	{"rpartition", (PyCFunction)string_rpartition, METH_O,
-	 rpartition__doc__},
-	{"startswith", (PyCFunction)string_startswith, METH_VARARGS,
-	 startswith__doc__},
-	{"strip", (PyCFunction)string_strip, METH_VARARGS, strip__doc__},
-	{"swapcase", (PyCFunction)string_swapcase, METH_NOARGS,
-	 swapcase__doc__},
-	{"translate", (PyCFunction)string_translate, METH_VARARGS,
-	 translate__doc__},
-	{"title", (PyCFunction)string_title, METH_NOARGS, title__doc__},
-	{"ljust", (PyCFunction)string_ljust, METH_VARARGS, ljust__doc__},
-	{"rjust", (PyCFunction)string_rjust, METH_VARARGS, rjust__doc__},
-	{"center", (PyCFunction)string_center, METH_VARARGS, center__doc__},
-	{"zfill", (PyCFunction)string_zfill, METH_VARARGS, zfill__doc__},
-	{"format", (PyCFunction) do_string_format, METH_VARARGS | METH_KEYWORDS, format__doc__},
-	{"__format__", (PyCFunction) string__format__, METH_VARARGS, p_format__doc__},
-	{"_formatter_field_name_split", (PyCFunction) formatter_field_name_split, METH_NOARGS},
-	{"_formatter_parser", (PyCFunction) formatter_parser, METH_NOARGS},
-	{"encode", (PyCFunction)string_encode, METH_VARARGS | METH_KEYWORDS, encode__doc__},
-	{"decode", (PyCFunction)string_decode, METH_VARARGS | METH_KEYWORDS, decode__doc__},
-	{"expandtabs", (PyCFunction)string_expandtabs, METH_VARARGS,
-	 expandtabs__doc__},
-	{"splitlines", (PyCFunction)string_splitlines, METH_VARARGS,
-	 splitlines__doc__},
-	{"__sizeof__", (PyCFunction)string_sizeof, METH_NOARGS,
-	 sizeof__doc__},
-	{"__getnewargs__",	(PyCFunction)string_getnewargs,	METH_NOARGS},
-	{NULL,     NULL}		     /* sentinel */
+    /* Counterparts of the obsolete stropmodule functions; except
+       string.maketrans(). */
+    {"join", (PyCFunction)string_join, METH_O, join__doc__},
+    {"split", (PyCFunction)string_split, METH_VARARGS, split__doc__},
+    {"rsplit", (PyCFunction)string_rsplit, METH_VARARGS, rsplit__doc__},
+    {"lower", (PyCFunction)string_lower, METH_NOARGS, lower__doc__},
+    {"upper", (PyCFunction)string_upper, METH_NOARGS, upper__doc__},
+    {"islower", (PyCFunction)string_islower, METH_NOARGS, islower__doc__},
+    {"isupper", (PyCFunction)string_isupper, METH_NOARGS, isupper__doc__},
+    {"isspace", (PyCFunction)string_isspace, METH_NOARGS, isspace__doc__},
+    {"isdigit", (PyCFunction)string_isdigit, METH_NOARGS, isdigit__doc__},
+    {"istitle", (PyCFunction)string_istitle, METH_NOARGS, istitle__doc__},
+    {"isalpha", (PyCFunction)string_isalpha, METH_NOARGS, isalpha__doc__},
+    {"isalnum", (PyCFunction)string_isalnum, METH_NOARGS, isalnum__doc__},
+    {"capitalize", (PyCFunction)string_capitalize, METH_NOARGS,
+     capitalize__doc__},
+    {"count", (PyCFunction)string_count, METH_VARARGS, count__doc__},
+    {"endswith", (PyCFunction)string_endswith, METH_VARARGS,
+     endswith__doc__},
+    {"partition", (PyCFunction)string_partition, METH_O, partition__doc__},
+    {"find", (PyCFunction)string_find, METH_VARARGS, find__doc__},
+    {"index", (PyCFunction)string_index, METH_VARARGS, index__doc__},
+    {"lstrip", (PyCFunction)string_lstrip, METH_VARARGS, lstrip__doc__},
+    {"replace", (PyCFunction)string_replace, METH_VARARGS, replace__doc__},
+    {"rfind", (PyCFunction)string_rfind, METH_VARARGS, rfind__doc__},
+    {"rindex", (PyCFunction)string_rindex, METH_VARARGS, rindex__doc__},
+    {"rstrip", (PyCFunction)string_rstrip, METH_VARARGS, rstrip__doc__},
+    {"rpartition", (PyCFunction)string_rpartition, METH_O,
+     rpartition__doc__},
+    {"startswith", (PyCFunction)string_startswith, METH_VARARGS,
+     startswith__doc__},
+    {"strip", (PyCFunction)string_strip, METH_VARARGS, strip__doc__},
+    {"swapcase", (PyCFunction)string_swapcase, METH_NOARGS,
+     swapcase__doc__},
+    {"translate", (PyCFunction)string_translate, METH_VARARGS,
+     translate__doc__},
+    {"title", (PyCFunction)string_title, METH_NOARGS, title__doc__},
+    {"ljust", (PyCFunction)string_ljust, METH_VARARGS, ljust__doc__},
+    {"rjust", (PyCFunction)string_rjust, METH_VARARGS, rjust__doc__},
+    {"center", (PyCFunction)string_center, METH_VARARGS, center__doc__},
+    {"zfill", (PyCFunction)string_zfill, METH_VARARGS, zfill__doc__},
+    {"format", (PyCFunction) do_string_format, METH_VARARGS | METH_KEYWORDS, format__doc__},
+    {"__format__", (PyCFunction) string__format__, METH_VARARGS, p_format__doc__},
+    {"_formatter_field_name_split", (PyCFunction) formatter_field_name_split, METH_NOARGS},
+    {"_formatter_parser", (PyCFunction) formatter_parser, METH_NOARGS},
+    {"encode", (PyCFunction)string_encode, METH_VARARGS | METH_KEYWORDS, encode__doc__},
+    {"decode", (PyCFunction)string_decode, METH_VARARGS | METH_KEYWORDS, decode__doc__},
+    {"expandtabs", (PyCFunction)string_expandtabs, METH_VARARGS,
+     expandtabs__doc__},
+    {"splitlines", (PyCFunction)string_splitlines, METH_VARARGS,
+     splitlines__doc__},
+    {"__sizeof__", (PyCFunction)string_sizeof, METH_NOARGS,
+     sizeof__doc__},
+    {"__getnewargs__",          (PyCFunction)string_getnewargs, METH_NOARGS},
+    {NULL,     NULL}                         /* sentinel */
 };
 
 static PyObject *
@@ -3684,111 +3684,111 @@
 static PyObject *
 string_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *x = NULL;
-	static char *kwlist[] = {"object", 0};
+    PyObject *x = NULL;
+    static char *kwlist[] = {"object", 0};
 
-	if (type != &PyString_Type)
-		return str_subtype_new(type, args, kwds);
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:str", kwlist, &x))
-		return NULL;
-	if (x == NULL)
-		return PyString_FromString("");
-	return PyObject_Str(x);
+    if (type != &PyString_Type)
+        return str_subtype_new(type, args, kwds);
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:str", kwlist, &x))
+        return NULL;
+    if (x == NULL)
+        return PyString_FromString("");
+    return PyObject_Str(x);
 }
 
 static PyObject *
 str_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *tmp, *pnew;
-	Py_ssize_t n;
+    PyObject *tmp, *pnew;
+    Py_ssize_t n;
 
-	assert(PyType_IsSubtype(type, &PyString_Type));
-	tmp = string_new(&PyString_Type, args, kwds);
-	if (tmp == NULL)
-		return NULL;
-	assert(PyString_CheckExact(tmp));
-	n = PyString_GET_SIZE(tmp);
-	pnew = type->tp_alloc(type, n);
-	if (pnew != NULL) {
-		Py_MEMCPY(PyString_AS_STRING(pnew), PyString_AS_STRING(tmp), n+1);
-		((PyStringObject *)pnew)->ob_shash =
-			((PyStringObject *)tmp)->ob_shash;
-		((PyStringObject *)pnew)->ob_sstate = SSTATE_NOT_INTERNED;
-	}
-	Py_DECREF(tmp);
-	return pnew;
+    assert(PyType_IsSubtype(type, &PyString_Type));
+    tmp = string_new(&PyString_Type, args, kwds);
+    if (tmp == NULL)
+        return NULL;
+    assert(PyString_CheckExact(tmp));
+    n = PyString_GET_SIZE(tmp);
+    pnew = type->tp_alloc(type, n);
+    if (pnew != NULL) {
+        Py_MEMCPY(PyString_AS_STRING(pnew), PyString_AS_STRING(tmp), n+1);
+        ((PyStringObject *)pnew)->ob_shash =
+            ((PyStringObject *)tmp)->ob_shash;
+        ((PyStringObject *)pnew)->ob_sstate = SSTATE_NOT_INTERNED;
+    }
+    Py_DECREF(tmp);
+    return pnew;
 }
 
 static PyObject *
 basestring_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyErr_SetString(PyExc_TypeError,
-			"The basestring type cannot be instantiated");
-	return NULL;
+    PyErr_SetString(PyExc_TypeError,
+                    "The basestring type cannot be instantiated");
+    return NULL;
 }
 
 static PyObject *
 string_mod(PyObject *v, PyObject *w)
 {
-	if (!PyString_Check(v)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	return PyString_Format(v, w);
+    if (!PyString_Check(v)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    return PyString_Format(v, w);
 }
 
 PyDoc_STRVAR(basestring_doc,
 "Type basestring cannot be instantiated; it is the base for str and unicode.");
 
 static PyNumberMethods string_as_number = {
-	0,			/*nb_add*/
-	0,			/*nb_subtract*/
-	0,			/*nb_multiply*/
-	0, 			/*nb_divide*/
-	string_mod,		/*nb_remainder*/
+    0,                          /*nb_add*/
+    0,                          /*nb_subtract*/
+    0,                          /*nb_multiply*/
+    0,                          /*nb_divide*/
+    string_mod,                 /*nb_remainder*/
 };
 
 
 PyTypeObject PyBaseString_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"basestring",
-	0,
-	0,
- 	0,			 		/* tp_dealloc */
-	0,			 		/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,		 			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,		 			/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	0,					/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
-	basestring_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	&PyBaseObject_Type,			/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	basestring_new,				/* tp_new */
-	0,		                	/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "basestring",
+    0,
+    0,
+    0,                                          /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    0,                                          /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+    basestring_doc,                             /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    &PyBaseObject_Type,                         /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    basestring_new,                             /* tp_new */
+    0,                                          /* tp_free */
 };
 
 PyDoc_STRVAR(string_doc,
@@ -3798,70 +3798,70 @@
 If the argument is a string, the return value is the same object.");
 
 PyTypeObject PyString_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"str",
-	PyStringObject_SIZE,
-	sizeof(char),
- 	string_dealloc, 			/* tp_dealloc */
-	(printfunc)string_print, 		/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	string_repr, 				/* tp_repr */
-	&string_as_number,			/* tp_as_number */
-	&string_as_sequence,			/* tp_as_sequence */
-	&string_as_mapping,			/* tp_as_mapping */
-	(hashfunc)string_hash, 			/* tp_hash */
-	0,					/* tp_call */
-	string_str,				/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	&string_as_buffer,			/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
-		Py_TPFLAGS_BASETYPE | Py_TPFLAGS_STRING_SUBCLASS |
-		Py_TPFLAGS_HAVE_NEWBUFFER,	/* tp_flags */
-	string_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	(richcmpfunc)string_richcompare,	/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	string_methods,				/* tp_methods */
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	&PyBaseString_Type,			/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	string_new,				/* tp_new */
-	PyObject_Del,	                	/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "str",
+    PyStringObject_SIZE,
+    sizeof(char),
+    string_dealloc,                             /* tp_dealloc */
+    (printfunc)string_print,                    /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    string_repr,                                /* tp_repr */
+    &string_as_number,                          /* tp_as_number */
+    &string_as_sequence,                        /* tp_as_sequence */
+    &string_as_mapping,                         /* tp_as_mapping */
+    (hashfunc)string_hash,                      /* tp_hash */
+    0,                                          /* tp_call */
+    string_str,                                 /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    &string_as_buffer,                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
+        Py_TPFLAGS_BASETYPE | Py_TPFLAGS_STRING_SUBCLASS |
+        Py_TPFLAGS_HAVE_NEWBUFFER,              /* tp_flags */
+    string_doc,                                 /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    (richcmpfunc)string_richcompare,            /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    string_methods,                             /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    &PyBaseString_Type,                         /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    string_new,                                 /* tp_new */
+    PyObject_Del,                               /* tp_free */
 };
 
 void
 PyString_Concat(register PyObject **pv, register PyObject *w)
 {
-	register PyObject *v;
-	if (*pv == NULL)
-		return;
-	if (w == NULL || !PyString_Check(*pv)) {
-		Py_DECREF(*pv);
-		*pv = NULL;
-		return;
-	}
-	v = string_concat((PyStringObject *) *pv, w);
-	Py_DECREF(*pv);
-	*pv = v;
+    register PyObject *v;
+    if (*pv == NULL)
+        return;
+    if (w == NULL || !PyString_Check(*pv)) {
+        Py_DECREF(*pv);
+        *pv = NULL;
+        return;
+    }
+    v = string_concat((PyStringObject *) *pv, w);
+    Py_DECREF(*pv);
+    *pv = v;
 }
 
 void
 PyString_ConcatAndDel(register PyObject **pv, register PyObject *w)
 {
-	PyString_Concat(pv, w);
-	Py_XDECREF(w);
+    PyString_Concat(pv, w);
+    Py_XDECREF(w);
 }
 
 
@@ -3882,32 +3882,32 @@
 int
 _PyString_Resize(PyObject **pv, Py_ssize_t newsize)
 {
-	register PyObject *v;
-	register PyStringObject *sv;
-	v = *pv;
-	if (!PyString_Check(v) || Py_REFCNT(v) != 1 || newsize < 0 ||
-	    PyString_CHECK_INTERNED(v)) {
-		*pv = 0;
-		Py_DECREF(v);
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	/* XXX UNREF/NEWREF interface should be more symmetrical */
-	_Py_DEC_REFTOTAL;
-	_Py_ForgetReference(v);
-	*pv = (PyObject *)
-		PyObject_REALLOC((char *)v, PyStringObject_SIZE + newsize);
-	if (*pv == NULL) {
-		PyObject_Del(v);
-		PyErr_NoMemory();
-		return -1;
-	}
-	_Py_NewReference(*pv);
-	sv = (PyStringObject *) *pv;
-	Py_SIZE(sv) = newsize;
-	sv->ob_sval[newsize] = '\0';
-	sv->ob_shash = -1;	/* invalidate cached hash value */
-	return 0;
+    register PyObject *v;
+    register PyStringObject *sv;
+    v = *pv;
+    if (!PyString_Check(v) || Py_REFCNT(v) != 1 || newsize < 0 ||
+        PyString_CHECK_INTERNED(v)) {
+        *pv = 0;
+        Py_DECREF(v);
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    /* XXX UNREF/NEWREF interface should be more symmetrical */
+    _Py_DEC_REFTOTAL;
+    _Py_ForgetReference(v);
+    *pv = (PyObject *)
+        PyObject_REALLOC((char *)v, PyStringObject_SIZE + newsize);
+    if (*pv == NULL) {
+        PyObject_Del(v);
+        PyErr_NoMemory();
+        return -1;
+    }
+    _Py_NewReference(*pv);
+    sv = (PyStringObject *) *pv;
+    Py_SIZE(sv) = newsize;
+    sv->ob_sval[newsize] = '\0';
+    sv->ob_shash = -1;          /* invalidate cached hash value */
+    return 0;
 }
 
 /* Helpers for formatstring */
@@ -3915,59 +3915,59 @@
 Py_LOCAL_INLINE(PyObject *)
 getnextarg(PyObject *args, Py_ssize_t arglen, Py_ssize_t *p_argidx)
 {
-	Py_ssize_t argidx = *p_argidx;
-	if (argidx < arglen) {
-		(*p_argidx)++;
-		if (arglen < 0)
-			return args;
-		else
-			return PyTuple_GetItem(args, argidx);
-	}
-	PyErr_SetString(PyExc_TypeError,
-			"not enough arguments for format string");
-	return NULL;
+    Py_ssize_t argidx = *p_argidx;
+    if (argidx < arglen) {
+        (*p_argidx)++;
+        if (arglen < 0)
+            return args;
+        else
+            return PyTuple_GetItem(args, argidx);
+    }
+    PyErr_SetString(PyExc_TypeError,
+                    "not enough arguments for format string");
+    return NULL;
 }
 
 /* Format codes
- * F_LJUST	'-'
- * F_SIGN	'+'
- * F_BLANK	' '
- * F_ALT	'#'
- * F_ZERO	'0'
+ * F_LJUST      '-'
+ * F_SIGN       '+'
+ * F_BLANK      ' '
+ * F_ALT        '#'
+ * F_ZERO       '0'
  */
 #define F_LJUST (1<<0)
-#define F_SIGN	(1<<1)
+#define F_SIGN  (1<<1)
 #define F_BLANK (1<<2)
-#define F_ALT	(1<<3)
-#define F_ZERO	(1<<4)
+#define F_ALT   (1<<3)
+#define F_ZERO  (1<<4)
 
 /* Returns a new reference to a PyString object, or NULL on failure. */
 
 static PyObject *
 formatfloat(PyObject *v, int flags, int prec, int type)
 {
-	char *p;
-	PyObject *result;
-	double x;
+    char *p;
+    PyObject *result;
+    double x;
 
-	x = PyFloat_AsDouble(v);
-	if (x == -1.0 && PyErr_Occurred()) {
-		PyErr_Format(PyExc_TypeError, "float argument required, "
-			     "not %.200s", Py_TYPE(v)->tp_name);
-		return NULL;
-	}
+    x = PyFloat_AsDouble(v);
+    if (x == -1.0 && PyErr_Occurred()) {
+        PyErr_Format(PyExc_TypeError, "float argument required, "
+                     "not %.200s", Py_TYPE(v)->tp_name);
+        return NULL;
+    }
 
-	if (prec < 0)
-		prec = 6;
+    if (prec < 0)
+        prec = 6;
 
-	p = PyOS_double_to_string(x, type, prec,
-				  (flags & F_ALT) ? Py_DTSF_ALT : 0, NULL);
+    p = PyOS_double_to_string(x, type, prec,
+                              (flags & F_ALT) ? Py_DTSF_ALT : 0, NULL);
 
-	if (p == NULL)
-		return NULL;
-	result = PyString_FromStringAndSize(p, strlen(p));
-	PyMem_Free(p);
-	return result;
+    if (p == NULL)
+        return NULL;
+    result = PyString_FromStringAndSize(p, strlen(p));
+    PyMem_Free(p);
+    return result;
 }
 
 /* _PyString_FormatLong emulates the format codes d, u, o, x and X, and
@@ -3983,226 +3983,226 @@
  *         set in flags.  The case of hex digits will be correct,
  *     There will be at least prec digits, zero-filled on the left if
  *         necessary to get that many.
- * val		object to be converted
- * flags	bitmask of format flags; only F_ALT is looked at
- * prec		minimum number of digits; 0-fill on left if needed
- * type		a character in [duoxX]; u acts the same as d
+ * val          object to be converted
+ * flags        bitmask of format flags; only F_ALT is looked at
+ * prec         minimum number of digits; 0-fill on left if needed
+ * type         a character in [duoxX]; u acts the same as d
  *
  * CAUTION:  o, x and X conversions on regular ints can never
  * produce a '-' sign, but can for Python's unbounded ints.
  */
 PyObject*
 _PyString_FormatLong(PyObject *val, int flags, int prec, int type,
-		     char **pbuf, int *plen)
+                     char **pbuf, int *plen)
 {
-	PyObject *result = NULL;
-	char *buf;
-	Py_ssize_t i;
-	int sign;	/* 1 if '-', else 0 */
-	int len;	/* number of characters */
-	Py_ssize_t llen;
-	int numdigits;	/* len == numnondigits + numdigits */
-	int numnondigits = 0;
+    PyObject *result = NULL;
+    char *buf;
+    Py_ssize_t i;
+    int sign;           /* 1 if '-', else 0 */
+    int len;            /* number of characters */
+    Py_ssize_t llen;
+    int numdigits;      /* len == numnondigits + numdigits */
+    int numnondigits = 0;
 
-	switch (type) {
-	case 'd':
-	case 'u':
-		result = Py_TYPE(val)->tp_str(val);
-		break;
-	case 'o':
-		result = Py_TYPE(val)->tp_as_number->nb_oct(val);
-		break;
-	case 'x':
-	case 'X':
-		numnondigits = 2;
-		result = Py_TYPE(val)->tp_as_number->nb_hex(val);
-		break;
-	default:
-		assert(!"'type' not in [duoxX]");
-	}
-	if (!result)
-		return NULL;
+    switch (type) {
+    case 'd':
+    case 'u':
+        result = Py_TYPE(val)->tp_str(val);
+        break;
+    case 'o':
+        result = Py_TYPE(val)->tp_as_number->nb_oct(val);
+        break;
+    case 'x':
+    case 'X':
+        numnondigits = 2;
+        result = Py_TYPE(val)->tp_as_number->nb_hex(val);
+        break;
+    default:
+        assert(!"'type' not in [duoxX]");
+    }
+    if (!result)
+        return NULL;
 
-	buf = PyString_AsString(result);
-	if (!buf) {
-		Py_DECREF(result);
-		return NULL;
-	}
+    buf = PyString_AsString(result);
+    if (!buf) {
+        Py_DECREF(result);
+        return NULL;
+    }
 
-	/* To modify the string in-place, there can only be one reference. */
-	if (Py_REFCNT(result) != 1) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	llen = PyString_Size(result);
-	if (llen > INT_MAX) {
-		PyErr_SetString(PyExc_ValueError, "string too large in _PyString_FormatLong");
-		return NULL;
-	}
-	len = (int)llen;
-	if (buf[len-1] == 'L') {
-		--len;
-		buf[len] = '\0';
-	}
-	sign = buf[0] == '-';
-	numnondigits += sign;
-	numdigits = len - numnondigits;
-	assert(numdigits > 0);
+    /* To modify the string in-place, there can only be one reference. */
+    if (Py_REFCNT(result) != 1) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    llen = PyString_Size(result);
+    if (llen > INT_MAX) {
+        PyErr_SetString(PyExc_ValueError, "string too large in _PyString_FormatLong");
+        return NULL;
+    }
+    len = (int)llen;
+    if (buf[len-1] == 'L') {
+        --len;
+        buf[len] = '\0';
+    }
+    sign = buf[0] == '-';
+    numnondigits += sign;
+    numdigits = len - numnondigits;
+    assert(numdigits > 0);
 
-	/* Get rid of base marker unless F_ALT */
-	if ((flags & F_ALT) == 0) {
-		/* Need to skip 0x, 0X or 0. */
-		int skipped = 0;
-		switch (type) {
-		case 'o':
-			assert(buf[sign] == '0');
-			/* If 0 is only digit, leave it alone. */
-			if (numdigits > 1) {
-				skipped = 1;
-				--numdigits;
-			}
-			break;
-		case 'x':
-		case 'X':
-			assert(buf[sign] == '0');
-			assert(buf[sign + 1] == 'x');
-			skipped = 2;
-			numnondigits -= 2;
-			break;
-		}
-		if (skipped) {
-			buf += skipped;
-			len -= skipped;
-			if (sign)
-				buf[0] = '-';
-		}
-		assert(len == numnondigits + numdigits);
-		assert(numdigits > 0);
-	}
+    /* Get rid of base marker unless F_ALT */
+    if ((flags & F_ALT) == 0) {
+        /* Need to skip 0x, 0X or 0. */
+        int skipped = 0;
+        switch (type) {
+        case 'o':
+            assert(buf[sign] == '0');
+            /* If 0 is only digit, leave it alone. */
+            if (numdigits > 1) {
+                skipped = 1;
+                --numdigits;
+            }
+            break;
+        case 'x':
+        case 'X':
+            assert(buf[sign] == '0');
+            assert(buf[sign + 1] == 'x');
+            skipped = 2;
+            numnondigits -= 2;
+            break;
+        }
+        if (skipped) {
+            buf += skipped;
+            len -= skipped;
+            if (sign)
+                buf[0] = '-';
+        }
+        assert(len == numnondigits + numdigits);
+        assert(numdigits > 0);
+    }
 
-	/* Fill with leading zeroes to meet minimum width. */
-	if (prec > numdigits) {
-		PyObject *r1 = PyString_FromStringAndSize(NULL,
-					numnondigits + prec);
-		char *b1;
-		if (!r1) {
-			Py_DECREF(result);
-			return NULL;
-		}
-		b1 = PyString_AS_STRING(r1);
-		for (i = 0; i < numnondigits; ++i)
-			*b1++ = *buf++;
-		for (i = 0; i < prec - numdigits; i++)
-			*b1++ = '0';
-		for (i = 0; i < numdigits; i++)
-			*b1++ = *buf++;
-		*b1 = '\0';
-		Py_DECREF(result);
-		result = r1;
-		buf = PyString_AS_STRING(result);
-		len = numnondigits + prec;
-	}
+    /* Fill with leading zeroes to meet minimum width. */
+    if (prec > numdigits) {
+        PyObject *r1 = PyString_FromStringAndSize(NULL,
+                                numnondigits + prec);
+        char *b1;
+        if (!r1) {
+            Py_DECREF(result);
+            return NULL;
+        }
+        b1 = PyString_AS_STRING(r1);
+        for (i = 0; i < numnondigits; ++i)
+            *b1++ = *buf++;
+        for (i = 0; i < prec - numdigits; i++)
+            *b1++ = '0';
+        for (i = 0; i < numdigits; i++)
+            *b1++ = *buf++;
+        *b1 = '\0';
+        Py_DECREF(result);
+        result = r1;
+        buf = PyString_AS_STRING(result);
+        len = numnondigits + prec;
+    }
 
-	/* Fix up case for hex conversions. */
-	if (type == 'X') {
-		/* Need to convert all lower case letters to upper case.
-		   and need to convert 0x to 0X (and -0x to -0X). */
-		for (i = 0; i < len; i++)
-			if (buf[i] >= 'a' && buf[i] <= 'x')
-				buf[i] -= 'a'-'A';
-	}
-	*pbuf = buf;
-	*plen = len;
-	return result;
+    /* Fix up case for hex conversions. */
+    if (type == 'X') {
+        /* Need to convert all lower case letters to upper case.
+           and need to convert 0x to 0X (and -0x to -0X). */
+        for (i = 0; i < len; i++)
+            if (buf[i] >= 'a' && buf[i] <= 'x')
+                buf[i] -= 'a'-'A';
+    }
+    *pbuf = buf;
+    *plen = len;
+    return result;
 }
 
 Py_LOCAL_INLINE(int)
 formatint(char *buf, size_t buflen, int flags,
           int prec, int type, PyObject *v)
 {
-	/* fmt = '%#.' + `prec` + 'l' + `type`
-	   worst case length = 3 + 19 (worst len of INT_MAX on 64-bit machine)
-	   + 1 + 1 = 24 */
-	char fmt[64];	/* plenty big enough! */
-	char *sign;
-	long x;
+    /* fmt = '%#.' + `prec` + 'l' + `type`
+       worst case length = 3 + 19 (worst len of INT_MAX on 64-bit machine)
+       + 1 + 1 = 24 */
+    char fmt[64];       /* plenty big enough! */
+    char *sign;
+    long x;
 
-	x = PyInt_AsLong(v);
-	if (x == -1 && PyErr_Occurred()) {
-		PyErr_Format(PyExc_TypeError, "int argument required, not %.200s",
-			     Py_TYPE(v)->tp_name);
-		return -1;
-	}
-	if (x < 0 && type == 'u') {
-		type = 'd';
-	}
-	if (x < 0 && (type == 'x' || type == 'X' || type == 'o'))
-		sign = "-";
-	else
-		sign = "";
-	if (prec < 0)
-		prec = 1;
+    x = PyInt_AsLong(v);
+    if (x == -1 && PyErr_Occurred()) {
+        PyErr_Format(PyExc_TypeError, "int argument required, not %.200s",
+                     Py_TYPE(v)->tp_name);
+        return -1;
+    }
+    if (x < 0 && type == 'u') {
+        type = 'd';
+    }
+    if (x < 0 && (type == 'x' || type == 'X' || type == 'o'))
+        sign = "-";
+    else
+        sign = "";
+    if (prec < 0)
+        prec = 1;
 
-	if ((flags & F_ALT) &&
-	    (type == 'x' || type == 'X')) {
-		/* When converting under %#x or %#X, there are a number
-		 * of issues that cause pain:
-		 * - when 0 is being converted, the C standard leaves off
-		 *   the '0x' or '0X', which is inconsistent with other
-		 *   %#x/%#X conversions and inconsistent with Python's
-		 *   hex() function
-		 * - there are platforms that violate the standard and
-		 *   convert 0 with the '0x' or '0X'
-		 *   (Metrowerks, Compaq Tru64)
-		 * - there are platforms that give '0x' when converting
-		 *   under %#X, but convert 0 in accordance with the
-		 *   standard (OS/2 EMX)
-		 *
-		 * We can achieve the desired consistency by inserting our
-		 * own '0x' or '0X' prefix, and substituting %x/%X in place
-		 * of %#x/%#X.
-		 *
-		 * Note that this is the same approach as used in
-		 * formatint() in unicodeobject.c
-		 */
-		PyOS_snprintf(fmt, sizeof(fmt), "%s0%c%%.%dl%c",
-			      sign, type, prec, type);
-	}
-	else {
-		PyOS_snprintf(fmt, sizeof(fmt), "%s%%%s.%dl%c",
-			      sign, (flags&F_ALT) ? "#" : "",
-			      prec, type);
-	}
+    if ((flags & F_ALT) &&
+        (type == 'x' || type == 'X')) {
+        /* When converting under %#x or %#X, there are a number
+         * of issues that cause pain:
+         * - when 0 is being converted, the C standard leaves off
+         *   the '0x' or '0X', which is inconsistent with other
+         *   %#x/%#X conversions and inconsistent with Python's
+         *   hex() function
+         * - there are platforms that violate the standard and
+         *   convert 0 with the '0x' or '0X'
+         *   (Metrowerks, Compaq Tru64)
+         * - there are platforms that give '0x' when converting
+         *   under %#X, but convert 0 in accordance with the
+         *   standard (OS/2 EMX)
+         *
+         * We can achieve the desired consistency by inserting our
+         * own '0x' or '0X' prefix, and substituting %x/%X in place
+         * of %#x/%#X.
+         *
+         * Note that this is the same approach as used in
+         * formatint() in unicodeobject.c
+         */
+        PyOS_snprintf(fmt, sizeof(fmt), "%s0%c%%.%dl%c",
+                      sign, type, prec, type);
+    }
+    else {
+        PyOS_snprintf(fmt, sizeof(fmt), "%s%%%s.%dl%c",
+                      sign, (flags&F_ALT) ? "#" : "",
+                      prec, type);
+    }
 
-	/* buf = '+'/'-'/'' + '0'/'0x'/'' + '[0-9]'*max(prec, len(x in octal))
-	 * worst case buf = '-0x' + [0-9]*prec, where prec >= 11
-	 */
-	if (buflen <= 14 || buflen <= (size_t)3 + (size_t)prec) {
-		PyErr_SetString(PyExc_OverflowError,
-		    "formatted integer is too long (precision too large?)");
-		return -1;
-	}
-	if (sign[0])
-		PyOS_snprintf(buf, buflen, fmt, -x);
-	else
-		PyOS_snprintf(buf, buflen, fmt, x);
-	return (int)strlen(buf);
+    /* buf = '+'/'-'/'' + '0'/'0x'/'' + '[0-9]'*max(prec, len(x in octal))
+     * worst case buf = '-0x' + [0-9]*prec, where prec >= 11
+     */
+    if (buflen <= 14 || buflen <= (size_t)3 + (size_t)prec) {
+        PyErr_SetString(PyExc_OverflowError,
+            "formatted integer is too long (precision too large?)");
+        return -1;
+    }
+    if (sign[0])
+        PyOS_snprintf(buf, buflen, fmt, -x);
+    else
+        PyOS_snprintf(buf, buflen, fmt, x);
+    return (int)strlen(buf);
 }
 
 Py_LOCAL_INLINE(int)
 formatchar(char *buf, size_t buflen, PyObject *v)
 {
-	/* presume that the buffer is at least 2 characters long */
-	if (PyString_Check(v)) {
-		if (!PyArg_Parse(v, "c;%c requires int or char", &buf[0]))
-			return -1;
-	}
-	else {
-		if (!PyArg_Parse(v, "b;%c requires int or char", &buf[0]))
-			return -1;
-	}
-	buf[1] = '\0';
-	return 1;
+    /* presume that the buffer is at least 2 characters long */
+    if (PyString_Check(v)) {
+        if (!PyArg_Parse(v, "c;%c requires int or char", &buf[0]))
+            return -1;
+    }
+    else {
+        if (!PyArg_Parse(v, "b;%c requires int or char", &buf[0]))
+            return -1;
+    }
+    buf[1] = '\0';
+    return 1;
 }
 
 /* fmt%(v1,v2,...) is roughly equivalent to sprintf(fmt, v1, v2, ...)
@@ -4218,615 +4218,615 @@
 PyObject *
 PyString_Format(PyObject *format, PyObject *args)
 {
-	char *fmt, *res;
-	Py_ssize_t arglen, argidx;
-	Py_ssize_t reslen, rescnt, fmtcnt;
-	int args_owned = 0;
-	PyObject *result, *orig_args;
+    char *fmt, *res;
+    Py_ssize_t arglen, argidx;
+    Py_ssize_t reslen, rescnt, fmtcnt;
+    int args_owned = 0;
+    PyObject *result, *orig_args;
 #ifdef Py_USING_UNICODE
-	PyObject *v, *w;
+    PyObject *v, *w;
 #endif
-	PyObject *dict = NULL;
-	if (format == NULL || !PyString_Check(format) || args == NULL) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	orig_args = args;
-	fmt = PyString_AS_STRING(format);
-	fmtcnt = PyString_GET_SIZE(format);
-	reslen = rescnt = fmtcnt + 100;
-	result = PyString_FromStringAndSize((char *)NULL, reslen);
-	if (result == NULL)
-		return NULL;
-	res = PyString_AsString(result);
-	if (PyTuple_Check(args)) {
-		arglen = PyTuple_GET_SIZE(args);
-		argidx = 0;
-	}
-	else {
-		arglen = -1;
-		argidx = -2;
-	}
-	if (Py_TYPE(args)->tp_as_mapping && !PyTuple_Check(args) &&
-	    !PyObject_TypeCheck(args, &PyBaseString_Type))
-		dict = args;
-	while (--fmtcnt >= 0) {
-		if (*fmt != '%') {
-			if (--rescnt < 0) {
-				rescnt = fmtcnt + 100;
-				reslen += rescnt;
-				if (_PyString_Resize(&result, reslen))
-					return NULL;
-				res = PyString_AS_STRING(result)
-					+ reslen - rescnt;
-				--rescnt;
-			}
-			*res++ = *fmt++;
-		}
-		else {
-			/* Got a format specifier */
-			int flags = 0;
-			Py_ssize_t width = -1;
-			int prec = -1;
-			int c = '\0';
-			int fill;
-			int isnumok;
-			PyObject *v = NULL;
-			PyObject *temp = NULL;
-			char *pbuf;
-			int sign;
-			Py_ssize_t len;
-			char formatbuf[FORMATBUFLEN];
-			     /* For format{int,char}() */
+    PyObject *dict = NULL;
+    if (format == NULL || !PyString_Check(format) || args == NULL) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    orig_args = args;
+    fmt = PyString_AS_STRING(format);
+    fmtcnt = PyString_GET_SIZE(format);
+    reslen = rescnt = fmtcnt + 100;
+    result = PyString_FromStringAndSize((char *)NULL, reslen);
+    if (result == NULL)
+        return NULL;
+    res = PyString_AsString(result);
+    if (PyTuple_Check(args)) {
+        arglen = PyTuple_GET_SIZE(args);
+        argidx = 0;
+    }
+    else {
+        arglen = -1;
+        argidx = -2;
+    }
+    if (Py_TYPE(args)->tp_as_mapping && !PyTuple_Check(args) &&
+        !PyObject_TypeCheck(args, &PyBaseString_Type))
+        dict = args;
+    while (--fmtcnt >= 0) {
+        if (*fmt != '%') {
+            if (--rescnt < 0) {
+                rescnt = fmtcnt + 100;
+                reslen += rescnt;
+                if (_PyString_Resize(&result, reslen))
+                    return NULL;
+                res = PyString_AS_STRING(result)
+                    + reslen - rescnt;
+                --rescnt;
+            }
+            *res++ = *fmt++;
+        }
+        else {
+            /* Got a format specifier */
+            int flags = 0;
+            Py_ssize_t width = -1;
+            int prec = -1;
+            int c = '\0';
+            int fill;
+            int isnumok;
+            PyObject *v = NULL;
+            PyObject *temp = NULL;
+            char *pbuf;
+            int sign;
+            Py_ssize_t len;
+            char formatbuf[FORMATBUFLEN];
+                 /* For format{int,char}() */
 #ifdef Py_USING_UNICODE
-			char *fmt_start = fmt;
-			Py_ssize_t argidx_start = argidx;
+            char *fmt_start = fmt;
+            Py_ssize_t argidx_start = argidx;
 #endif
 
-			fmt++;
-			if (*fmt == '(') {
-				char *keystart;
-				Py_ssize_t keylen;
-				PyObject *key;
-				int pcount = 1;
+            fmt++;
+            if (*fmt == '(') {
+                char *keystart;
+                Py_ssize_t keylen;
+                PyObject *key;
+                int pcount = 1;
 
-				if (dict == NULL) {
-					PyErr_SetString(PyExc_TypeError,
-						 "format requires a mapping");
-					goto error;
-				}
-				++fmt;
-				--fmtcnt;
-				keystart = fmt;
-				/* Skip over balanced parentheses */
-				while (pcount > 0 && --fmtcnt >= 0) {
-					if (*fmt == ')')
-						--pcount;
-					else if (*fmt == '(')
-						++pcount;
-					fmt++;
-				}
-				keylen = fmt - keystart - 1;
-				if (fmtcnt < 0 || pcount > 0) {
-					PyErr_SetString(PyExc_ValueError,
-						   "incomplete format key");
-					goto error;
-				}
-				key = PyString_FromStringAndSize(keystart,
-								 keylen);
-				if (key == NULL)
-					goto error;
-				if (args_owned) {
-					Py_DECREF(args);
-					args_owned = 0;
-				}
-				args = PyObject_GetItem(dict, key);
-				Py_DECREF(key);
-				if (args == NULL) {
-					goto error;
-				}
-				args_owned = 1;
-				arglen = -1;
-				argidx = -2;
-			}
-			while (--fmtcnt >= 0) {
-				switch (c = *fmt++) {
-				case '-': flags |= F_LJUST; continue;
-				case '+': flags |= F_SIGN; continue;
-				case ' ': flags |= F_BLANK; continue;
-				case '#': flags |= F_ALT; continue;
-				case '0': flags |= F_ZERO; continue;
-				}
-				break;
-			}
-			if (c == '*') {
-				v = getnextarg(args, arglen, &argidx);
-				if (v == NULL)
-					goto error;
-				if (!PyInt_Check(v)) {
-					PyErr_SetString(PyExc_TypeError,
-							"* wants int");
-					goto error;
-				}
-				width = PyInt_AsLong(v);
-				if (width < 0) {
-					flags |= F_LJUST;
-					width = -width;
-				}
-				if (--fmtcnt >= 0)
-					c = *fmt++;
-			}
-			else if (c >= 0 && isdigit(c)) {
-				width = c - '0';
-				while (--fmtcnt >= 0) {
-					c = Py_CHARMASK(*fmt++);
-					if (!isdigit(c))
-						break;
-					if ((width*10) / 10 != width) {
-						PyErr_SetString(
-							PyExc_ValueError,
-							"width too big");
-						goto error;
-					}
-					width = width*10 + (c - '0');
-				}
-			}
-			if (c == '.') {
-				prec = 0;
-				if (--fmtcnt >= 0)
-					c = *fmt++;
-				if (c == '*') {
-					v = getnextarg(args, arglen, &argidx);
-					if (v == NULL)
-						goto error;
-					if (!PyInt_Check(v)) {
-						PyErr_SetString(
-							PyExc_TypeError,
-							"* wants int");
-						goto error;
-					}
-					prec = PyInt_AsLong(v);
-					if (prec < 0)
-						prec = 0;
-					if (--fmtcnt >= 0)
-						c = *fmt++;
-				}
-				else if (c >= 0 && isdigit(c)) {
-					prec = c - '0';
-					while (--fmtcnt >= 0) {
-						c = Py_CHARMASK(*fmt++);
-						if (!isdigit(c))
-							break;
-						if ((prec*10) / 10 != prec) {
-							PyErr_SetString(
-							    PyExc_ValueError,
-							    "prec too big");
-							goto error;
-						}
-						prec = prec*10 + (c - '0');
-					}
-				}
-			} /* prec */
-			if (fmtcnt >= 0) {
-				if (c == 'h' || c == 'l' || c == 'L') {
-					if (--fmtcnt >= 0)
-						c = *fmt++;
-				}
-			}
-			if (fmtcnt < 0) {
-				PyErr_SetString(PyExc_ValueError,
-						"incomplete format");
-				goto error;
-			}
-			if (c != '%') {
-				v = getnextarg(args, arglen, &argidx);
-				if (v == NULL)
-					goto error;
-			}
-			sign = 0;
-			fill = ' ';
-			switch (c) {
-			case '%':
-				pbuf = "%";
-				len = 1;
-				break;
-			case 's':
-#ifdef Py_USING_UNICODE
-				if (PyUnicode_Check(v)) {
-					fmt = fmt_start;
-					argidx = argidx_start;
-					goto unicode;
-				}
-#endif
-				temp = _PyObject_Str(v);
-#ifdef Py_USING_UNICODE
-				if (temp != NULL && PyUnicode_Check(temp)) {
-					Py_DECREF(temp);
-					fmt = fmt_start;
-					argidx = argidx_start;
-					goto unicode;
-				}
-#endif
-				/* Fall through */
-			case 'r':
-				if (c == 'r')
-					temp = PyObject_Repr(v);
-				if (temp == NULL)
-					goto error;
-				if (!PyString_Check(temp)) {
-					PyErr_SetString(PyExc_TypeError,
-					  "%s argument has non-string str()");
-					Py_DECREF(temp);
-					goto error;
-				}
-				pbuf = PyString_AS_STRING(temp);
-				len = PyString_GET_SIZE(temp);
-				if (prec >= 0 && len > prec)
-					len = prec;
-				break;
-			case 'i':
-			case 'd':
-			case 'u':
-			case 'o':
-			case 'x':
-			case 'X':
-				if (c == 'i')
-					c = 'd';
-				isnumok = 0;
-				if (PyNumber_Check(v)) {
-					PyObject *iobj=NULL;
-
-					if (PyInt_Check(v) || (PyLong_Check(v))) {
-						iobj = v;
-						Py_INCREF(iobj);
-					}
-					else {
-						iobj = PyNumber_Int(v);
-						if (iobj==NULL) iobj = PyNumber_Long(v);
-					}
-					if (iobj!=NULL) {
-						if (PyInt_Check(iobj)) {
-							isnumok = 1;
-							pbuf = formatbuf;
-							len = formatint(pbuf,
-									sizeof(formatbuf),
-									flags, prec, c, iobj);
-							Py_DECREF(iobj);
-							if (len < 0)
-								goto error;
-							sign = 1;
-						}
-						else if (PyLong_Check(iobj)) {
-							int ilen;
-							
-							isnumok = 1;
-							temp = _PyString_FormatLong(iobj, flags,
-								prec, c, &pbuf, &ilen);
-							Py_DECREF(iobj);
-							len = ilen;
-							if (!temp)
-								goto error;
-							sign = 1;
-						}
-						else {
-							Py_DECREF(iobj);
-						}
-					}
-				}
-				if (!isnumok) {
-					PyErr_Format(PyExc_TypeError, 
-					    "%%%c format: a number is required, "
-					    "not %.200s", c, Py_TYPE(v)->tp_name);
-					goto error;
-				}
-				if (flags & F_ZERO)
-					fill = '0';
-				break;
-			case 'e':
-			case 'E':
-			case 'f':
-			case 'F':
-			case 'g':
-			case 'G':
-				temp = formatfloat(v, flags, prec, c);
-				if (temp == NULL)
-					goto error;
-				pbuf = PyString_AS_STRING(temp);
-				len = PyString_GET_SIZE(temp);
-				sign = 1;
-				if (flags & F_ZERO)
-					fill = '0';
-				break;
-			case 'c':
-#ifdef Py_USING_UNICODE
-				if (PyUnicode_Check(v)) {
-					fmt = fmt_start;
-					argidx = argidx_start;
-					goto unicode;
-				}
-#endif
-				pbuf = formatbuf;
-				len = formatchar(pbuf, sizeof(formatbuf), v);
-				if (len < 0)
-					goto error;
-				break;
-			default:
-				PyErr_Format(PyExc_ValueError,
-				  "unsupported format character '%c' (0x%x) "
-				  "at index %zd",
-				  c, c,
-				  (Py_ssize_t)(fmt - 1 -
-					       PyString_AsString(format)));
-				goto error;
-			}
-			if (sign) {
-				if (*pbuf == '-' || *pbuf == '+') {
-					sign = *pbuf++;
-					len--;
-				}
-				else if (flags & F_SIGN)
-					sign = '+';
-				else if (flags & F_BLANK)
-					sign = ' ';
-				else
-					sign = 0;
-			}
-			if (width < len)
-				width = len;
-			if (rescnt - (sign != 0) < width) {
-				reslen -= rescnt;
-				rescnt = width + fmtcnt + 100;
-				reslen += rescnt;
-				if (reslen < 0) {
-					Py_DECREF(result);
-					Py_XDECREF(temp);
-					return PyErr_NoMemory();
-				}
-				if (_PyString_Resize(&result, reslen)) {
-					Py_XDECREF(temp);
-					return NULL;
-				}
-				res = PyString_AS_STRING(result)
-					+ reslen - rescnt;
-			}
-			if (sign) {
-				if (fill != ' ')
-					*res++ = sign;
-				rescnt--;
-				if (width > len)
-					width--;
-			}
-			if ((flags & F_ALT) && (c == 'x' || c == 'X')) {
-				assert(pbuf[0] == '0');
-				assert(pbuf[1] == c);
-				if (fill != ' ') {
-					*res++ = *pbuf++;
-					*res++ = *pbuf++;
-				}
-				rescnt -= 2;
-				width -= 2;
-				if (width < 0)
-					width = 0;
-				len -= 2;
-			}
-			if (width > len && !(flags & F_LJUST)) {
-				do {
-					--rescnt;
-					*res++ = fill;
-				} while (--width > len);
-			}
-			if (fill == ' ') {
-				if (sign)
-					*res++ = sign;
-				if ((flags & F_ALT) &&
-				    (c == 'x' || c == 'X')) {
-					assert(pbuf[0] == '0');
-					assert(pbuf[1] == c);
-					*res++ = *pbuf++;
-					*res++ = *pbuf++;
-				}
-			}
-			Py_MEMCPY(res, pbuf, len);
-			res += len;
-			rescnt -= len;
-			while (--width >= len) {
-				--rescnt;
-				*res++ = ' ';
-			}
-                        if (dict && (argidx < arglen) && c != '%') {
-                                PyErr_SetString(PyExc_TypeError,
-                                           "not all arguments converted during string formatting");
-                                Py_XDECREF(temp);
-                                goto error;
+                if (dict == NULL) {
+                    PyErr_SetString(PyExc_TypeError,
+                             "format requires a mapping");
+                    goto error;
+                }
+                ++fmt;
+                --fmtcnt;
+                keystart = fmt;
+                /* Skip over balanced parentheses */
+                while (pcount > 0 && --fmtcnt >= 0) {
+                    if (*fmt == ')')
+                        --pcount;
+                    else if (*fmt == '(')
+                        ++pcount;
+                    fmt++;
+                }
+                keylen = fmt - keystart - 1;
+                if (fmtcnt < 0 || pcount > 0) {
+                    PyErr_SetString(PyExc_ValueError,
+                               "incomplete format key");
+                    goto error;
+                }
+                key = PyString_FromStringAndSize(keystart,
+                                                 keylen);
+                if (key == NULL)
+                    goto error;
+                if (args_owned) {
+                    Py_DECREF(args);
+                    args_owned = 0;
+                }
+                args = PyObject_GetItem(dict, key);
+                Py_DECREF(key);
+                if (args == NULL) {
+                    goto error;
+                }
+                args_owned = 1;
+                arglen = -1;
+                argidx = -2;
+            }
+            while (--fmtcnt >= 0) {
+                switch (c = *fmt++) {
+                case '-': flags |= F_LJUST; continue;
+                case '+': flags |= F_SIGN; continue;
+                case ' ': flags |= F_BLANK; continue;
+                case '#': flags |= F_ALT; continue;
+                case '0': flags |= F_ZERO; continue;
+                }
+                break;
+            }
+            if (c == '*') {
+                v = getnextarg(args, arglen, &argidx);
+                if (v == NULL)
+                    goto error;
+                if (!PyInt_Check(v)) {
+                    PyErr_SetString(PyExc_TypeError,
+                                    "* wants int");
+                    goto error;
+                }
+                width = PyInt_AsLong(v);
+                if (width < 0) {
+                    flags |= F_LJUST;
+                    width = -width;
+                }
+                if (--fmtcnt >= 0)
+                    c = *fmt++;
+            }
+            else if (c >= 0 && isdigit(c)) {
+                width = c - '0';
+                while (--fmtcnt >= 0) {
+                    c = Py_CHARMASK(*fmt++);
+                    if (!isdigit(c))
+                        break;
+                    if ((width*10) / 10 != width) {
+                        PyErr_SetString(
+                            PyExc_ValueError,
+                            "width too big");
+                        goto error;
+                    }
+                    width = width*10 + (c - '0');
+                }
+            }
+            if (c == '.') {
+                prec = 0;
+                if (--fmtcnt >= 0)
+                    c = *fmt++;
+                if (c == '*') {
+                    v = getnextarg(args, arglen, &argidx);
+                    if (v == NULL)
+                        goto error;
+                    if (!PyInt_Check(v)) {
+                        PyErr_SetString(
+                            PyExc_TypeError,
+                            "* wants int");
+                        goto error;
+                    }
+                    prec = PyInt_AsLong(v);
+                    if (prec < 0)
+                        prec = 0;
+                    if (--fmtcnt >= 0)
+                        c = *fmt++;
+                }
+                else if (c >= 0 && isdigit(c)) {
+                    prec = c - '0';
+                    while (--fmtcnt >= 0) {
+                        c = Py_CHARMASK(*fmt++);
+                        if (!isdigit(c))
+                            break;
+                        if ((prec*10) / 10 != prec) {
+                            PyErr_SetString(
+                                PyExc_ValueError,
+                                "prec too big");
+                            goto error;
                         }
-			Py_XDECREF(temp);
-		} /* '%' */
-	} /* until end */
-	if (argidx < arglen && !dict) {
-		PyErr_SetString(PyExc_TypeError,
-				"not all arguments converted during string formatting");
-		goto error;
-	}
-	if (args_owned) {
-		Py_DECREF(args);
-	}
-	if (_PyString_Resize(&result, reslen - rescnt))
-		return NULL;
-	return result;
+                        prec = prec*10 + (c - '0');
+                    }
+                }
+            } /* prec */
+            if (fmtcnt >= 0) {
+                if (c == 'h' || c == 'l' || c == 'L') {
+                    if (--fmtcnt >= 0)
+                        c = *fmt++;
+                }
+            }
+            if (fmtcnt < 0) {
+                PyErr_SetString(PyExc_ValueError,
+                                "incomplete format");
+                goto error;
+            }
+            if (c != '%') {
+                v = getnextarg(args, arglen, &argidx);
+                if (v == NULL)
+                    goto error;
+            }
+            sign = 0;
+            fill = ' ';
+            switch (c) {
+            case '%':
+                pbuf = "%";
+                len = 1;
+                break;
+            case 's':
+#ifdef Py_USING_UNICODE
+                if (PyUnicode_Check(v)) {
+                    fmt = fmt_start;
+                    argidx = argidx_start;
+                    goto unicode;
+                }
+#endif
+                temp = _PyObject_Str(v);
+#ifdef Py_USING_UNICODE
+                if (temp != NULL && PyUnicode_Check(temp)) {
+                    Py_DECREF(temp);
+                    fmt = fmt_start;
+                    argidx = argidx_start;
+                    goto unicode;
+                }
+#endif
+                /* Fall through */
+            case 'r':
+                if (c == 'r')
+                    temp = PyObject_Repr(v);
+                if (temp == NULL)
+                    goto error;
+                if (!PyString_Check(temp)) {
+                    PyErr_SetString(PyExc_TypeError,
+                      "%s argument has non-string str()");
+                    Py_DECREF(temp);
+                    goto error;
+                }
+                pbuf = PyString_AS_STRING(temp);
+                len = PyString_GET_SIZE(temp);
+                if (prec >= 0 && len > prec)
+                    len = prec;
+                break;
+            case 'i':
+            case 'd':
+            case 'u':
+            case 'o':
+            case 'x':
+            case 'X':
+                if (c == 'i')
+                    c = 'd';
+                isnumok = 0;
+                if (PyNumber_Check(v)) {
+                    PyObject *iobj=NULL;
+
+                    if (PyInt_Check(v) || (PyLong_Check(v))) {
+                        iobj = v;
+                        Py_INCREF(iobj);
+                    }
+                    else {
+                        iobj = PyNumber_Int(v);
+                        if (iobj==NULL) iobj = PyNumber_Long(v);
+                    }
+                    if (iobj!=NULL) {
+                        if (PyInt_Check(iobj)) {
+                            isnumok = 1;
+                            pbuf = formatbuf;
+                            len = formatint(pbuf,
+                                            sizeof(formatbuf),
+                                            flags, prec, c, iobj);
+                            Py_DECREF(iobj);
+                            if (len < 0)
+                                goto error;
+                            sign = 1;
+                        }
+                        else if (PyLong_Check(iobj)) {
+                            int ilen;
+
+                            isnumok = 1;
+                            temp = _PyString_FormatLong(iobj, flags,
+                                prec, c, &pbuf, &ilen);
+                            Py_DECREF(iobj);
+                            len = ilen;
+                            if (!temp)
+                                goto error;
+                            sign = 1;
+                        }
+                        else {
+                            Py_DECREF(iobj);
+                        }
+                    }
+                }
+                if (!isnumok) {
+                    PyErr_Format(PyExc_TypeError,
+                        "%%%c format: a number is required, "
+                        "not %.200s", c, Py_TYPE(v)->tp_name);
+                    goto error;
+                }
+                if (flags & F_ZERO)
+                    fill = '0';
+                break;
+            case 'e':
+            case 'E':
+            case 'f':
+            case 'F':
+            case 'g':
+            case 'G':
+                temp = formatfloat(v, flags, prec, c);
+                if (temp == NULL)
+                    goto error;
+                pbuf = PyString_AS_STRING(temp);
+                len = PyString_GET_SIZE(temp);
+                sign = 1;
+                if (flags & F_ZERO)
+                    fill = '0';
+                break;
+            case 'c':
+#ifdef Py_USING_UNICODE
+                if (PyUnicode_Check(v)) {
+                    fmt = fmt_start;
+                    argidx = argidx_start;
+                    goto unicode;
+                }
+#endif
+                pbuf = formatbuf;
+                len = formatchar(pbuf, sizeof(formatbuf), v);
+                if (len < 0)
+                    goto error;
+                break;
+            default:
+                PyErr_Format(PyExc_ValueError,
+                  "unsupported format character '%c' (0x%x) "
+                  "at index %zd",
+                  c, c,
+                  (Py_ssize_t)(fmt - 1 -
+                               PyString_AsString(format)));
+                goto error;
+            }
+            if (sign) {
+                if (*pbuf == '-' || *pbuf == '+') {
+                    sign = *pbuf++;
+                    len--;
+                }
+                else if (flags & F_SIGN)
+                    sign = '+';
+                else if (flags & F_BLANK)
+                    sign = ' ';
+                else
+                    sign = 0;
+            }
+            if (width < len)
+                width = len;
+            if (rescnt - (sign != 0) < width) {
+                reslen -= rescnt;
+                rescnt = width + fmtcnt + 100;
+                reslen += rescnt;
+                if (reslen < 0) {
+                    Py_DECREF(result);
+                    Py_XDECREF(temp);
+                    return PyErr_NoMemory();
+                }
+                if (_PyString_Resize(&result, reslen)) {
+                    Py_XDECREF(temp);
+                    return NULL;
+                }
+                res = PyString_AS_STRING(result)
+                    + reslen - rescnt;
+            }
+            if (sign) {
+                if (fill != ' ')
+                    *res++ = sign;
+                rescnt--;
+                if (width > len)
+                    width--;
+            }
+            if ((flags & F_ALT) && (c == 'x' || c == 'X')) {
+                assert(pbuf[0] == '0');
+                assert(pbuf[1] == c);
+                if (fill != ' ') {
+                    *res++ = *pbuf++;
+                    *res++ = *pbuf++;
+                }
+                rescnt -= 2;
+                width -= 2;
+                if (width < 0)
+                    width = 0;
+                len -= 2;
+            }
+            if (width > len && !(flags & F_LJUST)) {
+                do {
+                    --rescnt;
+                    *res++ = fill;
+                } while (--width > len);
+            }
+            if (fill == ' ') {
+                if (sign)
+                    *res++ = sign;
+                if ((flags & F_ALT) &&
+                    (c == 'x' || c == 'X')) {
+                    assert(pbuf[0] == '0');
+                    assert(pbuf[1] == c);
+                    *res++ = *pbuf++;
+                    *res++ = *pbuf++;
+                }
+            }
+            Py_MEMCPY(res, pbuf, len);
+            res += len;
+            rescnt -= len;
+            while (--width >= len) {
+                --rescnt;
+                *res++ = ' ';
+            }
+            if (dict && (argidx < arglen) && c != '%') {
+                PyErr_SetString(PyExc_TypeError,
+                           "not all arguments converted during string formatting");
+                Py_XDECREF(temp);
+                goto error;
+            }
+            Py_XDECREF(temp);
+        } /* '%' */
+    } /* until end */
+    if (argidx < arglen && !dict) {
+        PyErr_SetString(PyExc_TypeError,
+                        "not all arguments converted during string formatting");
+        goto error;
+    }
+    if (args_owned) {
+        Py_DECREF(args);
+    }
+    if (_PyString_Resize(&result, reslen - rescnt))
+        return NULL;
+    return result;
 
 #ifdef Py_USING_UNICODE
  unicode:
-	if (args_owned) {
-		Py_DECREF(args);
-		args_owned = 0;
-	}
-	/* Fiddle args right (remove the first argidx arguments) */
-	if (PyTuple_Check(orig_args) && argidx > 0) {
-		PyObject *v;
-		Py_ssize_t n = PyTuple_GET_SIZE(orig_args) - argidx;
-		v = PyTuple_New(n);
-		if (v == NULL)
-			goto error;
-		while (--n >= 0) {
-			PyObject *w = PyTuple_GET_ITEM(orig_args, n + argidx);
-			Py_INCREF(w);
-			PyTuple_SET_ITEM(v, n, w);
-		}
-		args = v;
-	} else {
-		Py_INCREF(orig_args);
-		args = orig_args;
-	}
-	args_owned = 1;
-	/* Take what we have of the result and let the Unicode formatting
-	   function format the rest of the input. */
-	rescnt = res - PyString_AS_STRING(result);
-	if (_PyString_Resize(&result, rescnt))
-		goto error;
-	fmtcnt = PyString_GET_SIZE(format) - \
-		 (fmt - PyString_AS_STRING(format));
-	format = PyUnicode_Decode(fmt, fmtcnt, NULL, NULL);
-	if (format == NULL)
-		goto error;
-	v = PyUnicode_Format(format, args);
-	Py_DECREF(format);
-	if (v == NULL)
-		goto error;
-	/* Paste what we have (result) to what the Unicode formatting
-	   function returned (v) and return the result (or error) */
-	w = PyUnicode_Concat(result, v);
-	Py_DECREF(result);
-	Py_DECREF(v);
-	Py_DECREF(args);
-	return w;
+    if (args_owned) {
+        Py_DECREF(args);
+        args_owned = 0;
+    }
+    /* Fiddle args right (remove the first argidx arguments) */
+    if (PyTuple_Check(orig_args) && argidx > 0) {
+        PyObject *v;
+        Py_ssize_t n = PyTuple_GET_SIZE(orig_args) - argidx;
+        v = PyTuple_New(n);
+        if (v == NULL)
+            goto error;
+        while (--n >= 0) {
+            PyObject *w = PyTuple_GET_ITEM(orig_args, n + argidx);
+            Py_INCREF(w);
+            PyTuple_SET_ITEM(v, n, w);
+        }
+        args = v;
+    } else {
+        Py_INCREF(orig_args);
+        args = orig_args;
+    }
+    args_owned = 1;
+    /* Take what we have of the result and let the Unicode formatting
+       function format the rest of the input. */
+    rescnt = res - PyString_AS_STRING(result);
+    if (_PyString_Resize(&result, rescnt))
+        goto error;
+    fmtcnt = PyString_GET_SIZE(format) - \
+             (fmt - PyString_AS_STRING(format));
+    format = PyUnicode_Decode(fmt, fmtcnt, NULL, NULL);
+    if (format == NULL)
+        goto error;
+    v = PyUnicode_Format(format, args);
+    Py_DECREF(format);
+    if (v == NULL)
+        goto error;
+    /* Paste what we have (result) to what the Unicode formatting
+       function returned (v) and return the result (or error) */
+    w = PyUnicode_Concat(result, v);
+    Py_DECREF(result);
+    Py_DECREF(v);
+    Py_DECREF(args);
+    return w;
 #endif /* Py_USING_UNICODE */
 
  error:
-	Py_DECREF(result);
-	if (args_owned) {
-		Py_DECREF(args);
-	}
-	return NULL;
+    Py_DECREF(result);
+    if (args_owned) {
+        Py_DECREF(args);
+    }
+    return NULL;
 }
 
 void
 PyString_InternInPlace(PyObject **p)
 {
-	register PyStringObject *s = (PyStringObject *)(*p);
-	PyObject *t;
-	if (s == NULL || !PyString_Check(s))
-		Py_FatalError("PyString_InternInPlace: strings only please!");
-	/* If it's a string subclass, we don't really know what putting
-	   it in the interned dict might do. */
-	if (!PyString_CheckExact(s))
-		return;
-	if (PyString_CHECK_INTERNED(s))
-		return;
-	if (interned == NULL) {
-		interned = PyDict_New();
-		if (interned == NULL) {
-			PyErr_Clear(); /* Don't leave an exception */
-			return;
-		}
-	}
-	t = PyDict_GetItem(interned, (PyObject *)s);
-	if (t) {
-		Py_INCREF(t);
-		Py_DECREF(*p);
-		*p = t;
-		return;
-	}
+    register PyStringObject *s = (PyStringObject *)(*p);
+    PyObject *t;
+    if (s == NULL || !PyString_Check(s))
+        Py_FatalError("PyString_InternInPlace: strings only please!");
+    /* If it's a string subclass, we don't really know what putting
+       it in the interned dict might do. */
+    if (!PyString_CheckExact(s))
+        return;
+    if (PyString_CHECK_INTERNED(s))
+        return;
+    if (interned == NULL) {
+        interned = PyDict_New();
+        if (interned == NULL) {
+            PyErr_Clear(); /* Don't leave an exception */
+            return;
+        }
+    }
+    t = PyDict_GetItem(interned, (PyObject *)s);
+    if (t) {
+        Py_INCREF(t);
+        Py_DECREF(*p);
+        *p = t;
+        return;
+    }
 
-	if (PyDict_SetItem(interned, (PyObject *)s, (PyObject *)s) < 0) {
-		PyErr_Clear();
-		return;
-	}
-	/* The two references in interned are not counted by refcnt.
-	   The string deallocator will take care of this */
-	Py_REFCNT(s) -= 2;
-	PyString_CHECK_INTERNED(s) = SSTATE_INTERNED_MORTAL;
+    if (PyDict_SetItem(interned, (PyObject *)s, (PyObject *)s) < 0) {
+        PyErr_Clear();
+        return;
+    }
+    /* The two references in interned are not counted by refcnt.
+       The string deallocator will take care of this */
+    Py_REFCNT(s) -= 2;
+    PyString_CHECK_INTERNED(s) = SSTATE_INTERNED_MORTAL;
 }
 
 void
 PyString_InternImmortal(PyObject **p)
 {
-	PyString_InternInPlace(p);
-	if (PyString_CHECK_INTERNED(*p) != SSTATE_INTERNED_IMMORTAL) {
-		PyString_CHECK_INTERNED(*p) = SSTATE_INTERNED_IMMORTAL;
-		Py_INCREF(*p);
-	}
+    PyString_InternInPlace(p);
+    if (PyString_CHECK_INTERNED(*p) != SSTATE_INTERNED_IMMORTAL) {
+        PyString_CHECK_INTERNED(*p) = SSTATE_INTERNED_IMMORTAL;
+        Py_INCREF(*p);
+    }
 }
 
 
 PyObject *
 PyString_InternFromString(const char *cp)
 {
-	PyObject *s = PyString_FromString(cp);
-	if (s == NULL)
-		return NULL;
-	PyString_InternInPlace(&s);
-	return s;
+    PyObject *s = PyString_FromString(cp);
+    if (s == NULL)
+        return NULL;
+    PyString_InternInPlace(&s);
+    return s;
 }
 
 void
 PyString_Fini(void)
 {
-	int i;
-	for (i = 0; i < UCHAR_MAX + 1; i++) {
-		Py_XDECREF(characters[i]);
-		characters[i] = NULL;
-	}
-	Py_XDECREF(nullstring);
-	nullstring = NULL;
+    int i;
+    for (i = 0; i < UCHAR_MAX + 1; i++) {
+        Py_XDECREF(characters[i]);
+        characters[i] = NULL;
+    }
+    Py_XDECREF(nullstring);
+    nullstring = NULL;
 }
 
 void _Py_ReleaseInternedStrings(void)
 {
-	PyObject *keys;
-	PyStringObject *s;
-	Py_ssize_t i, n;
-	Py_ssize_t immortal_size = 0, mortal_size = 0;
+    PyObject *keys;
+    PyStringObject *s;
+    Py_ssize_t i, n;
+    Py_ssize_t immortal_size = 0, mortal_size = 0;
 
-	if (interned == NULL || !PyDict_Check(interned))
-		return;
-	keys = PyDict_Keys(interned);
-	if (keys == NULL || !PyList_Check(keys)) {
-		PyErr_Clear();
-		return;
-	}
+    if (interned == NULL || !PyDict_Check(interned))
+        return;
+    keys = PyDict_Keys(interned);
+    if (keys == NULL || !PyList_Check(keys)) {
+        PyErr_Clear();
+        return;
+    }
 
-	/* Since _Py_ReleaseInternedStrings() is intended to help a leak
-	   detector, interned strings are not forcibly deallocated; rather, we
-	   give them their stolen references back, and then clear and DECREF
-	   the interned dict. */
+    /* Since _Py_ReleaseInternedStrings() is intended to help a leak
+       detector, interned strings are not forcibly deallocated; rather, we
+       give them their stolen references back, and then clear and DECREF
+       the interned dict. */
 
-	n = PyList_GET_SIZE(keys);
-	fprintf(stderr, "releasing %" PY_FORMAT_SIZE_T "d interned strings\n",
-		n);
-	for (i = 0; i < n; i++) {
-		s = (PyStringObject *) PyList_GET_ITEM(keys, i);
-		switch (s->ob_sstate) {
-		case SSTATE_NOT_INTERNED:
-			/* XXX Shouldn't happen */
-			break;
-		case SSTATE_INTERNED_IMMORTAL:
-			Py_REFCNT(s) += 1;
-			immortal_size += Py_SIZE(s);
-			break;
-		case SSTATE_INTERNED_MORTAL:
-			Py_REFCNT(s) += 2;
-			mortal_size += Py_SIZE(s);
-			break;
-		default:
-			Py_FatalError("Inconsistent interned string state.");
-		}
-		s->ob_sstate = SSTATE_NOT_INTERNED;
-	}
-	fprintf(stderr, "total size of all interned strings: "
-			"%" PY_FORMAT_SIZE_T "d/%" PY_FORMAT_SIZE_T "d "
-			"mortal/immortal\n", mortal_size, immortal_size);
-	Py_DECREF(keys);
-	PyDict_Clear(interned);
-	Py_DECREF(interned);
-	interned = NULL;
+    n = PyList_GET_SIZE(keys);
+    fprintf(stderr, "releasing %" PY_FORMAT_SIZE_T "d interned strings\n",
+        n);
+    for (i = 0; i < n; i++) {
+        s = (PyStringObject *) PyList_GET_ITEM(keys, i);
+        switch (s->ob_sstate) {
+        case SSTATE_NOT_INTERNED:
+            /* XXX Shouldn't happen */
+            break;
+        case SSTATE_INTERNED_IMMORTAL:
+            Py_REFCNT(s) += 1;
+            immortal_size += Py_SIZE(s);
+            break;
+        case SSTATE_INTERNED_MORTAL:
+            Py_REFCNT(s) += 2;
+            mortal_size += Py_SIZE(s);
+            break;
+        default:
+            Py_FatalError("Inconsistent interned string state.");
+        }
+        s->ob_sstate = SSTATE_NOT_INTERNED;
+    }
+    fprintf(stderr, "total size of all interned strings: "
+                    "%" PY_FORMAT_SIZE_T "d/%" PY_FORMAT_SIZE_T "d "
+                    "mortal/immortal\n", mortal_size, immortal_size);
+    Py_DECREF(keys);
+    PyDict_Clear(interned);
+    Py_DECREF(interned);
+    interned = NULL;
 }
diff --git a/Objects/structseq.c b/Objects/structseq.c
index ad246a1..58e15cb 100644
--- a/Objects/structseq.c
+++ b/Objects/structseq.c
@@ -9,7 +9,7 @@
 static char real_length_key[] = "n_fields";
 static char unnamed_fields_key[] = "n_unnamed_fields";
 
-/* Fields with this name have only a field index, not a field name. 
+/* Fields with this name have only a field index, not a field name.
    They are only allowed for indices < n_visible_fields. */
 char *PyStructSequence_UnnamedField = "unnamed field";
 
@@ -29,511 +29,511 @@
 PyObject *
 PyStructSequence_New(PyTypeObject *type)
 {
-	PyStructSequence *obj;
+    PyStructSequence *obj;
 
-	obj = PyObject_New(PyStructSequence, type);
-	if (obj == NULL)
-		return NULL;
-	Py_SIZE(obj) = VISIBLE_SIZE_TP(type);
+    obj = PyObject_New(PyStructSequence, type);
+    if (obj == NULL)
+        return NULL;
+    Py_SIZE(obj) = VISIBLE_SIZE_TP(type);
 
-	return (PyObject*) obj;
+    return (PyObject*) obj;
 }
 
 static void
 structseq_dealloc(PyStructSequence *obj)
 {
-	Py_ssize_t i, size;
+    Py_ssize_t i, size;
 
-	size = REAL_SIZE(obj);
-	for (i = 0; i < size; ++i) {
-		Py_XDECREF(obj->ob_item[i]);
-	}
-	PyObject_Del(obj);
+    size = REAL_SIZE(obj);
+    for (i = 0; i < size; ++i) {
+        Py_XDECREF(obj->ob_item[i]);
+    }
+    PyObject_Del(obj);
 }
 
 static Py_ssize_t
 structseq_length(PyStructSequence *obj)
 {
-	return VISIBLE_SIZE(obj);
+    return VISIBLE_SIZE(obj);
 }
 
 static PyObject*
 structseq_item(PyStructSequence *obj, Py_ssize_t i)
 {
-	if (i < 0 || i >= VISIBLE_SIZE(obj)) {
-		PyErr_SetString(PyExc_IndexError, "tuple index out of range");
-		return NULL;
-	}
-	Py_INCREF(obj->ob_item[i]);
-	return obj->ob_item[i];
+    if (i < 0 || i >= VISIBLE_SIZE(obj)) {
+        PyErr_SetString(PyExc_IndexError, "tuple index out of range");
+        return NULL;
+    }
+    Py_INCREF(obj->ob_item[i]);
+    return obj->ob_item[i];
 }
 
 static PyObject*
 structseq_slice(PyStructSequence *obj, Py_ssize_t low, Py_ssize_t high)
 {
-	PyTupleObject *np;
-	Py_ssize_t i;
+    PyTupleObject *np;
+    Py_ssize_t i;
 
-	if (low < 0)
-		low = 0;
-	if (high > VISIBLE_SIZE(obj))
-		high = VISIBLE_SIZE(obj);
-	if (high < low)
-		high = low;
-	np = (PyTupleObject *)PyTuple_New(high-low);
-	if (np == NULL)
-		return NULL;
-	for(i = low; i < high; ++i) {
-		PyObject *v = obj->ob_item[i];
-		Py_INCREF(v);
-		PyTuple_SET_ITEM(np, i-low, v);
-	}
-	return (PyObject *) np;
+    if (low < 0)
+        low = 0;
+    if (high > VISIBLE_SIZE(obj))
+        high = VISIBLE_SIZE(obj);
+    if (high < low)
+        high = low;
+    np = (PyTupleObject *)PyTuple_New(high-low);
+    if (np == NULL)
+        return NULL;
+    for(i = low; i < high; ++i) {
+        PyObject *v = obj->ob_item[i];
+        Py_INCREF(v);
+        PyTuple_SET_ITEM(np, i-low, v);
+    }
+    return (PyObject *) np;
 }
 
 static PyObject *
 structseq_subscript(PyStructSequence *self, PyObject *item)
 {
-	if (PyIndex_Check(item)) {
-		Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
-		if (i == -1 && PyErr_Occurred())
-			return NULL;
+    if (PyIndex_Check(item)) {
+        Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
+        if (i == -1 && PyErr_Occurred())
+            return NULL;
 
-		if (i < 0)
-			i += VISIBLE_SIZE(self);
+        if (i < 0)
+            i += VISIBLE_SIZE(self);
 
-		if (i < 0 || i >= VISIBLE_SIZE(self)) {
-			PyErr_SetString(PyExc_IndexError,
-				"tuple index out of range");
-			return NULL;
-		}
-		Py_INCREF(self->ob_item[i]);
-		return self->ob_item[i];
-	}
-	else if (PySlice_Check(item)) {
-		Py_ssize_t start, stop, step, slicelen, cur, i;
-		PyObject *result;
-		
-		if (PySlice_GetIndicesEx((PySliceObject *)item,
-					 VISIBLE_SIZE(self), &start, &stop,
-					 &step, &slicelen) < 0) {
-			return NULL;
-		}
-		if (slicelen <= 0)
-			return PyTuple_New(0);
-		result = PyTuple_New(slicelen);
-		if (result == NULL)
-			return NULL;
-		for (cur = start, i = 0; i < slicelen;
-		     cur += step, i++) {
-			PyObject *v = self->ob_item[cur];
-			Py_INCREF(v);
-			PyTuple_SET_ITEM(result, i, v);
-		}
-		return result;
-	}
-	else {
-		PyErr_SetString(PyExc_TypeError,
-				"structseq index must be integer");
-		return NULL;
-	}
+        if (i < 0 || i >= VISIBLE_SIZE(self)) {
+            PyErr_SetString(PyExc_IndexError,
+                "tuple index out of range");
+            return NULL;
+        }
+        Py_INCREF(self->ob_item[i]);
+        return self->ob_item[i];
+    }
+    else if (PySlice_Check(item)) {
+        Py_ssize_t start, stop, step, slicelen, cur, i;
+        PyObject *result;
+
+        if (PySlice_GetIndicesEx((PySliceObject *)item,
+                                 VISIBLE_SIZE(self), &start, &stop,
+                                 &step, &slicelen) < 0) {
+            return NULL;
+        }
+        if (slicelen <= 0)
+            return PyTuple_New(0);
+        result = PyTuple_New(slicelen);
+        if (result == NULL)
+            return NULL;
+        for (cur = start, i = 0; i < slicelen;
+             cur += step, i++) {
+            PyObject *v = self->ob_item[cur];
+            Py_INCREF(v);
+            PyTuple_SET_ITEM(result, i, v);
+        }
+        return result;
+    }
+    else {
+        PyErr_SetString(PyExc_TypeError,
+                        "structseq index must be integer");
+        return NULL;
+    }
 }
 
 static PyObject *
 structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *arg = NULL;
-	PyObject *dict = NULL;
-	PyObject *ob;
-	PyStructSequence *res = NULL;
-	Py_ssize_t len, min_len, max_len, i, n_unnamed_fields;
-	static char *kwlist[] = {"sequence", "dict", 0};
+    PyObject *arg = NULL;
+    PyObject *dict = NULL;
+    PyObject *ob;
+    PyStructSequence *res = NULL;
+    Py_ssize_t len, min_len, max_len, i, n_unnamed_fields;
+    static char *kwlist[] = {"sequence", "dict", 0};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:structseq", 
-					 kwlist, &arg, &dict))
-		return NULL;
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:structseq",
+                                     kwlist, &arg, &dict))
+        return NULL;
 
-	arg = PySequence_Fast(arg, "constructor requires a sequence");
+    arg = PySequence_Fast(arg, "constructor requires a sequence");
 
-	if (!arg) {				
-		return NULL;
-	}
+    if (!arg) {
+        return NULL;
+    }
 
-	if (dict && !PyDict_Check(dict)) {
-		PyErr_Format(PyExc_TypeError, 
-			     "%.500s() takes a dict as second arg, if any",
-			     type->tp_name);
-		Py_DECREF(arg);
-		return NULL;
-	}
+    if (dict && !PyDict_Check(dict)) {
+        PyErr_Format(PyExc_TypeError,
+                     "%.500s() takes a dict as second arg, if any",
+                     type->tp_name);
+        Py_DECREF(arg);
+        return NULL;
+    }
 
-	len = PySequence_Fast_GET_SIZE(arg);
-	min_len = VISIBLE_SIZE_TP(type);
-	max_len = REAL_SIZE_TP(type);
-	n_unnamed_fields = UNNAMED_FIELDS_TP(type);
+    len = PySequence_Fast_GET_SIZE(arg);
+    min_len = VISIBLE_SIZE_TP(type);
+    max_len = REAL_SIZE_TP(type);
+    n_unnamed_fields = UNNAMED_FIELDS_TP(type);
 
-	if (min_len != max_len) {
-		if (len < min_len) {
-			PyErr_Format(PyExc_TypeError, 
-	       "%.500s() takes an at least %zd-sequence (%zd-sequence given)",
-				     type->tp_name, min_len, len);
-			Py_DECREF(arg);
-			return NULL;
-		}
+    if (min_len != max_len) {
+        if (len < min_len) {
+            PyErr_Format(PyExc_TypeError,
+           "%.500s() takes an at least %zd-sequence (%zd-sequence given)",
+                                 type->tp_name, min_len, len);
+                    Py_DECREF(arg);
+                    return NULL;
+        }
 
-		if (len > max_len) {
-			PyErr_Format(PyExc_TypeError, 
-	       "%.500s() takes an at most %zd-sequence (%zd-sequence given)",
-				     type->tp_name, max_len, len);
-			Py_DECREF(arg);
-			return NULL;
-		}
-	} 
-	else {
-		if (len != min_len) {
-			PyErr_Format(PyExc_TypeError, 
-	       "%.500s() takes a %zd-sequence (%zd-sequence given)",
-				     type->tp_name, min_len, len);
-			Py_DECREF(arg);
-			return NULL;
-		}
-	}
+        if (len > max_len) {
+            PyErr_Format(PyExc_TypeError,
+           "%.500s() takes an at most %zd-sequence (%zd-sequence given)",
+                                 type->tp_name, max_len, len);
+                    Py_DECREF(arg);
+                    return NULL;
+        }
+    }
+    else {
+        if (len != min_len) {
+            PyErr_Format(PyExc_TypeError,
+           "%.500s() takes a %zd-sequence (%zd-sequence given)",
+                                 type->tp_name, min_len, len);
+                    Py_DECREF(arg);
+                    return NULL;
+        }
+    }
 
-	res = (PyStructSequence*) PyStructSequence_New(type);
-	if (res == NULL) {
-		return NULL;
-	}
-	for (i = 0; i < len; ++i) {
-		PyObject *v = PySequence_Fast_GET_ITEM(arg, i);
-		Py_INCREF(v);
-		res->ob_item[i] = v;
-	}
-	for (; i < max_len; ++i) {
-		if (dict && (ob = PyDict_GetItemString(
-			dict, type->tp_members[i-n_unnamed_fields].name))) {
-		}
-		else {
-			ob = Py_None;
-		}
-		Py_INCREF(ob);
-		res->ob_item[i] = ob;
-	}
-	
-	Py_DECREF(arg);
-	return (PyObject*) res;
+    res = (PyStructSequence*) PyStructSequence_New(type);
+    if (res == NULL) {
+        return NULL;
+    }
+    for (i = 0; i < len; ++i) {
+        PyObject *v = PySequence_Fast_GET_ITEM(arg, i);
+        Py_INCREF(v);
+        res->ob_item[i] = v;
+    }
+    for (; i < max_len; ++i) {
+        if (dict && (ob = PyDict_GetItemString(
+            dict, type->tp_members[i-n_unnamed_fields].name))) {
+        }
+        else {
+            ob = Py_None;
+        }
+        Py_INCREF(ob);
+        res->ob_item[i] = ob;
+    }
+
+    Py_DECREF(arg);
+    return (PyObject*) res;
 }
 
 static PyObject *
 make_tuple(PyStructSequence *obj)
 {
-	return structseq_slice(obj, 0, VISIBLE_SIZE(obj));
+    return structseq_slice(obj, 0, VISIBLE_SIZE(obj));
 }
 
 static PyObject *
 structseq_repr(PyStructSequence *obj)
 {
-	/* buffer and type size were chosen well considered. */
+    /* buffer and type size were chosen well considered. */
 #define REPR_BUFFER_SIZE 512
 #define TYPE_MAXSIZE 100
 
-	PyObject *tup;
-	PyTypeObject *typ = Py_TYPE(obj);
-	int i, removelast = 0;
-	Py_ssize_t len;
-	char buf[REPR_BUFFER_SIZE];
-	char *endofbuf, *pbuf = buf;
+    PyObject *tup;
+    PyTypeObject *typ = Py_TYPE(obj);
+    int i, removelast = 0;
+    Py_ssize_t len;
+    char buf[REPR_BUFFER_SIZE];
+    char *endofbuf, *pbuf = buf;
 
-	/* pointer to end of writeable buffer; safes space for "...)\0" */
-	endofbuf= &buf[REPR_BUFFER_SIZE-5];
+    /* pointer to end of writeable buffer; safes space for "...)\0" */
+    endofbuf= &buf[REPR_BUFFER_SIZE-5];
 
-	if ((tup = make_tuple(obj)) == NULL) {
-		return NULL;
-	}
+    if ((tup = make_tuple(obj)) == NULL) {
+        return NULL;
+    }
 
-	/* "typename(", limited to  TYPE_MAXSIZE */
-	len = strlen(typ->tp_name) > TYPE_MAXSIZE ? TYPE_MAXSIZE :
-						    strlen(typ->tp_name);
-	strncpy(pbuf, typ->tp_name, len);
-	pbuf += len;
-	*pbuf++ = '(';
+    /* "typename(", limited to  TYPE_MAXSIZE */
+    len = strlen(typ->tp_name) > TYPE_MAXSIZE ? TYPE_MAXSIZE :
+                            strlen(typ->tp_name);
+    strncpy(pbuf, typ->tp_name, len);
+    pbuf += len;
+    *pbuf++ = '(';
 
-	for (i=0; i < VISIBLE_SIZE(obj); i++) {
-		PyObject *val, *repr;
-		char *cname, *crepr;
+    for (i=0; i < VISIBLE_SIZE(obj); i++) {
+        PyObject *val, *repr;
+        char *cname, *crepr;
 
-		cname = typ->tp_members[i].name;
-		
-		val = PyTuple_GetItem(tup, i);
-		if (cname == NULL || val == NULL) {
-			return NULL;
-		}
-		repr = PyObject_Repr(val);
-		if (repr == NULL) {
-			Py_DECREF(tup);
-			return NULL;
-		}
-		crepr = PyString_AsString(repr);
-		if (crepr == NULL) {
-			Py_DECREF(tup);
-			Py_DECREF(repr);
-			return NULL;
-		}
-		
-		/* + 3: keep space for "=" and ", " */
- 		len = strlen(cname) + strlen(crepr) + 3;
-		if ((pbuf+len) <= endofbuf) {
-			strcpy(pbuf, cname);
-			pbuf += strlen(cname);
-			*pbuf++ = '=';
-			strcpy(pbuf, crepr);
-			pbuf += strlen(crepr);
-			*pbuf++ = ',';
-			*pbuf++ = ' ';
-			removelast = 1;
-			Py_DECREF(repr);
-		}
-		else {
-			strcpy(pbuf, "...");
-			pbuf += 3;
-			removelast = 0;
-			Py_DECREF(repr);
-			break;
-		}
-	}
-	Py_DECREF(tup);
-	if (removelast) {
-		/* overwrite last ", " */
-		pbuf-=2;
-	}
-	*pbuf++ = ')';
-	*pbuf = '\0';
+        cname = typ->tp_members[i].name;
 
-	return PyString_FromString(buf);
+        val = PyTuple_GetItem(tup, i);
+        if (cname == NULL || val == NULL) {
+            return NULL;
+        }
+        repr = PyObject_Repr(val);
+        if (repr == NULL) {
+            Py_DECREF(tup);
+            return NULL;
+        }
+        crepr = PyString_AsString(repr);
+        if (crepr == NULL) {
+            Py_DECREF(tup);
+            Py_DECREF(repr);
+            return NULL;
+        }
+
+        /* + 3: keep space for "=" and ", " */
+        len = strlen(cname) + strlen(crepr) + 3;
+        if ((pbuf+len) <= endofbuf) {
+            strcpy(pbuf, cname);
+            pbuf += strlen(cname);
+            *pbuf++ = '=';
+            strcpy(pbuf, crepr);
+            pbuf += strlen(crepr);
+            *pbuf++ = ',';
+            *pbuf++ = ' ';
+            removelast = 1;
+            Py_DECREF(repr);
+        }
+        else {
+            strcpy(pbuf, "...");
+            pbuf += 3;
+            removelast = 0;
+            Py_DECREF(repr);
+            break;
+        }
+    }
+    Py_DECREF(tup);
+    if (removelast) {
+        /* overwrite last ", " */
+        pbuf-=2;
+    }
+    *pbuf++ = ')';
+    *pbuf = '\0';
+
+    return PyString_FromString(buf);
 }
 
 static PyObject *
 structseq_concat(PyStructSequence *obj, PyObject *b)
 {
-	PyObject *tup, *result;
-	tup = make_tuple(obj);
-	result = PySequence_Concat(tup, b);
-	Py_DECREF(tup);
-	return result;
+    PyObject *tup, *result;
+    tup = make_tuple(obj);
+    result = PySequence_Concat(tup, b);
+    Py_DECREF(tup);
+    return result;
 }
 
 static PyObject *
 structseq_repeat(PyStructSequence *obj, Py_ssize_t n)
 {
-	PyObject *tup, *result;
-	tup = make_tuple(obj);
-	result = PySequence_Repeat(tup, n);
-	Py_DECREF(tup);
-	return result;
+    PyObject *tup, *result;
+    tup = make_tuple(obj);
+    result = PySequence_Repeat(tup, n);
+    Py_DECREF(tup);
+    return result;
 }
 
 static int
 structseq_contains(PyStructSequence *obj, PyObject *o)
 {
-	PyObject *tup;
-	int result;
-	tup = make_tuple(obj);
-	if (!tup)
-		return -1;
-	result = PySequence_Contains(tup, o);
-	Py_DECREF(tup);
-	return result;
+    PyObject *tup;
+    int result;
+    tup = make_tuple(obj);
+    if (!tup)
+        return -1;
+    result = PySequence_Contains(tup, o);
+    Py_DECREF(tup);
+    return result;
 }
 
 static long
 structseq_hash(PyObject *obj)
 {
-	PyObject *tup;
-	long result;
-	tup = make_tuple((PyStructSequence*) obj);
-	if (!tup)
-		return -1;
-	result = PyObject_Hash(tup);
-	Py_DECREF(tup);
-	return result;
+    PyObject *tup;
+    long result;
+    tup = make_tuple((PyStructSequence*) obj);
+    if (!tup)
+        return -1;
+    result = PyObject_Hash(tup);
+    Py_DECREF(tup);
+    return result;
 }
 
 static PyObject *
 structseq_richcompare(PyObject *obj, PyObject *o2, int op)
 {
-	PyObject *tup, *result;
-	tup = make_tuple((PyStructSequence*) obj);
-	result = PyObject_RichCompare(tup, o2, op);
-	Py_DECREF(tup);
-	return result;
+    PyObject *tup, *result;
+    tup = make_tuple((PyStructSequence*) obj);
+    result = PyObject_RichCompare(tup, o2, op);
+    Py_DECREF(tup);
+    return result;
 }
 
 static PyObject *
 structseq_reduce(PyStructSequence* self)
 {
-	PyObject* tup;
-	PyObject* dict;
-	PyObject* result;
-	Py_ssize_t n_fields, n_visible_fields, n_unnamed_fields;
-	int i;
-	
-	n_fields = REAL_SIZE(self);
-	n_visible_fields = VISIBLE_SIZE(self);
-	n_unnamed_fields = UNNAMED_FIELDS(self);
-	tup = PyTuple_New(n_visible_fields);
-	if (!tup) {
-		return NULL;
-	}
+    PyObject* tup;
+    PyObject* dict;
+    PyObject* result;
+    Py_ssize_t n_fields, n_visible_fields, n_unnamed_fields;
+    int i;
 
-	dict = PyDict_New();
-	if (!dict) {
-		Py_DECREF(tup);
-		return NULL;
-	}
+    n_fields = REAL_SIZE(self);
+    n_visible_fields = VISIBLE_SIZE(self);
+    n_unnamed_fields = UNNAMED_FIELDS(self);
+    tup = PyTuple_New(n_visible_fields);
+    if (!tup) {
+        return NULL;
+    }
 
-	for (i = 0; i < n_visible_fields; i++) {
-		Py_INCREF(self->ob_item[i]);
-		PyTuple_SET_ITEM(tup, i, self->ob_item[i]);
-	}
-	
-	for (; i < n_fields; i++) {
-		char *n = Py_TYPE(self)->tp_members[i-n_unnamed_fields].name;
-		PyDict_SetItemString(dict, n,
-				     self->ob_item[i]);
-	}
+    dict = PyDict_New();
+    if (!dict) {
+        Py_DECREF(tup);
+        return NULL;
+    }
 
-	result = Py_BuildValue("(O(OO))", Py_TYPE(self), tup, dict);
+    for (i = 0; i < n_visible_fields; i++) {
+        Py_INCREF(self->ob_item[i]);
+        PyTuple_SET_ITEM(tup, i, self->ob_item[i]);
+    }
 
-	Py_DECREF(tup);
-	Py_DECREF(dict);
+    for (; i < n_fields; i++) {
+        char *n = Py_TYPE(self)->tp_members[i-n_unnamed_fields].name;
+        PyDict_SetItemString(dict, n,
+                             self->ob_item[i]);
+    }
 
-	return result;
+    result = Py_BuildValue("(O(OO))", Py_TYPE(self), tup, dict);
+
+    Py_DECREF(tup);
+    Py_DECREF(dict);
+
+    return result;
 }
 
 static PySequenceMethods structseq_as_sequence = {
-	(lenfunc)structseq_length,
-	(binaryfunc)structseq_concat,           /* sq_concat */
-	(ssizeargfunc)structseq_repeat,         /* sq_repeat */
-	(ssizeargfunc)structseq_item,		/* sq_item */
-	(ssizessizeargfunc)structseq_slice,	/* sq_slice */
-	0,					/* sq_ass_item */
-	0,					/* sq_ass_slice */
-	(objobjproc)structseq_contains,	        /* sq_contains */
+    (lenfunc)structseq_length,
+    (binaryfunc)structseq_concat,           /* sq_concat */
+    (ssizeargfunc)structseq_repeat,         /* sq_repeat */
+    (ssizeargfunc)structseq_item,               /* sq_item */
+    (ssizessizeargfunc)structseq_slice,         /* sq_slice */
+    0,                                          /* sq_ass_item */
+    0,                                          /* sq_ass_slice */
+    (objobjproc)structseq_contains,             /* sq_contains */
 };
 
 static PyMappingMethods structseq_as_mapping = {
-	(lenfunc)structseq_length,
-	(binaryfunc)structseq_subscript,
+    (lenfunc)structseq_length,
+    (binaryfunc)structseq_subscript,
 };
 
 static PyMethodDef structseq_methods[] = {
-	{"__reduce__", (PyCFunction)structseq_reduce, 
-	 METH_NOARGS, NULL},
-	{NULL, NULL}
+    {"__reduce__", (PyCFunction)structseq_reduce,
+     METH_NOARGS, NULL},
+    {NULL, NULL}
 };
 
 static PyTypeObject _struct_sequence_template = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	NULL,	                     		/* tp_name */
-        0,		                        /* tp_basicsize */
-	0,	                      		/* tp_itemsize */
-	(destructor)structseq_dealloc,	        /* tp_dealloc */
-	0,                        	        /* tp_print */
-	0,			 		/* tp_getattr */
-	0,					/* tp_setattr */
-	0,               			/* tp_compare */
-	(reprfunc)structseq_repr,             	/* tp_repr */
-	0,					/* tp_as_number */
-	&structseq_as_sequence,			/* tp_as_sequence */
-	&structseq_as_mapping,			/* tp_as_mapping */
-	structseq_hash,				/* tp_hash */
-	0,              			/* tp_call */
-	0,					/* tp_str */
-	0,                       		/* tp_getattro */
-	0,	                           	/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,                     /* tp_flags */
-	NULL,	 		         	/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	structseq_richcompare,			/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	structseq_methods,      		/* tp_methods */
-        NULL,			             	/* tp_members */
-	0,			          	/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,	                                /* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	structseq_new,				/* tp_new */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    NULL,                                       /* tp_name */
+    0,                                          /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    (destructor)structseq_dealloc,              /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)structseq_repr,                   /* tp_repr */
+    0,                                          /* tp_as_number */
+    &structseq_as_sequence,                     /* tp_as_sequence */
+    &structseq_as_mapping,                      /* tp_as_mapping */
+    structseq_hash,                             /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    0,                                          /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,                     /* tp_flags */
+    NULL,                                       /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    structseq_richcompare,                      /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    structseq_methods,                          /* tp_methods */
+    NULL,                                       /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    structseq_new,                              /* tp_new */
 };
 
 void
 PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc *desc)
 {
-	PyObject *dict;
-	PyMemberDef* members;
-	int n_members, n_unnamed_members, i, k;
+    PyObject *dict;
+    PyMemberDef* members;
+    int n_members, n_unnamed_members, i, k;
 
 #ifdef Py_TRACE_REFS
-	/* if the type object was chained, unchain it first
-	   before overwriting its storage */
-	if (type->_ob_next) {
-		_Py_ForgetReference((PyObject*)type);
-	}
+    /* if the type object was chained, unchain it first
+       before overwriting its storage */
+    if (type->_ob_next) {
+        _Py_ForgetReference((PyObject*)type);
+    }
 #endif
 
-	n_unnamed_members = 0;
-	for (i = 0; desc->fields[i].name != NULL; ++i)
-		if (desc->fields[i].name == PyStructSequence_UnnamedField)
-			n_unnamed_members++;
-	n_members = i;
+    n_unnamed_members = 0;
+    for (i = 0; desc->fields[i].name != NULL; ++i)
+        if (desc->fields[i].name == PyStructSequence_UnnamedField)
+            n_unnamed_members++;
+    n_members = i;
 
-	memcpy(type, &_struct_sequence_template, sizeof(PyTypeObject));
-	type->tp_name = desc->name;
-	type->tp_doc = desc->doc;
-	type->tp_basicsize = sizeof(PyStructSequence)+
-		sizeof(PyObject*)*(n_members-1);
-	type->tp_itemsize = 0;
+    memcpy(type, &_struct_sequence_template, sizeof(PyTypeObject));
+    type->tp_name = desc->name;
+    type->tp_doc = desc->doc;
+    type->tp_basicsize = sizeof(PyStructSequence)+
+        sizeof(PyObject*)*(n_members-1);
+    type->tp_itemsize = 0;
 
-	members = PyMem_NEW(PyMemberDef, n_members-n_unnamed_members+1);
-	if (members == NULL)
-		return;
-	
-	for (i = k = 0; i < n_members; ++i) {
-		if (desc->fields[i].name == PyStructSequence_UnnamedField)
-			continue;
-		members[k].name = desc->fields[i].name;
-		members[k].type = T_OBJECT;
-		members[k].offset = offsetof(PyStructSequence, ob_item)
-		  + i * sizeof(PyObject*);
-		members[k].flags = READONLY;
-		members[k].doc = desc->fields[i].doc;
-		k++;
-	}
-	members[k].name = NULL;
+    members = PyMem_NEW(PyMemberDef, n_members-n_unnamed_members+1);
+    if (members == NULL)
+        return;
 
-	type->tp_members = members;
+    for (i = k = 0; i < n_members; ++i) {
+        if (desc->fields[i].name == PyStructSequence_UnnamedField)
+            continue;
+        members[k].name = desc->fields[i].name;
+        members[k].type = T_OBJECT;
+        members[k].offset = offsetof(PyStructSequence, ob_item)
+          + i * sizeof(PyObject*);
+        members[k].flags = READONLY;
+        members[k].doc = desc->fields[i].doc;
+        k++;
+    }
+    members[k].name = NULL;
 
-	if (PyType_Ready(type) < 0)
-		return;
-	Py_INCREF(type);
+    type->tp_members = members;
 
-	dict = type->tp_dict;
-#define SET_DICT_FROM_INT(key, value)				\
-	do {							\
-		PyObject *v = PyInt_FromLong((long) value);	\
-		if (v != NULL) {				\
-			PyDict_SetItemString(dict, key, v);	\
-			Py_DECREF(v);				\
-		}						\
-	} while (0)
+    if (PyType_Ready(type) < 0)
+        return;
+    Py_INCREF(type);
 
-	SET_DICT_FROM_INT(visible_length_key, desc->n_in_sequence);
-	SET_DICT_FROM_INT(real_length_key, n_members);
-	SET_DICT_FROM_INT(unnamed_fields_key, n_unnamed_members);
+    dict = type->tp_dict;
+#define SET_DICT_FROM_INT(key, value)                           \
+    do {                                                        \
+        PyObject *v = PyInt_FromLong((long) value);             \
+        if (v != NULL) {                                        \
+            PyDict_SetItemString(dict, key, v);                 \
+            Py_DECREF(v);                                       \
+        }                                                       \
+    } while (0)
+
+    SET_DICT_FROM_INT(visible_length_key, desc->n_in_sequence);
+    SET_DICT_FROM_INT(real_length_key, n_members);
+    SET_DICT_FROM_INT(unnamed_fields_key, n_unnamed_members);
 }
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 143a62c..3249ccc 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -5,7 +5,7 @@
 
 /* Speed optimization to avoid frequent malloc/free of small tuples */
 #ifndef PyTuple_MAXSAVESIZE
-#define PyTuple_MAXSAVESIZE	20  /* Largest tuple to save on free list */
+#define PyTuple_MAXSAVESIZE     20  /* Largest tuple to save on free list */
 #endif
 #ifndef PyTuple_MAXFREELIST
 #define PyTuple_MAXFREELIST  2000  /* Maximum number of tuples of each size to save */
@@ -35,12 +35,12 @@
 static void
 show_track(void)
 {
-	fprintf(stderr, "Tuples created: %" PY_FORMAT_SIZE_T "d\n",
-		count_tracked + count_untracked);
-	fprintf(stderr, "Tuples tracked by the GC: %" PY_FORMAT_SIZE_T
-		"d\n", count_tracked);
-	fprintf(stderr, "%.2f%% tuple tracking rate\n\n",
-		(100.0*count_tracked/(count_untracked+count_tracked)));
+    fprintf(stderr, "Tuples created: %" PY_FORMAT_SIZE_T "d\n",
+        count_tracked + count_untracked);
+    fprintf(stderr, "Tuples tracked by the GC: %" PY_FORMAT_SIZE_T
+        "d\n", count_tracked);
+    fprintf(stderr, "%.2f%% tuple tracking rate\n\n",
+        (100.0*count_tracked/(count_untracked+count_tracked)));
 }
 #endif
 
@@ -48,160 +48,160 @@
 PyObject *
 PyTuple_New(register Py_ssize_t size)
 {
-	register PyTupleObject *op;
-	Py_ssize_t i;
-	if (size < 0) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
+    register PyTupleObject *op;
+    Py_ssize_t i;
+    if (size < 0) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
 #if PyTuple_MAXSAVESIZE > 0
-	if (size == 0 && free_list[0]) {
-		op = free_list[0];
-		Py_INCREF(op);
+    if (size == 0 && free_list[0]) {
+        op = free_list[0];
+        Py_INCREF(op);
 #ifdef COUNT_ALLOCS
-		tuple_zero_allocs++;
+        tuple_zero_allocs++;
 #endif
-		return (PyObject *) op;
-	}
-	if (size < PyTuple_MAXSAVESIZE && (op = free_list[size]) != NULL) {
-		free_list[size] = (PyTupleObject *) op->ob_item[0];
-		numfree[size]--;
+        return (PyObject *) op;
+    }
+    if (size < PyTuple_MAXSAVESIZE && (op = free_list[size]) != NULL) {
+        free_list[size] = (PyTupleObject *) op->ob_item[0];
+        numfree[size]--;
 #ifdef COUNT_ALLOCS
-		fast_tuple_allocs++;
+        fast_tuple_allocs++;
 #endif
-		/* Inline PyObject_InitVar */
+        /* Inline PyObject_InitVar */
 #ifdef Py_TRACE_REFS
-		Py_SIZE(op) = size;
-		Py_TYPE(op) = &PyTuple_Type;
+        Py_SIZE(op) = size;
+        Py_TYPE(op) = &PyTuple_Type;
 #endif
-		_Py_NewReference((PyObject *)op);
-	}
-	else
+        _Py_NewReference((PyObject *)op);
+    }
+    else
 #endif
-	{
-		Py_ssize_t nbytes = size * sizeof(PyObject *);
-		/* Check for overflow */
-		if (nbytes / sizeof(PyObject *) != (size_t)size ||
-		    (nbytes > PY_SSIZE_T_MAX - sizeof(PyTupleObject) - sizeof(PyObject *)))
-		{
-			return PyErr_NoMemory();
-		}
+    {
+        Py_ssize_t nbytes = size * sizeof(PyObject *);
+        /* Check for overflow */
+        if (nbytes / sizeof(PyObject *) != (size_t)size ||
+            (nbytes > PY_SSIZE_T_MAX - sizeof(PyTupleObject) - sizeof(PyObject *)))
+        {
+            return PyErr_NoMemory();
+        }
 
-		op = PyObject_GC_NewVar(PyTupleObject, &PyTuple_Type, size);
-		if (op == NULL)
-			return NULL;
-	}
-	for (i=0; i < size; i++)
-		op->ob_item[i] = NULL;
+        op = PyObject_GC_NewVar(PyTupleObject, &PyTuple_Type, size);
+        if (op == NULL)
+            return NULL;
+    }
+    for (i=0; i < size; i++)
+        op->ob_item[i] = NULL;
 #if PyTuple_MAXSAVESIZE > 0
-	if (size == 0) {
-		free_list[0] = op;
-		++numfree[0];
-		Py_INCREF(op);	/* extra INCREF so that this is never freed */
-	}
+    if (size == 0) {
+        free_list[0] = op;
+        ++numfree[0];
+        Py_INCREF(op);          /* extra INCREF so that this is never freed */
+    }
 #endif
 #ifdef SHOW_TRACK_COUNT
-	count_tracked++;
+    count_tracked++;
 #endif
-	_PyObject_GC_TRACK(op);
-	return (PyObject *) op;
+    _PyObject_GC_TRACK(op);
+    return (PyObject *) op;
 }
 
 Py_ssize_t
 PyTuple_Size(register PyObject *op)
 {
-	if (!PyTuple_Check(op)) {
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	else
-		return Py_SIZE(op);
+    if (!PyTuple_Check(op)) {
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    else
+        return Py_SIZE(op);
 }
 
 PyObject *
 PyTuple_GetItem(register PyObject *op, register Py_ssize_t i)
 {
-	if (!PyTuple_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	if (i < 0 || i >= Py_SIZE(op)) {
-		PyErr_SetString(PyExc_IndexError, "tuple index out of range");
-		return NULL;
-	}
-	return ((PyTupleObject *)op) -> ob_item[i];
+    if (!PyTuple_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    if (i < 0 || i >= Py_SIZE(op)) {
+        PyErr_SetString(PyExc_IndexError, "tuple index out of range");
+        return NULL;
+    }
+    return ((PyTupleObject *)op) -> ob_item[i];
 }
 
 int
 PyTuple_SetItem(register PyObject *op, register Py_ssize_t i, PyObject *newitem)
 {
-	register PyObject *olditem;
-	register PyObject **p;
-	if (!PyTuple_Check(op) || op->ob_refcnt != 1) {
-		Py_XDECREF(newitem);
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	if (i < 0 || i >= Py_SIZE(op)) {
-		Py_XDECREF(newitem);
-		PyErr_SetString(PyExc_IndexError,
-				"tuple assignment index out of range");
-		return -1;
-	}
-	p = ((PyTupleObject *)op) -> ob_item + i;
-	olditem = *p;
-	*p = newitem;
-	Py_XDECREF(olditem);
-	return 0;
+    register PyObject *olditem;
+    register PyObject **p;
+    if (!PyTuple_Check(op) || op->ob_refcnt != 1) {
+        Py_XDECREF(newitem);
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    if (i < 0 || i >= Py_SIZE(op)) {
+        Py_XDECREF(newitem);
+        PyErr_SetString(PyExc_IndexError,
+                        "tuple assignment index out of range");
+        return -1;
+    }
+    p = ((PyTupleObject *)op) -> ob_item + i;
+    olditem = *p;
+    *p = newitem;
+    Py_XDECREF(olditem);
+    return 0;
 }
 
 void
 _PyTuple_MaybeUntrack(PyObject *op)
 {
-	PyTupleObject *t;
-	Py_ssize_t i, n;
-	
-	if (!PyTuple_CheckExact(op) || !_PyObject_GC_IS_TRACKED(op))
-		return;
-	t = (PyTupleObject *) op;
-	n = Py_SIZE(t);
-	for (i = 0; i < n; i++) {
-		PyObject *elt = PyTuple_GET_ITEM(t, i);
-		/* Tuple with NULL elements aren't
-		   fully constructed, don't untrack
-		   them yet. */
-		if (!elt ||
-			_PyObject_GC_MAY_BE_TRACKED(elt))
-			return;
-	}
+    PyTupleObject *t;
+    Py_ssize_t i, n;
+
+    if (!PyTuple_CheckExact(op) || !_PyObject_GC_IS_TRACKED(op))
+        return;
+    t = (PyTupleObject *) op;
+    n = Py_SIZE(t);
+    for (i = 0; i < n; i++) {
+        PyObject *elt = PyTuple_GET_ITEM(t, i);
+        /* Tuple with NULL elements aren't
+           fully constructed, don't untrack
+           them yet. */
+        if (!elt ||
+            _PyObject_GC_MAY_BE_TRACKED(elt))
+            return;
+    }
 #ifdef SHOW_TRACK_COUNT
-	count_tracked--;
-	count_untracked++;
+    count_tracked--;
+    count_untracked++;
 #endif
-	_PyObject_GC_UNTRACK(op);
+    _PyObject_GC_UNTRACK(op);
 }
 
 PyObject *
 PyTuple_Pack(Py_ssize_t n, ...)
 {
-	Py_ssize_t i;
-	PyObject *o;
-	PyObject *result;
-	PyObject **items;
-	va_list vargs;
+    Py_ssize_t i;
+    PyObject *o;
+    PyObject *result;
+    PyObject **items;
+    va_list vargs;
 
-	va_start(vargs, n);
-	result = PyTuple_New(n);
-	if (result == NULL)
-		return NULL;
-	items = ((PyTupleObject *)result)->ob_item;
-	for (i = 0; i < n; i++) {
-		o = va_arg(vargs, PyObject *);
-		Py_INCREF(o);
-		items[i] = o;
-	}
-	va_end(vargs);
-	return result;
+    va_start(vargs, n);
+    result = PyTuple_New(n);
+    if (result == NULL)
+        return NULL;
+    items = ((PyTupleObject *)result)->ob_item;
+    for (i = 0; i < n; i++) {
+        o = va_arg(vargs, PyObject *);
+        Py_INCREF(o);
+        items[i] = o;
+    }
+    va_end(vargs);
+    return result;
 }
 
 
@@ -210,430 +210,430 @@
 static void
 tupledealloc(register PyTupleObject *op)
 {
-	register Py_ssize_t i;
-	register Py_ssize_t len =  Py_SIZE(op);
-	PyObject_GC_UnTrack(op);
-	Py_TRASHCAN_SAFE_BEGIN(op)
-	if (len > 0) {
-		i = len;
-		while (--i >= 0)
-			Py_XDECREF(op->ob_item[i]);
+    register Py_ssize_t i;
+    register Py_ssize_t len =  Py_SIZE(op);
+    PyObject_GC_UnTrack(op);
+    Py_TRASHCAN_SAFE_BEGIN(op)
+    if (len > 0) {
+        i = len;
+        while (--i >= 0)
+            Py_XDECREF(op->ob_item[i]);
 #if PyTuple_MAXSAVESIZE > 0
-		if (len < PyTuple_MAXSAVESIZE &&
-		    numfree[len] < PyTuple_MAXFREELIST &&
-		    Py_TYPE(op) == &PyTuple_Type)
-		{
-			op->ob_item[0] = (PyObject *) free_list[len];
-			numfree[len]++;
-			free_list[len] = op;
-			goto done; /* return */
-		}
+        if (len < PyTuple_MAXSAVESIZE &&
+            numfree[len] < PyTuple_MAXFREELIST &&
+            Py_TYPE(op) == &PyTuple_Type)
+        {
+            op->ob_item[0] = (PyObject *) free_list[len];
+            numfree[len]++;
+            free_list[len] = op;
+            goto done; /* return */
+        }
 #endif
-	}
-	Py_TYPE(op)->tp_free((PyObject *)op);
+    }
+    Py_TYPE(op)->tp_free((PyObject *)op);
 done:
-	Py_TRASHCAN_SAFE_END(op)
+    Py_TRASHCAN_SAFE_END(op)
 }
 
 static int
 tupleprint(PyTupleObject *op, FILE *fp, int flags)
 {
-	Py_ssize_t i;
-	Py_BEGIN_ALLOW_THREADS
-	fprintf(fp, "(");
-	Py_END_ALLOW_THREADS
-	for (i = 0; i < Py_SIZE(op); i++) {
-		if (i > 0) {
-			Py_BEGIN_ALLOW_THREADS
-			fprintf(fp, ", ");
-			Py_END_ALLOW_THREADS
-		}
-		if (PyObject_Print(op->ob_item[i], fp, 0) != 0)
-			return -1;
-	}
-	i = Py_SIZE(op);
-	Py_BEGIN_ALLOW_THREADS
-	if (i == 1)
-		fprintf(fp, ",");
-	fprintf(fp, ")");
-	Py_END_ALLOW_THREADS
-	return 0;
+    Py_ssize_t i;
+    Py_BEGIN_ALLOW_THREADS
+    fprintf(fp, "(");
+    Py_END_ALLOW_THREADS
+    for (i = 0; i < Py_SIZE(op); i++) {
+        if (i > 0) {
+            Py_BEGIN_ALLOW_THREADS
+            fprintf(fp, ", ");
+            Py_END_ALLOW_THREADS
+        }
+        if (PyObject_Print(op->ob_item[i], fp, 0) != 0)
+            return -1;
+    }
+    i = Py_SIZE(op);
+    Py_BEGIN_ALLOW_THREADS
+    if (i == 1)
+        fprintf(fp, ",");
+    fprintf(fp, ")");
+    Py_END_ALLOW_THREADS
+    return 0;
 }
 
 static PyObject *
 tuplerepr(PyTupleObject *v)
 {
-	Py_ssize_t i, n;
-	PyObject *s, *temp;
-	PyObject *pieces, *result = NULL;
+    Py_ssize_t i, n;
+    PyObject *s, *temp;
+    PyObject *pieces, *result = NULL;
 
-	n = Py_SIZE(v);
-	if (n == 0)
-		return PyString_FromString("()");
+    n = Py_SIZE(v);
+    if (n == 0)
+        return PyString_FromString("()");
 
-	/* While not mutable, it is still possible to end up with a cycle in a
-	   tuple through an object that stores itself within a tuple (and thus
-	   infinitely asks for the repr of itself). This should only be
-	   possible within a type. */
-	i = Py_ReprEnter((PyObject *)v);
-	if (i != 0) {
-		return i > 0 ? PyString_FromString("(...)") : NULL;
-	}
+    /* While not mutable, it is still possible to end up with a cycle in a
+       tuple through an object that stores itself within a tuple (and thus
+       infinitely asks for the repr of itself). This should only be
+       possible within a type. */
+    i = Py_ReprEnter((PyObject *)v);
+    if (i != 0) {
+        return i > 0 ? PyString_FromString("(...)") : NULL;
+    }
 
-	pieces = PyTuple_New(n);
-	if (pieces == NULL)
-		return NULL;
+    pieces = PyTuple_New(n);
+    if (pieces == NULL)
+        return NULL;
 
-	/* Do repr() on each element. */
-	for (i = 0; i < n; ++i) {
-		if (Py_EnterRecursiveCall(" while getting the repr of a tuple"))
-			goto Done;
-		s = PyObject_Repr(v->ob_item[i]);
-		Py_LeaveRecursiveCall();
-		if (s == NULL)
-			goto Done;
-		PyTuple_SET_ITEM(pieces, i, s);
-	}
+    /* Do repr() on each element. */
+    for (i = 0; i < n; ++i) {
+        if (Py_EnterRecursiveCall(" while getting the repr of a tuple"))
+            goto Done;
+        s = PyObject_Repr(v->ob_item[i]);
+        Py_LeaveRecursiveCall();
+        if (s == NULL)
+            goto Done;
+        PyTuple_SET_ITEM(pieces, i, s);
+    }
 
-	/* Add "()" decorations to the first and last items. */
-	assert(n > 0);
-	s = PyString_FromString("(");
-	if (s == NULL)
-		goto Done;
-	temp = PyTuple_GET_ITEM(pieces, 0);
-	PyString_ConcatAndDel(&s, temp);
-	PyTuple_SET_ITEM(pieces, 0, s);
-	if (s == NULL)
-		goto Done;
+    /* Add "()" decorations to the first and last items. */
+    assert(n > 0);
+    s = PyString_FromString("(");
+    if (s == NULL)
+        goto Done;
+    temp = PyTuple_GET_ITEM(pieces, 0);
+    PyString_ConcatAndDel(&s, temp);
+    PyTuple_SET_ITEM(pieces, 0, s);
+    if (s == NULL)
+        goto Done;
 
-	s = PyString_FromString(n == 1 ? ",)" : ")");
-	if (s == NULL)
-		goto Done;
-	temp = PyTuple_GET_ITEM(pieces, n-1);
-	PyString_ConcatAndDel(&temp, s);
-	PyTuple_SET_ITEM(pieces, n-1, temp);
-	if (temp == NULL)
-		goto Done;
+    s = PyString_FromString(n == 1 ? ",)" : ")");
+    if (s == NULL)
+        goto Done;
+    temp = PyTuple_GET_ITEM(pieces, n-1);
+    PyString_ConcatAndDel(&temp, s);
+    PyTuple_SET_ITEM(pieces, n-1, temp);
+    if (temp == NULL)
+        goto Done;
 
-	/* Paste them all together with ", " between. */
-	s = PyString_FromString(", ");
-	if (s == NULL)
-		goto Done;
-	result = _PyString_Join(s, pieces);
-	Py_DECREF(s);	
+    /* Paste them all together with ", " between. */
+    s = PyString_FromString(", ");
+    if (s == NULL)
+        goto Done;
+    result = _PyString_Join(s, pieces);
+    Py_DECREF(s);
 
 Done:
-	Py_DECREF(pieces);
-	Py_ReprLeave((PyObject *)v);
-	return result;
+    Py_DECREF(pieces);
+    Py_ReprLeave((PyObject *)v);
+    return result;
 }
 
-/* The addend 82520, was selected from the range(0, 1000000) for 
-   generating the greatest number of prime multipliers for tuples 
+/* The addend 82520, was selected from the range(0, 1000000) for
+   generating the greatest number of prime multipliers for tuples
    upto length eight:
 
-     1082527, 1165049, 1082531, 1165057, 1247581, 1330103, 1082533, 
+     1082527, 1165049, 1082531, 1165057, 1247581, 1330103, 1082533,
      1330111, 1412633, 1165069, 1247599, 1495177, 1577699
 */
 
 static long
 tuplehash(PyTupleObject *v)
 {
-	register long x, y;
-	register Py_ssize_t len = Py_SIZE(v);
-	register PyObject **p;
-	long mult = 1000003L;
-	x = 0x345678L;
-	p = v->ob_item;
-	while (--len >= 0) {
-		y = PyObject_Hash(*p++);
-		if (y == -1)
-			return -1;
-		x = (x ^ y) * mult;
-		/* the cast might truncate len; that doesn't change hash stability */
-		mult += (long)(82520L + len + len);
-	}
-	x += 97531L;
-	if (x == -1)
-		x = -2;
-	return x;
+    register long x, y;
+    register Py_ssize_t len = Py_SIZE(v);
+    register PyObject **p;
+    long mult = 1000003L;
+    x = 0x345678L;
+    p = v->ob_item;
+    while (--len >= 0) {
+        y = PyObject_Hash(*p++);
+        if (y == -1)
+            return -1;
+        x = (x ^ y) * mult;
+        /* the cast might truncate len; that doesn't change hash stability */
+        mult += (long)(82520L + len + len);
+    }
+    x += 97531L;
+    if (x == -1)
+        x = -2;
+    return x;
 }
 
 static Py_ssize_t
 tuplelength(PyTupleObject *a)
 {
-	return Py_SIZE(a);
+    return Py_SIZE(a);
 }
 
 static int
 tuplecontains(PyTupleObject *a, PyObject *el)
 {
-	Py_ssize_t i;
-	int cmp;
+    Py_ssize_t i;
+    int cmp;
 
-	for (i = 0, cmp = 0 ; cmp == 0 && i < Py_SIZE(a); ++i)
-		cmp = PyObject_RichCompareBool(el, PyTuple_GET_ITEM(a, i),
-						   Py_EQ);
-	return cmp;
+    for (i = 0, cmp = 0 ; cmp == 0 && i < Py_SIZE(a); ++i)
+        cmp = PyObject_RichCompareBool(el, PyTuple_GET_ITEM(a, i),
+                                           Py_EQ);
+    return cmp;
 }
 
 static PyObject *
 tupleitem(register PyTupleObject *a, register Py_ssize_t i)
 {
-	if (i < 0 || i >= Py_SIZE(a)) {
-		PyErr_SetString(PyExc_IndexError, "tuple index out of range");
-		return NULL;
-	}
-	Py_INCREF(a->ob_item[i]);
-	return a->ob_item[i];
+    if (i < 0 || i >= Py_SIZE(a)) {
+        PyErr_SetString(PyExc_IndexError, "tuple index out of range");
+        return NULL;
+    }
+    Py_INCREF(a->ob_item[i]);
+    return a->ob_item[i];
 }
 
 static PyObject *
-tupleslice(register PyTupleObject *a, register Py_ssize_t ilow, 
-	   register Py_ssize_t ihigh)
+tupleslice(register PyTupleObject *a, register Py_ssize_t ilow,
+           register Py_ssize_t ihigh)
 {
-	register PyTupleObject *np;
-	PyObject **src, **dest;
-	register Py_ssize_t i;
-	Py_ssize_t len;
-	if (ilow < 0)
-		ilow = 0;
-	if (ihigh > Py_SIZE(a))
-		ihigh = Py_SIZE(a);
-	if (ihigh < ilow)
-		ihigh = ilow;
-	if (ilow == 0 && ihigh == Py_SIZE(a) && PyTuple_CheckExact(a)) {
-		Py_INCREF(a);
-		return (PyObject *)a;
-	}
-	len = ihigh - ilow;
-	np = (PyTupleObject *)PyTuple_New(len);
-	if (np == NULL)
-		return NULL;
-	src = a->ob_item + ilow;
-	dest = np->ob_item;
-	for (i = 0; i < len; i++) {
-		PyObject *v = src[i];
-		Py_INCREF(v);
-		dest[i] = v;
-	}
-	return (PyObject *)np;
+    register PyTupleObject *np;
+    PyObject **src, **dest;
+    register Py_ssize_t i;
+    Py_ssize_t len;
+    if (ilow < 0)
+        ilow = 0;
+    if (ihigh > Py_SIZE(a))
+        ihigh = Py_SIZE(a);
+    if (ihigh < ilow)
+        ihigh = ilow;
+    if (ilow == 0 && ihigh == Py_SIZE(a) && PyTuple_CheckExact(a)) {
+        Py_INCREF(a);
+        return (PyObject *)a;
+    }
+    len = ihigh - ilow;
+    np = (PyTupleObject *)PyTuple_New(len);
+    if (np == NULL)
+        return NULL;
+    src = a->ob_item + ilow;
+    dest = np->ob_item;
+    for (i = 0; i < len; i++) {
+        PyObject *v = src[i];
+        Py_INCREF(v);
+        dest[i] = v;
+    }
+    return (PyObject *)np;
 }
 
 PyObject *
 PyTuple_GetSlice(PyObject *op, Py_ssize_t i, Py_ssize_t j)
 {
-	if (op == NULL || !PyTuple_Check(op)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	return tupleslice((PyTupleObject *)op, i, j);
+    if (op == NULL || !PyTuple_Check(op)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    return tupleslice((PyTupleObject *)op, i, j);
 }
 
 static PyObject *
 tupleconcat(register PyTupleObject *a, register PyObject *bb)
 {
-	register Py_ssize_t size;
-	register Py_ssize_t i;
-	PyObject **src, **dest;
-	PyTupleObject *np;
-	if (!PyTuple_Check(bb)) {
-		PyErr_Format(PyExc_TypeError,
-       		     "can only concatenate tuple (not \"%.200s\") to tuple",
-			     Py_TYPE(bb)->tp_name);
-		return NULL;
-	}
+    register Py_ssize_t size;
+    register Py_ssize_t i;
+    PyObject **src, **dest;
+    PyTupleObject *np;
+    if (!PyTuple_Check(bb)) {
+        PyErr_Format(PyExc_TypeError,
+             "can only concatenate tuple (not \"%.200s\") to tuple",
+                 Py_TYPE(bb)->tp_name);
+        return NULL;
+    }
 #define b ((PyTupleObject *)bb)
-	size = Py_SIZE(a) + Py_SIZE(b);
-	if (size < 0)
-		return PyErr_NoMemory();
-	np = (PyTupleObject *) PyTuple_New(size);
-	if (np == NULL) {
-		return NULL;
-	}
-	src = a->ob_item;
-	dest = np->ob_item;
-	for (i = 0; i < Py_SIZE(a); i++) {
-		PyObject *v = src[i];
-		Py_INCREF(v);
-		dest[i] = v;
-	}
-	src = b->ob_item;
-	dest = np->ob_item + Py_SIZE(a);
-	for (i = 0; i < Py_SIZE(b); i++) {
-		PyObject *v = src[i];
-		Py_INCREF(v);
-		dest[i] = v;
-	}
-	return (PyObject *)np;
+    size = Py_SIZE(a) + Py_SIZE(b);
+    if (size < 0)
+        return PyErr_NoMemory();
+    np = (PyTupleObject *) PyTuple_New(size);
+    if (np == NULL) {
+        return NULL;
+    }
+    src = a->ob_item;
+    dest = np->ob_item;
+    for (i = 0; i < Py_SIZE(a); i++) {
+        PyObject *v = src[i];
+        Py_INCREF(v);
+        dest[i] = v;
+    }
+    src = b->ob_item;
+    dest = np->ob_item + Py_SIZE(a);
+    for (i = 0; i < Py_SIZE(b); i++) {
+        PyObject *v = src[i];
+        Py_INCREF(v);
+        dest[i] = v;
+    }
+    return (PyObject *)np;
 #undef b
 }
 
 static PyObject *
 tuplerepeat(PyTupleObject *a, Py_ssize_t n)
 {
-	Py_ssize_t i, j;
-	Py_ssize_t size;
-	PyTupleObject *np;
-	PyObject **p, **items;
-	if (n < 0)
-		n = 0;
-	if (Py_SIZE(a) == 0 || n == 1) {
-		if (PyTuple_CheckExact(a)) {
-			/* Since tuples are immutable, we can return a shared
-			   copy in this case */
-			Py_INCREF(a);
-			return (PyObject *)a;
-		}
-		if (Py_SIZE(a) == 0)
-			return PyTuple_New(0);
-	}
-	size = Py_SIZE(a) * n;
-	if (size/Py_SIZE(a) != n)
-		return PyErr_NoMemory();
-	np = (PyTupleObject *) PyTuple_New(size);
-	if (np == NULL)
-		return NULL;
-	p = np->ob_item;
-	items = a->ob_item;
-	for (i = 0; i < n; i++) {
-		for (j = 0; j < Py_SIZE(a); j++) {
-			*p = items[j];
-			Py_INCREF(*p);
-			p++;
-		}
-	}
-	return (PyObject *) np;
+    Py_ssize_t i, j;
+    Py_ssize_t size;
+    PyTupleObject *np;
+    PyObject **p, **items;
+    if (n < 0)
+        n = 0;
+    if (Py_SIZE(a) == 0 || n == 1) {
+        if (PyTuple_CheckExact(a)) {
+            /* Since tuples are immutable, we can return a shared
+               copy in this case */
+            Py_INCREF(a);
+            return (PyObject *)a;
+        }
+        if (Py_SIZE(a) == 0)
+            return PyTuple_New(0);
+    }
+    size = Py_SIZE(a) * n;
+    if (size/Py_SIZE(a) != n)
+        return PyErr_NoMemory();
+    np = (PyTupleObject *) PyTuple_New(size);
+    if (np == NULL)
+        return NULL;
+    p = np->ob_item;
+    items = a->ob_item;
+    for (i = 0; i < n; i++) {
+        for (j = 0; j < Py_SIZE(a); j++) {
+            *p = items[j];
+            Py_INCREF(*p);
+            p++;
+        }
+    }
+    return (PyObject *) np;
 }
 
 static PyObject *
 tupleindex(PyTupleObject *self, PyObject *args)
 {
-	Py_ssize_t i, start=0, stop=Py_SIZE(self);
-	PyObject *v;
+    Py_ssize_t i, start=0, stop=Py_SIZE(self);
+    PyObject *v;
 
-	if (!PyArg_ParseTuple(args, "O|O&O&:index", &v,
-	                            _PyEval_SliceIndex, &start,
-	                            _PyEval_SliceIndex, &stop))
-		return NULL;
-	if (start < 0) {
-		start += Py_SIZE(self);
-		if (start < 0)
-			start = 0;
-	}
-	if (stop < 0) {
-		stop += Py_SIZE(self);
-		if (stop < 0)
-			stop = 0;
-	}
-	for (i = start; i < stop && i < Py_SIZE(self); i++) {
-		int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
-		if (cmp > 0)
-			return PyInt_FromSsize_t(i);
-		else if (cmp < 0)
-			return NULL;
-	}
-	PyErr_SetString(PyExc_ValueError, "tuple.index(x): x not in tuple");
-	return NULL;
+    if (!PyArg_ParseTuple(args, "O|O&O&:index", &v,
+                                _PyEval_SliceIndex, &start,
+                                _PyEval_SliceIndex, &stop))
+        return NULL;
+    if (start < 0) {
+        start += Py_SIZE(self);
+        if (start < 0)
+            start = 0;
+    }
+    if (stop < 0) {
+        stop += Py_SIZE(self);
+        if (stop < 0)
+            stop = 0;
+    }
+    for (i = start; i < stop && i < Py_SIZE(self); i++) {
+        int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
+        if (cmp > 0)
+            return PyInt_FromSsize_t(i);
+        else if (cmp < 0)
+            return NULL;
+    }
+    PyErr_SetString(PyExc_ValueError, "tuple.index(x): x not in tuple");
+    return NULL;
 }
 
 static PyObject *
 tuplecount(PyTupleObject *self, PyObject *v)
 {
-	Py_ssize_t count = 0;
-	Py_ssize_t i;
+    Py_ssize_t count = 0;
+    Py_ssize_t i;
 
-	for (i = 0; i < Py_SIZE(self); i++) {
-		int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
-		if (cmp > 0)
-			count++;
-		else if (cmp < 0)
-			return NULL;
-	}
-	return PyInt_FromSsize_t(count);
+    for (i = 0; i < Py_SIZE(self); i++) {
+        int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
+        if (cmp > 0)
+            count++;
+        else if (cmp < 0)
+            return NULL;
+    }
+    return PyInt_FromSsize_t(count);
 }
 
 static int
 tupletraverse(PyTupleObject *o, visitproc visit, void *arg)
 {
-	Py_ssize_t i;
+    Py_ssize_t i;
 
-	for (i = Py_SIZE(o); --i >= 0; )
-		Py_VISIT(o->ob_item[i]);
-	return 0;
+    for (i = Py_SIZE(o); --i >= 0; )
+        Py_VISIT(o->ob_item[i]);
+    return 0;
 }
 
 static PyObject *
 tuplerichcompare(PyObject *v, PyObject *w, int op)
 {
-	PyTupleObject *vt, *wt;
-	Py_ssize_t i;
-	Py_ssize_t vlen, wlen;
+    PyTupleObject *vt, *wt;
+    Py_ssize_t i;
+    Py_ssize_t vlen, wlen;
 
-	if (!PyTuple_Check(v) || !PyTuple_Check(w)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
+    if (!PyTuple_Check(v) || !PyTuple_Check(w)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 
-	vt = (PyTupleObject *)v;
-	wt = (PyTupleObject *)w;
+    vt = (PyTupleObject *)v;
+    wt = (PyTupleObject *)w;
 
-	vlen = Py_SIZE(vt);
-	wlen = Py_SIZE(wt);
+    vlen = Py_SIZE(vt);
+    wlen = Py_SIZE(wt);
 
-	/* Note:  the corresponding code for lists has an "early out" test
-	 * here when op is EQ or NE and the lengths differ.  That pays there,
-	 * but Tim was unable to find any real code where EQ/NE tuple
-	 * compares don't have the same length, so testing for it here would
-	 * have cost without benefit.
-	 */
+    /* Note:  the corresponding code for lists has an "early out" test
+     * here when op is EQ or NE and the lengths differ.  That pays there,
+     * but Tim was unable to find any real code where EQ/NE tuple
+     * compares don't have the same length, so testing for it here would
+     * have cost without benefit.
+     */
 
-	/* Search for the first index where items are different.
-	 * Note that because tuples are immutable, it's safe to reuse
-	 * vlen and wlen across the comparison calls.
-	 */
-	for (i = 0; i < vlen && i < wlen; i++) {
-		int k = PyObject_RichCompareBool(vt->ob_item[i],
-						 wt->ob_item[i], Py_EQ);
-		if (k < 0)
-			return NULL;
-		if (!k)
-			break;
-	}
+    /* Search for the first index where items are different.
+     * Note that because tuples are immutable, it's safe to reuse
+     * vlen and wlen across the comparison calls.
+     */
+    for (i = 0; i < vlen && i < wlen; i++) {
+        int k = PyObject_RichCompareBool(vt->ob_item[i],
+                                         wt->ob_item[i], Py_EQ);
+        if (k < 0)
+            return NULL;
+        if (!k)
+            break;
+    }
 
-	if (i >= vlen || i >= wlen) {
-		/* No more items to compare -- compare sizes */
-		int cmp;
-		PyObject *res;
-		switch (op) {
-		case Py_LT: cmp = vlen <  wlen; break;
-		case Py_LE: cmp = vlen <= wlen; break;
-		case Py_EQ: cmp = vlen == wlen; break;
-		case Py_NE: cmp = vlen != wlen; break;
-		case Py_GT: cmp = vlen >  wlen; break;
-		case Py_GE: cmp = vlen >= wlen; break;
-		default: return NULL; /* cannot happen */
-		}
-		if (cmp)
-			res = Py_True;
-		else
-			res = Py_False;
-		Py_INCREF(res);
-		return res;
-	}
+    if (i >= vlen || i >= wlen) {
+        /* No more items to compare -- compare sizes */
+        int cmp;
+        PyObject *res;
+        switch (op) {
+        case Py_LT: cmp = vlen <  wlen; break;
+        case Py_LE: cmp = vlen <= wlen; break;
+        case Py_EQ: cmp = vlen == wlen; break;
+        case Py_NE: cmp = vlen != wlen; break;
+        case Py_GT: cmp = vlen >  wlen; break;
+        case Py_GE: cmp = vlen >= wlen; break;
+        default: return NULL; /* cannot happen */
+        }
+        if (cmp)
+            res = Py_True;
+        else
+            res = Py_False;
+        Py_INCREF(res);
+        return res;
+    }
 
-	/* We have an item that differs -- shortcuts for EQ/NE */
-	if (op == Py_EQ) {
-		Py_INCREF(Py_False);
-		return Py_False;
-	}
-	if (op == Py_NE) {
-		Py_INCREF(Py_True);
-		return Py_True;
-	}
+    /* We have an item that differs -- shortcuts for EQ/NE */
+    if (op == Py_EQ) {
+        Py_INCREF(Py_False);
+        return Py_False;
+    }
+    if (op == Py_NE) {
+        Py_INCREF(Py_True);
+        return Py_True;
+    }
 
-	/* Compare the final item again using the proper operator */
-	return PyObject_RichCompare(vt->ob_item[i], wt->ob_item[i], op);
+    /* Compare the final item again using the proper operator */
+    return PyObject_RichCompare(vt->ob_item[i], wt->ob_item[i], op);
 }
 
 static PyObject *
@@ -642,41 +642,41 @@
 static PyObject *
 tuple_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *arg = NULL;
-	static char *kwlist[] = {"sequence", 0};
+    PyObject *arg = NULL;
+    static char *kwlist[] = {"sequence", 0};
 
-	if (type != &PyTuple_Type)
-		return tuple_subtype_new(type, args, kwds);
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:tuple", kwlist, &arg))
-		return NULL;
+    if (type != &PyTuple_Type)
+        return tuple_subtype_new(type, args, kwds);
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:tuple", kwlist, &arg))
+        return NULL;
 
-	if (arg == NULL)
-		return PyTuple_New(0);
-	else
-		return PySequence_Tuple(arg);
+    if (arg == NULL)
+        return PyTuple_New(0);
+    else
+        return PySequence_Tuple(arg);
 }
 
 static PyObject *
 tuple_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *tmp, *newobj, *item;
-	Py_ssize_t i, n;
+    PyObject *tmp, *newobj, *item;
+    Py_ssize_t i, n;
 
-	assert(PyType_IsSubtype(type, &PyTuple_Type));
-	tmp = tuple_new(&PyTuple_Type, args, kwds);
-	if (tmp == NULL)
-		return NULL;
-	assert(PyTuple_Check(tmp));
-	newobj = type->tp_alloc(type, n = PyTuple_GET_SIZE(tmp));
-	if (newobj == NULL)
-		return NULL;
-	for (i = 0; i < n; i++) {
-		item = PyTuple_GET_ITEM(tmp, i);
-		Py_INCREF(item);
-		PyTuple_SET_ITEM(newobj, i, item);
-	}
-	Py_DECREF(tmp);
-	return newobj;
+    assert(PyType_IsSubtype(type, &PyTuple_Type));
+    tmp = tuple_new(&PyTuple_Type, args, kwds);
+    if (tmp == NULL)
+        return NULL;
+    assert(PyTuple_Check(tmp));
+    newobj = type->tp_alloc(type, n = PyTuple_GET_SIZE(tmp));
+    if (newobj == NULL)
+        return NULL;
+    for (i = 0; i < n; i++) {
+        item = PyTuple_GET_ITEM(tmp, i);
+        Py_INCREF(item);
+        PyTuple_SET_ITEM(newobj, i, item);
+    }
+    Py_DECREF(tmp);
+    return newobj;
 }
 
 PyDoc_STRVAR(tuple_doc,
@@ -686,86 +686,86 @@
 If the argument is a tuple, the return value is the same object.");
 
 static PySequenceMethods tuple_as_sequence = {
-	(lenfunc)tuplelength,			/* sq_length */
-	(binaryfunc)tupleconcat,		/* sq_concat */
-	(ssizeargfunc)tuplerepeat,		/* sq_repeat */
-	(ssizeargfunc)tupleitem,		/* sq_item */
-	(ssizessizeargfunc)tupleslice,		/* sq_slice */
-	0,					/* sq_ass_item */
-	0,					/* sq_ass_slice */
-	(objobjproc)tuplecontains,		/* sq_contains */
+    (lenfunc)tuplelength,                       /* sq_length */
+    (binaryfunc)tupleconcat,                    /* sq_concat */
+    (ssizeargfunc)tuplerepeat,                  /* sq_repeat */
+    (ssizeargfunc)tupleitem,                    /* sq_item */
+    (ssizessizeargfunc)tupleslice,              /* sq_slice */
+    0,                                          /* sq_ass_item */
+    0,                                          /* sq_ass_slice */
+    (objobjproc)tuplecontains,                  /* sq_contains */
 };
 
 static PyObject*
 tuplesubscript(PyTupleObject* self, PyObject* item)
 {
-	if (PyIndex_Check(item)) {
-		Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
-		if (i == -1 && PyErr_Occurred())
-			return NULL;
-		if (i < 0)
-			i += PyTuple_GET_SIZE(self);
-		return tupleitem(self, i);
-	}
-	else if (PySlice_Check(item)) {
-		Py_ssize_t start, stop, step, slicelength, cur, i;
-		PyObject* result;
-		PyObject* it;
-		PyObject **src, **dest;
+    if (PyIndex_Check(item)) {
+        Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError);
+        if (i == -1 && PyErr_Occurred())
+            return NULL;
+        if (i < 0)
+            i += PyTuple_GET_SIZE(self);
+        return tupleitem(self, i);
+    }
+    else if (PySlice_Check(item)) {
+        Py_ssize_t start, stop, step, slicelength, cur, i;
+        PyObject* result;
+        PyObject* it;
+        PyObject **src, **dest;
 
-		if (PySlice_GetIndicesEx((PySliceObject*)item,
-				 PyTuple_GET_SIZE(self),
-				 &start, &stop, &step, &slicelength) < 0) {
-			return NULL;
-		}
+        if (PySlice_GetIndicesEx((PySliceObject*)item,
+                         PyTuple_GET_SIZE(self),
+                         &start, &stop, &step, &slicelength) < 0) {
+            return NULL;
+        }
 
-		if (slicelength <= 0) {
-			return PyTuple_New(0);
-		}
-		else if (start == 0 && step == 1 &&
-			 slicelength == PyTuple_GET_SIZE(self) &&
-			 PyTuple_CheckExact(self)) {
-			Py_INCREF(self);
-			return (PyObject *)self;
-		}
-		else {
-			result = PyTuple_New(slicelength);
-			if (!result) return NULL;
+        if (slicelength <= 0) {
+            return PyTuple_New(0);
+        }
+        else if (start == 0 && step == 1 &&
+                 slicelength == PyTuple_GET_SIZE(self) &&
+                 PyTuple_CheckExact(self)) {
+            Py_INCREF(self);
+            return (PyObject *)self;
+        }
+        else {
+            result = PyTuple_New(slicelength);
+            if (!result) return NULL;
 
-			src = self->ob_item;
-			dest = ((PyTupleObject *)result)->ob_item;
-			for (cur = start, i = 0; i < slicelength; 
-			     cur += step, i++) {
-				it = src[cur];
-				Py_INCREF(it);
-				dest[i] = it;
-			}
-			
-			return result;
-		}
-	}
-	else {
-		PyErr_Format(PyExc_TypeError, 
-			     "tuple indices must be integers, not %.200s",
-			     Py_TYPE(item)->tp_name);
-		return NULL;
-	}
+            src = self->ob_item;
+            dest = ((PyTupleObject *)result)->ob_item;
+            for (cur = start, i = 0; i < slicelength;
+                 cur += step, i++) {
+                it = src[cur];
+                Py_INCREF(it);
+                dest[i] = it;
+            }
+
+            return result;
+        }
+    }
+    else {
+        PyErr_Format(PyExc_TypeError,
+                     "tuple indices must be integers, not %.200s",
+                     Py_TYPE(item)->tp_name);
+        return NULL;
+    }
 }
 
 static PyObject *
 tuple_getnewargs(PyTupleObject *v)
 {
-	return Py_BuildValue("(N)", tupleslice(v, 0, Py_SIZE(v)));
-	
+    return Py_BuildValue("(N)", tupleslice(v, 0, Py_SIZE(v)));
+
 }
 
 static PyObject *
 tuple_sizeof(PyTupleObject *self)
 {
-	Py_ssize_t res;
+    Py_ssize_t res;
 
-	res = PyTuple_Type.tp_basicsize + Py_SIZE(self) * sizeof(PyObject *);
-	return PyInt_FromSsize_t(res);
+    res = PyTuple_Type.tp_basicsize + Py_SIZE(self) * sizeof(PyObject *);
+    return PyInt_FromSsize_t(res);
 }
 
 PyDoc_STRVAR(index_doc,
@@ -778,62 +778,62 @@
 "T.__sizeof__() -- size of T in memory, in bytes");
 
 static PyMethodDef tuple_methods[] = {
-	{"__getnewargs__",	(PyCFunction)tuple_getnewargs,	METH_NOARGS},
-	{"__sizeof__",	(PyCFunction)tuple_sizeof, METH_NOARGS, sizeof_doc},
-	{"index",	(PyCFunction)tupleindex,  METH_VARARGS, index_doc},
-	{"count",	(PyCFunction)tuplecount,  METH_O, count_doc},
-	{NULL,		NULL}		/* sentinel */
+    {"__getnewargs__",          (PyCFunction)tuple_getnewargs,  METH_NOARGS},
+    {"__sizeof__",      (PyCFunction)tuple_sizeof, METH_NOARGS, sizeof_doc},
+    {"index",           (PyCFunction)tupleindex,  METH_VARARGS, index_doc},
+    {"count",           (PyCFunction)tuplecount,  METH_O, count_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 static PyMappingMethods tuple_as_mapping = {
-	(lenfunc)tuplelength,
-	(binaryfunc)tuplesubscript,
-	0
+    (lenfunc)tuplelength,
+    (binaryfunc)tuplesubscript,
+    0
 };
 
 static PyObject *tuple_iter(PyObject *seq);
 
 PyTypeObject PyTuple_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"tuple",
-	sizeof(PyTupleObject) - sizeof(PyObject *),
-	sizeof(PyObject *),
-	(destructor)tupledealloc,		/* tp_dealloc */
-	(printfunc)tupleprint,			/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)tuplerepr,			/* tp_repr */
-	0,					/* tp_as_number */
-	&tuple_as_sequence,			/* tp_as_sequence */
-	&tuple_as_mapping,			/* tp_as_mapping */
-	(hashfunc)tuplehash,			/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_BASETYPE | Py_TPFLAGS_TUPLE_SUBCLASS, /* tp_flags */
-	tuple_doc,				/* tp_doc */
- 	(traverseproc)tupletraverse,		/* tp_traverse */
-	0,					/* tp_clear */
-	tuplerichcompare,			/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	tuple_iter,	    			/* tp_iter */
-	0,					/* tp_iternext */
-	tuple_methods,				/* tp_methods */
-	0,					/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	0,					/* tp_init */
-	0,					/* tp_alloc */
-	tuple_new,				/* tp_new */
-	PyObject_GC_Del,        		/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "tuple",
+    sizeof(PyTupleObject) - sizeof(PyObject *),
+    sizeof(PyObject *),
+    (destructor)tupledealloc,                   /* tp_dealloc */
+    (printfunc)tupleprint,                      /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    (reprfunc)tuplerepr,                        /* tp_repr */
+    0,                                          /* tp_as_number */
+    &tuple_as_sequence,                         /* tp_as_sequence */
+    &tuple_as_mapping,                          /* tp_as_mapping */
+    (hashfunc)tuplehash,                        /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_BASETYPE | Py_TPFLAGS_TUPLE_SUBCLASS, /* tp_flags */
+    tuple_doc,                                  /* tp_doc */
+    (traverseproc)tupletraverse,                /* tp_traverse */
+    0,                                          /* tp_clear */
+    tuplerichcompare,                           /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    tuple_iter,                                 /* tp_iter */
+    0,                                          /* tp_iternext */
+    tuple_methods,                              /* tp_methods */
+    0,                                          /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    0,                                          /* tp_init */
+    0,                                          /* tp_alloc */
+    tuple_new,                                  /* tp_new */
+    PyObject_GC_Del,                            /* tp_free */
 };
 
 /* The following function breaks the notion that tuples are immutable:
@@ -846,207 +846,207 @@
 int
 _PyTuple_Resize(PyObject **pv, Py_ssize_t newsize)
 {
-	register PyTupleObject *v;
-	register PyTupleObject *sv;
-	Py_ssize_t i;
-	Py_ssize_t oldsize;
+    register PyTupleObject *v;
+    register PyTupleObject *sv;
+    Py_ssize_t i;
+    Py_ssize_t oldsize;
 
-	v = (PyTupleObject *) *pv;
-	if (v == NULL || Py_TYPE(v) != &PyTuple_Type ||
-	    (Py_SIZE(v) != 0 && Py_REFCNT(v) != 1)) {
-		*pv = 0;
-		Py_XDECREF(v);
-		PyErr_BadInternalCall();
-		return -1;
-	}
-	oldsize = Py_SIZE(v);
-	if (oldsize == newsize)
-		return 0;
+    v = (PyTupleObject *) *pv;
+    if (v == NULL || Py_TYPE(v) != &PyTuple_Type ||
+        (Py_SIZE(v) != 0 && Py_REFCNT(v) != 1)) {
+        *pv = 0;
+        Py_XDECREF(v);
+        PyErr_BadInternalCall();
+        return -1;
+    }
+    oldsize = Py_SIZE(v);
+    if (oldsize == newsize)
+        return 0;
 
-	if (oldsize == 0) {
-		/* Empty tuples are often shared, so we should never 
-		   resize them in-place even if we do own the only
-		   (current) reference */
-		Py_DECREF(v);
-		*pv = PyTuple_New(newsize);
-		return *pv == NULL ? -1 : 0;
-	}
+    if (oldsize == 0) {
+        /* Empty tuples are often shared, so we should never
+           resize them in-place even if we do own the only
+           (current) reference */
+        Py_DECREF(v);
+        *pv = PyTuple_New(newsize);
+        return *pv == NULL ? -1 : 0;
+    }
 
-	/* XXX UNREF/NEWREF interface should be more symmetrical */
-	_Py_DEC_REFTOTAL;
-	if (_PyObject_GC_IS_TRACKED(v))
-		_PyObject_GC_UNTRACK(v);
-	_Py_ForgetReference((PyObject *) v);
-	/* DECREF items deleted by shrinkage */
-	for (i = newsize; i < oldsize; i++) {
-		Py_XDECREF(v->ob_item[i]);
-		v->ob_item[i] = NULL;
-	}
-	sv = PyObject_GC_Resize(PyTupleObject, v, newsize);
-	if (sv == NULL) {
-		*pv = NULL;
-		PyObject_GC_Del(v);
-		return -1;
-	}
-	_Py_NewReference((PyObject *) sv);
-	/* Zero out items added by growing */
-	if (newsize > oldsize)
-		memset(&sv->ob_item[oldsize], 0,
-		       sizeof(*sv->ob_item) * (newsize - oldsize));
-	*pv = (PyObject *) sv;
-	_PyObject_GC_TRACK(sv);
-	return 0;
+    /* XXX UNREF/NEWREF interface should be more symmetrical */
+    _Py_DEC_REFTOTAL;
+    if (_PyObject_GC_IS_TRACKED(v))
+        _PyObject_GC_UNTRACK(v);
+    _Py_ForgetReference((PyObject *) v);
+    /* DECREF items deleted by shrinkage */
+    for (i = newsize; i < oldsize; i++) {
+        Py_XDECREF(v->ob_item[i]);
+        v->ob_item[i] = NULL;
+    }
+    sv = PyObject_GC_Resize(PyTupleObject, v, newsize);
+    if (sv == NULL) {
+        *pv = NULL;
+        PyObject_GC_Del(v);
+        return -1;
+    }
+    _Py_NewReference((PyObject *) sv);
+    /* Zero out items added by growing */
+    if (newsize > oldsize)
+        memset(&sv->ob_item[oldsize], 0,
+               sizeof(*sv->ob_item) * (newsize - oldsize));
+    *pv = (PyObject *) sv;
+    _PyObject_GC_TRACK(sv);
+    return 0;
 }
 
 int
 PyTuple_ClearFreeList(void)
 {
-	int freelist_size = 0;
+    int freelist_size = 0;
 #if PyTuple_MAXSAVESIZE > 0
-	int i;
-	for (i = 1; i < PyTuple_MAXSAVESIZE; i++) {
-		PyTupleObject *p, *q;
-		p = free_list[i];
-		freelist_size += numfree[i];
-		free_list[i] = NULL;
-		numfree[i] = 0;
-		while (p) {
-			q = p;
-			p = (PyTupleObject *)(p->ob_item[0]);
-			PyObject_GC_Del(q);
-		}
-	}
+    int i;
+    for (i = 1; i < PyTuple_MAXSAVESIZE; i++) {
+        PyTupleObject *p, *q;
+        p = free_list[i];
+        freelist_size += numfree[i];
+        free_list[i] = NULL;
+        numfree[i] = 0;
+        while (p) {
+            q = p;
+            p = (PyTupleObject *)(p->ob_item[0]);
+            PyObject_GC_Del(q);
+        }
+    }
 #endif
-	return freelist_size;
+    return freelist_size;
 }
-	
+
 void
 PyTuple_Fini(void)
 {
 #if PyTuple_MAXSAVESIZE > 0
-	/* empty tuples are used all over the place and applications may
-	 * rely on the fact that an empty tuple is a singleton. */
-	Py_XDECREF(free_list[0]);
-	free_list[0] = NULL;
+    /* empty tuples are used all over the place and applications may
+     * rely on the fact that an empty tuple is a singleton. */
+    Py_XDECREF(free_list[0]);
+    free_list[0] = NULL;
 
-	(void)PyTuple_ClearFreeList();
+    (void)PyTuple_ClearFreeList();
 #endif
 #ifdef SHOW_TRACK_COUNT
-	show_track();
+    show_track();
 #endif
 }
 
 /*********************** Tuple Iterator **************************/
 
 typedef struct {
-	PyObject_HEAD
-	long it_index;
-	PyTupleObject *it_seq; /* Set to NULL when iterator is exhausted */
+    PyObject_HEAD
+    long it_index;
+    PyTupleObject *it_seq; /* Set to NULL when iterator is exhausted */
 } tupleiterobject;
 
 static void
 tupleiter_dealloc(tupleiterobject *it)
 {
-	_PyObject_GC_UNTRACK(it);
-	Py_XDECREF(it->it_seq);
-	PyObject_GC_Del(it);
+    _PyObject_GC_UNTRACK(it);
+    Py_XDECREF(it->it_seq);
+    PyObject_GC_Del(it);
 }
 
 static int
 tupleiter_traverse(tupleiterobject *it, visitproc visit, void *arg)
 {
-	Py_VISIT(it->it_seq);
-	return 0;
+    Py_VISIT(it->it_seq);
+    return 0;
 }
 
 static PyObject *
 tupleiter_next(tupleiterobject *it)
 {
-	PyTupleObject *seq;
-	PyObject *item;
+    PyTupleObject *seq;
+    PyObject *item;
 
-	assert(it != NULL);
-	seq = it->it_seq;
-	if (seq == NULL)
-		return NULL;
-	assert(PyTuple_Check(seq));
+    assert(it != NULL);
+    seq = it->it_seq;
+    if (seq == NULL)
+        return NULL;
+    assert(PyTuple_Check(seq));
 
-	if (it->it_index < PyTuple_GET_SIZE(seq)) {
-		item = PyTuple_GET_ITEM(seq, it->it_index);
-		++it->it_index;
-		Py_INCREF(item);
-		return item;
-	}
+    if (it->it_index < PyTuple_GET_SIZE(seq)) {
+        item = PyTuple_GET_ITEM(seq, it->it_index);
+        ++it->it_index;
+        Py_INCREF(item);
+        return item;
+    }
 
-	Py_DECREF(seq);
-	it->it_seq = NULL;
-	return NULL;
+    Py_DECREF(seq);
+    it->it_seq = NULL;
+    return NULL;
 }
 
 static PyObject *
 tupleiter_len(tupleiterobject *it)
 {
-	Py_ssize_t len = 0;
-	if (it->it_seq)
-		len = PyTuple_GET_SIZE(it->it_seq) - it->it_index;
-	return PyInt_FromSsize_t(len);
+    Py_ssize_t len = 0;
+    if (it->it_seq)
+        len = PyTuple_GET_SIZE(it->it_seq) - it->it_index;
+    return PyInt_FromSsize_t(len);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
 
 static PyMethodDef tupleiter_methods[] = {
-	{"__length_hint__", (PyCFunction)tupleiter_len, METH_NOARGS, length_hint_doc},
- 	{NULL,		NULL}		/* sentinel */
+    {"__length_hint__", (PyCFunction)tupleiter_len, METH_NOARGS, length_hint_doc},
+    {NULL,              NULL}           /* sentinel */
 };
 
 PyTypeObject PyTupleIter_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"tupleiterator",			/* tp_name */
-	sizeof(tupleiterobject),		/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	(destructor)tupleiter_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	0,					/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
-	0,					/* tp_doc */
-	(traverseproc)tupleiter_traverse,	/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	PyObject_SelfIter,			/* tp_iter */
-	(iternextfunc)tupleiter_next,		/* tp_iternext */
-	tupleiter_methods,			/* tp_methods */
-	0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "tupleiterator",                            /* tp_name */
+    sizeof(tupleiterobject),                    /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    (destructor)tupleiter_dealloc,              /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    0,                                          /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+    0,                                          /* tp_doc */
+    (traverseproc)tupleiter_traverse,           /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    PyObject_SelfIter,                          /* tp_iter */
+    (iternextfunc)tupleiter_next,               /* tp_iternext */
+    tupleiter_methods,                          /* tp_methods */
+    0,
 };
 
 static PyObject *
 tuple_iter(PyObject *seq)
 {
-	tupleiterobject *it;
+    tupleiterobject *it;
 
-	if (!PyTuple_Check(seq)) {
-		PyErr_BadInternalCall();
-		return NULL;
-	}
-	it = PyObject_GC_New(tupleiterobject, &PyTupleIter_Type);
-	if (it == NULL)
-		return NULL;
-	it->it_index = 0;
-	Py_INCREF(seq);
-	it->it_seq = (PyTupleObject *)seq;
-	_PyObject_GC_TRACK(it);
-	return (PyObject *)it;
+    if (!PyTuple_Check(seq)) {
+        PyErr_BadInternalCall();
+        return NULL;
+    }
+    it = PyObject_GC_New(tupleiterobject, &PyTupleIter_Type);
+    if (it == NULL)
+        return NULL;
+    it->it_index = 0;
+    Py_INCREF(seq);
+    it->it_seq = (PyTupleObject *)seq;
+    _PyObject_GC_TRACK(it);
+    return (PyObject *)it;
 }
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index e347328..c4b9dbf 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -12,22 +12,22 @@
    they normally would.  This is why the maximum size is limited to
    MCACHE_MAX_ATTR_SIZE, since it might be a problem if very large
    strings are used as attribute names. */
-#define MCACHE_MAX_ATTR_SIZE	100
-#define MCACHE_SIZE_EXP		10
-#define MCACHE_HASH(version, name_hash)					\
-		(((unsigned int)(version) * (unsigned int)(name_hash))	\
-		 >> (8*sizeof(unsigned int) - MCACHE_SIZE_EXP))
+#define MCACHE_MAX_ATTR_SIZE    100
+#define MCACHE_SIZE_EXP         10
+#define MCACHE_HASH(version, name_hash)                                 \
+        (((unsigned int)(version) * (unsigned int)(name_hash))          \
+         >> (8*sizeof(unsigned int) - MCACHE_SIZE_EXP))
 #define MCACHE_HASH_METHOD(type, name)                                  \
-		MCACHE_HASH((type)->tp_version_tag,                     \
-		            ((PyStringObject *)(name))->ob_shash)
+        MCACHE_HASH((type)->tp_version_tag,                     \
+                    ((PyStringObject *)(name))->ob_shash)
 #define MCACHE_CACHEABLE_NAME(name)                                     \
-		PyString_CheckExact(name) &&                            \
-		PyString_GET_SIZE(name) <= MCACHE_MAX_ATTR_SIZE
+        PyString_CheckExact(name) &&                            \
+        PyString_GET_SIZE(name) <= MCACHE_MAX_ATTR_SIZE
 
 struct method_cache_entry {
-	unsigned int version;
-	PyObject *name;		/* reference to exactly a str or None */
-	PyObject *value;	/* borrowed */
+    unsigned int version;
+    PyObject *name;             /* reference to exactly a str or None */
+    PyObject *value;            /* borrowed */
 };
 
 static struct method_cache_entry method_cache[1 << MCACHE_SIZE_EXP];
@@ -36,313 +36,313 @@
 unsigned int
 PyType_ClearCache(void)
 {
-	Py_ssize_t i;
-	unsigned int cur_version_tag = next_version_tag - 1;
+    Py_ssize_t i;
+    unsigned int cur_version_tag = next_version_tag - 1;
 
-	for (i = 0; i < (1 << MCACHE_SIZE_EXP); i++) {
-		method_cache[i].version = 0;
-		Py_CLEAR(method_cache[i].name);
-		method_cache[i].value = NULL;
-	}
-	next_version_tag = 0;
-	/* mark all version tags as invalid */
-	PyType_Modified(&PyBaseObject_Type);
-	return cur_version_tag;
+    for (i = 0; i < (1 << MCACHE_SIZE_EXP); i++) {
+        method_cache[i].version = 0;
+        Py_CLEAR(method_cache[i].name);
+        method_cache[i].value = NULL;
+    }
+    next_version_tag = 0;
+    /* mark all version tags as invalid */
+    PyType_Modified(&PyBaseObject_Type);
+    return cur_version_tag;
 }
 
 void
 PyType_Modified(PyTypeObject *type)
 {
-	/* Invalidate any cached data for the specified type and all
-	   subclasses.  This function is called after the base
-	   classes, mro, or attributes of the type are altered.
+    /* Invalidate any cached data for the specified type and all
+       subclasses.  This function is called after the base
+       classes, mro, or attributes of the type are altered.
 
-	   Invariants:
+       Invariants:
 
-	   - Py_TPFLAGS_VALID_VERSION_TAG is never set if
-	     Py_TPFLAGS_HAVE_VERSION_TAG is not set (e.g. on type
-	     objects coming from non-recompiled extension modules)
+       - Py_TPFLAGS_VALID_VERSION_TAG is never set if
+         Py_TPFLAGS_HAVE_VERSION_TAG is not set (e.g. on type
+         objects coming from non-recompiled extension modules)
 
-	   - before Py_TPFLAGS_VALID_VERSION_TAG can be set on a type,
-	     it must first be set on all super types.
+       - before Py_TPFLAGS_VALID_VERSION_TAG can be set on a type,
+         it must first be set on all super types.
 
-	   This function clears the Py_TPFLAGS_VALID_VERSION_TAG of a
-	   type (so it must first clear it on all subclasses).  The
-	   tp_version_tag value is meaningless unless this flag is set.
-	   We don't assign new version tags eagerly, but only as
-	   needed.
-	 */
-	PyObject *raw, *ref;
-	Py_ssize_t i, n;
+       This function clears the Py_TPFLAGS_VALID_VERSION_TAG of a
+       type (so it must first clear it on all subclasses).  The
+       tp_version_tag value is meaningless unless this flag is set.
+       We don't assign new version tags eagerly, but only as
+       needed.
+     */
+    PyObject *raw, *ref;
+    Py_ssize_t i, n;
 
-	if (!PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG))
-		return;
+    if (!PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG))
+        return;
 
-	raw = type->tp_subclasses;
-	if (raw != NULL) {
-		n = PyList_GET_SIZE(raw);
-		for (i = 0; i < n; i++) {
-			ref = PyList_GET_ITEM(raw, i);
-			ref = PyWeakref_GET_OBJECT(ref);
-			if (ref != Py_None) {
-				PyType_Modified((PyTypeObject *)ref);
-			}
-		}
-	}
-	type->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
+    raw = type->tp_subclasses;
+    if (raw != NULL) {
+        n = PyList_GET_SIZE(raw);
+        for (i = 0; i < n; i++) {
+            ref = PyList_GET_ITEM(raw, i);
+            ref = PyWeakref_GET_OBJECT(ref);
+            if (ref != Py_None) {
+                PyType_Modified((PyTypeObject *)ref);
+            }
+        }
+    }
+    type->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
 }
 
 static void
 type_mro_modified(PyTypeObject *type, PyObject *bases) {
-	/*
-	   Check that all base classes or elements of the mro of type are
-	   able to be cached.  This function is called after the base
-	   classes or mro of the type are altered.
+    /*
+       Check that all base classes or elements of the mro of type are
+       able to be cached.  This function is called after the base
+       classes or mro of the type are altered.
 
-	   Unset HAVE_VERSION_TAG and VALID_VERSION_TAG if the type
-	   inherits from an old-style class, either directly or if it
-	   appears in the MRO of a new-style class.  No support either for
-	   custom MROs that include types that are not officially super
-	   types.
+       Unset HAVE_VERSION_TAG and VALID_VERSION_TAG if the type
+       inherits from an old-style class, either directly or if it
+       appears in the MRO of a new-style class.  No support either for
+       custom MROs that include types that are not officially super
+       types.
 
-	   Called from mro_internal, which will subsequently be called on
-	   each subclass when their mro is recursively updated.
-	 */
-	Py_ssize_t i, n;
-	int clear = 0;
+       Called from mro_internal, which will subsequently be called on
+       each subclass when their mro is recursively updated.
+     */
+    Py_ssize_t i, n;
+    int clear = 0;
 
-	if (!PyType_HasFeature(type, Py_TPFLAGS_HAVE_VERSION_TAG))
-		return;
+    if (!PyType_HasFeature(type, Py_TPFLAGS_HAVE_VERSION_TAG))
+        return;
 
-	n = PyTuple_GET_SIZE(bases);
-	for (i = 0; i < n; i++) {
-		PyObject *b = PyTuple_GET_ITEM(bases, i);
-		PyTypeObject *cls;
+    n = PyTuple_GET_SIZE(bases);
+    for (i = 0; i < n; i++) {
+        PyObject *b = PyTuple_GET_ITEM(bases, i);
+        PyTypeObject *cls;
 
-		if (!PyType_Check(b) ) {
-			clear = 1;
-			break;
-		}
+        if (!PyType_Check(b) ) {
+            clear = 1;
+            break;
+        }
 
-		cls = (PyTypeObject *)b;
+        cls = (PyTypeObject *)b;
 
-		if (!PyType_HasFeature(cls, Py_TPFLAGS_HAVE_VERSION_TAG) ||
-		    !PyType_IsSubtype(type, cls)) {
-			clear = 1;
-			break;
-		}
-	}
+        if (!PyType_HasFeature(cls, Py_TPFLAGS_HAVE_VERSION_TAG) ||
+            !PyType_IsSubtype(type, cls)) {
+            clear = 1;
+            break;
+        }
+    }
 
-	if (clear)
-		type->tp_flags &= ~(Py_TPFLAGS_HAVE_VERSION_TAG|
-		                    Py_TPFLAGS_VALID_VERSION_TAG);
+    if (clear)
+        type->tp_flags &= ~(Py_TPFLAGS_HAVE_VERSION_TAG|
+                            Py_TPFLAGS_VALID_VERSION_TAG);
 }
 
 static int
 assign_version_tag(PyTypeObject *type)
 {
-	/* Ensure that the tp_version_tag is valid and set
-	   Py_TPFLAGS_VALID_VERSION_TAG.  To respect the invariant, this
-	   must first be done on all super classes.  Return 0 if this
-	   cannot be done, 1 if Py_TPFLAGS_VALID_VERSION_TAG.
-	*/
-	Py_ssize_t i, n;
-	PyObject *bases;
+    /* Ensure that the tp_version_tag is valid and set
+       Py_TPFLAGS_VALID_VERSION_TAG.  To respect the invariant, this
+       must first be done on all super classes.  Return 0 if this
+       cannot be done, 1 if Py_TPFLAGS_VALID_VERSION_TAG.
+    */
+    Py_ssize_t i, n;
+    PyObject *bases;
 
-	if (PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG))
-		return 1;
-	if (!PyType_HasFeature(type, Py_TPFLAGS_HAVE_VERSION_TAG))
-		return 0;
-	if (!PyType_HasFeature(type, Py_TPFLAGS_READY))
-		return 0;
+    if (PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG))
+        return 1;
+    if (!PyType_HasFeature(type, Py_TPFLAGS_HAVE_VERSION_TAG))
+        return 0;
+    if (!PyType_HasFeature(type, Py_TPFLAGS_READY))
+        return 0;
 
-	type->tp_version_tag = next_version_tag++;
-	/* for stress-testing: next_version_tag &= 0xFF; */
+    type->tp_version_tag = next_version_tag++;
+    /* for stress-testing: next_version_tag &= 0xFF; */
 
-	if (type->tp_version_tag == 0) {
-		/* wrap-around or just starting Python - clear the whole
-		   cache by filling names with references to Py_None.
-		   Values are also set to NULL for added protection, as they
-		   are borrowed reference */
-		for (i = 0; i < (1 << MCACHE_SIZE_EXP); i++) {
-			method_cache[i].value = NULL;
-			Py_XDECREF(method_cache[i].name);
-			method_cache[i].name = Py_None;
-			Py_INCREF(Py_None);
-		}
-		/* mark all version tags as invalid */
-		PyType_Modified(&PyBaseObject_Type);
-		return 1;
-	}
-	bases = type->tp_bases;
-	n = PyTuple_GET_SIZE(bases);
-	for (i = 0; i < n; i++) {
-		PyObject *b = PyTuple_GET_ITEM(bases, i);
-		assert(PyType_Check(b));
-		if (!assign_version_tag((PyTypeObject *)b))
-			return 0;
-	}
-	type->tp_flags |= Py_TPFLAGS_VALID_VERSION_TAG;
-	return 1;
+    if (type->tp_version_tag == 0) {
+        /* wrap-around or just starting Python - clear the whole
+           cache by filling names with references to Py_None.
+           Values are also set to NULL for added protection, as they
+           are borrowed reference */
+        for (i = 0; i < (1 << MCACHE_SIZE_EXP); i++) {
+            method_cache[i].value = NULL;
+            Py_XDECREF(method_cache[i].name);
+            method_cache[i].name = Py_None;
+            Py_INCREF(Py_None);
+        }
+        /* mark all version tags as invalid */
+        PyType_Modified(&PyBaseObject_Type);
+        return 1;
+    }
+    bases = type->tp_bases;
+    n = PyTuple_GET_SIZE(bases);
+    for (i = 0; i < n; i++) {
+        PyObject *b = PyTuple_GET_ITEM(bases, i);
+        assert(PyType_Check(b));
+        if (!assign_version_tag((PyTypeObject *)b))
+            return 0;
+    }
+    type->tp_flags |= Py_TPFLAGS_VALID_VERSION_TAG;
+    return 1;
 }
 
 
 static PyMemberDef type_members[] = {
-	{"__basicsize__", T_INT, offsetof(PyTypeObject,tp_basicsize),READONLY},
-	{"__itemsize__", T_INT, offsetof(PyTypeObject, tp_itemsize), READONLY},
-	{"__flags__", T_LONG, offsetof(PyTypeObject, tp_flags), READONLY},
-	{"__weakrefoffset__", T_LONG,
-	 offsetof(PyTypeObject, tp_weaklistoffset), READONLY},
-	{"__base__", T_OBJECT, offsetof(PyTypeObject, tp_base), READONLY},
-	{"__dictoffset__", T_LONG,
-	 offsetof(PyTypeObject, tp_dictoffset), READONLY},
-	{"__mro__", T_OBJECT, offsetof(PyTypeObject, tp_mro), READONLY},
-	{0}
+    {"__basicsize__", T_INT, offsetof(PyTypeObject,tp_basicsize),READONLY},
+    {"__itemsize__", T_INT, offsetof(PyTypeObject, tp_itemsize), READONLY},
+    {"__flags__", T_LONG, offsetof(PyTypeObject, tp_flags), READONLY},
+    {"__weakrefoffset__", T_LONG,
+     offsetof(PyTypeObject, tp_weaklistoffset), READONLY},
+    {"__base__", T_OBJECT, offsetof(PyTypeObject, tp_base), READONLY},
+    {"__dictoffset__", T_LONG,
+     offsetof(PyTypeObject, tp_dictoffset), READONLY},
+    {"__mro__", T_OBJECT, offsetof(PyTypeObject, tp_mro), READONLY},
+    {0}
 };
 
 static PyObject *
 type_name(PyTypeObject *type, void *context)
 {
-	const char *s;
+    const char *s;
 
-	if (type->tp_flags & Py_TPFLAGS_HEAPTYPE) {
-		PyHeapTypeObject* et = (PyHeapTypeObject*)type;
+    if (type->tp_flags & Py_TPFLAGS_HEAPTYPE) {
+        PyHeapTypeObject* et = (PyHeapTypeObject*)type;
 
-		Py_INCREF(et->ht_name);
-		return et->ht_name;
-	}
-	else {
-		s = strrchr(type->tp_name, '.');
-		if (s == NULL)
-			s = type->tp_name;
-		else
-			s++;
-		return PyString_FromString(s);
-	}
+        Py_INCREF(et->ht_name);
+        return et->ht_name;
+    }
+    else {
+        s = strrchr(type->tp_name, '.');
+        if (s == NULL)
+            s = type->tp_name;
+        else
+            s++;
+        return PyString_FromString(s);
+    }
 }
 
 static int
 type_set_name(PyTypeObject *type, PyObject *value, void *context)
 {
-	PyHeapTypeObject* et;
+    PyHeapTypeObject* et;
 
-	if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
-		PyErr_Format(PyExc_TypeError,
-			     "can't set %s.__name__", type->tp_name);
-		return -1;
-	}
-	if (!value) {
-		PyErr_Format(PyExc_TypeError,
-			     "can't delete %s.__name__", type->tp_name);
-		return -1;
-	}
-	if (!PyString_Check(value)) {
-		PyErr_Format(PyExc_TypeError,
-			     "can only assign string to %s.__name__, not '%s'",
-			     type->tp_name, Py_TYPE(value)->tp_name);
-		return -1;
-	}
-	if (strlen(PyString_AS_STRING(value))
-	    != (size_t)PyString_GET_SIZE(value)) {
-		PyErr_Format(PyExc_ValueError,
-			     "__name__ must not contain null bytes");
-		return -1;
-	}
+    if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
+        PyErr_Format(PyExc_TypeError,
+                     "can't set %s.__name__", type->tp_name);
+        return -1;
+    }
+    if (!value) {
+        PyErr_Format(PyExc_TypeError,
+                     "can't delete %s.__name__", type->tp_name);
+        return -1;
+    }
+    if (!PyString_Check(value)) {
+        PyErr_Format(PyExc_TypeError,
+                     "can only assign string to %s.__name__, not '%s'",
+                     type->tp_name, Py_TYPE(value)->tp_name);
+        return -1;
+    }
+    if (strlen(PyString_AS_STRING(value))
+        != (size_t)PyString_GET_SIZE(value)) {
+        PyErr_Format(PyExc_ValueError,
+                     "__name__ must not contain null bytes");
+        return -1;
+    }
 
-	et = (PyHeapTypeObject*)type;
+    et = (PyHeapTypeObject*)type;
 
-	Py_INCREF(value);
+    Py_INCREF(value);
 
-	Py_DECREF(et->ht_name);
-	et->ht_name = value;
+    Py_DECREF(et->ht_name);
+    et->ht_name = value;
 
-	type->tp_name = PyString_AS_STRING(value);
+    type->tp_name = PyString_AS_STRING(value);
 
-	return 0;
+    return 0;
 }
 
 static PyObject *
 type_module(PyTypeObject *type, void *context)
 {
-	PyObject *mod;
-	char *s;
+    PyObject *mod;
+    char *s;
 
-	if (type->tp_flags & Py_TPFLAGS_HEAPTYPE) {
-		mod = PyDict_GetItemString(type->tp_dict, "__module__");
-		if (!mod) { 
-			PyErr_Format(PyExc_AttributeError, "__module__");
-			return 0;
-		}
-		Py_XINCREF(mod);
-		return mod;
-	}
-	else {
-		s = strrchr(type->tp_name, '.');
-		if (s != NULL)
-			return PyString_FromStringAndSize(
-			    type->tp_name, (Py_ssize_t)(s - type->tp_name));
-		return PyString_FromString("__builtin__");
-	}
+    if (type->tp_flags & Py_TPFLAGS_HEAPTYPE) {
+        mod = PyDict_GetItemString(type->tp_dict, "__module__");
+        if (!mod) {
+            PyErr_Format(PyExc_AttributeError, "__module__");
+            return 0;
+        }
+        Py_XINCREF(mod);
+        return mod;
+    }
+    else {
+        s = strrchr(type->tp_name, '.');
+        if (s != NULL)
+            return PyString_FromStringAndSize(
+                type->tp_name, (Py_ssize_t)(s - type->tp_name));
+        return PyString_FromString("__builtin__");
+    }
 }
 
 static int
 type_set_module(PyTypeObject *type, PyObject *value, void *context)
 {
-	if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
-		PyErr_Format(PyExc_TypeError,
-			     "can't set %s.__module__", type->tp_name);
-		return -1;
-	}
-	if (!value) {
-		PyErr_Format(PyExc_TypeError,
-			     "can't delete %s.__module__", type->tp_name);
-		return -1;
-	}
+    if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
+        PyErr_Format(PyExc_TypeError,
+                     "can't set %s.__module__", type->tp_name);
+        return -1;
+    }
+    if (!value) {
+        PyErr_Format(PyExc_TypeError,
+                     "can't delete %s.__module__", type->tp_name);
+        return -1;
+    }
 
-	PyType_Modified(type);
+    PyType_Modified(type);
 
-	return PyDict_SetItemString(type->tp_dict, "__module__", value);
+    return PyDict_SetItemString(type->tp_dict, "__module__", value);
 }
 
 static PyObject *
 type_abstractmethods(PyTypeObject *type, void *context)
 {
-	PyObject *mod = PyDict_GetItemString(type->tp_dict,
-					     "__abstractmethods__");
-	if (!mod) {
-		PyErr_Format(PyExc_AttributeError, "__abstractmethods__");
-		return NULL;
-	}
-	Py_XINCREF(mod);
-	return mod;
+    PyObject *mod = PyDict_GetItemString(type->tp_dict,
+                                         "__abstractmethods__");
+    if (!mod) {
+        PyErr_Format(PyExc_AttributeError, "__abstractmethods__");
+        return NULL;
+    }
+    Py_XINCREF(mod);
+    return mod;
 }
 
 static int
 type_set_abstractmethods(PyTypeObject *type, PyObject *value, void *context)
 {
-	/* __abstractmethods__ should only be set once on a type, in
-	   abc.ABCMeta.__new__, so this function doesn't do anything
-	   special to update subclasses.
-	*/
-	int res = PyDict_SetItemString(type->tp_dict,
-				       "__abstractmethods__", value);
-	if (res == 0) {
-		PyType_Modified(type);
-		if (value && PyObject_IsTrue(value)) {
-			type->tp_flags |= Py_TPFLAGS_IS_ABSTRACT;
-		}
-		else {
-			type->tp_flags &= ~Py_TPFLAGS_IS_ABSTRACT;
-		}
-	}
-	return res;
+    /* __abstractmethods__ should only be set once on a type, in
+       abc.ABCMeta.__new__, so this function doesn't do anything
+       special to update subclasses.
+    */
+    int res = PyDict_SetItemString(type->tp_dict,
+                                   "__abstractmethods__", value);
+    if (res == 0) {
+        PyType_Modified(type);
+        if (value && PyObject_IsTrue(value)) {
+            type->tp_flags |= Py_TPFLAGS_IS_ABSTRACT;
+        }
+        else {
+            type->tp_flags &= ~Py_TPFLAGS_IS_ABSTRACT;
+        }
+    }
+    return res;
 }
 
 static PyObject *
 type_get_bases(PyTypeObject *type, void *context)
 {
-	Py_INCREF(type->tp_bases);
-	return type->tp_bases;
+    Py_INCREF(type->tp_bases);
+    return type->tp_bases;
 }
 
 static PyTypeObject *best_base(PyObject *);
@@ -354,416 +354,416 @@
 
 typedef int (*update_callback)(PyTypeObject *, void *);
 static int update_subclasses(PyTypeObject *type, PyObject *name,
-			     update_callback callback, void *data);
+                             update_callback callback, void *data);
 static int recurse_down_subclasses(PyTypeObject *type, PyObject *name,
-				   update_callback callback, void *data);
+                                   update_callback callback, void *data);
 
 static int
 mro_subclasses(PyTypeObject *type, PyObject* temp)
 {
-	PyTypeObject *subclass;
-	PyObject *ref, *subclasses, *old_mro;
-	Py_ssize_t i, n;
+    PyTypeObject *subclass;
+    PyObject *ref, *subclasses, *old_mro;
+    Py_ssize_t i, n;
 
-	subclasses = type->tp_subclasses;
-	if (subclasses == NULL)
-		return 0;
-	assert(PyList_Check(subclasses));
-	n = PyList_GET_SIZE(subclasses);
-	for (i = 0; i < n; i++) {
-		ref = PyList_GET_ITEM(subclasses, i);
-		assert(PyWeakref_CheckRef(ref));
-		subclass = (PyTypeObject *)PyWeakref_GET_OBJECT(ref);
-		assert(subclass != NULL);
-		if ((PyObject *)subclass == Py_None)
-			continue;
-		assert(PyType_Check(subclass));
-		old_mro = subclass->tp_mro;
-		if (mro_internal(subclass) < 0) {
-			subclass->tp_mro = old_mro;
-			return -1;
-		}
-		else {
-			PyObject* tuple;
-			tuple = PyTuple_Pack(2, subclass, old_mro);
-			Py_DECREF(old_mro);
-			if (!tuple)
-				return -1;
-			if (PyList_Append(temp, tuple) < 0)
-				return -1;
-			Py_DECREF(tuple);
-		}
-		if (mro_subclasses(subclass, temp) < 0)
-			return -1;
-	}
-	return 0;
+    subclasses = type->tp_subclasses;
+    if (subclasses == NULL)
+        return 0;
+    assert(PyList_Check(subclasses));
+    n = PyList_GET_SIZE(subclasses);
+    for (i = 0; i < n; i++) {
+        ref = PyList_GET_ITEM(subclasses, i);
+        assert(PyWeakref_CheckRef(ref));
+        subclass = (PyTypeObject *)PyWeakref_GET_OBJECT(ref);
+        assert(subclass != NULL);
+        if ((PyObject *)subclass == Py_None)
+            continue;
+        assert(PyType_Check(subclass));
+        old_mro = subclass->tp_mro;
+        if (mro_internal(subclass) < 0) {
+            subclass->tp_mro = old_mro;
+            return -1;
+        }
+        else {
+            PyObject* tuple;
+            tuple = PyTuple_Pack(2, subclass, old_mro);
+            Py_DECREF(old_mro);
+            if (!tuple)
+                return -1;
+            if (PyList_Append(temp, tuple) < 0)
+                return -1;
+            Py_DECREF(tuple);
+        }
+        if (mro_subclasses(subclass, temp) < 0)
+            return -1;
+    }
+    return 0;
 }
 
 static int
 type_set_bases(PyTypeObject *type, PyObject *value, void *context)
 {
-	Py_ssize_t i;
-	int r = 0;
-	PyObject *ob, *temp;
-	PyTypeObject *new_base, *old_base;
-	PyObject *old_bases, *old_mro;
+    Py_ssize_t i;
+    int r = 0;
+    PyObject *ob, *temp;
+    PyTypeObject *new_base, *old_base;
+    PyObject *old_bases, *old_mro;
 
-	if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
-		PyErr_Format(PyExc_TypeError,
-			     "can't set %s.__bases__", type->tp_name);
-		return -1;
-	}
-	if (!value) {
-		PyErr_Format(PyExc_TypeError,
-			     "can't delete %s.__bases__", type->tp_name);
-		return -1;
-	}
-	if (!PyTuple_Check(value)) {
-		PyErr_Format(PyExc_TypeError,
-		     "can only assign tuple to %s.__bases__, not %s",
-			     type->tp_name, Py_TYPE(value)->tp_name);
-		return -1;
-	}
-	if (PyTuple_GET_SIZE(value) == 0) {
-		PyErr_Format(PyExc_TypeError,
-		     "can only assign non-empty tuple to %s.__bases__, not ()",
-			     type->tp_name);
-		return -1;
-	}
-	for (i = 0; i < PyTuple_GET_SIZE(value); i++) {
-		ob = PyTuple_GET_ITEM(value, i);
-		if (!PyClass_Check(ob) && !PyType_Check(ob)) {
-			PyErr_Format(
-				PyExc_TypeError,
-	"%s.__bases__ must be tuple of old- or new-style classes, not '%s'",
-				type->tp_name, Py_TYPE(ob)->tp_name);
-			return -1;
-		}
-		if (PyType_Check(ob)) {
-			if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
-				PyErr_SetString(PyExc_TypeError,
-			"a __bases__ item causes an inheritance cycle");
-				return -1;
-			}
-		}
-	}
+    if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
+        PyErr_Format(PyExc_TypeError,
+                     "can't set %s.__bases__", type->tp_name);
+        return -1;
+    }
+    if (!value) {
+        PyErr_Format(PyExc_TypeError,
+                     "can't delete %s.__bases__", type->tp_name);
+        return -1;
+    }
+    if (!PyTuple_Check(value)) {
+        PyErr_Format(PyExc_TypeError,
+             "can only assign tuple to %s.__bases__, not %s",
+                 type->tp_name, Py_TYPE(value)->tp_name);
+        return -1;
+    }
+    if (PyTuple_GET_SIZE(value) == 0) {
+        PyErr_Format(PyExc_TypeError,
+             "can only assign non-empty tuple to %s.__bases__, not ()",
+                 type->tp_name);
+        return -1;
+    }
+    for (i = 0; i < PyTuple_GET_SIZE(value); i++) {
+        ob = PyTuple_GET_ITEM(value, i);
+        if (!PyClass_Check(ob) && !PyType_Check(ob)) {
+            PyErr_Format(
+                PyExc_TypeError,
+    "%s.__bases__ must be tuple of old- or new-style classes, not '%s'",
+                            type->tp_name, Py_TYPE(ob)->tp_name);
+                    return -1;
+        }
+        if (PyType_Check(ob)) {
+            if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
+                PyErr_SetString(PyExc_TypeError,
+            "a __bases__ item causes an inheritance cycle");
+                return -1;
+            }
+        }
+    }
 
-	new_base = best_base(value);
+    new_base = best_base(value);
 
-	if (!new_base) {
-		return -1;
-	}
+    if (!new_base) {
+        return -1;
+    }
 
-	if (!compatible_for_assignment(type->tp_base, new_base, "__bases__"))
-		return -1;
+    if (!compatible_for_assignment(type->tp_base, new_base, "__bases__"))
+        return -1;
 
-	Py_INCREF(new_base);
-	Py_INCREF(value);
+    Py_INCREF(new_base);
+    Py_INCREF(value);
 
-	old_bases = type->tp_bases;
-	old_base = type->tp_base;
-	old_mro = type->tp_mro;
+    old_bases = type->tp_bases;
+    old_base = type->tp_base;
+    old_mro = type->tp_mro;
 
-	type->tp_bases = value;
-	type->tp_base = new_base;
+    type->tp_bases = value;
+    type->tp_base = new_base;
 
-	if (mro_internal(type) < 0) {
-		goto bail;
-	}
+    if (mro_internal(type) < 0) {
+        goto bail;
+    }
 
-	temp = PyList_New(0);
-	if (!temp)
-		goto bail;
+    temp = PyList_New(0);
+    if (!temp)
+        goto bail;
 
-	r = mro_subclasses(type, temp);
+    r = mro_subclasses(type, temp);
 
-	if (r < 0) {
-		for (i = 0; i < PyList_Size(temp); i++) {
-			PyTypeObject* cls;
-			PyObject* mro;
-			PyArg_UnpackTuple(PyList_GET_ITEM(temp, i),
-					 "", 2, 2, &cls, &mro);
-			Py_INCREF(mro);
-			ob = cls->tp_mro;
-			cls->tp_mro = mro;
-			Py_DECREF(ob);
-		}
-		Py_DECREF(temp);
-		goto bail;
-	}
+    if (r < 0) {
+        for (i = 0; i < PyList_Size(temp); i++) {
+            PyTypeObject* cls;
+            PyObject* mro;
+            PyArg_UnpackTuple(PyList_GET_ITEM(temp, i),
+                             "", 2, 2, &cls, &mro);
+            Py_INCREF(mro);
+            ob = cls->tp_mro;
+            cls->tp_mro = mro;
+            Py_DECREF(ob);
+        }
+        Py_DECREF(temp);
+        goto bail;
+    }
 
-	Py_DECREF(temp);
+    Py_DECREF(temp);
 
-	/* any base that was in __bases__ but now isn't, we
-	   need to remove |type| from its tp_subclasses.
-	   conversely, any class now in __bases__ that wasn't
-	   needs to have |type| added to its subclasses. */
+    /* any base that was in __bases__ but now isn't, we
+       need to remove |type| from its tp_subclasses.
+       conversely, any class now in __bases__ that wasn't
+       needs to have |type| added to its subclasses. */
 
-	/* for now, sod that: just remove from all old_bases,
-	   add to all new_bases */
+    /* for now, sod that: just remove from all old_bases,
+       add to all new_bases */
 
-	for (i = PyTuple_GET_SIZE(old_bases) - 1; i >= 0; i--) {
-		ob = PyTuple_GET_ITEM(old_bases, i);
-		if (PyType_Check(ob)) {
-			remove_subclass(
-				(PyTypeObject*)ob, type);
-		}
-	}
+    for (i = PyTuple_GET_SIZE(old_bases) - 1; i >= 0; i--) {
+        ob = PyTuple_GET_ITEM(old_bases, i);
+        if (PyType_Check(ob)) {
+            remove_subclass(
+                (PyTypeObject*)ob, type);
+        }
+    }
 
-	for (i = PyTuple_GET_SIZE(value) - 1; i >= 0; i--) {
-		ob = PyTuple_GET_ITEM(value, i);
-		if (PyType_Check(ob)) {
-			if (add_subclass((PyTypeObject*)ob, type) < 0)
-				r = -1;
-		}
-	}
+    for (i = PyTuple_GET_SIZE(value) - 1; i >= 0; i--) {
+        ob = PyTuple_GET_ITEM(value, i);
+        if (PyType_Check(ob)) {
+            if (add_subclass((PyTypeObject*)ob, type) < 0)
+                r = -1;
+        }
+    }
 
-	update_all_slots(type);
+    update_all_slots(type);
 
-	Py_DECREF(old_bases);
-	Py_DECREF(old_base);
-	Py_DECREF(old_mro);
+    Py_DECREF(old_bases);
+    Py_DECREF(old_base);
+    Py_DECREF(old_mro);
 
-	return r;
+    return r;
 
   bail:
-	Py_DECREF(type->tp_bases);
-	Py_DECREF(type->tp_base);
-	if (type->tp_mro != old_mro) {
-		Py_DECREF(type->tp_mro);
-	}
+    Py_DECREF(type->tp_bases);
+    Py_DECREF(type->tp_base);
+    if (type->tp_mro != old_mro) {
+        Py_DECREF(type->tp_mro);
+    }
 
-	type->tp_bases = old_bases;
-	type->tp_base = old_base;
-	type->tp_mro = old_mro;
+    type->tp_bases = old_bases;
+    type->tp_base = old_base;
+    type->tp_mro = old_mro;
 
-	return -1;
+    return -1;
 }
 
 static PyObject *
 type_dict(PyTypeObject *type, void *context)
 {
-	if (type->tp_dict == NULL) {
-		Py_INCREF(Py_None);
-		return Py_None;
-	}
-	return PyDictProxy_New(type->tp_dict);
+    if (type->tp_dict == NULL) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return PyDictProxy_New(type->tp_dict);
 }
 
 static PyObject *
 type_get_doc(PyTypeObject *type, void *context)
 {
-	PyObject *result;
-	if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE) && type->tp_doc != NULL)
-		return PyString_FromString(type->tp_doc);
-	result = PyDict_GetItemString(type->tp_dict, "__doc__");
-	if (result == NULL) {
-		result = Py_None;
-		Py_INCREF(result);
-	}
-	else if (Py_TYPE(result)->tp_descr_get) {
-		result = Py_TYPE(result)->tp_descr_get(result, NULL,
-						       (PyObject *)type);
-	}
-	else {
-		Py_INCREF(result);
-	}
-	return result;
+    PyObject *result;
+    if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE) && type->tp_doc != NULL)
+        return PyString_FromString(type->tp_doc);
+    result = PyDict_GetItemString(type->tp_dict, "__doc__");
+    if (result == NULL) {
+        result = Py_None;
+        Py_INCREF(result);
+    }
+    else if (Py_TYPE(result)->tp_descr_get) {
+        result = Py_TYPE(result)->tp_descr_get(result, NULL,
+                                               (PyObject *)type);
+    }
+    else {
+        Py_INCREF(result);
+    }
+    return result;
 }
 
 static PyObject *
 type___instancecheck__(PyObject *type, PyObject *inst)
 {
-	switch (_PyObject_RealIsInstance(inst, type)) {
-	case -1:
-		return NULL;
-	case 0:
-		Py_RETURN_FALSE;
-	default:
-		Py_RETURN_TRUE;
-	}
+    switch (_PyObject_RealIsInstance(inst, type)) {
+    case -1:
+        return NULL;
+    case 0:
+        Py_RETURN_FALSE;
+    default:
+        Py_RETURN_TRUE;
+    }
 }
 
 
 static PyObject *
 type___subclasscheck__(PyObject *type, PyObject *inst)
 {
-	switch (_PyObject_RealIsSubclass(inst, type)) {
-	case -1:
-		return NULL;
-	case 0:
-		Py_RETURN_FALSE;
-	default:
-		Py_RETURN_TRUE;
-	}
+    switch (_PyObject_RealIsSubclass(inst, type)) {
+    case -1:
+        return NULL;
+    case 0:
+        Py_RETURN_FALSE;
+    default:
+        Py_RETURN_TRUE;
+    }
 }
 
 
 static PyGetSetDef type_getsets[] = {
-	{"__name__", (getter)type_name, (setter)type_set_name, NULL},
-	{"__bases__", (getter)type_get_bases, (setter)type_set_bases, NULL},
-	{"__module__", (getter)type_module, (setter)type_set_module, NULL},
-	{"__abstractmethods__", (getter)type_abstractmethods,
-	 (setter)type_set_abstractmethods, NULL},
-	{"__dict__",  (getter)type_dict,  NULL, NULL},
-	{"__doc__", (getter)type_get_doc, NULL, NULL},
-	{0}
+    {"__name__", (getter)type_name, (setter)type_set_name, NULL},
+    {"__bases__", (getter)type_get_bases, (setter)type_set_bases, NULL},
+    {"__module__", (getter)type_module, (setter)type_set_module, NULL},
+    {"__abstractmethods__", (getter)type_abstractmethods,
+     (setter)type_set_abstractmethods, NULL},
+    {"__dict__",  (getter)type_dict,  NULL, NULL},
+    {"__doc__", (getter)type_get_doc, NULL, NULL},
+    {0}
 };
 
 
 static PyObject*
 type_richcompare(PyObject *v, PyObject *w, int op)
 {
-	PyObject *result;
-	Py_uintptr_t vv, ww;
-	int c;
+    PyObject *result;
+    Py_uintptr_t vv, ww;
+    int c;
 
-	/* Make sure both arguments are types. */
-	if (!PyType_Check(v) || !PyType_Check(w) ||
-	    /* If there is a __cmp__ method defined, let it be called instead
-	       of our dumb function designed merely to warn.  See bug
-	       #7491. */
-	    Py_TYPE(v)->tp_compare || Py_TYPE(w)->tp_compare) {
-		result = Py_NotImplemented;
-		goto out;
-	}
+    /* Make sure both arguments are types. */
+    if (!PyType_Check(v) || !PyType_Check(w) ||
+        /* If there is a __cmp__ method defined, let it be called instead
+           of our dumb function designed merely to warn.  See bug
+           #7491. */
+        Py_TYPE(v)->tp_compare || Py_TYPE(w)->tp_compare) {
+        result = Py_NotImplemented;
+        goto out;
+    }
 
-	/* Py3K warning if comparison isn't == or !=  */
-	if (Py_Py3kWarningFlag && op != Py_EQ && op != Py_NE &&
-		PyErr_WarnEx(PyExc_DeprecationWarning,
-			   "type inequality comparisons not supported "
-			   "in 3.x", 1) < 0) {
-		return NULL;
-	}
+    /* Py3K warning if comparison isn't == or !=  */
+    if (Py_Py3kWarningFlag && op != Py_EQ && op != Py_NE &&
+        PyErr_WarnEx(PyExc_DeprecationWarning,
+                   "type inequality comparisons not supported "
+                   "in 3.x", 1) < 0) {
+        return NULL;
+    }
 
-	/* Compare addresses */
-	vv = (Py_uintptr_t)v;
-	ww = (Py_uintptr_t)w;
-	switch (op) {
-	case Py_LT: c = vv <  ww; break;
-	case Py_LE: c = vv <= ww; break;
-	case Py_EQ: c = vv == ww; break;
-	case Py_NE: c = vv != ww; break;
-	case Py_GT: c = vv >  ww; break;
-	case Py_GE: c = vv >= ww; break;
-	default:
-		result = Py_NotImplemented;
-		goto out;
-	}
-	result = c ? Py_True : Py_False;
+    /* Compare addresses */
+    vv = (Py_uintptr_t)v;
+    ww = (Py_uintptr_t)w;
+    switch (op) {
+    case Py_LT: c = vv <  ww; break;
+    case Py_LE: c = vv <= ww; break;
+    case Py_EQ: c = vv == ww; break;
+    case Py_NE: c = vv != ww; break;
+    case Py_GT: c = vv >  ww; break;
+    case Py_GE: c = vv >= ww; break;
+    default:
+        result = Py_NotImplemented;
+        goto out;
+    }
+    result = c ? Py_True : Py_False;
 
   /* incref and return */
   out:
-	Py_INCREF(result);
-	return result;
+    Py_INCREF(result);
+    return result;
 }
 
 static PyObject *
 type_repr(PyTypeObject *type)
 {
-	PyObject *mod, *name, *rtn;
-	char *kind;
+    PyObject *mod, *name, *rtn;
+    char *kind;
 
-	mod = type_module(type, NULL);
-	if (mod == NULL)
-		PyErr_Clear();
-	else if (!PyString_Check(mod)) {
-		Py_DECREF(mod);
-		mod = NULL;
-	}
-	name = type_name(type, NULL);
-	if (name == NULL)
-		return NULL;
+    mod = type_module(type, NULL);
+    if (mod == NULL)
+        PyErr_Clear();
+    else if (!PyString_Check(mod)) {
+        Py_DECREF(mod);
+        mod = NULL;
+    }
+    name = type_name(type, NULL);
+    if (name == NULL)
+        return NULL;
 
-	if (type->tp_flags & Py_TPFLAGS_HEAPTYPE)
-		kind = "class";
-	else
-		kind = "type";
+    if (type->tp_flags & Py_TPFLAGS_HEAPTYPE)
+        kind = "class";
+    else
+        kind = "type";
 
-	if (mod != NULL && strcmp(PyString_AS_STRING(mod), "__builtin__")) {
-		rtn = PyString_FromFormat("<%s '%s.%s'>",
-					  kind,
-					  PyString_AS_STRING(mod),
-					  PyString_AS_STRING(name));
-	}
-	else
-		rtn = PyString_FromFormat("<%s '%s'>", kind, type->tp_name);
+    if (mod != NULL && strcmp(PyString_AS_STRING(mod), "__builtin__")) {
+        rtn = PyString_FromFormat("<%s '%s.%s'>",
+                                  kind,
+                                  PyString_AS_STRING(mod),
+                                  PyString_AS_STRING(name));
+    }
+    else
+        rtn = PyString_FromFormat("<%s '%s'>", kind, type->tp_name);
 
-	Py_XDECREF(mod);
-	Py_DECREF(name);
-	return rtn;
+    Py_XDECREF(mod);
+    Py_DECREF(name);
+    return rtn;
 }
 
 static PyObject *
 type_call(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *obj;
+    PyObject *obj;
 
-	if (type->tp_new == NULL) {
-		PyErr_Format(PyExc_TypeError,
-			     "cannot create '%.100s' instances",
-			     type->tp_name);
-		return NULL;
-	}
+    if (type->tp_new == NULL) {
+        PyErr_Format(PyExc_TypeError,
+                     "cannot create '%.100s' instances",
+                     type->tp_name);
+        return NULL;
+    }
 
-	obj = type->tp_new(type, args, kwds);
-	if (obj != NULL) {
-		/* Ugly exception: when the call was type(something),
-		   don't call tp_init on the result. */
-		if (type == &PyType_Type &&
-		    PyTuple_Check(args) && PyTuple_GET_SIZE(args) == 1 &&
-		    (kwds == NULL ||
-		     (PyDict_Check(kwds) && PyDict_Size(kwds) == 0)))
-			return obj;
-		/* If the returned object is not an instance of type,
-		   it won't be initialized. */
-		if (!PyType_IsSubtype(obj->ob_type, type))
-			return obj;
-		type = obj->ob_type;
-		if (PyType_HasFeature(type, Py_TPFLAGS_HAVE_CLASS) &&
-		    type->tp_init != NULL &&
-		    type->tp_init(obj, args, kwds) < 0) {
-			Py_DECREF(obj);
-			obj = NULL;
-		}
-	}
-	return obj;
+    obj = type->tp_new(type, args, kwds);
+    if (obj != NULL) {
+        /* Ugly exception: when the call was type(something),
+           don't call tp_init on the result. */
+        if (type == &PyType_Type &&
+            PyTuple_Check(args) && PyTuple_GET_SIZE(args) == 1 &&
+            (kwds == NULL ||
+             (PyDict_Check(kwds) && PyDict_Size(kwds) == 0)))
+            return obj;
+        /* If the returned object is not an instance of type,
+           it won't be initialized. */
+        if (!PyType_IsSubtype(obj->ob_type, type))
+            return obj;
+        type = obj->ob_type;
+        if (PyType_HasFeature(type, Py_TPFLAGS_HAVE_CLASS) &&
+            type->tp_init != NULL &&
+            type->tp_init(obj, args, kwds) < 0) {
+            Py_DECREF(obj);
+            obj = NULL;
+        }
+    }
+    return obj;
 }
 
 PyObject *
 PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
 {
-	PyObject *obj;
-	const size_t size = _PyObject_VAR_SIZE(type, nitems+1);
-	/* note that we need to add one, for the sentinel */
+    PyObject *obj;
+    const size_t size = _PyObject_VAR_SIZE(type, nitems+1);
+    /* note that we need to add one, for the sentinel */
 
-	if (PyType_IS_GC(type))
-		obj = _PyObject_GC_Malloc(size);
-	else
-		obj = (PyObject *)PyObject_MALLOC(size);
+    if (PyType_IS_GC(type))
+        obj = _PyObject_GC_Malloc(size);
+    else
+        obj = (PyObject *)PyObject_MALLOC(size);
 
-	if (obj == NULL)
-		return PyErr_NoMemory();
+    if (obj == NULL)
+        return PyErr_NoMemory();
 
-	memset(obj, '\0', size);
+    memset(obj, '\0', size);
 
-	if (type->tp_flags & Py_TPFLAGS_HEAPTYPE)
-		Py_INCREF(type);
+    if (type->tp_flags & Py_TPFLAGS_HEAPTYPE)
+        Py_INCREF(type);
 
-	if (type->tp_itemsize == 0)
-		PyObject_INIT(obj, type);
-	else
-		(void) PyObject_INIT_VAR((PyVarObject *)obj, type, nitems);
+    if (type->tp_itemsize == 0)
+        PyObject_INIT(obj, type);
+    else
+        (void) PyObject_INIT_VAR((PyVarObject *)obj, type, nitems);
 
-	if (PyType_IS_GC(type))
-		_PyObject_GC_TRACK(obj);
-	return obj;
+    if (PyType_IS_GC(type))
+        _PyObject_GC_TRACK(obj);
+    return obj;
 }
 
 PyObject *
 PyType_GenericNew(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	return type->tp_alloc(type, 0);
+    return type->tp_alloc(type, 0);
 }
 
 /* Helpers for subtyping */
@@ -771,341 +771,341 @@
 static int
 traverse_slots(PyTypeObject *type, PyObject *self, visitproc visit, void *arg)
 {
-	Py_ssize_t i, n;
-	PyMemberDef *mp;
+    Py_ssize_t i, n;
+    PyMemberDef *mp;
 
-	n = Py_SIZE(type);
-	mp = PyHeapType_GET_MEMBERS((PyHeapTypeObject *)type);
-	for (i = 0; i < n; i++, mp++) {
-		if (mp->type == T_OBJECT_EX) {
-			char *addr = (char *)self + mp->offset;
-			PyObject *obj = *(PyObject **)addr;
-			if (obj != NULL) {
-				int err = visit(obj, arg);
-				if (err)
-					return err;
-			}
-		}
-	}
-	return 0;
+    n = Py_SIZE(type);
+    mp = PyHeapType_GET_MEMBERS((PyHeapTypeObject *)type);
+    for (i = 0; i < n; i++, mp++) {
+        if (mp->type == T_OBJECT_EX) {
+            char *addr = (char *)self + mp->offset;
+            PyObject *obj = *(PyObject **)addr;
+            if (obj != NULL) {
+                int err = visit(obj, arg);
+                if (err)
+                    return err;
+            }
+        }
+    }
+    return 0;
 }
 
 static int
 subtype_traverse(PyObject *self, visitproc visit, void *arg)
 {
-	PyTypeObject *type, *base;
-	traverseproc basetraverse;
+    PyTypeObject *type, *base;
+    traverseproc basetraverse;
 
-	/* Find the nearest base with a different tp_traverse,
-	   and traverse slots while we're at it */
-	type = Py_TYPE(self);
-	base = type;
-	while ((basetraverse = base->tp_traverse) == subtype_traverse) {
-		if (Py_SIZE(base)) {
-			int err = traverse_slots(base, self, visit, arg);
-			if (err)
-				return err;
-		}
-		base = base->tp_base;
-		assert(base);
-	}
+    /* Find the nearest base with a different tp_traverse,
+       and traverse slots while we're at it */
+    type = Py_TYPE(self);
+    base = type;
+    while ((basetraverse = base->tp_traverse) == subtype_traverse) {
+        if (Py_SIZE(base)) {
+            int err = traverse_slots(base, self, visit, arg);
+            if (err)
+                return err;
+        }
+        base = base->tp_base;
+        assert(base);
+    }
 
-	if (type->tp_dictoffset != base->tp_dictoffset) {
-		PyObject **dictptr = _PyObject_GetDictPtr(self);
-		if (dictptr && *dictptr)
-			Py_VISIT(*dictptr);
-	}
+    if (type->tp_dictoffset != base->tp_dictoffset) {
+        PyObject **dictptr = _PyObject_GetDictPtr(self);
+        if (dictptr && *dictptr)
+            Py_VISIT(*dictptr);
+    }
 
-	if (type->tp_flags & Py_TPFLAGS_HEAPTYPE)
-		/* For a heaptype, the instances count as references
-		   to the type.	 Traverse the type so the collector
-		   can find cycles involving this link. */
-		Py_VISIT(type);
+    if (type->tp_flags & Py_TPFLAGS_HEAPTYPE)
+        /* For a heaptype, the instances count as references
+           to the type.          Traverse the type so the collector
+           can find cycles involving this link. */
+        Py_VISIT(type);
 
-	if (basetraverse)
-		return basetraverse(self, visit, arg);
-	return 0;
+    if (basetraverse)
+        return basetraverse(self, visit, arg);
+    return 0;
 }
 
 static void
 clear_slots(PyTypeObject *type, PyObject *self)
 {
-	Py_ssize_t i, n;
-	PyMemberDef *mp;
+    Py_ssize_t i, n;
+    PyMemberDef *mp;
 
-	n = Py_SIZE(type);
-	mp = PyHeapType_GET_MEMBERS((PyHeapTypeObject *)type);
-	for (i = 0; i < n; i++, mp++) {
-		if (mp->type == T_OBJECT_EX && !(mp->flags & READONLY)) {
-			char *addr = (char *)self + mp->offset;
-			PyObject *obj = *(PyObject **)addr;
-			if (obj != NULL) {
-				*(PyObject **)addr = NULL;
-				Py_DECREF(obj);
-			}
-		}
-	}
+    n = Py_SIZE(type);
+    mp = PyHeapType_GET_MEMBERS((PyHeapTypeObject *)type);
+    for (i = 0; i < n; i++, mp++) {
+        if (mp->type == T_OBJECT_EX && !(mp->flags & READONLY)) {
+            char *addr = (char *)self + mp->offset;
+            PyObject *obj = *(PyObject **)addr;
+            if (obj != NULL) {
+                *(PyObject **)addr = NULL;
+                Py_DECREF(obj);
+            }
+        }
+    }
 }
 
 static int
 subtype_clear(PyObject *self)
 {
-	PyTypeObject *type, *base;
-	inquiry baseclear;
+    PyTypeObject *type, *base;
+    inquiry baseclear;
 
-	/* Find the nearest base with a different tp_clear
-	   and clear slots while we're at it */
-	type = Py_TYPE(self);
-	base = type;
-	while ((baseclear = base->tp_clear) == subtype_clear) {
-		if (Py_SIZE(base))
-			clear_slots(base, self);
-		base = base->tp_base;
-		assert(base);
-	}
+    /* Find the nearest base with a different tp_clear
+       and clear slots while we're at it */
+    type = Py_TYPE(self);
+    base = type;
+    while ((baseclear = base->tp_clear) == subtype_clear) {
+        if (Py_SIZE(base))
+            clear_slots(base, self);
+        base = base->tp_base;
+        assert(base);
+    }
 
-	/* There's no need to clear the instance dict (if any);
-	   the collector will call its tp_clear handler. */
+    /* There's no need to clear the instance dict (if any);
+       the collector will call its tp_clear handler. */
 
-	if (baseclear)
-		return baseclear(self);
-	return 0;
+    if (baseclear)
+        return baseclear(self);
+    return 0;
 }
 
 static void
 subtype_dealloc(PyObject *self)
 {
-	PyTypeObject *type, *base;
-	destructor basedealloc;
+    PyTypeObject *type, *base;
+    destructor basedealloc;
 
-	/* Extract the type; we expect it to be a heap type */
-	type = Py_TYPE(self);
-	assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);
+    /* Extract the type; we expect it to be a heap type */
+    type = Py_TYPE(self);
+    assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);
 
-	/* Test whether the type has GC exactly once */
+    /* Test whether the type has GC exactly once */
 
-	if (!PyType_IS_GC(type)) {
-		/* It's really rare to find a dynamic type that doesn't have
-		   GC; it can only happen when deriving from 'object' and not
-		   adding any slots or instance variables.  This allows
-		   certain simplifications: there's no need to call
-		   clear_slots(), or DECREF the dict, or clear weakrefs. */
+    if (!PyType_IS_GC(type)) {
+        /* It's really rare to find a dynamic type that doesn't have
+           GC; it can only happen when deriving from 'object' and not
+           adding any slots or instance variables.  This allows
+           certain simplifications: there's no need to call
+           clear_slots(), or DECREF the dict, or clear weakrefs. */
 
-		/* Maybe call finalizer; exit early if resurrected */
-		if (type->tp_del) {
-			type->tp_del(self);
-			if (self->ob_refcnt > 0)
-				return;
-		}
+        /* Maybe call finalizer; exit early if resurrected */
+        if (type->tp_del) {
+            type->tp_del(self);
+            if (self->ob_refcnt > 0)
+                return;
+        }
 
-		/* Find the nearest base with a different tp_dealloc */
-		base = type;
-		while ((basedealloc = base->tp_dealloc) == subtype_dealloc) {
-			assert(Py_SIZE(base) == 0);
-			base = base->tp_base;
-			assert(base);
-		}
+        /* Find the nearest base with a different tp_dealloc */
+        base = type;
+        while ((basedealloc = base->tp_dealloc) == subtype_dealloc) {
+            assert(Py_SIZE(base) == 0);
+            base = base->tp_base;
+            assert(base);
+        }
 
-		/* Extract the type again; tp_del may have changed it */
-		type = Py_TYPE(self);
+        /* Extract the type again; tp_del may have changed it */
+        type = Py_TYPE(self);
 
-		/* Call the base tp_dealloc() */
-		assert(basedealloc);
-		basedealloc(self);
+        /* Call the base tp_dealloc() */
+        assert(basedealloc);
+        basedealloc(self);
 
-		/* Can't reference self beyond this point */
-		Py_DECREF(type);
+        /* Can't reference self beyond this point */
+        Py_DECREF(type);
 
-		/* Done */
-		return;
-	}
+        /* Done */
+        return;
+    }
 
-	/* We get here only if the type has GC */
+    /* We get here only if the type has GC */
 
-	/* UnTrack and re-Track around the trashcan macro, alas */
-	/* See explanation at end of function for full disclosure */
-	PyObject_GC_UnTrack(self);
-	++_PyTrash_delete_nesting;
-	Py_TRASHCAN_SAFE_BEGIN(self);
-	--_PyTrash_delete_nesting;
-	/* DO NOT restore GC tracking at this point.  weakref callbacks
-	 * (if any, and whether directly here or indirectly in something we
-	 * call) may trigger GC, and if self is tracked at that point, it
-	 * will look like trash to GC and GC will try to delete self again.
-	 */
+    /* UnTrack and re-Track around the trashcan macro, alas */
+    /* See explanation at end of function for full disclosure */
+    PyObject_GC_UnTrack(self);
+    ++_PyTrash_delete_nesting;
+    Py_TRASHCAN_SAFE_BEGIN(self);
+    --_PyTrash_delete_nesting;
+    /* DO NOT restore GC tracking at this point.  weakref callbacks
+     * (if any, and whether directly here or indirectly in something we
+     * call) may trigger GC, and if self is tracked at that point, it
+     * will look like trash to GC and GC will try to delete self again.
+     */
 
-	/* Find the nearest base with a different tp_dealloc */
-	base = type;
-	while ((basedealloc = base->tp_dealloc) == subtype_dealloc) {
-		base = base->tp_base;
-		assert(base);
-	}
+    /* Find the nearest base with a different tp_dealloc */
+    base = type;
+    while ((basedealloc = base->tp_dealloc) == subtype_dealloc) {
+        base = base->tp_base;
+        assert(base);
+    }
 
-	/* If we added a weaklist, we clear it.	 Do this *before* calling
-	   the finalizer (__del__), clearing slots, or clearing the instance
-	   dict. */
+    /* If we added a weaklist, we clear it.      Do this *before* calling
+       the finalizer (__del__), clearing slots, or clearing the instance
+       dict. */
 
-	if (type->tp_weaklistoffset && !base->tp_weaklistoffset)
-		PyObject_ClearWeakRefs(self);
+    if (type->tp_weaklistoffset && !base->tp_weaklistoffset)
+        PyObject_ClearWeakRefs(self);
 
-	/* Maybe call finalizer; exit early if resurrected */
-	if (type->tp_del) {
-		_PyObject_GC_TRACK(self);
-		type->tp_del(self);
-		if (self->ob_refcnt > 0)
-			goto endlabel;	/* resurrected */
-		else
-			_PyObject_GC_UNTRACK(self);
-		/* New weakrefs could be created during the finalizer call.
-		    If this occurs, clear them out without calling their
-		    finalizers since they might rely on part of the object
-		    being finalized that has already been destroyed. */
-		if (type->tp_weaklistoffset && !base->tp_weaklistoffset) {
-			/* Modeled after GET_WEAKREFS_LISTPTR() */
-			PyWeakReference **list = (PyWeakReference **) \
-				PyObject_GET_WEAKREFS_LISTPTR(self);
-			while (*list)
-				_PyWeakref_ClearRef(*list);
-		}
-	}
+    /* Maybe call finalizer; exit early if resurrected */
+    if (type->tp_del) {
+        _PyObject_GC_TRACK(self);
+        type->tp_del(self);
+        if (self->ob_refcnt > 0)
+            goto endlabel;              /* resurrected */
+        else
+            _PyObject_GC_UNTRACK(self);
+        /* New weakrefs could be created during the finalizer call.
+            If this occurs, clear them out without calling their
+            finalizers since they might rely on part of the object
+            being finalized that has already been destroyed. */
+        if (type->tp_weaklistoffset && !base->tp_weaklistoffset) {
+            /* Modeled after GET_WEAKREFS_LISTPTR() */
+            PyWeakReference **list = (PyWeakReference **) \
+                PyObject_GET_WEAKREFS_LISTPTR(self);
+            while (*list)
+                _PyWeakref_ClearRef(*list);
+        }
+    }
 
-	/*  Clear slots up to the nearest base with a different tp_dealloc */
-	base = type;
-	while (base->tp_dealloc == subtype_dealloc) {
-		if (Py_SIZE(base))
-			clear_slots(base, self);
-		base = base->tp_base;
-		assert(base);
-	}
+    /*  Clear slots up to the nearest base with a different tp_dealloc */
+    base = type;
+    while (base->tp_dealloc == subtype_dealloc) {
+        if (Py_SIZE(base))
+            clear_slots(base, self);
+        base = base->tp_base;
+        assert(base);
+    }
 
-	/* If we added a dict, DECREF it */
-	if (type->tp_dictoffset && !base->tp_dictoffset) {
-		PyObject **dictptr = _PyObject_GetDictPtr(self);
-		if (dictptr != NULL) {
-			PyObject *dict = *dictptr;
-			if (dict != NULL) {
-				Py_DECREF(dict);
-				*dictptr = NULL;
-			}
-		}
-	}
+    /* If we added a dict, DECREF it */
+    if (type->tp_dictoffset && !base->tp_dictoffset) {
+        PyObject **dictptr = _PyObject_GetDictPtr(self);
+        if (dictptr != NULL) {
+            PyObject *dict = *dictptr;
+            if (dict != NULL) {
+                Py_DECREF(dict);
+                *dictptr = NULL;
+            }
+        }
+    }
 
-	/* Extract the type again; tp_del may have changed it */
-	type = Py_TYPE(self);
+    /* Extract the type again; tp_del may have changed it */
+    type = Py_TYPE(self);
 
-	/* Call the base tp_dealloc(); first retrack self if
-	 * basedealloc knows about gc.
-	 */
-	if (PyType_IS_GC(base))
-		_PyObject_GC_TRACK(self);
-	assert(basedealloc);
-	basedealloc(self);
+    /* Call the base tp_dealloc(); first retrack self if
+     * basedealloc knows about gc.
+     */
+    if (PyType_IS_GC(base))
+        _PyObject_GC_TRACK(self);
+    assert(basedealloc);
+    basedealloc(self);
 
-	/* Can't reference self beyond this point */
-	Py_DECREF(type);
+    /* Can't reference self beyond this point */
+    Py_DECREF(type);
 
   endlabel:
-	++_PyTrash_delete_nesting;
-	Py_TRASHCAN_SAFE_END(self);
-	--_PyTrash_delete_nesting;
+    ++_PyTrash_delete_nesting;
+    Py_TRASHCAN_SAFE_END(self);
+    --_PyTrash_delete_nesting;
 
-	/* Explanation of the weirdness around the trashcan macros:
+    /* Explanation of the weirdness around the trashcan macros:
 
-	   Q. What do the trashcan macros do?
+       Q. What do the trashcan macros do?
 
-	   A. Read the comment titled "Trashcan mechanism" in object.h.
-	      For one, this explains why there must be a call to GC-untrack
-	      before the trashcan begin macro.	Without understanding the
-	      trashcan code, the answers to the following questions don't make
-	      sense.
+       A. Read the comment titled "Trashcan mechanism" in object.h.
+          For one, this explains why there must be a call to GC-untrack
+          before the trashcan begin macro.      Without understanding the
+          trashcan code, the answers to the following questions don't make
+          sense.
 
-	   Q. Why do we GC-untrack before the trashcan and then immediately
-	      GC-track again afterward?
+       Q. Why do we GC-untrack before the trashcan and then immediately
+          GC-track again afterward?
 
-	   A. In the case that the base class is GC-aware, the base class
-	      probably GC-untracks the object.	If it does that using the
-	      UNTRACK macro, this will crash when the object is already
-	      untracked.  Because we don't know what the base class does, the
-	      only safe thing is to make sure the object is tracked when we
-	      call the base class dealloc.  But...  The trashcan begin macro
-	      requires that the object is *untracked* before it is called.  So
-	      the dance becomes:
+       A. In the case that the base class is GC-aware, the base class
+          probably GC-untracks the object.      If it does that using the
+          UNTRACK macro, this will crash when the object is already
+          untracked.  Because we don't know what the base class does, the
+          only safe thing is to make sure the object is tracked when we
+          call the base class dealloc.  But...  The trashcan begin macro
+          requires that the object is *untracked* before it is called.  So
+          the dance becomes:
 
-		 GC untrack
-		 trashcan begin
-		 GC track
+         GC untrack
+         trashcan begin
+         GC track
 
-	   Q. Why did the last question say "immediately GC-track again"?
-	      It's nowhere near immediately.
+       Q. Why did the last question say "immediately GC-track again"?
+          It's nowhere near immediately.
 
-	   A. Because the code *used* to re-track immediately.	Bad Idea.
-	      self has a refcount of 0, and if gc ever gets its hands on it
-	      (which can happen if any weakref callback gets invoked), it
-	      looks like trash to gc too, and gc also tries to delete self
-	      then.  But we're already deleting self.  Double dealloction is
-	      a subtle disaster.
+       A. Because the code *used* to re-track immediately.      Bad Idea.
+          self has a refcount of 0, and if gc ever gets its hands on it
+          (which can happen if any weakref callback gets invoked), it
+          looks like trash to gc too, and gc also tries to delete self
+          then.  But we're already deleting self.  Double dealloction is
+          a subtle disaster.
 
-	   Q. Why the bizarre (net-zero) manipulation of
-	      _PyTrash_delete_nesting around the trashcan macros?
+       Q. Why the bizarre (net-zero) manipulation of
+          _PyTrash_delete_nesting around the trashcan macros?
 
-	   A. Some base classes (e.g. list) also use the trashcan mechanism.
-	      The following scenario used to be possible:
+       A. Some base classes (e.g. list) also use the trashcan mechanism.
+          The following scenario used to be possible:
 
-	      - suppose the trashcan level is one below the trashcan limit
+          - suppose the trashcan level is one below the trashcan limit
 
-	      - subtype_dealloc() is called
+          - subtype_dealloc() is called
 
-	      - the trashcan limit is not yet reached, so the trashcan level
-		is incremented and the code between trashcan begin and end is
-		executed
+          - the trashcan limit is not yet reached, so the trashcan level
+        is incremented and the code between trashcan begin and end is
+        executed
 
-	      - this destroys much of the object's contents, including its
-		slots and __dict__
+          - this destroys much of the object's contents, including its
+        slots and __dict__
 
-	      - basedealloc() is called; this is really list_dealloc(), or
-		some other type which also uses the trashcan macros
+          - basedealloc() is called; this is really list_dealloc(), or
+        some other type which also uses the trashcan macros
 
-	      - the trashcan limit is now reached, so the object is put on the
-		trashcan's to-be-deleted-later list
+          - the trashcan limit is now reached, so the object is put on the
+        trashcan's to-be-deleted-later list
 
-	      - basedealloc() returns
+          - basedealloc() returns
 
-	      - subtype_dealloc() decrefs the object's type
+          - subtype_dealloc() decrefs the object's type
 
-	      - subtype_dealloc() returns
+          - subtype_dealloc() returns
 
-	      - later, the trashcan code starts deleting the objects from its
-		to-be-deleted-later list
+          - later, the trashcan code starts deleting the objects from its
+        to-be-deleted-later list
 
-	      - subtype_dealloc() is called *AGAIN* for the same object
+          - subtype_dealloc() is called *AGAIN* for the same object
 
-	      - at the very least (if the destroyed slots and __dict__ don't
-		cause problems) the object's type gets decref'ed a second
-		time, which is *BAD*!!!
+          - at the very least (if the destroyed slots and __dict__ don't
+        cause problems) the object's type gets decref'ed a second
+        time, which is *BAD*!!!
 
-	      The remedy is to make sure that if the code between trashcan
-	      begin and end in subtype_dealloc() is called, the code between
-	      trashcan begin and end in basedealloc() will also be called.
-	      This is done by decrementing the level after passing into the
-	      trashcan block, and incrementing it just before leaving the
-	      block.
+          The remedy is to make sure that if the code between trashcan
+          begin and end in subtype_dealloc() is called, the code between
+          trashcan begin and end in basedealloc() will also be called.
+          This is done by decrementing the level after passing into the
+          trashcan block, and incrementing it just before leaving the
+          block.
 
-	      But now it's possible that a chain of objects consisting solely
-	      of objects whose deallocator is subtype_dealloc() will defeat
-	      the trashcan mechanism completely: the decremented level means
-	      that the effective level never reaches the limit.	 Therefore, we
-	      *increment* the level *before* entering the trashcan block, and
-	      matchingly decrement it after leaving.  This means the trashcan
-	      code will trigger a little early, but that's no big deal.
+          But now it's possible that a chain of objects consisting solely
+          of objects whose deallocator is subtype_dealloc() will defeat
+          the trashcan mechanism completely: the decremented level means
+          that the effective level never reaches the limit.      Therefore, we
+          *increment* the level *before* entering the trashcan block, and
+          matchingly decrement it after leaving.  This means the trashcan
+          code will trigger a little early, but that's no big deal.
 
-	   Q. Are there any live examples of code in need of all this
-	      complexity?
+       Q. Are there any live examples of code in need of all this
+          complexity?
 
-	   A. Yes.  See SF bug 668433 for code that crashed (when Python was
-	      compiled in debug mode) before the trashcan level manipulations
-	      were added.  For more discussion, see SF patches 581742, 575073
-	      and bug 574207.
-	*/
+       A. Yes.  See SF bug 668433 for code that crashed (when Python was
+          compiled in debug mode) before the trashcan level manipulations
+          were added.  For more discussion, see SF patches 581742, 575073
+          and bug 574207.
+    */
 }
 
 static PyTypeObject *solid_base(PyTypeObject *type);
@@ -1115,39 +1115,39 @@
 int
 PyType_IsSubtype(PyTypeObject *a, PyTypeObject *b)
 {
-	PyObject *mro;
+    PyObject *mro;
 
-	if (!(a->tp_flags & Py_TPFLAGS_HAVE_CLASS))
-		return b == a || b == &PyBaseObject_Type;
+    if (!(a->tp_flags & Py_TPFLAGS_HAVE_CLASS))
+        return b == a || b == &PyBaseObject_Type;
 
-	mro = a->tp_mro;
-	if (mro != NULL) {
-		/* Deal with multiple inheritance without recursion
-		   by walking the MRO tuple */
-		Py_ssize_t i, n;
-		assert(PyTuple_Check(mro));
-		n = PyTuple_GET_SIZE(mro);
-		for (i = 0; i < n; i++) {
-			if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
-				return 1;
-		}
-		return 0;
-	}
-	else {
-		/* a is not completely initilized yet; follow tp_base */
-		do {
-			if (a == b)
-				return 1;
-			a = a->tp_base;
-		} while (a != NULL);
-		return b == &PyBaseObject_Type;
-	}
+    mro = a->tp_mro;
+    if (mro != NULL) {
+        /* Deal with multiple inheritance without recursion
+           by walking the MRO tuple */
+        Py_ssize_t i, n;
+        assert(PyTuple_Check(mro));
+        n = PyTuple_GET_SIZE(mro);
+        for (i = 0; i < n; i++) {
+            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
+                return 1;
+        }
+        return 0;
+    }
+    else {
+        /* a is not completely initilized yet; follow tp_base */
+        do {
+            if (a == b)
+                return 1;
+            a = a->tp_base;
+        } while (a != NULL);
+        return b == &PyBaseObject_Type;
+    }
 }
 
 /* Internal routines to do a method lookup in the type
    without looking in the instance dictionary
    (so we can't use PyObject_GetAttr) but still binding
-   it to the instance.	The arguments are the object,
+   it to the instance.  The arguments are the object,
    the method name as a C string, and the address of a
    static variable used to cache the interned Python string.
 
@@ -1164,76 +1164,76 @@
 static PyObject *
 lookup_maybe(PyObject *self, char *attrstr, PyObject **attrobj)
 {
-	PyObject *res;
+    PyObject *res;
 
-	if (*attrobj == NULL) {
-		*attrobj = PyString_InternFromString(attrstr);
-		if (*attrobj == NULL)
-			return NULL;
-	}
-	res = _PyType_Lookup(Py_TYPE(self), *attrobj);
-	if (res != NULL) {
-		descrgetfunc f;
-		if ((f = Py_TYPE(res)->tp_descr_get) == NULL)
-			Py_INCREF(res);
-		else
-			res = f(res, self, (PyObject *)(Py_TYPE(self)));
-	}
-	return res;
+    if (*attrobj == NULL) {
+        *attrobj = PyString_InternFromString(attrstr);
+        if (*attrobj == NULL)
+            return NULL;
+    }
+    res = _PyType_Lookup(Py_TYPE(self), *attrobj);
+    if (res != NULL) {
+        descrgetfunc f;
+        if ((f = Py_TYPE(res)->tp_descr_get) == NULL)
+            Py_INCREF(res);
+        else
+            res = f(res, self, (PyObject *)(Py_TYPE(self)));
+    }
+    return res;
 }
 
 static PyObject *
 lookup_method(PyObject *self, char *attrstr, PyObject **attrobj)
 {
-	PyObject *res = lookup_maybe(self, attrstr, attrobj);
-	if (res == NULL && !PyErr_Occurred())
-		PyErr_SetObject(PyExc_AttributeError, *attrobj);
-	return res;
+    PyObject *res = lookup_maybe(self, attrstr, attrobj);
+    if (res == NULL && !PyErr_Occurred())
+        PyErr_SetObject(PyExc_AttributeError, *attrobj);
+    return res;
 }
 
 PyObject *
 _PyObject_LookupSpecial(PyObject *self, char *attrstr, PyObject **attrobj)
 {
-	assert(!PyInstance_Check(self));
-	return lookup_maybe(self, attrstr, attrobj);
+    assert(!PyInstance_Check(self));
+    return lookup_maybe(self, attrstr, attrobj);
 }
 
 /* A variation of PyObject_CallMethod that uses lookup_method()
-   instead of PyObject_GetAttrString().	 This uses the same convention
+   instead of PyObject_GetAttrString().  This uses the same convention
    as lookup_method to cache the interned name string object. */
 
 static PyObject *
 call_method(PyObject *o, char *name, PyObject **nameobj, char *format, ...)
 {
-	va_list va;
-	PyObject *args, *func = 0, *retval;
-	va_start(va, format);
+    va_list va;
+    PyObject *args, *func = 0, *retval;
+    va_start(va, format);
 
-	func = lookup_maybe(o, name, nameobj);
-	if (func == NULL) {
-		va_end(va);
-		if (!PyErr_Occurred())
-			PyErr_SetObject(PyExc_AttributeError, *nameobj);
-		return NULL;
-	}
+    func = lookup_maybe(o, name, nameobj);
+    if (func == NULL) {
+        va_end(va);
+        if (!PyErr_Occurred())
+            PyErr_SetObject(PyExc_AttributeError, *nameobj);
+        return NULL;
+    }
 
-	if (format && *format)
-		args = Py_VaBuildValue(format, va);
-	else
-		args = PyTuple_New(0);
+    if (format && *format)
+        args = Py_VaBuildValue(format, va);
+    else
+        args = PyTuple_New(0);
 
-	va_end(va);
+    va_end(va);
 
-	if (args == NULL)
-		return NULL;
+    if (args == NULL)
+        return NULL;
 
-	assert(PyTuple_Check(args));
-	retval = PyObject_Call(func, args, NULL);
+    assert(PyTuple_Check(args));
+    retval = PyObject_Call(func, args, NULL);
 
-	Py_DECREF(args);
-	Py_DECREF(func);
+    Py_DECREF(args);
+    Py_DECREF(func);
 
-	return retval;
+    return retval;
 }
 
 /* Clone of call_method() that returns NotImplemented when the lookup fails. */
@@ -1241,78 +1241,78 @@
 static PyObject *
 call_maybe(PyObject *o, char *name, PyObject **nameobj, char *format, ...)
 {
-	va_list va;
-	PyObject *args, *func = 0, *retval;
-	va_start(va, format);
+    va_list va;
+    PyObject *args, *func = 0, *retval;
+    va_start(va, format);
 
-	func = lookup_maybe(o, name, nameobj);
-	if (func == NULL) {
-		va_end(va);
-		if (!PyErr_Occurred()) {
-			Py_INCREF(Py_NotImplemented);
-			return Py_NotImplemented;
-		}
-		return NULL;
-	}
+    func = lookup_maybe(o, name, nameobj);
+    if (func == NULL) {
+        va_end(va);
+        if (!PyErr_Occurred()) {
+            Py_INCREF(Py_NotImplemented);
+            return Py_NotImplemented;
+        }
+        return NULL;
+    }
 
-	if (format && *format)
-		args = Py_VaBuildValue(format, va);
-	else
-		args = PyTuple_New(0);
+    if (format && *format)
+        args = Py_VaBuildValue(format, va);
+    else
+        args = PyTuple_New(0);
 
-	va_end(va);
+    va_end(va);
 
-	if (args == NULL)
-		return NULL;
+    if (args == NULL)
+        return NULL;
 
-	assert(PyTuple_Check(args));
-	retval = PyObject_Call(func, args, NULL);
+    assert(PyTuple_Check(args));
+    retval = PyObject_Call(func, args, NULL);
 
-	Py_DECREF(args);
-	Py_DECREF(func);
+    Py_DECREF(args);
+    Py_DECREF(func);
 
-	return retval;
+    return retval;
 }
 
 static int
 fill_classic_mro(PyObject *mro, PyObject *cls)
 {
-	PyObject *bases, *base;
-	Py_ssize_t i, n;
+    PyObject *bases, *base;
+    Py_ssize_t i, n;
 
-	assert(PyList_Check(mro));
-	assert(PyClass_Check(cls));
-	i = PySequence_Contains(mro, cls);
-	if (i < 0)
-		return -1;
-	if (!i) {
-		if (PyList_Append(mro, cls) < 0)
-			return -1;
-	}
-	bases = ((PyClassObject *)cls)->cl_bases;
-	assert(bases && PyTuple_Check(bases));
-	n = PyTuple_GET_SIZE(bases);
-	for (i = 0; i < n; i++) {
-		base = PyTuple_GET_ITEM(bases, i);
-		if (fill_classic_mro(mro, base) < 0)
-			return -1;
-	}
-	return 0;
+    assert(PyList_Check(mro));
+    assert(PyClass_Check(cls));
+    i = PySequence_Contains(mro, cls);
+    if (i < 0)
+        return -1;
+    if (!i) {
+        if (PyList_Append(mro, cls) < 0)
+            return -1;
+    }
+    bases = ((PyClassObject *)cls)->cl_bases;
+    assert(bases && PyTuple_Check(bases));
+    n = PyTuple_GET_SIZE(bases);
+    for (i = 0; i < n; i++) {
+        base = PyTuple_GET_ITEM(bases, i);
+        if (fill_classic_mro(mro, base) < 0)
+            return -1;
+    }
+    return 0;
 }
 
 static PyObject *
 classic_mro(PyObject *cls)
 {
-	PyObject *mro;
+    PyObject *mro;
 
-	assert(PyClass_Check(cls));
-	mro = PyList_New(0);
-	if (mro != NULL) {
-		if (fill_classic_mro(mro, cls) == 0)
-			return mro;
-		Py_DECREF(mro);
-	}
-	return NULL;
+    assert(PyClass_Check(cls));
+    mro = PyList_New(0);
+    if (mro != NULL) {
+        if (fill_classic_mro(mro, cls) == 0)
+            return mro;
+        Py_DECREF(mro);
+    }
+    return NULL;
 }
 
 /*
@@ -1345,63 +1345,63 @@
 
 static int
 tail_contains(PyObject *list, int whence, PyObject *o) {
-	Py_ssize_t j, size;
-	size = PyList_GET_SIZE(list);
+    Py_ssize_t j, size;
+    size = PyList_GET_SIZE(list);
 
-	for (j = whence+1; j < size; j++) {
-		if (PyList_GET_ITEM(list, j) == o)
-			return 1;
-	}
-	return 0;
+    for (j = whence+1; j < size; j++) {
+        if (PyList_GET_ITEM(list, j) == o)
+            return 1;
+    }
+    return 0;
 }
 
 static PyObject *
 class_name(PyObject *cls)
 {
-	PyObject *name = PyObject_GetAttrString(cls, "__name__");
-	if (name == NULL) {
-		PyErr_Clear();
-		Py_XDECREF(name);
-		name = PyObject_Repr(cls);
-	}
-	if (name == NULL)
-		return NULL;
-	if (!PyString_Check(name)) {
-		Py_DECREF(name);
-		return NULL;
-	}
-	return name;
+    PyObject *name = PyObject_GetAttrString(cls, "__name__");
+    if (name == NULL) {
+        PyErr_Clear();
+        Py_XDECREF(name);
+        name = PyObject_Repr(cls);
+    }
+    if (name == NULL)
+        return NULL;
+    if (!PyString_Check(name)) {
+        Py_DECREF(name);
+        return NULL;
+    }
+    return name;
 }
 
 static int
 check_duplicates(PyObject *list)
 {
-	Py_ssize_t i, j, n;
-	/* Let's use a quadratic time algorithm,
-	   assuming that the bases lists is short.
-	*/
-	n = PyList_GET_SIZE(list);
-	for (i = 0; i < n; i++) {
-		PyObject *o = PyList_GET_ITEM(list, i);
-		for (j = i + 1; j < n; j++) {
-			if (PyList_GET_ITEM(list, j) == o) {
-				o = class_name(o);
-				PyErr_Format(PyExc_TypeError,
-					     "duplicate base class %s",
-					     o ? PyString_AS_STRING(o) : "?");
-				Py_XDECREF(o);
-				return -1;
-			}
-		}
-	}
-	return 0;
+    Py_ssize_t i, j, n;
+    /* Let's use a quadratic time algorithm,
+       assuming that the bases lists is short.
+    */
+    n = PyList_GET_SIZE(list);
+    for (i = 0; i < n; i++) {
+        PyObject *o = PyList_GET_ITEM(list, i);
+        for (j = i + 1; j < n; j++) {
+            if (PyList_GET_ITEM(list, j) == o) {
+                o = class_name(o);
+                PyErr_Format(PyExc_TypeError,
+                             "duplicate base class %s",
+                             o ? PyString_AS_STRING(o) : "?");
+                Py_XDECREF(o);
+                return -1;
+            }
+        }
+    }
+    return 0;
 }
 
 /* Raise a TypeError for an MRO order disagreement.
 
    It's hard to produce a good error message.  In the absence of better
    insight into error reporting, report the classes that were candidates
-   to be put next into the MRO.	 There is some conflict between the
+   to be put next into the MRO.  There is some conflict between the
    order in which they should be put in the MRO, but it's hard to
    diagnose what constraint can't be satisfied.
 */
@@ -1409,258 +1409,258 @@
 static void
 set_mro_error(PyObject *to_merge, int *remain)
 {
-	Py_ssize_t i, n, off, to_merge_size;
-	char buf[1000];
-	PyObject *k, *v;
-	PyObject *set = PyDict_New();
-	if (!set) return;
+    Py_ssize_t i, n, off, to_merge_size;
+    char buf[1000];
+    PyObject *k, *v;
+    PyObject *set = PyDict_New();
+    if (!set) return;
 
-	to_merge_size = PyList_GET_SIZE(to_merge);
-	for (i = 0; i < to_merge_size; i++) {
-		PyObject *L = PyList_GET_ITEM(to_merge, i);
-		if (remain[i] < PyList_GET_SIZE(L)) {
-			PyObject *c = PyList_GET_ITEM(L, remain[i]);
-			if (PyDict_SetItem(set, c, Py_None) < 0) {
-				Py_DECREF(set);
-				return;
-			}
-		}
-	}
-	n = PyDict_Size(set);
+    to_merge_size = PyList_GET_SIZE(to_merge);
+    for (i = 0; i < to_merge_size; i++) {
+        PyObject *L = PyList_GET_ITEM(to_merge, i);
+        if (remain[i] < PyList_GET_SIZE(L)) {
+            PyObject *c = PyList_GET_ITEM(L, remain[i]);
+            if (PyDict_SetItem(set, c, Py_None) < 0) {
+                Py_DECREF(set);
+                return;
+            }
+        }
+    }
+    n = PyDict_Size(set);
 
-	off = PyOS_snprintf(buf, sizeof(buf), "Cannot create a \
+    off = PyOS_snprintf(buf, sizeof(buf), "Cannot create a \
 consistent method resolution\norder (MRO) for bases");
-	i = 0;
-	while (PyDict_Next(set, &i, &k, &v) && (size_t)off < sizeof(buf)) {
-		PyObject *name = class_name(k);
-		off += PyOS_snprintf(buf + off, sizeof(buf) - off, " %s",
-				     name ? PyString_AS_STRING(name) : "?");
-		Py_XDECREF(name);
-		if (--n && (size_t)(off+1) < sizeof(buf)) {
-			buf[off++] = ',';
-			buf[off] = '\0';
-		}
-	}
-	PyErr_SetString(PyExc_TypeError, buf);
-	Py_DECREF(set);
+    i = 0;
+    while (PyDict_Next(set, &i, &k, &v) && (size_t)off < sizeof(buf)) {
+        PyObject *name = class_name(k);
+        off += PyOS_snprintf(buf + off, sizeof(buf) - off, " %s",
+                             name ? PyString_AS_STRING(name) : "?");
+        Py_XDECREF(name);
+        if (--n && (size_t)(off+1) < sizeof(buf)) {
+            buf[off++] = ',';
+            buf[off] = '\0';
+        }
+    }
+    PyErr_SetString(PyExc_TypeError, buf);
+    Py_DECREF(set);
 }
 
 static int
 pmerge(PyObject *acc, PyObject* to_merge) {
-	Py_ssize_t i, j, to_merge_size, empty_cnt;
-	int *remain;
-	int ok;
+    Py_ssize_t i, j, to_merge_size, empty_cnt;
+    int *remain;
+    int ok;
 
-	to_merge_size = PyList_GET_SIZE(to_merge);
+    to_merge_size = PyList_GET_SIZE(to_merge);
 
-	/* remain stores an index into each sublist of to_merge.
-	   remain[i] is the index of the next base in to_merge[i]
-	   that is not included in acc.
-	*/
-	remain = (int *)PyMem_MALLOC(SIZEOF_INT*to_merge_size);
-	if (remain == NULL)
-		return -1;
-	for (i = 0; i < to_merge_size; i++)
-		remain[i] = 0;
+    /* remain stores an index into each sublist of to_merge.
+       remain[i] is the index of the next base in to_merge[i]
+       that is not included in acc.
+    */
+    remain = (int *)PyMem_MALLOC(SIZEOF_INT*to_merge_size);
+    if (remain == NULL)
+        return -1;
+    for (i = 0; i < to_merge_size; i++)
+        remain[i] = 0;
 
   again:
-	empty_cnt = 0;
-	for (i = 0; i < to_merge_size; i++) {
-		PyObject *candidate;
+    empty_cnt = 0;
+    for (i = 0; i < to_merge_size; i++) {
+        PyObject *candidate;
 
-		PyObject *cur_list = PyList_GET_ITEM(to_merge, i);
+        PyObject *cur_list = PyList_GET_ITEM(to_merge, i);
 
-		if (remain[i] >= PyList_GET_SIZE(cur_list)) {
-			empty_cnt++;
-			continue;
-		}
+        if (remain[i] >= PyList_GET_SIZE(cur_list)) {
+            empty_cnt++;
+            continue;
+        }
 
-		/* Choose next candidate for MRO.
+        /* Choose next candidate for MRO.
 
-		   The input sequences alone can determine the choice.
-		   If not, choose the class which appears in the MRO
-		   of the earliest direct superclass of the new class.
-		*/
+           The input sequences alone can determine the choice.
+           If not, choose the class which appears in the MRO
+           of the earliest direct superclass of the new class.
+        */
 
-		candidate = PyList_GET_ITEM(cur_list, remain[i]);
-		for (j = 0; j < to_merge_size; j++) {
-			PyObject *j_lst = PyList_GET_ITEM(to_merge, j);
-			if (tail_contains(j_lst, remain[j], candidate)) {
-				goto skip; /* continue outer loop */
-			}
-		}
-		ok = PyList_Append(acc, candidate);
-		if (ok < 0) {
-			PyMem_Free(remain);
-			return -1;
-		}
-		for (j = 0; j < to_merge_size; j++) {
-			PyObject *j_lst = PyList_GET_ITEM(to_merge, j);
-			if (remain[j] < PyList_GET_SIZE(j_lst) &&
-			    PyList_GET_ITEM(j_lst, remain[j]) == candidate) {
-				remain[j]++;
-			}
-		}
-		goto again;
-	  skip: ;
-	}
+        candidate = PyList_GET_ITEM(cur_list, remain[i]);
+        for (j = 0; j < to_merge_size; j++) {
+            PyObject *j_lst = PyList_GET_ITEM(to_merge, j);
+            if (tail_contains(j_lst, remain[j], candidate)) {
+                goto skip; /* continue outer loop */
+            }
+        }
+        ok = PyList_Append(acc, candidate);
+        if (ok < 0) {
+            PyMem_Free(remain);
+            return -1;
+        }
+        for (j = 0; j < to_merge_size; j++) {
+            PyObject *j_lst = PyList_GET_ITEM(to_merge, j);
+            if (remain[j] < PyList_GET_SIZE(j_lst) &&
+                PyList_GET_ITEM(j_lst, remain[j]) == candidate) {
+                remain[j]++;
+            }
+        }
+        goto again;
+      skip: ;
+    }
 
-	if (empty_cnt == to_merge_size) {
-		PyMem_FREE(remain);
-		return 0;
-	}
-	set_mro_error(to_merge, remain);
-	PyMem_FREE(remain);
-	return -1;
+    if (empty_cnt == to_merge_size) {
+        PyMem_FREE(remain);
+        return 0;
+    }
+    set_mro_error(to_merge, remain);
+    PyMem_FREE(remain);
+    return -1;
 }
 
 static PyObject *
 mro_implementation(PyTypeObject *type)
 {
-	Py_ssize_t i, n;
-	int ok;
-	PyObject *bases, *result;
-	PyObject *to_merge, *bases_aslist;
+    Py_ssize_t i, n;
+    int ok;
+    PyObject *bases, *result;
+    PyObject *to_merge, *bases_aslist;
 
-	if (type->tp_dict == NULL) {
-		if (PyType_Ready(type) < 0)
-			return NULL;
-	}
+    if (type->tp_dict == NULL) {
+        if (PyType_Ready(type) < 0)
+            return NULL;
+    }
 
-	/* Find a superclass linearization that honors the constraints
-	   of the explicit lists of bases and the constraints implied by
-	   each base class.
+    /* Find a superclass linearization that honors the constraints
+       of the explicit lists of bases and the constraints implied by
+       each base class.
 
-	   to_merge is a list of lists, where each list is a superclass
-	   linearization implied by a base class.  The last element of
-	   to_merge is the declared list of bases.
-	*/
+       to_merge is a list of lists, where each list is a superclass
+       linearization implied by a base class.  The last element of
+       to_merge is the declared list of bases.
+    */
 
-	bases = type->tp_bases;
-	n = PyTuple_GET_SIZE(bases);
+    bases = type->tp_bases;
+    n = PyTuple_GET_SIZE(bases);
 
-	to_merge = PyList_New(n+1);
-	if (to_merge == NULL)
-		return NULL;
+    to_merge = PyList_New(n+1);
+    if (to_merge == NULL)
+        return NULL;
 
-	for (i = 0; i < n; i++) {
-		PyObject *base = PyTuple_GET_ITEM(bases, i);
-		PyObject *parentMRO;
-		if (PyType_Check(base))
-			parentMRO = PySequence_List(
-				((PyTypeObject*)base)->tp_mro);
-		else
-			parentMRO = classic_mro(base);
-		if (parentMRO == NULL) {
-			Py_DECREF(to_merge);
-			return NULL;
-		}
+    for (i = 0; i < n; i++) {
+        PyObject *base = PyTuple_GET_ITEM(bases, i);
+        PyObject *parentMRO;
+        if (PyType_Check(base))
+            parentMRO = PySequence_List(
+                ((PyTypeObject*)base)->tp_mro);
+        else
+            parentMRO = classic_mro(base);
+        if (parentMRO == NULL) {
+            Py_DECREF(to_merge);
+            return NULL;
+        }
 
-		PyList_SET_ITEM(to_merge, i, parentMRO);
-	}
+        PyList_SET_ITEM(to_merge, i, parentMRO);
+    }
 
-	bases_aslist = PySequence_List(bases);
-	if (bases_aslist == NULL) {
-		Py_DECREF(to_merge);
-		return NULL;
-	}
-	/* This is just a basic sanity check. */
-	if (check_duplicates(bases_aslist) < 0) {
-		Py_DECREF(to_merge);
-		Py_DECREF(bases_aslist);
-		return NULL;
-	}
-	PyList_SET_ITEM(to_merge, n, bases_aslist);
+    bases_aslist = PySequence_List(bases);
+    if (bases_aslist == NULL) {
+        Py_DECREF(to_merge);
+        return NULL;
+    }
+    /* This is just a basic sanity check. */
+    if (check_duplicates(bases_aslist) < 0) {
+        Py_DECREF(to_merge);
+        Py_DECREF(bases_aslist);
+        return NULL;
+    }
+    PyList_SET_ITEM(to_merge, n, bases_aslist);
 
-	result = Py_BuildValue("[O]", (PyObject *)type);
-	if (result == NULL) {
-		Py_DECREF(to_merge);
-		return NULL;
-	}
+    result = Py_BuildValue("[O]", (PyObject *)type);
+    if (result == NULL) {
+        Py_DECREF(to_merge);
+        return NULL;
+    }
 
-	ok = pmerge(result, to_merge);
-	Py_DECREF(to_merge);
-	if (ok < 0) {
-		Py_DECREF(result);
-		return NULL;
-	}
+    ok = pmerge(result, to_merge);
+    Py_DECREF(to_merge);
+    if (ok < 0) {
+        Py_DECREF(result);
+        return NULL;
+    }
 
-	return result;
+    return result;
 }
 
 static PyObject *
 mro_external(PyObject *self)
 {
-	PyTypeObject *type = (PyTypeObject *)self;
+    PyTypeObject *type = (PyTypeObject *)self;
 
-	return mro_implementation(type);
+    return mro_implementation(type);
 }
 
 static int
 mro_internal(PyTypeObject *type)
 {
-	PyObject *mro, *result, *tuple;
-	int checkit = 0;
+    PyObject *mro, *result, *tuple;
+    int checkit = 0;
 
-	if (Py_TYPE(type) == &PyType_Type) {
-		result = mro_implementation(type);
-	}
-	else {
-		static PyObject *mro_str;
-		checkit = 1;
-		mro = lookup_method((PyObject *)type, "mro", &mro_str);
-		if (mro == NULL)
-			return -1;
-		result = PyObject_CallObject(mro, NULL);
-		Py_DECREF(mro);
-	}
-	if (result == NULL)
-		return -1;
-	tuple = PySequence_Tuple(result);
-	Py_DECREF(result);
-	if (tuple == NULL)
-		return -1;
-	if (checkit) {
-		Py_ssize_t i, len;
-		PyObject *cls;
-		PyTypeObject *solid;
+    if (Py_TYPE(type) == &PyType_Type) {
+        result = mro_implementation(type);
+    }
+    else {
+        static PyObject *mro_str;
+        checkit = 1;
+        mro = lookup_method((PyObject *)type, "mro", &mro_str);
+        if (mro == NULL)
+            return -1;
+        result = PyObject_CallObject(mro, NULL);
+        Py_DECREF(mro);
+    }
+    if (result == NULL)
+        return -1;
+    tuple = PySequence_Tuple(result);
+    Py_DECREF(result);
+    if (tuple == NULL)
+        return -1;
+    if (checkit) {
+        Py_ssize_t i, len;
+        PyObject *cls;
+        PyTypeObject *solid;
 
-		solid = solid_base(type);
+        solid = solid_base(type);
 
-		len = PyTuple_GET_SIZE(tuple);
+        len = PyTuple_GET_SIZE(tuple);
 
-		for (i = 0; i < len; i++) {
-			PyTypeObject *t;
-			cls = PyTuple_GET_ITEM(tuple, i);
-			if (PyClass_Check(cls)) 
-				continue;
-			else if (!PyType_Check(cls)) {
-				PyErr_Format(PyExc_TypeError,
-			     "mro() returned a non-class ('%.500s')",
-					     Py_TYPE(cls)->tp_name);
-				Py_DECREF(tuple);
-				return -1;
-			}
-			t = (PyTypeObject*)cls;
-			if (!PyType_IsSubtype(solid, solid_base(t))) {
-				PyErr_Format(PyExc_TypeError,
-		     "mro() returned base with unsuitable layout ('%.500s')",
-					     t->tp_name);
-				Py_DECREF(tuple);
-				return -1;
-			}
-		}
-	}
-	type->tp_mro = tuple;
+        for (i = 0; i < len; i++) {
+            PyTypeObject *t;
+            cls = PyTuple_GET_ITEM(tuple, i);
+            if (PyClass_Check(cls))
+                continue;
+            else if (!PyType_Check(cls)) {
+                PyErr_Format(PyExc_TypeError,
+                 "mro() returned a non-class ('%.500s')",
+                                 Py_TYPE(cls)->tp_name);
+                Py_DECREF(tuple);
+                return -1;
+            }
+            t = (PyTypeObject*)cls;
+            if (!PyType_IsSubtype(solid, solid_base(t))) {
+                PyErr_Format(PyExc_TypeError,
+             "mro() returned base with unsuitable layout ('%.500s')",
+                                     t->tp_name);
+                        Py_DECREF(tuple);
+                        return -1;
+            }
+        }
+    }
+    type->tp_mro = tuple;
 
-	type_mro_modified(type, type->tp_mro);
-	/* corner case: the old-style super class might have been hidden
-	   from the custom MRO */
-	type_mro_modified(type, type->tp_bases);
+    type_mro_modified(type, type->tp_mro);
+    /* corner case: the old-style super class might have been hidden
+       from the custom MRO */
+    type_mro_modified(type, type->tp_bases);
 
-	PyType_Modified(type);
+    PyType_Modified(type);
 
-	return 0;
+    return 0;
 }
 
 
@@ -1670,92 +1670,92 @@
 static PyTypeObject *
 best_base(PyObject *bases)
 {
-	Py_ssize_t i, n;
-	PyTypeObject *base, *winner, *candidate, *base_i;
-	PyObject *base_proto;
+    Py_ssize_t i, n;
+    PyTypeObject *base, *winner, *candidate, *base_i;
+    PyObject *base_proto;
 
-	assert(PyTuple_Check(bases));
-	n = PyTuple_GET_SIZE(bases);
-	assert(n > 0);
-	base = NULL;
-	winner = NULL;
-	for (i = 0; i < n; i++) {
-		base_proto = PyTuple_GET_ITEM(bases, i);
-		if (PyClass_Check(base_proto))
-			continue;
-		if (!PyType_Check(base_proto)) {
-			PyErr_SetString(
-				PyExc_TypeError,
-				"bases must be types");
-			return NULL;
-		}
-		base_i = (PyTypeObject *)base_proto;
-		if (base_i->tp_dict == NULL) {
-			if (PyType_Ready(base_i) < 0)
-				return NULL;
-		}
-		candidate = solid_base(base_i);
-		if (winner == NULL) {
-			winner = candidate;
-			base = base_i;
-		}
-		else if (PyType_IsSubtype(winner, candidate))
-			;
-		else if (PyType_IsSubtype(candidate, winner)) {
-			winner = candidate;
-			base = base_i;
-		}
-		else {
-			PyErr_SetString(
-				PyExc_TypeError,
-				"multiple bases have "
-				"instance lay-out conflict");
-			return NULL;
-		}
-	}
-	if (base == NULL)
-		PyErr_SetString(PyExc_TypeError,
-			"a new-style class can't have only classic bases");
-	return base;
+    assert(PyTuple_Check(bases));
+    n = PyTuple_GET_SIZE(bases);
+    assert(n > 0);
+    base = NULL;
+    winner = NULL;
+    for (i = 0; i < n; i++) {
+        base_proto = PyTuple_GET_ITEM(bases, i);
+        if (PyClass_Check(base_proto))
+            continue;
+        if (!PyType_Check(base_proto)) {
+            PyErr_SetString(
+                PyExc_TypeError,
+                "bases must be types");
+            return NULL;
+        }
+        base_i = (PyTypeObject *)base_proto;
+        if (base_i->tp_dict == NULL) {
+            if (PyType_Ready(base_i) < 0)
+                return NULL;
+        }
+        candidate = solid_base(base_i);
+        if (winner == NULL) {
+            winner = candidate;
+            base = base_i;
+        }
+        else if (PyType_IsSubtype(winner, candidate))
+            ;
+        else if (PyType_IsSubtype(candidate, winner)) {
+            winner = candidate;
+            base = base_i;
+        }
+        else {
+            PyErr_SetString(
+                PyExc_TypeError,
+                "multiple bases have "
+                "instance lay-out conflict");
+            return NULL;
+        }
+    }
+    if (base == NULL)
+        PyErr_SetString(PyExc_TypeError,
+            "a new-style class can't have only classic bases");
+    return base;
 }
 
 static int
 extra_ivars(PyTypeObject *type, PyTypeObject *base)
 {
-	size_t t_size = type->tp_basicsize;
-	size_t b_size = base->tp_basicsize;
+    size_t t_size = type->tp_basicsize;
+    size_t b_size = base->tp_basicsize;
 
-	assert(t_size >= b_size); /* Else type smaller than base! */
-	if (type->tp_itemsize || base->tp_itemsize) {
-		/* If itemsize is involved, stricter rules */
-		return t_size != b_size ||
-			type->tp_itemsize != base->tp_itemsize;
-	}
-	if (type->tp_weaklistoffset && base->tp_weaklistoffset == 0 &&
-	    type->tp_weaklistoffset + sizeof(PyObject *) == t_size &&
-	    type->tp_flags & Py_TPFLAGS_HEAPTYPE)
-		t_size -= sizeof(PyObject *);
-	if (type->tp_dictoffset && base->tp_dictoffset == 0 &&
-	    type->tp_dictoffset + sizeof(PyObject *) == t_size &&
-	    type->tp_flags & Py_TPFLAGS_HEAPTYPE)
-		t_size -= sizeof(PyObject *);
+    assert(t_size >= b_size); /* Else type smaller than base! */
+    if (type->tp_itemsize || base->tp_itemsize) {
+        /* If itemsize is involved, stricter rules */
+        return t_size != b_size ||
+            type->tp_itemsize != base->tp_itemsize;
+    }
+    if (type->tp_weaklistoffset && base->tp_weaklistoffset == 0 &&
+        type->tp_weaklistoffset + sizeof(PyObject *) == t_size &&
+        type->tp_flags & Py_TPFLAGS_HEAPTYPE)
+        t_size -= sizeof(PyObject *);
+    if (type->tp_dictoffset && base->tp_dictoffset == 0 &&
+        type->tp_dictoffset + sizeof(PyObject *) == t_size &&
+        type->tp_flags & Py_TPFLAGS_HEAPTYPE)
+        t_size -= sizeof(PyObject *);
 
-	return t_size != b_size;
+    return t_size != b_size;
 }
 
 static PyTypeObject *
 solid_base(PyTypeObject *type)
 {
-	PyTypeObject *base;
+    PyTypeObject *base;
 
-	if (type->tp_base)
-		base = solid_base(type->tp_base);
-	else
-		base = &PyBaseObject_Type;
-	if (extra_ivars(type, base))
-		return type;
-	else
-		return base;
+    if (type->tp_base)
+        base = solid_base(type->tp_base);
+    else
+        base = &PyBaseObject_Type;
+    if (extra_ivars(type, base))
+        return type;
+    else
+        return base;
 }
 
 static void object_dealloc(PyObject *);
@@ -1771,191 +1771,191 @@
 static PyTypeObject *
 get_builtin_base_with_dict(PyTypeObject *type)
 {
-	while (type->tp_base != NULL) {
-		if (type->tp_dictoffset != 0 &&
-		    !(type->tp_flags & Py_TPFLAGS_HEAPTYPE))
-			return type;
-		type = type->tp_base;
-	}
-	return NULL;
+    while (type->tp_base != NULL) {
+        if (type->tp_dictoffset != 0 &&
+            !(type->tp_flags & Py_TPFLAGS_HEAPTYPE))
+            return type;
+        type = type->tp_base;
+    }
+    return NULL;
 }
 
 static PyObject *
 get_dict_descriptor(PyTypeObject *type)
 {
-	static PyObject *dict_str;
-	PyObject *descr;
+    static PyObject *dict_str;
+    PyObject *descr;
 
-	if (dict_str == NULL) {
-		dict_str = PyString_InternFromString("__dict__");
-		if (dict_str == NULL)
-			return NULL;
-	}
-	descr = _PyType_Lookup(type, dict_str);
-	if (descr == NULL || !PyDescr_IsData(descr))
-		return NULL;
+    if (dict_str == NULL) {
+        dict_str = PyString_InternFromString("__dict__");
+        if (dict_str == NULL)
+            return NULL;
+    }
+    descr = _PyType_Lookup(type, dict_str);
+    if (descr == NULL || !PyDescr_IsData(descr))
+        return NULL;
 
-	return descr;
+    return descr;
 }
 
 static void
 raise_dict_descr_error(PyObject *obj)
 {
-	PyErr_Format(PyExc_TypeError,
-		     "this __dict__ descriptor does not support "
-		     "'%.200s' objects", obj->ob_type->tp_name);
+    PyErr_Format(PyExc_TypeError,
+                 "this __dict__ descriptor does not support "
+                 "'%.200s' objects", obj->ob_type->tp_name);
 }
 
 static PyObject *
 subtype_dict(PyObject *obj, void *context)
 {
-	PyObject **dictptr;
-	PyObject *dict;
-	PyTypeObject *base;
+    PyObject **dictptr;
+    PyObject *dict;
+    PyTypeObject *base;
 
-	base = get_builtin_base_with_dict(obj->ob_type);
-	if (base != NULL) {
-		descrgetfunc func;
-		PyObject *descr = get_dict_descriptor(base);
-		if (descr == NULL) {
-			raise_dict_descr_error(obj);
-			return NULL;
-		}
-		func = descr->ob_type->tp_descr_get;
-		if (func == NULL) {
-			raise_dict_descr_error(obj);
-			return NULL;
-		}
-		return func(descr, obj, (PyObject *)(obj->ob_type));
-	}
+    base = get_builtin_base_with_dict(obj->ob_type);
+    if (base != NULL) {
+        descrgetfunc func;
+        PyObject *descr = get_dict_descriptor(base);
+        if (descr == NULL) {
+            raise_dict_descr_error(obj);
+            return NULL;
+        }
+        func = descr->ob_type->tp_descr_get;
+        if (func == NULL) {
+            raise_dict_descr_error(obj);
+            return NULL;
+        }
+        return func(descr, obj, (PyObject *)(obj->ob_type));
+    }
 
-	dictptr = _PyObject_GetDictPtr(obj);
-	if (dictptr == NULL) {
-		PyErr_SetString(PyExc_AttributeError,
-				"This object has no __dict__");
-		return NULL;
-	}
-	dict = *dictptr;
-	if (dict == NULL)
-		*dictptr = dict = PyDict_New();
-	Py_XINCREF(dict);
-	return dict;
+    dictptr = _PyObject_GetDictPtr(obj);
+    if (dictptr == NULL) {
+        PyErr_SetString(PyExc_AttributeError,
+                        "This object has no __dict__");
+        return NULL;
+    }
+    dict = *dictptr;
+    if (dict == NULL)
+        *dictptr = dict = PyDict_New();
+    Py_XINCREF(dict);
+    return dict;
 }
 
 static int
 subtype_setdict(PyObject *obj, PyObject *value, void *context)
 {
-	PyObject **dictptr;
-	PyObject *dict;
-	PyTypeObject *base;
+    PyObject **dictptr;
+    PyObject *dict;
+    PyTypeObject *base;
 
-	base = get_builtin_base_with_dict(obj->ob_type);
-	if (base != NULL) {
-		descrsetfunc func;
-		PyObject *descr = get_dict_descriptor(base);
-		if (descr == NULL) {
-			raise_dict_descr_error(obj);
-			return -1;
-		}
-		func = descr->ob_type->tp_descr_set;
-		if (func == NULL) {
-			raise_dict_descr_error(obj);
-			return -1;
-		}
-		return func(descr, obj, value);
-	}
+    base = get_builtin_base_with_dict(obj->ob_type);
+    if (base != NULL) {
+        descrsetfunc func;
+        PyObject *descr = get_dict_descriptor(base);
+        if (descr == NULL) {
+            raise_dict_descr_error(obj);
+            return -1;
+        }
+        func = descr->ob_type->tp_descr_set;
+        if (func == NULL) {
+            raise_dict_descr_error(obj);
+            return -1;
+        }
+        return func(descr, obj, value);
+    }
 
-	dictptr = _PyObject_GetDictPtr(obj);
-	if (dictptr == NULL) {
-		PyErr_SetString(PyExc_AttributeError,
-				"This object has no __dict__");
-		return -1;
-	}
-	if (value != NULL && !PyDict_Check(value)) {
-		PyErr_Format(PyExc_TypeError,
-			     "__dict__ must be set to a dictionary, "
-			     "not a '%.200s'", Py_TYPE(value)->tp_name);
-		return -1;
-	}
-	dict = *dictptr;
-	Py_XINCREF(value);
-	*dictptr = value;
-	Py_XDECREF(dict);
-	return 0;
+    dictptr = _PyObject_GetDictPtr(obj);
+    if (dictptr == NULL) {
+        PyErr_SetString(PyExc_AttributeError,
+                        "This object has no __dict__");
+        return -1;
+    }
+    if (value != NULL && !PyDict_Check(value)) {
+        PyErr_Format(PyExc_TypeError,
+                     "__dict__ must be set to a dictionary, "
+                     "not a '%.200s'", Py_TYPE(value)->tp_name);
+        return -1;
+    }
+    dict = *dictptr;
+    Py_XINCREF(value);
+    *dictptr = value;
+    Py_XDECREF(dict);
+    return 0;
 }
 
 static PyObject *
 subtype_getweakref(PyObject *obj, void *context)
 {
-	PyObject **weaklistptr;
-	PyObject *result;
+    PyObject **weaklistptr;
+    PyObject *result;
 
-	if (Py_TYPE(obj)->tp_weaklistoffset == 0) {
-		PyErr_SetString(PyExc_AttributeError,
-				"This object has no __weakref__");
-		return NULL;
-	}
-	assert(Py_TYPE(obj)->tp_weaklistoffset > 0);
-	assert(Py_TYPE(obj)->tp_weaklistoffset + sizeof(PyObject *) <=
-	       (size_t)(Py_TYPE(obj)->tp_basicsize));
-	weaklistptr = (PyObject **)
-		((char *)obj + Py_TYPE(obj)->tp_weaklistoffset);
-	if (*weaklistptr == NULL)
-		result = Py_None;
-	else
-		result = *weaklistptr;
-	Py_INCREF(result);
-	return result;
+    if (Py_TYPE(obj)->tp_weaklistoffset == 0) {
+        PyErr_SetString(PyExc_AttributeError,
+                        "This object has no __weakref__");
+        return NULL;
+    }
+    assert(Py_TYPE(obj)->tp_weaklistoffset > 0);
+    assert(Py_TYPE(obj)->tp_weaklistoffset + sizeof(PyObject *) <=
+           (size_t)(Py_TYPE(obj)->tp_basicsize));
+    weaklistptr = (PyObject **)
+        ((char *)obj + Py_TYPE(obj)->tp_weaklistoffset);
+    if (*weaklistptr == NULL)
+        result = Py_None;
+    else
+        result = *weaklistptr;
+    Py_INCREF(result);
+    return result;
 }
 
 /* Three variants on the subtype_getsets list. */
 
 static PyGetSetDef subtype_getsets_full[] = {
-	{"__dict__", subtype_dict, subtype_setdict,
-	 PyDoc_STR("dictionary for instance variables (if defined)")},
-	{"__weakref__", subtype_getweakref, NULL,
-	 PyDoc_STR("list of weak references to the object (if defined)")},
-	{0}
+    {"__dict__", subtype_dict, subtype_setdict,
+     PyDoc_STR("dictionary for instance variables (if defined)")},
+    {"__weakref__", subtype_getweakref, NULL,
+     PyDoc_STR("list of weak references to the object (if defined)")},
+    {0}
 };
 
 static PyGetSetDef subtype_getsets_dict_only[] = {
-	{"__dict__", subtype_dict, subtype_setdict,
-	 PyDoc_STR("dictionary for instance variables (if defined)")},
-	{0}
+    {"__dict__", subtype_dict, subtype_setdict,
+     PyDoc_STR("dictionary for instance variables (if defined)")},
+    {0}
 };
 
 static PyGetSetDef subtype_getsets_weakref_only[] = {
-	{"__weakref__", subtype_getweakref, NULL,
-	 PyDoc_STR("list of weak references to the object (if defined)")},
-	{0}
+    {"__weakref__", subtype_getweakref, NULL,
+     PyDoc_STR("list of weak references to the object (if defined)")},
+    {0}
 };
 
 static int
 valid_identifier(PyObject *s)
 {
-	unsigned char *p;
-	Py_ssize_t i, n;
+    unsigned char *p;
+    Py_ssize_t i, n;
 
-	if (!PyString_Check(s)) {
-		PyErr_Format(PyExc_TypeError,
-			     "__slots__ items must be strings, not '%.200s'",
-			     Py_TYPE(s)->tp_name);
-		return 0;
-	}
-	p = (unsigned char *) PyString_AS_STRING(s);
-	n = PyString_GET_SIZE(s);
-	/* We must reject an empty name.  As a hack, we bump the
-	   length to 1 so that the loop will balk on the trailing \0. */
-	if (n == 0)
-		n = 1;
-	for (i = 0; i < n; i++, p++) {
-		if (!(i == 0 ? isalpha(*p) : isalnum(*p)) && *p != '_') {
-			PyErr_SetString(PyExc_TypeError,
-					"__slots__ must be identifiers");
-			return 0;
-		}
-	}
-	return 1;
+    if (!PyString_Check(s)) {
+        PyErr_Format(PyExc_TypeError,
+                     "__slots__ items must be strings, not '%.200s'",
+                     Py_TYPE(s)->tp_name);
+        return 0;
+    }
+    p = (unsigned char *) PyString_AS_STRING(s);
+    n = PyString_GET_SIZE(s);
+    /* We must reject an empty name.  As a hack, we bump the
+       length to 1 so that the loop will balk on the trailing \0. */
+    if (n == 0)
+        n = 1;
+    for (i = 0; i < n; i++, p++) {
+        if (!(i == 0 ? isalpha(*p) : isalnum(*p)) && *p != '_') {
+            PyErr_SetString(PyExc_TypeError,
+                            "__slots__ must be identifiers");
+            return 0;
+        }
+    }
+    return 1;
 }
 
 #ifdef Py_USING_UNICODE
@@ -1964,33 +1964,33 @@
 static PyObject *
 _unicode_to_string(PyObject *slots, Py_ssize_t nslots)
 {
-	PyObject *tmp = NULL;
-	PyObject *slot_name, *new_name;
-	Py_ssize_t i;
+    PyObject *tmp = NULL;
+    PyObject *slot_name, *new_name;
+    Py_ssize_t i;
 
-	for (i = 0; i < nslots; i++) {
-		if (PyUnicode_Check(slot_name = PyTuple_GET_ITEM(slots, i))) {
-			if (tmp == NULL) {
-				tmp = PySequence_List(slots);
-				if (tmp == NULL)
-					return NULL;
-			}
-			new_name = _PyUnicode_AsDefaultEncodedString(slot_name,
-								     NULL);
-			if (new_name == NULL) {
-				Py_DECREF(tmp);
-				return NULL;
-			}
-			Py_INCREF(new_name);
-			PyList_SET_ITEM(tmp, i, new_name);
-			Py_DECREF(slot_name);
-		}
-	}
-	if (tmp != NULL) {
-		slots = PyList_AsTuple(tmp);
-		Py_DECREF(tmp);
-	}
-	return slots;
+    for (i = 0; i < nslots; i++) {
+        if (PyUnicode_Check(slot_name = PyTuple_GET_ITEM(slots, i))) {
+            if (tmp == NULL) {
+                tmp = PySequence_List(slots);
+                if (tmp == NULL)
+                    return NULL;
+            }
+            new_name = _PyUnicode_AsDefaultEncodedString(slot_name,
+                                                         NULL);
+            if (new_name == NULL) {
+                Py_DECREF(tmp);
+                return NULL;
+            }
+            Py_INCREF(new_name);
+            PyList_SET_ITEM(tmp, i, new_name);
+            Py_DECREF(slot_name);
+        }
+    }
+    if (tmp != NULL) {
+        slots = PyList_AsTuple(tmp);
+        Py_DECREF(tmp);
+    }
+    return slots;
 }
 #endif
 
@@ -2001,450 +2001,450 @@
 static int
 type_init(PyObject *cls, PyObject *args, PyObject *kwds)
 {
-	int res;
+    int res;
 
-	assert(args != NULL && PyTuple_Check(args));
-	assert(kwds == NULL || PyDict_Check(kwds));
+    assert(args != NULL && PyTuple_Check(args));
+    assert(kwds == NULL || PyDict_Check(kwds));
 
-	if (kwds != NULL && PyDict_Check(kwds) && PyDict_Size(kwds) != 0) {
-		PyErr_SetString(PyExc_TypeError,
-				"type.__init__() takes no keyword arguments");
-		return -1;
-	}
+    if (kwds != NULL && PyDict_Check(kwds) && PyDict_Size(kwds) != 0) {
+        PyErr_SetString(PyExc_TypeError,
+                        "type.__init__() takes no keyword arguments");
+        return -1;
+    }
 
-	if (args != NULL && PyTuple_Check(args) &&
-	    (PyTuple_GET_SIZE(args) != 1 && PyTuple_GET_SIZE(args) != 3)) {
-		PyErr_SetString(PyExc_TypeError,
-				"type.__init__() takes 1 or 3 arguments");
-		return -1;
-	}
+    if (args != NULL && PyTuple_Check(args) &&
+        (PyTuple_GET_SIZE(args) != 1 && PyTuple_GET_SIZE(args) != 3)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "type.__init__() takes 1 or 3 arguments");
+        return -1;
+    }
 
-	/* Call object.__init__(self) now. */
-	/* XXX Could call super(type, cls).__init__() but what's the point? */
-	args = PyTuple_GetSlice(args, 0, 0);
-	res = object_init(cls, args, NULL);
-	Py_DECREF(args);
-	return res;
+    /* Call object.__init__(self) now. */
+    /* XXX Could call super(type, cls).__init__() but what's the point? */
+    args = PyTuple_GetSlice(args, 0, 0);
+    res = object_init(cls, args, NULL);
+    Py_DECREF(args);
+    return res;
 }
 
 static PyObject *
 type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
 {
-	PyObject *name, *bases, *dict;
-	static char *kwlist[] = {"name", "bases", "dict", 0};
-	PyObject *slots, *tmp, *newslots;
-	PyTypeObject *type, *base, *tmptype, *winner;
-	PyHeapTypeObject *et;
-	PyMemberDef *mp;
-	Py_ssize_t i, nbases, nslots, slotoffset, add_dict, add_weak;
-	int j, may_add_dict, may_add_weak;
+    PyObject *name, *bases, *dict;
+    static char *kwlist[] = {"name", "bases", "dict", 0};
+    PyObject *slots, *tmp, *newslots;
+    PyTypeObject *type, *base, *tmptype, *winner;
+    PyHeapTypeObject *et;
+    PyMemberDef *mp;
+    Py_ssize_t i, nbases, nslots, slotoffset, add_dict, add_weak;
+    int j, may_add_dict, may_add_weak;
 
-	assert(args != NULL && PyTuple_Check(args));
-	assert(kwds == NULL || PyDict_Check(kwds));
+    assert(args != NULL && PyTuple_Check(args));
+    assert(kwds == NULL || PyDict_Check(kwds));
 
-	/* Special case: type(x) should return x->ob_type */
-	{
-		const Py_ssize_t nargs = PyTuple_GET_SIZE(args);
-		const Py_ssize_t nkwds = kwds == NULL ? 0 : PyDict_Size(kwds);
+    /* Special case: type(x) should return x->ob_type */
+    {
+        const Py_ssize_t nargs = PyTuple_GET_SIZE(args);
+        const Py_ssize_t nkwds = kwds == NULL ? 0 : PyDict_Size(kwds);
 
-		if (PyType_CheckExact(metatype) && nargs == 1 && nkwds == 0) {
-			PyObject *x = PyTuple_GET_ITEM(args, 0);
-			Py_INCREF(Py_TYPE(x));
-			return (PyObject *) Py_TYPE(x);
-		}
+        if (PyType_CheckExact(metatype) && nargs == 1 && nkwds == 0) {
+            PyObject *x = PyTuple_GET_ITEM(args, 0);
+            Py_INCREF(Py_TYPE(x));
+            return (PyObject *) Py_TYPE(x);
+        }
 
-		/* SF bug 475327 -- if that didn't trigger, we need 3
-		   arguments. but PyArg_ParseTupleAndKeywords below may give
-		   a msg saying type() needs exactly 3. */
-		if (nargs + nkwds != 3) {
-			PyErr_SetString(PyExc_TypeError,
-					"type() takes 1 or 3 arguments");
-			return NULL;
-		}
-	}
+        /* SF bug 475327 -- if that didn't trigger, we need 3
+           arguments. but PyArg_ParseTupleAndKeywords below may give
+           a msg saying type() needs exactly 3. */
+        if (nargs + nkwds != 3) {
+            PyErr_SetString(PyExc_TypeError,
+                            "type() takes 1 or 3 arguments");
+            return NULL;
+        }
+    }
 
-	/* Check arguments: (name, bases, dict) */
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "SO!O!:type", kwlist,
-					 &name,
-					 &PyTuple_Type, &bases,
-					 &PyDict_Type, &dict))
-		return NULL;
+    /* Check arguments: (name, bases, dict) */
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "SO!O!:type", kwlist,
+                                     &name,
+                                     &PyTuple_Type, &bases,
+                                     &PyDict_Type, &dict))
+        return NULL;
 
-	/* Determine the proper metatype to deal with this,
-	   and check for metatype conflicts while we're at it.
-	   Note that if some other metatype wins to contract,
-	   it's possible that its instances are not types. */
-	nbases = PyTuple_GET_SIZE(bases);
-	winner = metatype;
-	for (i = 0; i < nbases; i++) {
-		tmp = PyTuple_GET_ITEM(bases, i);
-		tmptype = tmp->ob_type;
-		if (tmptype == &PyClass_Type)
-			continue; /* Special case classic classes */
-		if (PyType_IsSubtype(winner, tmptype))
-			continue;
-		if (PyType_IsSubtype(tmptype, winner)) {
-			winner = tmptype;
-			continue;
-		}
-		PyErr_SetString(PyExc_TypeError,
-				"metaclass conflict: "
-				"the metaclass of a derived class "
-				"must be a (non-strict) subclass "
-				"of the metaclasses of all its bases");
-		return NULL;
-	}
-	if (winner != metatype) {
-		if (winner->tp_new != type_new) /* Pass it to the winner */
-			return winner->tp_new(winner, args, kwds);
-		metatype = winner;
-	}
+    /* Determine the proper metatype to deal with this,
+       and check for metatype conflicts while we're at it.
+       Note that if some other metatype wins to contract,
+       it's possible that its instances are not types. */
+    nbases = PyTuple_GET_SIZE(bases);
+    winner = metatype;
+    for (i = 0; i < nbases; i++) {
+        tmp = PyTuple_GET_ITEM(bases, i);
+        tmptype = tmp->ob_type;
+        if (tmptype == &PyClass_Type)
+            continue; /* Special case classic classes */
+        if (PyType_IsSubtype(winner, tmptype))
+            continue;
+        if (PyType_IsSubtype(tmptype, winner)) {
+            winner = tmptype;
+            continue;
+        }
+        PyErr_SetString(PyExc_TypeError,
+                        "metaclass conflict: "
+                        "the metaclass of a derived class "
+                        "must be a (non-strict) subclass "
+                        "of the metaclasses of all its bases");
+        return NULL;
+    }
+    if (winner != metatype) {
+        if (winner->tp_new != type_new) /* Pass it to the winner */
+            return winner->tp_new(winner, args, kwds);
+        metatype = winner;
+    }
 
-	/* Adjust for empty tuple bases */
-	if (nbases == 0) {
-		bases = PyTuple_Pack(1, &PyBaseObject_Type);
-		if (bases == NULL)
-			return NULL;
-		nbases = 1;
-	}
-	else
-		Py_INCREF(bases);
+    /* Adjust for empty tuple bases */
+    if (nbases == 0) {
+        bases = PyTuple_Pack(1, &PyBaseObject_Type);
+        if (bases == NULL)
+            return NULL;
+        nbases = 1;
+    }
+    else
+        Py_INCREF(bases);
 
-	/* XXX From here until type is allocated, "return NULL" leaks bases! */
+    /* XXX From here until type is allocated, "return NULL" leaks bases! */
 
-	/* Calculate best base, and check that all bases are type objects */
-	base = best_base(bases);
-	if (base == NULL) {
-		Py_DECREF(bases);
-		return NULL;
-	}
-	if (!PyType_HasFeature(base, Py_TPFLAGS_BASETYPE)) {
-		PyErr_Format(PyExc_TypeError,
-			     "type '%.100s' is not an acceptable base type",
-			     base->tp_name);
-		Py_DECREF(bases);
-		return NULL;
-	}
+    /* Calculate best base, and check that all bases are type objects */
+    base = best_base(bases);
+    if (base == NULL) {
+        Py_DECREF(bases);
+        return NULL;
+    }
+    if (!PyType_HasFeature(base, Py_TPFLAGS_BASETYPE)) {
+        PyErr_Format(PyExc_TypeError,
+                     "type '%.100s' is not an acceptable base type",
+                     base->tp_name);
+        Py_DECREF(bases);
+        return NULL;
+    }
 
-	/* Check for a __slots__ sequence variable in dict, and count it */
-	slots = PyDict_GetItemString(dict, "__slots__");
-	nslots = 0;
-	add_dict = 0;
-	add_weak = 0;
-	may_add_dict = base->tp_dictoffset == 0;
-	may_add_weak = base->tp_weaklistoffset == 0 && base->tp_itemsize == 0;
-	if (slots == NULL) {
-		if (may_add_dict) {
-			add_dict++;
-		}
-		if (may_add_weak) {
-			add_weak++;
-		}
-	}
-	else {
-		/* Have slots */
+    /* Check for a __slots__ sequence variable in dict, and count it */
+    slots = PyDict_GetItemString(dict, "__slots__");
+    nslots = 0;
+    add_dict = 0;
+    add_weak = 0;
+    may_add_dict = base->tp_dictoffset == 0;
+    may_add_weak = base->tp_weaklistoffset == 0 && base->tp_itemsize == 0;
+    if (slots == NULL) {
+        if (may_add_dict) {
+            add_dict++;
+        }
+        if (may_add_weak) {
+            add_weak++;
+        }
+    }
+    else {
+        /* Have slots */
 
-		/* Make it into a tuple */
-		if (PyString_Check(slots) || PyUnicode_Check(slots))
-			slots = PyTuple_Pack(1, slots);
-		else
-			slots = PySequence_Tuple(slots);
-		if (slots == NULL) {
-			Py_DECREF(bases);
-			return NULL;
-		}
-		assert(PyTuple_Check(slots));
+        /* Make it into a tuple */
+        if (PyString_Check(slots) || PyUnicode_Check(slots))
+            slots = PyTuple_Pack(1, slots);
+        else
+            slots = PySequence_Tuple(slots);
+        if (slots == NULL) {
+            Py_DECREF(bases);
+            return NULL;
+        }
+        assert(PyTuple_Check(slots));
 
-		/* Are slots allowed? */
-		nslots = PyTuple_GET_SIZE(slots);
-		if (nslots > 0 && base->tp_itemsize != 0) {
-			PyErr_Format(PyExc_TypeError,
-				     "nonempty __slots__ "
-				     "not supported for subtype of '%s'",
-				     base->tp_name);
-		  bad_slots:
-			Py_DECREF(bases);
-			Py_DECREF(slots);
-			return NULL;
-		}
+        /* Are slots allowed? */
+        nslots = PyTuple_GET_SIZE(slots);
+        if (nslots > 0 && base->tp_itemsize != 0) {
+            PyErr_Format(PyExc_TypeError,
+                         "nonempty __slots__ "
+                         "not supported for subtype of '%s'",
+                         base->tp_name);
+          bad_slots:
+            Py_DECREF(bases);
+            Py_DECREF(slots);
+            return NULL;
+        }
 
 #ifdef Py_USING_UNICODE
-		tmp = _unicode_to_string(slots, nslots);
-		if (tmp == NULL)
-			goto bad_slots;
-		if (tmp != slots) {
-			Py_DECREF(slots);
-			slots = tmp;
-		}
+        tmp = _unicode_to_string(slots, nslots);
+        if (tmp == NULL)
+            goto bad_slots;
+        if (tmp != slots) {
+            Py_DECREF(slots);
+            slots = tmp;
+        }
 #endif
-		/* Check for valid slot names and two special cases */
-		for (i = 0; i < nslots; i++) {
-			PyObject *tmp = PyTuple_GET_ITEM(slots, i);
-			char *s;
-			if (!valid_identifier(tmp))
-				goto bad_slots;
-			assert(PyString_Check(tmp));
-			s = PyString_AS_STRING(tmp);
-			if (strcmp(s, "__dict__") == 0) {
-				if (!may_add_dict || add_dict) {
-					PyErr_SetString(PyExc_TypeError,
-						"__dict__ slot disallowed: "
-						"we already got one");
-					goto bad_slots;
-				}
-				add_dict++;
-			}
-			if (strcmp(s, "__weakref__") == 0) {
-				if (!may_add_weak || add_weak) {
-					PyErr_SetString(PyExc_TypeError,
-						"__weakref__ slot disallowed: "
-						"either we already got one, "
-						"or __itemsize__ != 0");
-					goto bad_slots;
-				}
-				add_weak++;
-			}
-		}
+        /* Check for valid slot names and two special cases */
+        for (i = 0; i < nslots; i++) {
+            PyObject *tmp = PyTuple_GET_ITEM(slots, i);
+            char *s;
+            if (!valid_identifier(tmp))
+                goto bad_slots;
+            assert(PyString_Check(tmp));
+            s = PyString_AS_STRING(tmp);
+            if (strcmp(s, "__dict__") == 0) {
+                if (!may_add_dict || add_dict) {
+                    PyErr_SetString(PyExc_TypeError,
+                        "__dict__ slot disallowed: "
+                        "we already got one");
+                    goto bad_slots;
+                }
+                add_dict++;
+            }
+            if (strcmp(s, "__weakref__") == 0) {
+                if (!may_add_weak || add_weak) {
+                    PyErr_SetString(PyExc_TypeError,
+                        "__weakref__ slot disallowed: "
+                        "either we already got one, "
+                        "or __itemsize__ != 0");
+                    goto bad_slots;
+                }
+                add_weak++;
+            }
+        }
 
-		/* Copy slots into a list, mangle names and sort them.
-		   Sorted names are needed for __class__ assignment.
-		   Convert them back to tuple at the end.
-		*/
-		newslots = PyList_New(nslots - add_dict - add_weak);
-		if (newslots == NULL)
-			goto bad_slots;
-		for (i = j = 0; i < nslots; i++) {
-			char *s;
-			tmp = PyTuple_GET_ITEM(slots, i);
-			s = PyString_AS_STRING(tmp);
-			if ((add_dict && strcmp(s, "__dict__") == 0) ||
-			    (add_weak && strcmp(s, "__weakref__") == 0))
-				continue;
-			tmp =_Py_Mangle(name, tmp);
-			if (!tmp)
-			    goto bad_slots;
-			PyList_SET_ITEM(newslots, j, tmp);
-			j++;
-		}
-		assert(j == nslots - add_dict - add_weak);
-		nslots = j;
-		Py_DECREF(slots);
-		if (PyList_Sort(newslots) == -1) {
-			Py_DECREF(bases);
-			Py_DECREF(newslots);
-			return NULL;
-		}
-		slots = PyList_AsTuple(newslots);
-		Py_DECREF(newslots);
-		if (slots == NULL) {
-			Py_DECREF(bases);
-			return NULL;
-		}
+        /* Copy slots into a list, mangle names and sort them.
+           Sorted names are needed for __class__ assignment.
+           Convert them back to tuple at the end.
+        */
+        newslots = PyList_New(nslots - add_dict - add_weak);
+        if (newslots == NULL)
+            goto bad_slots;
+        for (i = j = 0; i < nslots; i++) {
+            char *s;
+            tmp = PyTuple_GET_ITEM(slots, i);
+            s = PyString_AS_STRING(tmp);
+            if ((add_dict && strcmp(s, "__dict__") == 0) ||
+                (add_weak && strcmp(s, "__weakref__") == 0))
+                continue;
+            tmp =_Py_Mangle(name, tmp);
+            if (!tmp)
+                goto bad_slots;
+            PyList_SET_ITEM(newslots, j, tmp);
+            j++;
+        }
+        assert(j == nslots - add_dict - add_weak);
+        nslots = j;
+        Py_DECREF(slots);
+        if (PyList_Sort(newslots) == -1) {
+            Py_DECREF(bases);
+            Py_DECREF(newslots);
+            return NULL;
+        }
+        slots = PyList_AsTuple(newslots);
+        Py_DECREF(newslots);
+        if (slots == NULL) {
+            Py_DECREF(bases);
+            return NULL;
+        }
 
-		/* Secondary bases may provide weakrefs or dict */
-		if (nbases > 1 &&
-		    ((may_add_dict && !add_dict) ||
-		     (may_add_weak && !add_weak))) {
-			for (i = 0; i < nbases; i++) {
-				tmp = PyTuple_GET_ITEM(bases, i);
-				if (tmp == (PyObject *)base)
-					continue; /* Skip primary base */
-				if (PyClass_Check(tmp)) {
-					/* Classic base class provides both */
-					if (may_add_dict && !add_dict)
-						add_dict++;
-					if (may_add_weak && !add_weak)
-						add_weak++;
-					break;
-				}
-				assert(PyType_Check(tmp));
-				tmptype = (PyTypeObject *)tmp;
-				if (may_add_dict && !add_dict &&
-				    tmptype->tp_dictoffset != 0)
-					add_dict++;
-				if (may_add_weak && !add_weak &&
-				    tmptype->tp_weaklistoffset != 0)
-					add_weak++;
-				if (may_add_dict && !add_dict)
-					continue;
-				if (may_add_weak && !add_weak)
-					continue;
-				/* Nothing more to check */
-				break;
-			}
-		}
-	}
+        /* Secondary bases may provide weakrefs or dict */
+        if (nbases > 1 &&
+            ((may_add_dict && !add_dict) ||
+             (may_add_weak && !add_weak))) {
+            for (i = 0; i < nbases; i++) {
+                tmp = PyTuple_GET_ITEM(bases, i);
+                if (tmp == (PyObject *)base)
+                    continue; /* Skip primary base */
+                if (PyClass_Check(tmp)) {
+                    /* Classic base class provides both */
+                    if (may_add_dict && !add_dict)
+                        add_dict++;
+                    if (may_add_weak && !add_weak)
+                        add_weak++;
+                    break;
+                }
+                assert(PyType_Check(tmp));
+                tmptype = (PyTypeObject *)tmp;
+                if (may_add_dict && !add_dict &&
+                    tmptype->tp_dictoffset != 0)
+                    add_dict++;
+                if (may_add_weak && !add_weak &&
+                    tmptype->tp_weaklistoffset != 0)
+                    add_weak++;
+                if (may_add_dict && !add_dict)
+                    continue;
+                if (may_add_weak && !add_weak)
+                    continue;
+                /* Nothing more to check */
+                break;
+            }
+        }
+    }
 
-	/* XXX From here until type is safely allocated,
-	   "return NULL" may leak slots! */
+    /* XXX From here until type is safely allocated,
+       "return NULL" may leak slots! */
 
-	/* Allocate the type object */
-	type = (PyTypeObject *)metatype->tp_alloc(metatype, nslots);
-	if (type == NULL) {
-		Py_XDECREF(slots);
-		Py_DECREF(bases);
-		return NULL;
-	}
+    /* Allocate the type object */
+    type = (PyTypeObject *)metatype->tp_alloc(metatype, nslots);
+    if (type == NULL) {
+        Py_XDECREF(slots);
+        Py_DECREF(bases);
+        return NULL;
+    }
 
-	/* Keep name and slots alive in the extended type object */
-	et = (PyHeapTypeObject *)type;
-	Py_INCREF(name);
-	et->ht_name = name;
-	et->ht_slots = slots;
+    /* Keep name and slots alive in the extended type object */
+    et = (PyHeapTypeObject *)type;
+    Py_INCREF(name);
+    et->ht_name = name;
+    et->ht_slots = slots;
 
-	/* Initialize tp_flags */
-	type->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HEAPTYPE |
-		Py_TPFLAGS_BASETYPE;
-	if (base->tp_flags & Py_TPFLAGS_HAVE_GC)
-		type->tp_flags |= Py_TPFLAGS_HAVE_GC;
-	if (base->tp_flags & Py_TPFLAGS_HAVE_NEWBUFFER)
-		type->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER;
+    /* Initialize tp_flags */
+    type->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HEAPTYPE |
+        Py_TPFLAGS_BASETYPE;
+    if (base->tp_flags & Py_TPFLAGS_HAVE_GC)
+        type->tp_flags |= Py_TPFLAGS_HAVE_GC;
+    if (base->tp_flags & Py_TPFLAGS_HAVE_NEWBUFFER)
+        type->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER;
 
-	/* It's a new-style number unless it specifically inherits any
-	   old-style numeric behavior */
-	if ((base->tp_flags & Py_TPFLAGS_CHECKTYPES) ||
-	    (base->tp_as_number == NULL))
-		type->tp_flags |= Py_TPFLAGS_CHECKTYPES;
+    /* It's a new-style number unless it specifically inherits any
+       old-style numeric behavior */
+    if ((base->tp_flags & Py_TPFLAGS_CHECKTYPES) ||
+        (base->tp_as_number == NULL))
+        type->tp_flags |= Py_TPFLAGS_CHECKTYPES;
 
-	/* Initialize essential fields */
-	type->tp_as_number = &et->as_number;
-	type->tp_as_sequence = &et->as_sequence;
-	type->tp_as_mapping = &et->as_mapping;
-	type->tp_as_buffer = &et->as_buffer;
-	type->tp_name = PyString_AS_STRING(name);
+    /* Initialize essential fields */
+    type->tp_as_number = &et->as_number;
+    type->tp_as_sequence = &et->as_sequence;
+    type->tp_as_mapping = &et->as_mapping;
+    type->tp_as_buffer = &et->as_buffer;
+    type->tp_name = PyString_AS_STRING(name);
 
-	/* Set tp_base and tp_bases */
-	type->tp_bases = bases;
-	Py_INCREF(base);
-	type->tp_base = base;
+    /* Set tp_base and tp_bases */
+    type->tp_bases = bases;
+    Py_INCREF(base);
+    type->tp_base = base;
 
-	/* Initialize tp_dict from passed-in dict */
-	type->tp_dict = dict = PyDict_Copy(dict);
-	if (dict == NULL) {
-		Py_DECREF(type);
-		return NULL;
-	}
+    /* Initialize tp_dict from passed-in dict */
+    type->tp_dict = dict = PyDict_Copy(dict);
+    if (dict == NULL) {
+        Py_DECREF(type);
+        return NULL;
+    }
 
-	/* Set __module__ in the dict */
-	if (PyDict_GetItemString(dict, "__module__") == NULL) {
-		tmp = PyEval_GetGlobals();
-		if (tmp != NULL) {
-			tmp = PyDict_GetItemString(tmp, "__name__");
-			if (tmp != NULL) {
-				if (PyDict_SetItemString(dict, "__module__",
-							 tmp) < 0)
-					return NULL;
-			}
-		}
-	}
+    /* Set __module__ in the dict */
+    if (PyDict_GetItemString(dict, "__module__") == NULL) {
+        tmp = PyEval_GetGlobals();
+        if (tmp != NULL) {
+            tmp = PyDict_GetItemString(tmp, "__name__");
+            if (tmp != NULL) {
+                if (PyDict_SetItemString(dict, "__module__",
+                                         tmp) < 0)
+                    return NULL;
+            }
+        }
+    }
 
-	/* Set tp_doc to a copy of dict['__doc__'], if the latter is there
-	   and is a string.  The __doc__ accessor will first look for tp_doc;
-	   if that fails, it will still look into __dict__.
-	*/
-	{
-		PyObject *doc = PyDict_GetItemString(dict, "__doc__");
-		if (doc != NULL && PyString_Check(doc)) {
-			const size_t n = (size_t)PyString_GET_SIZE(doc);
-			char *tp_doc = (char *)PyObject_MALLOC(n+1);
-			if (tp_doc == NULL) {
-				Py_DECREF(type);
-				return NULL;
-			}
-			memcpy(tp_doc, PyString_AS_STRING(doc), n+1);
-			type->tp_doc = tp_doc;
-		}
-	}
+    /* Set tp_doc to a copy of dict['__doc__'], if the latter is there
+       and is a string.  The __doc__ accessor will first look for tp_doc;
+       if that fails, it will still look into __dict__.
+    */
+    {
+        PyObject *doc = PyDict_GetItemString(dict, "__doc__");
+        if (doc != NULL && PyString_Check(doc)) {
+            const size_t n = (size_t)PyString_GET_SIZE(doc);
+            char *tp_doc = (char *)PyObject_MALLOC(n+1);
+            if (tp_doc == NULL) {
+                Py_DECREF(type);
+                return NULL;
+            }
+            memcpy(tp_doc, PyString_AS_STRING(doc), n+1);
+            type->tp_doc = tp_doc;
+        }
+    }
 
-	/* Special-case __new__: if it's a plain function,
-	   make it a static function */
-	tmp = PyDict_GetItemString(dict, "__new__");
-	if (tmp != NULL && PyFunction_Check(tmp)) {
-		tmp = PyStaticMethod_New(tmp);
-		if (tmp == NULL) {
-			Py_DECREF(type);
-			return NULL;
-		}
-		PyDict_SetItemString(dict, "__new__", tmp);
-		Py_DECREF(tmp);
-	}
+    /* Special-case __new__: if it's a plain function,
+       make it a static function */
+    tmp = PyDict_GetItemString(dict, "__new__");
+    if (tmp != NULL && PyFunction_Check(tmp)) {
+        tmp = PyStaticMethod_New(tmp);
+        if (tmp == NULL) {
+            Py_DECREF(type);
+            return NULL;
+        }
+        PyDict_SetItemString(dict, "__new__", tmp);
+        Py_DECREF(tmp);
+    }
 
-	/* Add descriptors for custom slots from __slots__, or for __dict__ */
-	mp = PyHeapType_GET_MEMBERS(et);
-	slotoffset = base->tp_basicsize;
-	if (slots != NULL) {
-		for (i = 0; i < nslots; i++, mp++) {
-			mp->name = PyString_AS_STRING(
-				PyTuple_GET_ITEM(slots, i));
-			mp->type = T_OBJECT_EX;
-			mp->offset = slotoffset;
+    /* Add descriptors for custom slots from __slots__, or for __dict__ */
+    mp = PyHeapType_GET_MEMBERS(et);
+    slotoffset = base->tp_basicsize;
+    if (slots != NULL) {
+        for (i = 0; i < nslots; i++, mp++) {
+            mp->name = PyString_AS_STRING(
+                PyTuple_GET_ITEM(slots, i));
+            mp->type = T_OBJECT_EX;
+            mp->offset = slotoffset;
 
-			/* __dict__ and __weakref__ are already filtered out */
-			assert(strcmp(mp->name, "__dict__") != 0);
-			assert(strcmp(mp->name, "__weakref__") != 0);
+            /* __dict__ and __weakref__ are already filtered out */
+            assert(strcmp(mp->name, "__dict__") != 0);
+            assert(strcmp(mp->name, "__weakref__") != 0);
 
-			slotoffset += sizeof(PyObject *);
-		}
-	}
-	if (add_dict) {
-		if (base->tp_itemsize)
-			type->tp_dictoffset = -(long)sizeof(PyObject *);
-		else
-			type->tp_dictoffset = slotoffset;
-		slotoffset += sizeof(PyObject *);
-	}
-	if (add_weak) {
-		assert(!base->tp_itemsize);
-		type->tp_weaklistoffset = slotoffset;
-		slotoffset += sizeof(PyObject *);
-	}
-	type->tp_basicsize = slotoffset;
-	type->tp_itemsize = base->tp_itemsize;
-	type->tp_members = PyHeapType_GET_MEMBERS(et);
+            slotoffset += sizeof(PyObject *);
+        }
+    }
+    if (add_dict) {
+        if (base->tp_itemsize)
+            type->tp_dictoffset = -(long)sizeof(PyObject *);
+        else
+            type->tp_dictoffset = slotoffset;
+        slotoffset += sizeof(PyObject *);
+    }
+    if (add_weak) {
+        assert(!base->tp_itemsize);
+        type->tp_weaklistoffset = slotoffset;
+        slotoffset += sizeof(PyObject *);
+    }
+    type->tp_basicsize = slotoffset;
+    type->tp_itemsize = base->tp_itemsize;
+    type->tp_members = PyHeapType_GET_MEMBERS(et);
 
-	if (type->tp_weaklistoffset && type->tp_dictoffset)
-		type->tp_getset = subtype_getsets_full;
-	else if (type->tp_weaklistoffset && !type->tp_dictoffset)
-		type->tp_getset = subtype_getsets_weakref_only;
-	else if (!type->tp_weaklistoffset && type->tp_dictoffset)
-		type->tp_getset = subtype_getsets_dict_only;
-	else
-		type->tp_getset = NULL;
+    if (type->tp_weaklistoffset && type->tp_dictoffset)
+        type->tp_getset = subtype_getsets_full;
+    else if (type->tp_weaklistoffset && !type->tp_dictoffset)
+        type->tp_getset = subtype_getsets_weakref_only;
+    else if (!type->tp_weaklistoffset && type->tp_dictoffset)
+        type->tp_getset = subtype_getsets_dict_only;
+    else
+        type->tp_getset = NULL;
 
-	/* Special case some slots */
-	if (type->tp_dictoffset != 0 || nslots > 0) {
-		if (base->tp_getattr == NULL && base->tp_getattro == NULL)
-			type->tp_getattro = PyObject_GenericGetAttr;
-		if (base->tp_setattr == NULL && base->tp_setattro == NULL)
-			type->tp_setattro = PyObject_GenericSetAttr;
-	}
-	type->tp_dealloc = subtype_dealloc;
+    /* Special case some slots */
+    if (type->tp_dictoffset != 0 || nslots > 0) {
+        if (base->tp_getattr == NULL && base->tp_getattro == NULL)
+            type->tp_getattro = PyObject_GenericGetAttr;
+        if (base->tp_setattr == NULL && base->tp_setattro == NULL)
+            type->tp_setattro = PyObject_GenericSetAttr;
+    }
+    type->tp_dealloc = subtype_dealloc;
 
-	/* Enable GC unless there are really no instance variables possible */
-	if (!(type->tp_basicsize == sizeof(PyObject) &&
-	      type->tp_itemsize == 0))
-		type->tp_flags |= Py_TPFLAGS_HAVE_GC;
+    /* Enable GC unless there are really no instance variables possible */
+    if (!(type->tp_basicsize == sizeof(PyObject) &&
+          type->tp_itemsize == 0))
+        type->tp_flags |= Py_TPFLAGS_HAVE_GC;
 
-	/* Always override allocation strategy to use regular heap */
-	type->tp_alloc = PyType_GenericAlloc;
-	if (type->tp_flags & Py_TPFLAGS_HAVE_GC) {
-		type->tp_free = PyObject_GC_Del;
-		type->tp_traverse = subtype_traverse;
-		type->tp_clear = subtype_clear;
-	}
-	else
-		type->tp_free = PyObject_Del;
+    /* Always override allocation strategy to use regular heap */
+    type->tp_alloc = PyType_GenericAlloc;
+    if (type->tp_flags & Py_TPFLAGS_HAVE_GC) {
+        type->tp_free = PyObject_GC_Del;
+        type->tp_traverse = subtype_traverse;
+        type->tp_clear = subtype_clear;
+    }
+    else
+        type->tp_free = PyObject_Del;
 
-	/* Initialize the rest */
-	if (PyType_Ready(type) < 0) {
-		Py_DECREF(type);
-		return NULL;
-	}
+    /* Initialize the rest */
+    if (PyType_Ready(type) < 0) {
+        Py_DECREF(type);
+        return NULL;
+    }
 
-	/* Put the proper slots in place */
-	fixup_slot_dispatchers(type);
+    /* Put the proper slots in place */
+    fixup_slot_dispatchers(type);
 
-	return (PyObject *)type;
+    return (PyObject *)type;
 }
 
 /* Internal API to look for a name through the MRO.
@@ -2452,54 +2452,54 @@
 PyObject *
 _PyType_Lookup(PyTypeObject *type, PyObject *name)
 {
-	Py_ssize_t i, n;
-	PyObject *mro, *res, *base, *dict;
-	unsigned int h;
+    Py_ssize_t i, n;
+    PyObject *mro, *res, *base, *dict;
+    unsigned int h;
 
-	if (MCACHE_CACHEABLE_NAME(name) &&
-	    PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG)) {
-		/* fast path */
-		h = MCACHE_HASH_METHOD(type, name);
-		if (method_cache[h].version == type->tp_version_tag &&
-		    method_cache[h].name == name)
-		    return method_cache[h].value;
-	}
+    if (MCACHE_CACHEABLE_NAME(name) &&
+        PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG)) {
+        /* fast path */
+        h = MCACHE_HASH_METHOD(type, name);
+        if (method_cache[h].version == type->tp_version_tag &&
+            method_cache[h].name == name)
+            return method_cache[h].value;
+    }
 
-	/* Look in tp_dict of types in MRO */
-	mro = type->tp_mro;
+    /* Look in tp_dict of types in MRO */
+    mro = type->tp_mro;
 
-	/* If mro is NULL, the type is either not yet initialized
-	   by PyType_Ready(), or already cleared by type_clear().
-	   Either way the safest thing to do is to return NULL. */
-	if (mro == NULL)
-		return NULL;
+    /* If mro is NULL, the type is either not yet initialized
+       by PyType_Ready(), or already cleared by type_clear().
+       Either way the safest thing to do is to return NULL. */
+    if (mro == NULL)
+        return NULL;
 
-	res = NULL;
-	assert(PyTuple_Check(mro));
-	n = PyTuple_GET_SIZE(mro);
-	for (i = 0; i < n; i++) {
-		base = PyTuple_GET_ITEM(mro, i);
-		if (PyClass_Check(base))
-			dict = ((PyClassObject *)base)->cl_dict;
-		else {
-			assert(PyType_Check(base));
-			dict = ((PyTypeObject *)base)->tp_dict;
-		}
-		assert(dict && PyDict_Check(dict));
-		res = PyDict_GetItem(dict, name);
-		if (res != NULL)
-			break;
-	}
+    res = NULL;
+    assert(PyTuple_Check(mro));
+    n = PyTuple_GET_SIZE(mro);
+    for (i = 0; i < n; i++) {
+        base = PyTuple_GET_ITEM(mro, i);
+        if (PyClass_Check(base))
+            dict = ((PyClassObject *)base)->cl_dict;
+        else {
+            assert(PyType_Check(base));
+            dict = ((PyTypeObject *)base)->tp_dict;
+        }
+        assert(dict && PyDict_Check(dict));
+        res = PyDict_GetItem(dict, name);
+        if (res != NULL)
+            break;
+    }
 
-	if (MCACHE_CACHEABLE_NAME(name) && assign_version_tag(type)) {
-		h = MCACHE_HASH_METHOD(type, name);
-		method_cache[h].version = type->tp_version_tag;
-		method_cache[h].value = res;  /* borrowed */
-		Py_INCREF(name);
-		Py_DECREF(method_cache[h].name);
-		method_cache[h].name = name;
-	}
-	return res;
+    if (MCACHE_CACHEABLE_NAME(name) && assign_version_tag(type)) {
+        h = MCACHE_HASH_METHOD(type, name);
+        method_cache[h].version = type->tp_version_tag;
+        method_cache[h].value = res;  /* borrowed */
+        Py_INCREF(name);
+        Py_DECREF(method_cache[h].name);
+        method_cache[h].name = name;
+    }
+    return res;
 }
 
 /* This is similar to PyObject_GenericGetAttr(),
@@ -2507,156 +2507,156 @@
 static PyObject *
 type_getattro(PyTypeObject *type, PyObject *name)
 {
-	PyTypeObject *metatype = Py_TYPE(type);
-	PyObject *meta_attribute, *attribute;
-	descrgetfunc meta_get;
+    PyTypeObject *metatype = Py_TYPE(type);
+    PyObject *meta_attribute, *attribute;
+    descrgetfunc meta_get;
 
-	/* Initialize this type (we'll assume the metatype is initialized) */
-	if (type->tp_dict == NULL) {
-		if (PyType_Ready(type) < 0)
-			return NULL;
-	}
+    /* Initialize this type (we'll assume the metatype is initialized) */
+    if (type->tp_dict == NULL) {
+        if (PyType_Ready(type) < 0)
+            return NULL;
+    }
 
-	/* No readable descriptor found yet */
-	meta_get = NULL;
+    /* No readable descriptor found yet */
+    meta_get = NULL;
 
-	/* Look for the attribute in the metatype */
-	meta_attribute = _PyType_Lookup(metatype, name);
+    /* Look for the attribute in the metatype */
+    meta_attribute = _PyType_Lookup(metatype, name);
 
-	if (meta_attribute != NULL) {
-		meta_get = Py_TYPE(meta_attribute)->tp_descr_get;
+    if (meta_attribute != NULL) {
+        meta_get = Py_TYPE(meta_attribute)->tp_descr_get;
 
-		if (meta_get != NULL && PyDescr_IsData(meta_attribute)) {
-			/* Data descriptors implement tp_descr_set to intercept
-			 * writes. Assume the attribute is not overridden in
-			 * type's tp_dict (and bases): call the descriptor now.
-			 */
-			return meta_get(meta_attribute, (PyObject *)type,
-					(PyObject *)metatype);
-		}
-		Py_INCREF(meta_attribute);
-	}
+        if (meta_get != NULL && PyDescr_IsData(meta_attribute)) {
+            /* Data descriptors implement tp_descr_set to intercept
+             * writes. Assume the attribute is not overridden in
+             * type's tp_dict (and bases): call the descriptor now.
+             */
+            return meta_get(meta_attribute, (PyObject *)type,
+                            (PyObject *)metatype);
+        }
+        Py_INCREF(meta_attribute);
+    }
 
-	/* No data descriptor found on metatype. Look in tp_dict of this
-	 * type and its bases */
-	attribute = _PyType_Lookup(type, name);
-	if (attribute != NULL) {
-		/* Implement descriptor functionality, if any */
-		descrgetfunc local_get = Py_TYPE(attribute)->tp_descr_get;
+    /* No data descriptor found on metatype. Look in tp_dict of this
+     * type and its bases */
+    attribute = _PyType_Lookup(type, name);
+    if (attribute != NULL) {
+        /* Implement descriptor functionality, if any */
+        descrgetfunc local_get = Py_TYPE(attribute)->tp_descr_get;
 
-		Py_XDECREF(meta_attribute);
+        Py_XDECREF(meta_attribute);
 
-		if (local_get != NULL) {
-			/* NULL 2nd argument indicates the descriptor was
-			 * found on the target object itself (or a base)  */
-			return local_get(attribute, (PyObject *)NULL,
-					 (PyObject *)type);
-		}
+        if (local_get != NULL) {
+            /* NULL 2nd argument indicates the descriptor was
+             * found on the target object itself (or a base)  */
+            return local_get(attribute, (PyObject *)NULL,
+                             (PyObject *)type);
+        }
 
-		Py_INCREF(attribute);
-		return attribute;
-	}
+        Py_INCREF(attribute);
+        return attribute;
+    }
 
-	/* No attribute found in local __dict__ (or bases): use the
-	 * descriptor from the metatype, if any */
-	if (meta_get != NULL) {
-		PyObject *res;
-		res = meta_get(meta_attribute, (PyObject *)type,
-			       (PyObject *)metatype);
-		Py_DECREF(meta_attribute);
-		return res;
-	}
+    /* No attribute found in local __dict__ (or bases): use the
+     * descriptor from the metatype, if any */
+    if (meta_get != NULL) {
+        PyObject *res;
+        res = meta_get(meta_attribute, (PyObject *)type,
+                       (PyObject *)metatype);
+        Py_DECREF(meta_attribute);
+        return res;
+    }
 
-	/* If an ordinary attribute was found on the metatype, return it now */
-	if (meta_attribute != NULL) {
-		return meta_attribute;
-	}
+    /* If an ordinary attribute was found on the metatype, return it now */
+    if (meta_attribute != NULL) {
+        return meta_attribute;
+    }
 
-	/* Give up */
-	PyErr_Format(PyExc_AttributeError,
-			 "type object '%.50s' has no attribute '%.400s'",
-			 type->tp_name, PyString_AS_STRING(name));
-	return NULL;
+    /* Give up */
+    PyErr_Format(PyExc_AttributeError,
+                     "type object '%.50s' has no attribute '%.400s'",
+                     type->tp_name, PyString_AS_STRING(name));
+    return NULL;
 }
 
 static int
 type_setattro(PyTypeObject *type, PyObject *name, PyObject *value)
 {
-	if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
-		PyErr_Format(
-			PyExc_TypeError,
-			"can't set attributes of built-in/extension type '%s'",
-			type->tp_name);
-		return -1;
-	}
-	if (PyObject_GenericSetAttr((PyObject *)type, name, value) < 0)
-		return -1;
-	return update_slot(type, name);
+    if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
+        PyErr_Format(
+            PyExc_TypeError,
+            "can't set attributes of built-in/extension type '%s'",
+            type->tp_name);
+        return -1;
+    }
+    if (PyObject_GenericSetAttr((PyObject *)type, name, value) < 0)
+        return -1;
+    return update_slot(type, name);
 }
 
 static void
 type_dealloc(PyTypeObject *type)
 {
-	PyHeapTypeObject *et;
+    PyHeapTypeObject *et;
 
-	/* Assert this is a heap-allocated type object */
-	assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);
-	_PyObject_GC_UNTRACK(type);
-	PyObject_ClearWeakRefs((PyObject *)type);
-	et = (PyHeapTypeObject *)type;
-	Py_XDECREF(type->tp_base);
-	Py_XDECREF(type->tp_dict);
-	Py_XDECREF(type->tp_bases);
-	Py_XDECREF(type->tp_mro);
-	Py_XDECREF(type->tp_cache);
-	Py_XDECREF(type->tp_subclasses);
-	/* A type's tp_doc is heap allocated, unlike the tp_doc slots
-	 * of most other objects.  It's okay to cast it to char *.
-	 */
-	PyObject_Free((char *)type->tp_doc);
-	Py_XDECREF(et->ht_name);
-	Py_XDECREF(et->ht_slots);
-	Py_TYPE(type)->tp_free((PyObject *)type);
+    /* Assert this is a heap-allocated type object */
+    assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);
+    _PyObject_GC_UNTRACK(type);
+    PyObject_ClearWeakRefs((PyObject *)type);
+    et = (PyHeapTypeObject *)type;
+    Py_XDECREF(type->tp_base);
+    Py_XDECREF(type->tp_dict);
+    Py_XDECREF(type->tp_bases);
+    Py_XDECREF(type->tp_mro);
+    Py_XDECREF(type->tp_cache);
+    Py_XDECREF(type->tp_subclasses);
+    /* A type's tp_doc is heap allocated, unlike the tp_doc slots
+     * of most other objects.  It's okay to cast it to char *.
+     */
+    PyObject_Free((char *)type->tp_doc);
+    Py_XDECREF(et->ht_name);
+    Py_XDECREF(et->ht_slots);
+    Py_TYPE(type)->tp_free((PyObject *)type);
 }
 
 static PyObject *
 type_subclasses(PyTypeObject *type, PyObject *args_ignored)
 {
-	PyObject *list, *raw, *ref;
-	Py_ssize_t i, n;
+    PyObject *list, *raw, *ref;
+    Py_ssize_t i, n;
 
-	list = PyList_New(0);
-	if (list == NULL)
-		return NULL;
-	raw = type->tp_subclasses;
-	if (raw == NULL)
-		return list;
-	assert(PyList_Check(raw));
-	n = PyList_GET_SIZE(raw);
-	for (i = 0; i < n; i++) {
-		ref = PyList_GET_ITEM(raw, i);
-		assert(PyWeakref_CheckRef(ref));
-		ref = PyWeakref_GET_OBJECT(ref);
-		if (ref != Py_None) {
-			if (PyList_Append(list, ref) < 0) {
-				Py_DECREF(list);
-				return NULL;
-			}
-		}
-	}
-	return list;
+    list = PyList_New(0);
+    if (list == NULL)
+        return NULL;
+    raw = type->tp_subclasses;
+    if (raw == NULL)
+        return list;
+    assert(PyList_Check(raw));
+    n = PyList_GET_SIZE(raw);
+    for (i = 0; i < n; i++) {
+        ref = PyList_GET_ITEM(raw, i);
+        assert(PyWeakref_CheckRef(ref));
+        ref = PyWeakref_GET_OBJECT(ref);
+        if (ref != Py_None) {
+            if (PyList_Append(list, ref) < 0) {
+                Py_DECREF(list);
+                return NULL;
+            }
+        }
+    }
+    return list;
 }
 
 static PyMethodDef type_methods[] = {
-	{"mro", (PyCFunction)mro_external, METH_NOARGS,
-	 PyDoc_STR("mro() -> list\nreturn a type's method resolution order")},
-	{"__subclasses__", (PyCFunction)type_subclasses, METH_NOARGS,
-	 PyDoc_STR("__subclasses__() -> list of immediate subclasses")},
-	{"__instancecheck__", type___instancecheck__, METH_O,
-	 PyDoc_STR("__instancecheck__() -> check if an object is an instance")},
-	{"__subclasscheck__", type___subclasscheck__, METH_O,
-	 PyDoc_STR("__subclasschck__ -> check if an class is a subclass")},
-	{0}
+    {"mro", (PyCFunction)mro_external, METH_NOARGS,
+     PyDoc_STR("mro() -> list\nreturn a type's method resolution order")},
+    {"__subclasses__", (PyCFunction)type_subclasses, METH_NOARGS,
+     PyDoc_STR("__subclasses__() -> list of immediate subclasses")},
+    {"__instancecheck__", type___instancecheck__, METH_O,
+     PyDoc_STR("__instancecheck__() -> check if an object is an instance")},
+    {"__subclasscheck__", type___subclasscheck__, METH_O,
+     PyDoc_STR("__subclasschck__ -> check if an class is a subclass")},
+    {0}
 };
 
 PyDoc_STRVAR(type_doc,
@@ -2666,109 +2666,109 @@
 static int
 type_traverse(PyTypeObject *type, visitproc visit, void *arg)
 {
-	/* Because of type_is_gc(), the collector only calls this
-	   for heaptypes. */
-	assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);
+    /* Because of type_is_gc(), the collector only calls this
+       for heaptypes. */
+    assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);
 
-	Py_VISIT(type->tp_dict);
-	Py_VISIT(type->tp_cache);
-	Py_VISIT(type->tp_mro);
-	Py_VISIT(type->tp_bases);
-	Py_VISIT(type->tp_base);
+    Py_VISIT(type->tp_dict);
+    Py_VISIT(type->tp_cache);
+    Py_VISIT(type->tp_mro);
+    Py_VISIT(type->tp_bases);
+    Py_VISIT(type->tp_base);
 
-	/* There's no need to visit type->tp_subclasses or
-	   ((PyHeapTypeObject *)type)->ht_slots, because they can't be involved
-	   in cycles; tp_subclasses is a list of weak references,
-	   and slots is a tuple of strings. */
+    /* There's no need to visit type->tp_subclasses or
+       ((PyHeapTypeObject *)type)->ht_slots, because they can't be involved
+       in cycles; tp_subclasses is a list of weak references,
+       and slots is a tuple of strings. */
 
-	return 0;
+    return 0;
 }
 
 static int
 type_clear(PyTypeObject *type)
 {
-	/* Because of type_is_gc(), the collector only calls this
-	   for heaptypes. */
-	assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);
+    /* Because of type_is_gc(), the collector only calls this
+       for heaptypes. */
+    assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);
 
-	/* The only field we need to clear is tp_mro, which is part of a
-	   hard cycle (its first element is the class itself) that won't
-	   be broken otherwise (it's a tuple and tuples don't have a
-	   tp_clear handler).  None of the other fields need to be
-	   cleared, and here's why:
+    /* The only field we need to clear is tp_mro, which is part of a
+       hard cycle (its first element is the class itself) that won't
+       be broken otherwise (it's a tuple and tuples don't have a
+       tp_clear handler).  None of the other fields need to be
+       cleared, and here's why:
 
-	   tp_dict:
-	       It is a dict, so the collector will call its tp_clear.
+       tp_dict:
+           It is a dict, so the collector will call its tp_clear.
 
-	   tp_cache:
-	       Not used; if it were, it would be a dict.
+       tp_cache:
+           Not used; if it were, it would be a dict.
 
-	   tp_bases, tp_base:
-	       If these are involved in a cycle, there must be at least
-	       one other, mutable object in the cycle, e.g. a base
-	       class's dict; the cycle will be broken that way.
+       tp_bases, tp_base:
+           If these are involved in a cycle, there must be at least
+           one other, mutable object in the cycle, e.g. a base
+           class's dict; the cycle will be broken that way.
 
-	   tp_subclasses:
-	       A list of weak references can't be part of a cycle; and
-	       lists have their own tp_clear.
+       tp_subclasses:
+           A list of weak references can't be part of a cycle; and
+           lists have their own tp_clear.
 
-	   slots (in PyHeapTypeObject):
-	       A tuple of strings can't be part of a cycle.
-	*/
+       slots (in PyHeapTypeObject):
+           A tuple of strings can't be part of a cycle.
+    */
 
-	Py_CLEAR(type->tp_mro);
+    Py_CLEAR(type->tp_mro);
 
-	return 0;
+    return 0;
 }
 
 static int
 type_is_gc(PyTypeObject *type)
 {
-	return type->tp_flags & Py_TPFLAGS_HEAPTYPE;
+    return type->tp_flags & Py_TPFLAGS_HEAPTYPE;
 }
 
 PyTypeObject PyType_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"type",					/* tp_name */
-	sizeof(PyHeapTypeObject),		/* tp_basicsize */
-	sizeof(PyMemberDef),			/* tp_itemsize */
-	(destructor)type_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,				/* tp_compare */
-	(reprfunc)type_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	(hashfunc)_Py_HashPointer,		/* tp_hash */
-	(ternaryfunc)type_call,			/* tp_call */
-	0,					/* tp_str */
-	(getattrofunc)type_getattro,		/* tp_getattro */
-	(setattrofunc)type_setattro,		/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_BASETYPE | Py_TPFLAGS_TYPE_SUBCLASS,	/* tp_flags */
-	type_doc,				/* tp_doc */
-	(traverseproc)type_traverse,		/* tp_traverse */
-	(inquiry)type_clear,			/* tp_clear */
-	type_richcompare,					/* tp_richcompare */
-	offsetof(PyTypeObject, tp_weaklist),	/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	type_methods,				/* tp_methods */
-	type_members,				/* tp_members */
-	type_getsets,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	offsetof(PyTypeObject, tp_dict),	/* tp_dictoffset */
-	type_init,				/* tp_init */
-	0,					/* tp_alloc */
-	type_new,				/* tp_new */
-	PyObject_GC_Del,			/* tp_free */
-	(inquiry)type_is_gc,			/* tp_is_gc */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "type",                                     /* tp_name */
+    sizeof(PyHeapTypeObject),                   /* tp_basicsize */
+    sizeof(PyMemberDef),                        /* tp_itemsize */
+    (destructor)type_dealloc,                   /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                  /* tp_compare */
+    (reprfunc)type_repr,                        /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)_Py_HashPointer,                  /* tp_hash */
+    (ternaryfunc)type_call,                     /* tp_call */
+    0,                                          /* tp_str */
+    (getattrofunc)type_getattro,                /* tp_getattro */
+    (setattrofunc)type_setattro,                /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_BASETYPE | Py_TPFLAGS_TYPE_SUBCLASS,         /* tp_flags */
+    type_doc,                                   /* tp_doc */
+    (traverseproc)type_traverse,                /* tp_traverse */
+    (inquiry)type_clear,                        /* tp_clear */
+    type_richcompare,                                           /* tp_richcompare */
+    offsetof(PyTypeObject, tp_weaklist),        /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    type_methods,                               /* tp_methods */
+    type_members,                               /* tp_members */
+    type_getsets,                               /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    offsetof(PyTypeObject, tp_dict),            /* tp_dictoffset */
+    type_init,                                  /* tp_init */
+    0,                                          /* tp_alloc */
+    type_new,                                   /* tp_new */
+    PyObject_GC_Del,                            /* tp_free */
+    (inquiry)type_is_gc,                        /* tp_is_gc */
 };
 
 
@@ -2821,282 +2821,282 @@
 static int
 excess_args(PyObject *args, PyObject *kwds)
 {
-	return PyTuple_GET_SIZE(args) ||
-		(kwds && PyDict_Check(kwds) && PyDict_Size(kwds));
+    return PyTuple_GET_SIZE(args) ||
+        (kwds && PyDict_Check(kwds) && PyDict_Size(kwds));
 }
 
 static int
 object_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	int err = 0;
-	if (excess_args(args, kwds)) {
-		PyTypeObject *type = Py_TYPE(self);
-		if (type->tp_init != object_init &&
-		    type->tp_new != object_new)
-		{
-			err = PyErr_WarnEx(PyExc_DeprecationWarning,
-				   "object.__init__() takes no parameters",
-				   1);
-		}
-		else if (type->tp_init != object_init ||
-			 type->tp_new == object_new)
-		{
-			PyErr_SetString(PyExc_TypeError,
-				"object.__init__() takes no parameters");
-			err = -1;
-		}
-	}
-	return err;
+    int err = 0;
+    if (excess_args(args, kwds)) {
+        PyTypeObject *type = Py_TYPE(self);
+        if (type->tp_init != object_init &&
+            type->tp_new != object_new)
+        {
+            err = PyErr_WarnEx(PyExc_DeprecationWarning,
+                       "object.__init__() takes no parameters",
+                       1);
+        }
+        else if (type->tp_init != object_init ||
+                 type->tp_new == object_new)
+        {
+            PyErr_SetString(PyExc_TypeError,
+                "object.__init__() takes no parameters");
+            err = -1;
+        }
+    }
+    return err;
 }
 
 static PyObject *
 object_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	int err = 0;
-	if (excess_args(args, kwds)) {
-		if (type->tp_new != object_new &&
-		    type->tp_init != object_init)
-		{
-			err = PyErr_WarnEx(PyExc_DeprecationWarning,
-				   "object.__new__() takes no parameters",
-				   1);
-		}
-		else if (type->tp_new != object_new ||
-			 type->tp_init == object_init)
-		{
-			PyErr_SetString(PyExc_TypeError,
-				"object.__new__() takes no parameters");
-			err = -1;
-		}
-	}
-	if (err < 0)
-		return NULL;
+    int err = 0;
+    if (excess_args(args, kwds)) {
+        if (type->tp_new != object_new &&
+            type->tp_init != object_init)
+        {
+            err = PyErr_WarnEx(PyExc_DeprecationWarning,
+                       "object.__new__() takes no parameters",
+                       1);
+        }
+        else if (type->tp_new != object_new ||
+                 type->tp_init == object_init)
+        {
+            PyErr_SetString(PyExc_TypeError,
+                "object.__new__() takes no parameters");
+            err = -1;
+        }
+    }
+    if (err < 0)
+        return NULL;
 
-	if (type->tp_flags & Py_TPFLAGS_IS_ABSTRACT) {
-		static PyObject *comma = NULL;
-		PyObject *abstract_methods = NULL;
-		PyObject *builtins;
-		PyObject *sorted;
-		PyObject *sorted_methods = NULL;
-		PyObject *joined = NULL;
-		const char *joined_str;
+    if (type->tp_flags & Py_TPFLAGS_IS_ABSTRACT) {
+        static PyObject *comma = NULL;
+        PyObject *abstract_methods = NULL;
+        PyObject *builtins;
+        PyObject *sorted;
+        PyObject *sorted_methods = NULL;
+        PyObject *joined = NULL;
+        const char *joined_str;
 
-		/* Compute ", ".join(sorted(type.__abstractmethods__))
-		   into joined. */
-		abstract_methods = type_abstractmethods(type, NULL);
-		if (abstract_methods == NULL)
-			goto error;
-		builtins = PyEval_GetBuiltins();
-		if (builtins == NULL)
-			goto error;
-		sorted = PyDict_GetItemString(builtins, "sorted");
-		if (sorted == NULL)
-			goto error;
-		sorted_methods = PyObject_CallFunctionObjArgs(sorted,
-							      abstract_methods,
-							      NULL);
-		if (sorted_methods == NULL)
-			goto error;
-		if (comma == NULL) {
-			comma = PyString_InternFromString(", ");
-			if (comma == NULL)
-				goto error;
-		}
-		joined = PyObject_CallMethod(comma, "join",
-					     "O",  sorted_methods);
-		if (joined == NULL)
-			goto error;
-		joined_str = PyString_AsString(joined);
-		if (joined_str == NULL)
-			goto error;
+        /* Compute ", ".join(sorted(type.__abstractmethods__))
+           into joined. */
+        abstract_methods = type_abstractmethods(type, NULL);
+        if (abstract_methods == NULL)
+            goto error;
+        builtins = PyEval_GetBuiltins();
+        if (builtins == NULL)
+            goto error;
+        sorted = PyDict_GetItemString(builtins, "sorted");
+        if (sorted == NULL)
+            goto error;
+        sorted_methods = PyObject_CallFunctionObjArgs(sorted,
+                                                      abstract_methods,
+                                                      NULL);
+        if (sorted_methods == NULL)
+            goto error;
+        if (comma == NULL) {
+            comma = PyString_InternFromString(", ");
+            if (comma == NULL)
+                goto error;
+        }
+        joined = PyObject_CallMethod(comma, "join",
+                                     "O",  sorted_methods);
+        if (joined == NULL)
+            goto error;
+        joined_str = PyString_AsString(joined);
+        if (joined_str == NULL)
+            goto error;
 
-		PyErr_Format(PyExc_TypeError,
-			     "Can't instantiate abstract class %s "
-			     "with abstract methods %s",
-			     type->tp_name,
-			     joined_str);
-	error:
-		Py_XDECREF(joined);
-		Py_XDECREF(sorted_methods);
-		Py_XDECREF(abstract_methods);
-		return NULL;
-	}
-	return type->tp_alloc(type, 0);
+        PyErr_Format(PyExc_TypeError,
+                     "Can't instantiate abstract class %s "
+                     "with abstract methods %s",
+                     type->tp_name,
+                     joined_str);
+    error:
+        Py_XDECREF(joined);
+        Py_XDECREF(sorted_methods);
+        Py_XDECREF(abstract_methods);
+        return NULL;
+    }
+    return type->tp_alloc(type, 0);
 }
 
 static void
 object_dealloc(PyObject *self)
 {
-	Py_TYPE(self)->tp_free(self);
+    Py_TYPE(self)->tp_free(self);
 }
 
 static PyObject *
 object_repr(PyObject *self)
 {
-	PyTypeObject *type;
-	PyObject *mod, *name, *rtn;
+    PyTypeObject *type;
+    PyObject *mod, *name, *rtn;
 
-	type = Py_TYPE(self);
-	mod = type_module(type, NULL);
-	if (mod == NULL)
-		PyErr_Clear();
-	else if (!PyString_Check(mod)) {
-		Py_DECREF(mod);
-		mod = NULL;
-	}
-	name = type_name(type, NULL);
-	if (name == NULL)
-		return NULL;
-	if (mod != NULL && strcmp(PyString_AS_STRING(mod), "__builtin__"))
-		rtn = PyString_FromFormat("<%s.%s object at %p>",
-					  PyString_AS_STRING(mod),
-					  PyString_AS_STRING(name),
-					  self);
-	else
-		rtn = PyString_FromFormat("<%s object at %p>",
-					  type->tp_name, self);
-	Py_XDECREF(mod);
-	Py_DECREF(name);
-	return rtn;
+    type = Py_TYPE(self);
+    mod = type_module(type, NULL);
+    if (mod == NULL)
+        PyErr_Clear();
+    else if (!PyString_Check(mod)) {
+        Py_DECREF(mod);
+        mod = NULL;
+    }
+    name = type_name(type, NULL);
+    if (name == NULL)
+        return NULL;
+    if (mod != NULL && strcmp(PyString_AS_STRING(mod), "__builtin__"))
+        rtn = PyString_FromFormat("<%s.%s object at %p>",
+                                  PyString_AS_STRING(mod),
+                                  PyString_AS_STRING(name),
+                                  self);
+    else
+        rtn = PyString_FromFormat("<%s object at %p>",
+                                  type->tp_name, self);
+    Py_XDECREF(mod);
+    Py_DECREF(name);
+    return rtn;
 }
 
 static PyObject *
 object_str(PyObject *self)
 {
-	unaryfunc f;
+    unaryfunc f;
 
-	f = Py_TYPE(self)->tp_repr;
-	if (f == NULL)
-		f = object_repr;
-	return f(self);
+    f = Py_TYPE(self)->tp_repr;
+    if (f == NULL)
+        f = object_repr;
+    return f(self);
 }
 
 static PyObject *
 object_get_class(PyObject *self, void *closure)
 {
-	Py_INCREF(Py_TYPE(self));
-	return (PyObject *)(Py_TYPE(self));
+    Py_INCREF(Py_TYPE(self));
+    return (PyObject *)(Py_TYPE(self));
 }
 
 static int
 equiv_structs(PyTypeObject *a, PyTypeObject *b)
 {
-	return a == b ||
-	       (a != NULL &&
-		b != NULL &&
-		a->tp_basicsize == b->tp_basicsize &&
-		a->tp_itemsize == b->tp_itemsize &&
-		a->tp_dictoffset == b->tp_dictoffset &&
-		a->tp_weaklistoffset == b->tp_weaklistoffset &&
-		((a->tp_flags & Py_TPFLAGS_HAVE_GC) ==
-		 (b->tp_flags & Py_TPFLAGS_HAVE_GC)));
+    return a == b ||
+           (a != NULL &&
+        b != NULL &&
+        a->tp_basicsize == b->tp_basicsize &&
+        a->tp_itemsize == b->tp_itemsize &&
+        a->tp_dictoffset == b->tp_dictoffset &&
+        a->tp_weaklistoffset == b->tp_weaklistoffset &&
+        ((a->tp_flags & Py_TPFLAGS_HAVE_GC) ==
+         (b->tp_flags & Py_TPFLAGS_HAVE_GC)));
 }
 
 static int
 same_slots_added(PyTypeObject *a, PyTypeObject *b)
 {
-	PyTypeObject *base = a->tp_base;
-	Py_ssize_t size;
-	PyObject *slots_a, *slots_b;
+    PyTypeObject *base = a->tp_base;
+    Py_ssize_t size;
+    PyObject *slots_a, *slots_b;
 
-	if (base != b->tp_base)
-		return 0;
-	if (equiv_structs(a, base) && equiv_structs(b, base))
-		return 1;
-	size = base->tp_basicsize;
-	if (a->tp_dictoffset == size && b->tp_dictoffset == size)
-		size += sizeof(PyObject *);
-	if (a->tp_weaklistoffset == size && b->tp_weaklistoffset == size)
-		size += sizeof(PyObject *);
+    if (base != b->tp_base)
+        return 0;
+    if (equiv_structs(a, base) && equiv_structs(b, base))
+        return 1;
+    size = base->tp_basicsize;
+    if (a->tp_dictoffset == size && b->tp_dictoffset == size)
+        size += sizeof(PyObject *);
+    if (a->tp_weaklistoffset == size && b->tp_weaklistoffset == size)
+        size += sizeof(PyObject *);
 
-	/* Check slots compliance */
-	slots_a = ((PyHeapTypeObject *)a)->ht_slots;
-	slots_b = ((PyHeapTypeObject *)b)->ht_slots;
-	if (slots_a && slots_b) {
-		if (PyObject_Compare(slots_a, slots_b) != 0)
-			return 0;
-		size += sizeof(PyObject *) * PyTuple_GET_SIZE(slots_a);
-	}
-	return size == a->tp_basicsize && size == b->tp_basicsize;
+    /* Check slots compliance */
+    slots_a = ((PyHeapTypeObject *)a)->ht_slots;
+    slots_b = ((PyHeapTypeObject *)b)->ht_slots;
+    if (slots_a && slots_b) {
+        if (PyObject_Compare(slots_a, slots_b) != 0)
+            return 0;
+        size += sizeof(PyObject *) * PyTuple_GET_SIZE(slots_a);
+    }
+    return size == a->tp_basicsize && size == b->tp_basicsize;
 }
 
 static int
 compatible_for_assignment(PyTypeObject* oldto, PyTypeObject* newto, char* attr)
 {
-	PyTypeObject *newbase, *oldbase;
+    PyTypeObject *newbase, *oldbase;
 
-	if (newto->tp_dealloc != oldto->tp_dealloc ||
-	    newto->tp_free != oldto->tp_free)
-	{
-		PyErr_Format(PyExc_TypeError,
-			     "%s assignment: "
-			     "'%s' deallocator differs from '%s'",
-			     attr,
-			     newto->tp_name,
-			     oldto->tp_name);
-		return 0;
-	}
-	newbase = newto;
-	oldbase = oldto;
-	while (equiv_structs(newbase, newbase->tp_base))
-		newbase = newbase->tp_base;
-	while (equiv_structs(oldbase, oldbase->tp_base))
-		oldbase = oldbase->tp_base;
-	if (newbase != oldbase &&
-	    (newbase->tp_base != oldbase->tp_base ||
-	     !same_slots_added(newbase, oldbase))) {
-		PyErr_Format(PyExc_TypeError,
-			     "%s assignment: "
-			     "'%s' object layout differs from '%s'",
-			     attr,
-			     newto->tp_name,
-			     oldto->tp_name);
-		return 0;
-	}
+    if (newto->tp_dealloc != oldto->tp_dealloc ||
+        newto->tp_free != oldto->tp_free)
+    {
+        PyErr_Format(PyExc_TypeError,
+                     "%s assignment: "
+                     "'%s' deallocator differs from '%s'",
+                     attr,
+                     newto->tp_name,
+                     oldto->tp_name);
+        return 0;
+    }
+    newbase = newto;
+    oldbase = oldto;
+    while (equiv_structs(newbase, newbase->tp_base))
+        newbase = newbase->tp_base;
+    while (equiv_structs(oldbase, oldbase->tp_base))
+        oldbase = oldbase->tp_base;
+    if (newbase != oldbase &&
+        (newbase->tp_base != oldbase->tp_base ||
+         !same_slots_added(newbase, oldbase))) {
+        PyErr_Format(PyExc_TypeError,
+                     "%s assignment: "
+                     "'%s' object layout differs from '%s'",
+                     attr,
+                     newto->tp_name,
+                     oldto->tp_name);
+        return 0;
+    }
 
-	return 1;
+    return 1;
 }
 
 static int
 object_set_class(PyObject *self, PyObject *value, void *closure)
 {
-	PyTypeObject *oldto = Py_TYPE(self);
-	PyTypeObject *newto;
+    PyTypeObject *oldto = Py_TYPE(self);
+    PyTypeObject *newto;
 
-	if (value == NULL) {
-		PyErr_SetString(PyExc_TypeError,
-				"can't delete __class__ attribute");
-		return -1;
-	}
-	if (!PyType_Check(value)) {
-		PyErr_Format(PyExc_TypeError,
-		  "__class__ must be set to new-style class, not '%s' object",
-		  Py_TYPE(value)->tp_name);
-		return -1;
-	}
-	newto = (PyTypeObject *)value;
-	if (!(newto->tp_flags & Py_TPFLAGS_HEAPTYPE) ||
-	    !(oldto->tp_flags & Py_TPFLAGS_HEAPTYPE))
-	{
-		PyErr_Format(PyExc_TypeError,
-			     "__class__ assignment: only for heap types");
-		return -1;
-	}
-	if (compatible_for_assignment(newto, oldto, "__class__")) {
-		Py_INCREF(newto);
-		Py_TYPE(self) = newto;
-		Py_DECREF(oldto);
-		return 0;
-	}
-	else {
-		return -1;
-	}
+    if (value == NULL) {
+        PyErr_SetString(PyExc_TypeError,
+                        "can't delete __class__ attribute");
+        return -1;
+    }
+    if (!PyType_Check(value)) {
+        PyErr_Format(PyExc_TypeError,
+          "__class__ must be set to new-style class, not '%s' object",
+          Py_TYPE(value)->tp_name);
+        return -1;
+    }
+    newto = (PyTypeObject *)value;
+    if (!(newto->tp_flags & Py_TPFLAGS_HEAPTYPE) ||
+        !(oldto->tp_flags & Py_TPFLAGS_HEAPTYPE))
+    {
+        PyErr_Format(PyExc_TypeError,
+                     "__class__ assignment: only for heap types");
+        return -1;
+    }
+    if (compatible_for_assignment(newto, oldto, "__class__")) {
+        Py_INCREF(newto);
+        Py_TYPE(self) = newto;
+        Py_DECREF(oldto);
+        return 0;
+    }
+    else {
+        return -1;
+    }
 }
 
 static PyGetSetDef object_getsets[] = {
-	{"__class__", object_get_class, object_set_class,
-	 PyDoc_STR("the object's class")},
-	{0}
+    {"__class__", object_get_class, object_set_class,
+     PyDoc_STR("the object's class")},
+    {0}
 };
 
 
@@ -3110,190 +3110,190 @@
 static PyObject *
 import_copyreg(void)
 {
-	static PyObject *copyreg_str;
+    static PyObject *copyreg_str;
 
-	if (!copyreg_str) {
-		copyreg_str = PyString_InternFromString("copy_reg");
-		if (copyreg_str == NULL)
-			return NULL;
-	}
+    if (!copyreg_str) {
+        copyreg_str = PyString_InternFromString("copy_reg");
+        if (copyreg_str == NULL)
+            return NULL;
+    }
 
-	return PyImport_Import(copyreg_str);
+    return PyImport_Import(copyreg_str);
 }
 
 static PyObject *
 slotnames(PyObject *cls)
 {
-	PyObject *clsdict;
-	PyObject *copyreg;
-	PyObject *slotnames;
+    PyObject *clsdict;
+    PyObject *copyreg;
+    PyObject *slotnames;
 
-	if (!PyType_Check(cls)) {
-		Py_INCREF(Py_None);
-		return Py_None;
-	}
+    if (!PyType_Check(cls)) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
 
-	clsdict = ((PyTypeObject *)cls)->tp_dict;
-	slotnames = PyDict_GetItemString(clsdict, "__slotnames__");
-	if (slotnames != NULL && PyList_Check(slotnames)) {
-		Py_INCREF(slotnames);
-		return slotnames;
-	}
+    clsdict = ((PyTypeObject *)cls)->tp_dict;
+    slotnames = PyDict_GetItemString(clsdict, "__slotnames__");
+    if (slotnames != NULL && PyList_Check(slotnames)) {
+        Py_INCREF(slotnames);
+        return slotnames;
+    }
 
-	copyreg = import_copyreg();
-	if (copyreg == NULL)
-		return NULL;
+    copyreg = import_copyreg();
+    if (copyreg == NULL)
+        return NULL;
 
-	slotnames = PyObject_CallMethod(copyreg, "_slotnames", "O", cls);
-	Py_DECREF(copyreg);
-	if (slotnames != NULL &&
-	    slotnames != Py_None &&
-	    !PyList_Check(slotnames))
-	{
-		PyErr_SetString(PyExc_TypeError,
-			"copy_reg._slotnames didn't return a list or None");
-		Py_DECREF(slotnames);
-		slotnames = NULL;
-	}
+    slotnames = PyObject_CallMethod(copyreg, "_slotnames", "O", cls);
+    Py_DECREF(copyreg);
+    if (slotnames != NULL &&
+        slotnames != Py_None &&
+        !PyList_Check(slotnames))
+    {
+        PyErr_SetString(PyExc_TypeError,
+            "copy_reg._slotnames didn't return a list or None");
+        Py_DECREF(slotnames);
+        slotnames = NULL;
+    }
 
-	return slotnames;
+    return slotnames;
 }
 
 static PyObject *
 reduce_2(PyObject *obj)
 {
-	PyObject *cls, *getnewargs;
-	PyObject *args = NULL, *args2 = NULL;
-	PyObject *getstate = NULL, *state = NULL, *names = NULL;
-	PyObject *slots = NULL, *listitems = NULL, *dictitems = NULL;
-	PyObject *copyreg = NULL, *newobj = NULL, *res = NULL;
-	Py_ssize_t i, n;
+    PyObject *cls, *getnewargs;
+    PyObject *args = NULL, *args2 = NULL;
+    PyObject *getstate = NULL, *state = NULL, *names = NULL;
+    PyObject *slots = NULL, *listitems = NULL, *dictitems = NULL;
+    PyObject *copyreg = NULL, *newobj = NULL, *res = NULL;
+    Py_ssize_t i, n;
 
-	cls = PyObject_GetAttrString(obj, "__class__");
-	if (cls == NULL)
-		return NULL;
+    cls = PyObject_GetAttrString(obj, "__class__");
+    if (cls == NULL)
+        return NULL;
 
-	getnewargs = PyObject_GetAttrString(obj, "__getnewargs__");
-	if (getnewargs != NULL) {
-		args = PyObject_CallObject(getnewargs, NULL);
-		Py_DECREF(getnewargs);
-		if (args != NULL && !PyTuple_Check(args)) {
-			PyErr_Format(PyExc_TypeError,
-				"__getnewargs__ should return a tuple, "
-				"not '%.200s'", Py_TYPE(args)->tp_name);
-			goto end;
-		}
-	}
-	else {
-		PyErr_Clear();
-		args = PyTuple_New(0);
-	}
-	if (args == NULL)
-		goto end;
+    getnewargs = PyObject_GetAttrString(obj, "__getnewargs__");
+    if (getnewargs != NULL) {
+        args = PyObject_CallObject(getnewargs, NULL);
+        Py_DECREF(getnewargs);
+        if (args != NULL && !PyTuple_Check(args)) {
+            PyErr_Format(PyExc_TypeError,
+                "__getnewargs__ should return a tuple, "
+                "not '%.200s'", Py_TYPE(args)->tp_name);
+            goto end;
+        }
+    }
+    else {
+        PyErr_Clear();
+        args = PyTuple_New(0);
+    }
+    if (args == NULL)
+        goto end;
 
-	getstate = PyObject_GetAttrString(obj, "__getstate__");
-	if (getstate != NULL) {
-		state = PyObject_CallObject(getstate, NULL);
-		Py_DECREF(getstate);
-		if (state == NULL)
-			goto end;
-	}
-	else {
-		PyErr_Clear();
-		state = PyObject_GetAttrString(obj, "__dict__");
-		if (state == NULL) {
-			PyErr_Clear();
-			state = Py_None;
-			Py_INCREF(state);
-		}
-		names = slotnames(cls);
-		if (names == NULL)
-			goto end;
-		if (names != Py_None) {
-			assert(PyList_Check(names));
-			slots = PyDict_New();
-			if (slots == NULL)
-				goto end;
-			n = 0;
-			/* Can't pre-compute the list size; the list
-			   is stored on the class so accessible to other
-			   threads, which may be run by DECREF */
-			for (i = 0; i < PyList_GET_SIZE(names); i++) {
-				PyObject *name, *value;
-				name = PyList_GET_ITEM(names, i);
-				value = PyObject_GetAttr(obj, name);
-				if (value == NULL)
-					PyErr_Clear();
-				else {
-					int err = PyDict_SetItem(slots, name,
-								 value);
-					Py_DECREF(value);
-					if (err)
-						goto end;
-					n++;
-				}
-			}
-			if (n) {
-				state = Py_BuildValue("(NO)", state, slots);
-				if (state == NULL)
-					goto end;
-			}
-		}
-	}
+    getstate = PyObject_GetAttrString(obj, "__getstate__");
+    if (getstate != NULL) {
+        state = PyObject_CallObject(getstate, NULL);
+        Py_DECREF(getstate);
+        if (state == NULL)
+            goto end;
+    }
+    else {
+        PyErr_Clear();
+        state = PyObject_GetAttrString(obj, "__dict__");
+        if (state == NULL) {
+            PyErr_Clear();
+            state = Py_None;
+            Py_INCREF(state);
+        }
+        names = slotnames(cls);
+        if (names == NULL)
+            goto end;
+        if (names != Py_None) {
+            assert(PyList_Check(names));
+            slots = PyDict_New();
+            if (slots == NULL)
+                goto end;
+            n = 0;
+            /* Can't pre-compute the list size; the list
+               is stored on the class so accessible to other
+               threads, which may be run by DECREF */
+            for (i = 0; i < PyList_GET_SIZE(names); i++) {
+                PyObject *name, *value;
+                name = PyList_GET_ITEM(names, i);
+                value = PyObject_GetAttr(obj, name);
+                if (value == NULL)
+                    PyErr_Clear();
+                else {
+                    int err = PyDict_SetItem(slots, name,
+                                             value);
+                    Py_DECREF(value);
+                    if (err)
+                        goto end;
+                    n++;
+                }
+            }
+            if (n) {
+                state = Py_BuildValue("(NO)", state, slots);
+                if (state == NULL)
+                    goto end;
+            }
+        }
+    }
 
-	if (!PyList_Check(obj)) {
-		listitems = Py_None;
-		Py_INCREF(listitems);
-	}
-	else {
-		listitems = PyObject_GetIter(obj);
-		if (listitems == NULL)
-			goto end;
-	}
+    if (!PyList_Check(obj)) {
+        listitems = Py_None;
+        Py_INCREF(listitems);
+    }
+    else {
+        listitems = PyObject_GetIter(obj);
+        if (listitems == NULL)
+            goto end;
+    }
 
-	if (!PyDict_Check(obj)) {
-		dictitems = Py_None;
-		Py_INCREF(dictitems);
-	}
-	else {
-		dictitems = PyObject_CallMethod(obj, "iteritems", "");
-		if (dictitems == NULL)
-			goto end;
-	}
+    if (!PyDict_Check(obj)) {
+        dictitems = Py_None;
+        Py_INCREF(dictitems);
+    }
+    else {
+        dictitems = PyObject_CallMethod(obj, "iteritems", "");
+        if (dictitems == NULL)
+            goto end;
+    }
 
-	copyreg = import_copyreg();
-	if (copyreg == NULL)
-		goto end;
-	newobj = PyObject_GetAttrString(copyreg, "__newobj__");
-	if (newobj == NULL)
-		goto end;
+    copyreg = import_copyreg();
+    if (copyreg == NULL)
+        goto end;
+    newobj = PyObject_GetAttrString(copyreg, "__newobj__");
+    if (newobj == NULL)
+        goto end;
 
-	n = PyTuple_GET_SIZE(args);
-	args2 = PyTuple_New(n+1);
-	if (args2 == NULL)
-		goto end;
-	PyTuple_SET_ITEM(args2, 0, cls);
-	cls = NULL;
-	for (i = 0; i < n; i++) {
-		PyObject *v = PyTuple_GET_ITEM(args, i);
-		Py_INCREF(v);
-		PyTuple_SET_ITEM(args2, i+1, v);
-	}
+    n = PyTuple_GET_SIZE(args);
+    args2 = PyTuple_New(n+1);
+    if (args2 == NULL)
+        goto end;
+    PyTuple_SET_ITEM(args2, 0, cls);
+    cls = NULL;
+    for (i = 0; i < n; i++) {
+        PyObject *v = PyTuple_GET_ITEM(args, i);
+        Py_INCREF(v);
+        PyTuple_SET_ITEM(args2, i+1, v);
+    }
 
-	res = PyTuple_Pack(5, newobj, args2, state, listitems, dictitems);
+    res = PyTuple_Pack(5, newobj, args2, state, listitems, dictitems);
 
   end:
-	Py_XDECREF(cls);
-	Py_XDECREF(args);
-	Py_XDECREF(args2);
-	Py_XDECREF(slots);
-	Py_XDECREF(state);
-	Py_XDECREF(names);
-	Py_XDECREF(listitems);
-	Py_XDECREF(dictitems);
-	Py_XDECREF(copyreg);
-	Py_XDECREF(newobj);
-	return res;
+    Py_XDECREF(cls);
+    Py_XDECREF(args);
+    Py_XDECREF(args2);
+    Py_XDECREF(slots);
+    Py_XDECREF(state);
+    Py_XDECREF(names);
+    Py_XDECREF(listitems);
+    Py_XDECREF(dictitems);
+    Py_XDECREF(copyreg);
+    Py_XDECREF(newobj);
+    return res;
 }
 
 /*
@@ -3314,79 +3314,79 @@
 static PyObject *
 _common_reduce(PyObject *self, int proto)
 {
-	PyObject *copyreg, *res;
+    PyObject *copyreg, *res;
 
-	if (proto >= 2)
-		return reduce_2(self);
+    if (proto >= 2)
+        return reduce_2(self);
 
-	copyreg = import_copyreg();
-	if (!copyreg)
-		return NULL;
+    copyreg = import_copyreg();
+    if (!copyreg)
+        return NULL;
 
-	res = PyEval_CallMethod(copyreg, "_reduce_ex", "(Oi)", self, proto);
-	Py_DECREF(copyreg);
+    res = PyEval_CallMethod(copyreg, "_reduce_ex", "(Oi)", self, proto);
+    Py_DECREF(copyreg);
 
-	return res;
+    return res;
 }
 
 static PyObject *
 object_reduce(PyObject *self, PyObject *args)
 {
-	int proto = 0;
+    int proto = 0;
 
-	if (!PyArg_ParseTuple(args, "|i:__reduce__", &proto))
-		return NULL;
+    if (!PyArg_ParseTuple(args, "|i:__reduce__", &proto))
+        return NULL;
 
-	return _common_reduce(self, proto);
+    return _common_reduce(self, proto);
 }
 
 static PyObject *
 object_reduce_ex(PyObject *self, PyObject *args)
 {
-	PyObject *reduce, *res;
-	int proto = 0;
+    PyObject *reduce, *res;
+    int proto = 0;
 
-	if (!PyArg_ParseTuple(args, "|i:__reduce_ex__", &proto))
-		return NULL;
+    if (!PyArg_ParseTuple(args, "|i:__reduce_ex__", &proto))
+        return NULL;
 
-	reduce = PyObject_GetAttrString(self, "__reduce__");
-	if (reduce == NULL)
-		PyErr_Clear();
-	else {
-		PyObject *cls, *clsreduce, *objreduce;
-		int override;
-		cls = PyObject_GetAttrString(self, "__class__");
-		if (cls == NULL) {
-			Py_DECREF(reduce);
-			return NULL;
-		}
-		clsreduce = PyObject_GetAttrString(cls, "__reduce__");
-		Py_DECREF(cls);
-		if (clsreduce == NULL) {
-			Py_DECREF(reduce);
-			return NULL;
-		}
-		objreduce = PyDict_GetItemString(PyBaseObject_Type.tp_dict,
-						 "__reduce__");
-		override = (clsreduce != objreduce);
-		Py_DECREF(clsreduce);
-		if (override) {
-			res = PyObject_CallObject(reduce, NULL);
-			Py_DECREF(reduce);
-			return res;
-		}
-		else
-			Py_DECREF(reduce);
-	}
+    reduce = PyObject_GetAttrString(self, "__reduce__");
+    if (reduce == NULL)
+        PyErr_Clear();
+    else {
+        PyObject *cls, *clsreduce, *objreduce;
+        int override;
+        cls = PyObject_GetAttrString(self, "__class__");
+        if (cls == NULL) {
+            Py_DECREF(reduce);
+            return NULL;
+        }
+        clsreduce = PyObject_GetAttrString(cls, "__reduce__");
+        Py_DECREF(cls);
+        if (clsreduce == NULL) {
+            Py_DECREF(reduce);
+            return NULL;
+        }
+        objreduce = PyDict_GetItemString(PyBaseObject_Type.tp_dict,
+                                         "__reduce__");
+        override = (clsreduce != objreduce);
+        Py_DECREF(clsreduce);
+        if (override) {
+            res = PyObject_CallObject(reduce, NULL);
+            Py_DECREF(reduce);
+            return res;
+        }
+        else
+            Py_DECREF(reduce);
+    }
 
-	return _common_reduce(self, proto);
+    return _common_reduce(self, proto);
 }
 
 static PyObject *
 object_subclasshook(PyObject *cls, PyObject *args)
 {
-	Py_INCREF(Py_NotImplemented);
-	return Py_NotImplemented;
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
 }
 
 PyDoc_STRVAR(object_subclasshook_doc,
@@ -3402,141 +3402,141 @@
 
    class object:
        def __format__(self, format_spec):
-           if isinstance(format_spec, str):
-               return format(str(self), format_spec)
-           elif isinstance(format_spec, unicode):
-               return format(unicode(self), format_spec)
+       if isinstance(format_spec, str):
+           return format(str(self), format_spec)
+       elif isinstance(format_spec, unicode):
+           return format(unicode(self), format_spec)
 */
 static PyObject *
 object_format(PyObject *self, PyObject *args)
 {
-        PyObject *format_spec;
-        PyObject *self_as_str = NULL;
-        PyObject *result = NULL;
-        PyObject *format_meth = NULL;
-        Py_ssize_t format_len;
+    PyObject *format_spec;
+    PyObject *self_as_str = NULL;
+    PyObject *result = NULL;
+    PyObject *format_meth = NULL;
+    Py_ssize_t format_len;
 
-        if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
-                return NULL;
+    if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
+        return NULL;
 #ifdef Py_USING_UNICODE
-	if (PyUnicode_Check(format_spec)) {
-	        format_len = PyUnicode_GET_SIZE(format_spec);
-	        self_as_str = PyObject_Unicode(self);
-	} else if (PyString_Check(format_spec)) {
+    if (PyUnicode_Check(format_spec)) {
+        format_len = PyUnicode_GET_SIZE(format_spec);
+        self_as_str = PyObject_Unicode(self);
+    } else if (PyString_Check(format_spec)) {
 #else
-        if (PyString_Check(format_spec)) {
+    if (PyString_Check(format_spec)) {
 #endif
-	        format_len = PyString_GET_SIZE(format_spec);
-	        self_as_str = PyObject_Str(self);
-	} else {
-	        PyErr_SetString(PyExc_TypeError,
-                         "argument to __format__ must be unicode or str");
-	        return NULL;
-	}
+        format_len = PyString_GET_SIZE(format_spec);
+        self_as_str = PyObject_Str(self);
+    } else {
+        PyErr_SetString(PyExc_TypeError,
+                 "argument to __format__ must be unicode or str");
+        return NULL;
+    }
 
-        if (self_as_str != NULL) {
-                /* Issue 7994: If we're converting to a string, we
-                   should reject format specifications */
-                if (format_len > 0) {
-                    if (PyErr_WarnEx(PyExc_PendingDeprecationWarning,
-                         "object.__format__ with a non-empty format "
-                         "string is deprecated", 1) < 0) {
-                            goto done;
-                    }
-                    /* Eventually this will become an error:
-                    PyErr_Format(PyExc_TypeError,
-                       "non-empty format string passed to object.__format__");
-                    goto done;
-                    */
-                }
-
-                /* find the format function */
-                format_meth = PyObject_GetAttrString(self_as_str,
-                                                     "__format__");
-                if (format_meth != NULL) {
-                       /* and call it */
-                        result = PyObject_CallFunctionObjArgs(format_meth,
-                                                              format_spec,
-                                                              NULL);
-                }
+    if (self_as_str != NULL) {
+        /* Issue 7994: If we're converting to a string, we
+           should reject format specifications */
+        if (format_len > 0) {
+            if (PyErr_WarnEx(PyExc_PendingDeprecationWarning,
+             "object.__format__ with a non-empty format "
+             "string is deprecated", 1) < 0) {
+                goto done;
+            }
+            /* Eventually this will become an error:
+            PyErr_Format(PyExc_TypeError,
+               "non-empty format string passed to object.__format__");
+            goto done;
+            */
         }
 
-done:
-        Py_XDECREF(self_as_str);
-        Py_XDECREF(format_meth);
+        /* find the format function */
+        format_meth = PyObject_GetAttrString(self_as_str,
+                                             "__format__");
+        if (format_meth != NULL) {
+               /* and call it */
+            result = PyObject_CallFunctionObjArgs(format_meth,
+                                                  format_spec,
+                                                  NULL);
+        }
+    }
 
-        return result;
+done:
+    Py_XDECREF(self_as_str);
+    Py_XDECREF(format_meth);
+
+    return result;
 }
 
 static PyObject *
 object_sizeof(PyObject *self, PyObject *args)
 {
-	Py_ssize_t res, isize;
+    Py_ssize_t res, isize;
 
-	res = 0;
-	isize = self->ob_type->tp_itemsize;
-	if (isize > 0)
-		res = self->ob_type->ob_size * isize;
-	res += self->ob_type->tp_basicsize;
+    res = 0;
+    isize = self->ob_type->tp_itemsize;
+    if (isize > 0)
+        res = self->ob_type->ob_size * isize;
+    res += self->ob_type->tp_basicsize;
 
-	return PyInt_FromSsize_t(res);	 
+    return PyInt_FromSsize_t(res);
 }
 
 static PyMethodDef object_methods[] = {
-	{"__reduce_ex__", object_reduce_ex, METH_VARARGS,
-	 PyDoc_STR("helper for pickle")},
-	{"__reduce__", object_reduce, METH_VARARGS,
-	 PyDoc_STR("helper for pickle")},
-	{"__subclasshook__", object_subclasshook, METH_CLASS | METH_VARARGS,
-	 object_subclasshook_doc},
-        {"__format__", object_format, METH_VARARGS,
-         PyDoc_STR("default object formatter")},
-        {"__sizeof__", object_sizeof, METH_NOARGS,
-         PyDoc_STR("__sizeof__() -> size of object in memory, in bytes")},
-	{0}
+    {"__reduce_ex__", object_reduce_ex, METH_VARARGS,
+     PyDoc_STR("helper for pickle")},
+    {"__reduce__", object_reduce, METH_VARARGS,
+     PyDoc_STR("helper for pickle")},
+    {"__subclasshook__", object_subclasshook, METH_CLASS | METH_VARARGS,
+     object_subclasshook_doc},
+    {"__format__", object_format, METH_VARARGS,
+     PyDoc_STR("default object formatter")},
+    {"__sizeof__", object_sizeof, METH_NOARGS,
+     PyDoc_STR("__sizeof__() -> size of object in memory, in bytes")},
+    {0}
 };
 
 
 PyTypeObject PyBaseObject_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"object",				/* tp_name */
-	sizeof(PyObject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	object_dealloc,				/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	object_repr,				/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	(hashfunc)_Py_HashPointer,		/* tp_hash */
-	0,					/* tp_call */
-	object_str,				/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	PyObject_GenericSetAttr,		/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
-	PyDoc_STR("The most base type"),	/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	object_methods,				/* tp_methods */
-	0,					/* tp_members */
-	object_getsets,				/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	object_init,				/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	object_new,				/* tp_new */
-	PyObject_Del,				/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "object",                                   /* tp_name */
+    sizeof(PyObject),                           /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    object_dealloc,                             /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    object_repr,                                /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    (hashfunc)_Py_HashPointer,                  /* tp_hash */
+    0,                                          /* tp_call */
+    object_str,                                 /* tp_str */
+    PyObject_GenericGetAttr,                    /* tp_getattro */
+    PyObject_GenericSetAttr,                    /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+    PyDoc_STR("The most base type"),            /* tp_doc */
+    0,                                          /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    object_methods,                             /* tp_methods */
+    0,                                          /* tp_members */
+    object_getsets,                             /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    0,                                          /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    object_init,                                /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    object_new,                                 /* tp_new */
+    PyObject_Del,                               /* tp_free */
 };
 
 
@@ -3545,77 +3545,77 @@
 static int
 add_methods(PyTypeObject *type, PyMethodDef *meth)
 {
-	PyObject *dict = type->tp_dict;
+    PyObject *dict = type->tp_dict;
 
-	for (; meth->ml_name != NULL; meth++) {
-		PyObject *descr;
-		if (PyDict_GetItemString(dict, meth->ml_name) &&
-			!(meth->ml_flags & METH_COEXIST))
-				continue;
-		if (meth->ml_flags & METH_CLASS) {
-			if (meth->ml_flags & METH_STATIC) {
-				PyErr_SetString(PyExc_ValueError,
-				     "method cannot be both class and static");
-				return -1;
-			}
-			descr = PyDescr_NewClassMethod(type, meth);
-		}
-		else if (meth->ml_flags & METH_STATIC) {
-			PyObject *cfunc = PyCFunction_New(meth, NULL);
-			if (cfunc == NULL)
-				return -1;
-			descr = PyStaticMethod_New(cfunc);
-			Py_DECREF(cfunc);
-		}
-		else {
-			descr = PyDescr_NewMethod(type, meth);
-		}
-		if (descr == NULL)
-			return -1;
-		if (PyDict_SetItemString(dict, meth->ml_name, descr) < 0)
-			return -1;
-		Py_DECREF(descr);
-	}
-	return 0;
+    for (; meth->ml_name != NULL; meth++) {
+        PyObject *descr;
+        if (PyDict_GetItemString(dict, meth->ml_name) &&
+            !(meth->ml_flags & METH_COEXIST))
+                continue;
+        if (meth->ml_flags & METH_CLASS) {
+            if (meth->ml_flags & METH_STATIC) {
+                PyErr_SetString(PyExc_ValueError,
+                     "method cannot be both class and static");
+                return -1;
+            }
+            descr = PyDescr_NewClassMethod(type, meth);
+        }
+        else if (meth->ml_flags & METH_STATIC) {
+            PyObject *cfunc = PyCFunction_New(meth, NULL);
+            if (cfunc == NULL)
+                return -1;
+            descr = PyStaticMethod_New(cfunc);
+            Py_DECREF(cfunc);
+        }
+        else {
+            descr = PyDescr_NewMethod(type, meth);
+        }
+        if (descr == NULL)
+            return -1;
+        if (PyDict_SetItemString(dict, meth->ml_name, descr) < 0)
+            return -1;
+        Py_DECREF(descr);
+    }
+    return 0;
 }
 
 static int
 add_members(PyTypeObject *type, PyMemberDef *memb)
 {
-	PyObject *dict = type->tp_dict;
+    PyObject *dict = type->tp_dict;
 
-	for (; memb->name != NULL; memb++) {
-		PyObject *descr;
-		if (PyDict_GetItemString(dict, memb->name))
-			continue;
-		descr = PyDescr_NewMember(type, memb);
-		if (descr == NULL)
-			return -1;
-		if (PyDict_SetItemString(dict, memb->name, descr) < 0)
-			return -1;
-		Py_DECREF(descr);
-	}
-	return 0;
+    for (; memb->name != NULL; memb++) {
+        PyObject *descr;
+        if (PyDict_GetItemString(dict, memb->name))
+            continue;
+        descr = PyDescr_NewMember(type, memb);
+        if (descr == NULL)
+            return -1;
+        if (PyDict_SetItemString(dict, memb->name, descr) < 0)
+            return -1;
+        Py_DECREF(descr);
+    }
+    return 0;
 }
 
 static int
 add_getset(PyTypeObject *type, PyGetSetDef *gsp)
 {
-	PyObject *dict = type->tp_dict;
+    PyObject *dict = type->tp_dict;
 
-	for (; gsp->name != NULL; gsp++) {
-		PyObject *descr;
-		if (PyDict_GetItemString(dict, gsp->name))
-			continue;
-		descr = PyDescr_NewGetSet(type, gsp);
+    for (; gsp->name != NULL; gsp++) {
+        PyObject *descr;
+        if (PyDict_GetItemString(dict, gsp->name))
+            continue;
+        descr = PyDescr_NewGetSet(type, gsp);
 
-		if (descr == NULL)
-			return -1;
-		if (PyDict_SetItemString(dict, gsp->name, descr) < 0)
-			return -1;
-		Py_DECREF(descr);
-	}
-	return 0;
+        if (descr == NULL)
+            return -1;
+        if (PyDict_SetItemString(dict, gsp->name, descr) < 0)
+            return -1;
+        Py_DECREF(descr);
+    }
+    return 0;
 }
 
 #define BUFFER_FLAGS (Py_TPFLAGS_HAVE_GETCHARBUFFER | Py_TPFLAGS_HAVE_NEWBUFFER)
@@ -3623,114 +3623,114 @@
 static void
 inherit_special(PyTypeObject *type, PyTypeObject *base)
 {
-	Py_ssize_t oldsize, newsize;
+    Py_ssize_t oldsize, newsize;
 
-	/* Special flag magic */
-	if (!type->tp_as_buffer && base->tp_as_buffer) {
-		type->tp_flags &= ~BUFFER_FLAGS;
-		type->tp_flags |=
-			base->tp_flags & BUFFER_FLAGS;
-	}
-	if (!type->tp_as_sequence && base->tp_as_sequence) {
-		type->tp_flags &= ~Py_TPFLAGS_HAVE_SEQUENCE_IN;
-		type->tp_flags |= base->tp_flags & Py_TPFLAGS_HAVE_SEQUENCE_IN;
-	}
-	if ((type->tp_flags & Py_TPFLAGS_HAVE_INPLACEOPS) !=
-	    (base->tp_flags & Py_TPFLAGS_HAVE_INPLACEOPS)) {
-		if ((!type->tp_as_number && base->tp_as_number) ||
-		    (!type->tp_as_sequence && base->tp_as_sequence)) {
-			type->tp_flags &= ~Py_TPFLAGS_HAVE_INPLACEOPS;
-			if (!type->tp_as_number && !type->tp_as_sequence) {
-				type->tp_flags |= base->tp_flags &
-					Py_TPFLAGS_HAVE_INPLACEOPS;
-			}
-		}
-		/* Wow */
-	}
-	if (!type->tp_as_number && base->tp_as_number) {
-		type->tp_flags &= ~Py_TPFLAGS_CHECKTYPES;
-		type->tp_flags |= base->tp_flags & Py_TPFLAGS_CHECKTYPES;
-	}
+    /* Special flag magic */
+    if (!type->tp_as_buffer && base->tp_as_buffer) {
+        type->tp_flags &= ~BUFFER_FLAGS;
+        type->tp_flags |=
+            base->tp_flags & BUFFER_FLAGS;
+    }
+    if (!type->tp_as_sequence && base->tp_as_sequence) {
+        type->tp_flags &= ~Py_TPFLAGS_HAVE_SEQUENCE_IN;
+        type->tp_flags |= base->tp_flags & Py_TPFLAGS_HAVE_SEQUENCE_IN;
+    }
+    if ((type->tp_flags & Py_TPFLAGS_HAVE_INPLACEOPS) !=
+        (base->tp_flags & Py_TPFLAGS_HAVE_INPLACEOPS)) {
+        if ((!type->tp_as_number && base->tp_as_number) ||
+            (!type->tp_as_sequence && base->tp_as_sequence)) {
+            type->tp_flags &= ~Py_TPFLAGS_HAVE_INPLACEOPS;
+            if (!type->tp_as_number && !type->tp_as_sequence) {
+                type->tp_flags |= base->tp_flags &
+                    Py_TPFLAGS_HAVE_INPLACEOPS;
+            }
+        }
+        /* Wow */
+    }
+    if (!type->tp_as_number && base->tp_as_number) {
+        type->tp_flags &= ~Py_TPFLAGS_CHECKTYPES;
+        type->tp_flags |= base->tp_flags & Py_TPFLAGS_CHECKTYPES;
+    }
 
-	/* Copying basicsize is connected to the GC flags */
-	oldsize = base->tp_basicsize;
-	newsize = type->tp_basicsize ? type->tp_basicsize : oldsize;
-	if (!(type->tp_flags & Py_TPFLAGS_HAVE_GC) &&
-	    (base->tp_flags & Py_TPFLAGS_HAVE_GC) &&
-	    (type->tp_flags & Py_TPFLAGS_HAVE_RICHCOMPARE/*GC slots exist*/) &&
-	    (!type->tp_traverse && !type->tp_clear)) {
-		type->tp_flags |= Py_TPFLAGS_HAVE_GC;
-		if (type->tp_traverse == NULL)
-			type->tp_traverse = base->tp_traverse;
-		if (type->tp_clear == NULL)
-			type->tp_clear = base->tp_clear;
-	}
-	if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_CLASS) {
-		/* The condition below could use some explanation.
-		   It appears that tp_new is not inherited for static types
-		   whose base class is 'object'; this seems to be a precaution
-		   so that old extension types don't suddenly become
-		   callable (object.__new__ wouldn't insure the invariants
-		   that the extension type's own factory function ensures).
-		   Heap types, of course, are under our control, so they do
-		   inherit tp_new; static extension types that specify some
-		   other built-in type as the default are considered
-		   new-style-aware so they also inherit object.__new__. */
-		if (base != &PyBaseObject_Type ||
-		    (type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
-			if (type->tp_new == NULL)
-				type->tp_new = base->tp_new;
-		}
-	}
-	type->tp_basicsize = newsize;
+    /* Copying basicsize is connected to the GC flags */
+    oldsize = base->tp_basicsize;
+    newsize = type->tp_basicsize ? type->tp_basicsize : oldsize;
+    if (!(type->tp_flags & Py_TPFLAGS_HAVE_GC) &&
+        (base->tp_flags & Py_TPFLAGS_HAVE_GC) &&
+        (type->tp_flags & Py_TPFLAGS_HAVE_RICHCOMPARE/*GC slots exist*/) &&
+        (!type->tp_traverse && !type->tp_clear)) {
+        type->tp_flags |= Py_TPFLAGS_HAVE_GC;
+        if (type->tp_traverse == NULL)
+            type->tp_traverse = base->tp_traverse;
+        if (type->tp_clear == NULL)
+            type->tp_clear = base->tp_clear;
+    }
+    if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_CLASS) {
+        /* The condition below could use some explanation.
+           It appears that tp_new is not inherited for static types
+           whose base class is 'object'; this seems to be a precaution
+           so that old extension types don't suddenly become
+           callable (object.__new__ wouldn't insure the invariants
+           that the extension type's own factory function ensures).
+           Heap types, of course, are under our control, so they do
+           inherit tp_new; static extension types that specify some
+           other built-in type as the default are considered
+           new-style-aware so they also inherit object.__new__. */
+        if (base != &PyBaseObject_Type ||
+            (type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
+            if (type->tp_new == NULL)
+                type->tp_new = base->tp_new;
+        }
+    }
+    type->tp_basicsize = newsize;
 
-	/* Copy other non-function slots */
+    /* Copy other non-function slots */
 
 #undef COPYVAL
 #define COPYVAL(SLOT) \
-	if (type->SLOT == 0) type->SLOT = base->SLOT
+    if (type->SLOT == 0) type->SLOT = base->SLOT
 
-	COPYVAL(tp_itemsize);
-	if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_WEAKREFS) {
-		COPYVAL(tp_weaklistoffset);
-	}
-	if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_CLASS) {
-		COPYVAL(tp_dictoffset);
-	}
+    COPYVAL(tp_itemsize);
+    if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_WEAKREFS) {
+        COPYVAL(tp_weaklistoffset);
+    }
+    if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_CLASS) {
+        COPYVAL(tp_dictoffset);
+    }
 
-	/* Setup fast subclass flags */
-	if (PyType_IsSubtype(base, (PyTypeObject*)PyExc_BaseException))
-		type->tp_flags |= Py_TPFLAGS_BASE_EXC_SUBCLASS;
-	else if (PyType_IsSubtype(base, &PyType_Type))
-		type->tp_flags |= Py_TPFLAGS_TYPE_SUBCLASS;
-	else if (PyType_IsSubtype(base, &PyInt_Type))
-		type->tp_flags |= Py_TPFLAGS_INT_SUBCLASS;
-	else if (PyType_IsSubtype(base, &PyLong_Type))
-		type->tp_flags |= Py_TPFLAGS_LONG_SUBCLASS;
-	else if (PyType_IsSubtype(base, &PyString_Type))
-		type->tp_flags |= Py_TPFLAGS_STRING_SUBCLASS;
+    /* Setup fast subclass flags */
+    if (PyType_IsSubtype(base, (PyTypeObject*)PyExc_BaseException))
+        type->tp_flags |= Py_TPFLAGS_BASE_EXC_SUBCLASS;
+    else if (PyType_IsSubtype(base, &PyType_Type))
+        type->tp_flags |= Py_TPFLAGS_TYPE_SUBCLASS;
+    else if (PyType_IsSubtype(base, &PyInt_Type))
+        type->tp_flags |= Py_TPFLAGS_INT_SUBCLASS;
+    else if (PyType_IsSubtype(base, &PyLong_Type))
+        type->tp_flags |= Py_TPFLAGS_LONG_SUBCLASS;
+    else if (PyType_IsSubtype(base, &PyString_Type))
+        type->tp_flags |= Py_TPFLAGS_STRING_SUBCLASS;
 #ifdef Py_USING_UNICODE
-	else if (PyType_IsSubtype(base, &PyUnicode_Type))
-		type->tp_flags |= Py_TPFLAGS_UNICODE_SUBCLASS;
+    else if (PyType_IsSubtype(base, &PyUnicode_Type))
+        type->tp_flags |= Py_TPFLAGS_UNICODE_SUBCLASS;
 #endif
-	else if (PyType_IsSubtype(base, &PyTuple_Type))
-		type->tp_flags |= Py_TPFLAGS_TUPLE_SUBCLASS;
-	else if (PyType_IsSubtype(base, &PyList_Type))
-		type->tp_flags |= Py_TPFLAGS_LIST_SUBCLASS;
-	else if (PyType_IsSubtype(base, &PyDict_Type))
-		type->tp_flags |= Py_TPFLAGS_DICT_SUBCLASS;
+    else if (PyType_IsSubtype(base, &PyTuple_Type))
+        type->tp_flags |= Py_TPFLAGS_TUPLE_SUBCLASS;
+    else if (PyType_IsSubtype(base, &PyList_Type))
+        type->tp_flags |= Py_TPFLAGS_LIST_SUBCLASS;
+    else if (PyType_IsSubtype(base, &PyDict_Type))
+        type->tp_flags |= Py_TPFLAGS_DICT_SUBCLASS;
 }
 
 static int
 overrides_name(PyTypeObject *type, char *name)
 {
-	PyObject *dict = type->tp_dict;
+    PyObject *dict = type->tp_dict;
 
-	assert(dict != NULL);
-	if (PyDict_GetItemString(dict, name) != NULL) {
-		return 1;
-	}
-	return 0;
+    assert(dict != NULL);
+    if (PyDict_GetItemString(dict, name) != NULL) {
+        return 1;
+    }
+    return 0;
 }
 
 #define OVERRIDES_HASH(x)       overrides_name(x, "__hash__")
@@ -3740,7 +3740,7 @@
 static void
 inherit_slots(PyTypeObject *type, PyTypeObject *base)
 {
-	PyTypeObject *basebase;
+    PyTypeObject *basebase;
 
 #undef SLOTDEFINED
 #undef COPYSLOT
@@ -3750,185 +3750,185 @@
 #undef COPYBUF
 
 #define SLOTDEFINED(SLOT) \
-	(base->SLOT != 0 && \
-	 (basebase == NULL || base->SLOT != basebase->SLOT))
+    (base->SLOT != 0 && \
+     (basebase == NULL || base->SLOT != basebase->SLOT))
 
 #define COPYSLOT(SLOT) \
-	if (!type->SLOT && SLOTDEFINED(SLOT)) type->SLOT = base->SLOT
+    if (!type->SLOT && SLOTDEFINED(SLOT)) type->SLOT = base->SLOT
 
 #define COPYNUM(SLOT) COPYSLOT(tp_as_number->SLOT)
 #define COPYSEQ(SLOT) COPYSLOT(tp_as_sequence->SLOT)
 #define COPYMAP(SLOT) COPYSLOT(tp_as_mapping->SLOT)
 #define COPYBUF(SLOT) COPYSLOT(tp_as_buffer->SLOT)
 
-	/* This won't inherit indirect slots (from tp_as_number etc.)
-	   if type doesn't provide the space. */
+    /* This won't inherit indirect slots (from tp_as_number etc.)
+       if type doesn't provide the space. */
 
-	if (type->tp_as_number != NULL && base->tp_as_number != NULL) {
-		basebase = base->tp_base;
-		if (basebase->tp_as_number == NULL)
-			basebase = NULL;
-		COPYNUM(nb_add);
-		COPYNUM(nb_subtract);
-		COPYNUM(nb_multiply);
-		COPYNUM(nb_divide);
-		COPYNUM(nb_remainder);
-		COPYNUM(nb_divmod);
-		COPYNUM(nb_power);
-		COPYNUM(nb_negative);
-		COPYNUM(nb_positive);
-		COPYNUM(nb_absolute);
-		COPYNUM(nb_nonzero);
-		COPYNUM(nb_invert);
-		COPYNUM(nb_lshift);
-		COPYNUM(nb_rshift);
-		COPYNUM(nb_and);
-		COPYNUM(nb_xor);
-		COPYNUM(nb_or);
-		COPYNUM(nb_coerce);
-		COPYNUM(nb_int);
-		COPYNUM(nb_long);
-		COPYNUM(nb_float);
-		COPYNUM(nb_oct);
-		COPYNUM(nb_hex);
-		COPYNUM(nb_inplace_add);
-		COPYNUM(nb_inplace_subtract);
-		COPYNUM(nb_inplace_multiply);
-		COPYNUM(nb_inplace_divide);
-		COPYNUM(nb_inplace_remainder);
-		COPYNUM(nb_inplace_power);
-		COPYNUM(nb_inplace_lshift);
-		COPYNUM(nb_inplace_rshift);
-		COPYNUM(nb_inplace_and);
-		COPYNUM(nb_inplace_xor);
-		COPYNUM(nb_inplace_or);
-		if (base->tp_flags & Py_TPFLAGS_CHECKTYPES) {
-			COPYNUM(nb_true_divide);
-			COPYNUM(nb_floor_divide);
-			COPYNUM(nb_inplace_true_divide);
-			COPYNUM(nb_inplace_floor_divide);
-		}
-		if (base->tp_flags & Py_TPFLAGS_HAVE_INDEX) {
-			COPYNUM(nb_index);
-		}
-	}
+    if (type->tp_as_number != NULL && base->tp_as_number != NULL) {
+        basebase = base->tp_base;
+        if (basebase->tp_as_number == NULL)
+            basebase = NULL;
+        COPYNUM(nb_add);
+        COPYNUM(nb_subtract);
+        COPYNUM(nb_multiply);
+        COPYNUM(nb_divide);
+        COPYNUM(nb_remainder);
+        COPYNUM(nb_divmod);
+        COPYNUM(nb_power);
+        COPYNUM(nb_negative);
+        COPYNUM(nb_positive);
+        COPYNUM(nb_absolute);
+        COPYNUM(nb_nonzero);
+        COPYNUM(nb_invert);
+        COPYNUM(nb_lshift);
+        COPYNUM(nb_rshift);
+        COPYNUM(nb_and);
+        COPYNUM(nb_xor);
+        COPYNUM(nb_or);
+        COPYNUM(nb_coerce);
+        COPYNUM(nb_int);
+        COPYNUM(nb_long);
+        COPYNUM(nb_float);
+        COPYNUM(nb_oct);
+        COPYNUM(nb_hex);
+        COPYNUM(nb_inplace_add);
+        COPYNUM(nb_inplace_subtract);
+        COPYNUM(nb_inplace_multiply);
+        COPYNUM(nb_inplace_divide);
+        COPYNUM(nb_inplace_remainder);
+        COPYNUM(nb_inplace_power);
+        COPYNUM(nb_inplace_lshift);
+        COPYNUM(nb_inplace_rshift);
+        COPYNUM(nb_inplace_and);
+        COPYNUM(nb_inplace_xor);
+        COPYNUM(nb_inplace_or);
+        if (base->tp_flags & Py_TPFLAGS_CHECKTYPES) {
+            COPYNUM(nb_true_divide);
+            COPYNUM(nb_floor_divide);
+            COPYNUM(nb_inplace_true_divide);
+            COPYNUM(nb_inplace_floor_divide);
+        }
+        if (base->tp_flags & Py_TPFLAGS_HAVE_INDEX) {
+            COPYNUM(nb_index);
+        }
+    }
 
-	if (type->tp_as_sequence != NULL && base->tp_as_sequence != NULL) {
-		basebase = base->tp_base;
-		if (basebase->tp_as_sequence == NULL)
-			basebase = NULL;
-		COPYSEQ(sq_length);
-		COPYSEQ(sq_concat);
-		COPYSEQ(sq_repeat);
-		COPYSEQ(sq_item);
-		COPYSEQ(sq_slice);
-		COPYSEQ(sq_ass_item);
-		COPYSEQ(sq_ass_slice);
-		COPYSEQ(sq_contains);
-		COPYSEQ(sq_inplace_concat);
-		COPYSEQ(sq_inplace_repeat);
-	}
+    if (type->tp_as_sequence != NULL && base->tp_as_sequence != NULL) {
+        basebase = base->tp_base;
+        if (basebase->tp_as_sequence == NULL)
+            basebase = NULL;
+        COPYSEQ(sq_length);
+        COPYSEQ(sq_concat);
+        COPYSEQ(sq_repeat);
+        COPYSEQ(sq_item);
+        COPYSEQ(sq_slice);
+        COPYSEQ(sq_ass_item);
+        COPYSEQ(sq_ass_slice);
+        COPYSEQ(sq_contains);
+        COPYSEQ(sq_inplace_concat);
+        COPYSEQ(sq_inplace_repeat);
+    }
 
-	if (type->tp_as_mapping != NULL && base->tp_as_mapping != NULL) {
-		basebase = base->tp_base;
-		if (basebase->tp_as_mapping == NULL)
-			basebase = NULL;
-		COPYMAP(mp_length);
-		COPYMAP(mp_subscript);
-		COPYMAP(mp_ass_subscript);
-	}
+    if (type->tp_as_mapping != NULL && base->tp_as_mapping != NULL) {
+        basebase = base->tp_base;
+        if (basebase->tp_as_mapping == NULL)
+            basebase = NULL;
+        COPYMAP(mp_length);
+        COPYMAP(mp_subscript);
+        COPYMAP(mp_ass_subscript);
+    }
 
-	if (type->tp_as_buffer != NULL && base->tp_as_buffer != NULL) {
-		basebase = base->tp_base;
-		if (basebase->tp_as_buffer == NULL)
-			basebase = NULL;
-		COPYBUF(bf_getreadbuffer);
-		COPYBUF(bf_getwritebuffer);
-		COPYBUF(bf_getsegcount);
-		COPYBUF(bf_getcharbuffer);
-		COPYBUF(bf_getbuffer);
-		COPYBUF(bf_releasebuffer);
-	}
+    if (type->tp_as_buffer != NULL && base->tp_as_buffer != NULL) {
+        basebase = base->tp_base;
+        if (basebase->tp_as_buffer == NULL)
+            basebase = NULL;
+        COPYBUF(bf_getreadbuffer);
+        COPYBUF(bf_getwritebuffer);
+        COPYBUF(bf_getsegcount);
+        COPYBUF(bf_getcharbuffer);
+        COPYBUF(bf_getbuffer);
+        COPYBUF(bf_releasebuffer);
+    }
 
-	basebase = base->tp_base;
+    basebase = base->tp_base;
 
-	COPYSLOT(tp_dealloc);
-	COPYSLOT(tp_print);
-	if (type->tp_getattr == NULL && type->tp_getattro == NULL) {
-		type->tp_getattr = base->tp_getattr;
-		type->tp_getattro = base->tp_getattro;
-	}
-	if (type->tp_setattr == NULL && type->tp_setattro == NULL) {
-		type->tp_setattr = base->tp_setattr;
-		type->tp_setattro = base->tp_setattro;
-	}
-	/* tp_compare see tp_richcompare */
-	COPYSLOT(tp_repr);
-	/* tp_hash see tp_richcompare */
-	COPYSLOT(tp_call);
-	COPYSLOT(tp_str);
-	if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_RICHCOMPARE) {
-		if (type->tp_compare == NULL &&
-		    type->tp_richcompare == NULL &&
-		    type->tp_hash == NULL)
-		{
-			type->tp_compare = base->tp_compare;
-			type->tp_richcompare = base->tp_richcompare;
-			type->tp_hash = base->tp_hash;
-			/* Check for changes to inherited methods in Py3k*/
-			if (Py_Py3kWarningFlag) {
-				if (base->tp_hash &&
-						(base->tp_hash != PyObject_HashNotImplemented) &&
-						!OVERRIDES_HASH(type)) {
-					if (OVERRIDES_CMP(type)) {
-						PyErr_WarnPy3k("Overriding "
-						  "__cmp__ blocks inheritance "
-						  "of __hash__ in 3.x",
-						  1);
-					}
-					if (OVERRIDES_EQ(type)) {
-						PyErr_WarnPy3k("Overriding "
-						  "__eq__ blocks inheritance "
-						  "of __hash__ in 3.x",
-						  1);
-					}
-				}
-			}
-		}
-	}
-	else {
-		COPYSLOT(tp_compare);
-	}
-	if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_ITER) {
-		COPYSLOT(tp_iter);
-		COPYSLOT(tp_iternext);
-	}
-	if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_CLASS) {
-		COPYSLOT(tp_descr_get);
-		COPYSLOT(tp_descr_set);
-		COPYSLOT(tp_dictoffset);
-		COPYSLOT(tp_init);
-		COPYSLOT(tp_alloc);
-		COPYSLOT(tp_is_gc);
-		if ((type->tp_flags & Py_TPFLAGS_HAVE_GC) ==
-		    (base->tp_flags & Py_TPFLAGS_HAVE_GC)) {
-			/* They agree about gc. */
-			COPYSLOT(tp_free);
-		}
-		else if ((type->tp_flags & Py_TPFLAGS_HAVE_GC) &&
-			 type->tp_free == NULL &&
-			 base->tp_free == _PyObject_Del) {
-			/* A bit of magic to plug in the correct default
-			 * tp_free function when a derived class adds gc,
-			 * didn't define tp_free, and the base uses the
-			 * default non-gc tp_free.
-			 */
-			type->tp_free = PyObject_GC_Del;
-		}
-		/* else they didn't agree about gc, and there isn't something
-		 * obvious to be done -- the type is on its own.
-		 */
-	}
+    COPYSLOT(tp_dealloc);
+    COPYSLOT(tp_print);
+    if (type->tp_getattr == NULL && type->tp_getattro == NULL) {
+        type->tp_getattr = base->tp_getattr;
+        type->tp_getattro = base->tp_getattro;
+    }
+    if (type->tp_setattr == NULL && type->tp_setattro == NULL) {
+        type->tp_setattr = base->tp_setattr;
+        type->tp_setattro = base->tp_setattro;
+    }
+    /* tp_compare see tp_richcompare */
+    COPYSLOT(tp_repr);
+    /* tp_hash see tp_richcompare */
+    COPYSLOT(tp_call);
+    COPYSLOT(tp_str);
+    if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_RICHCOMPARE) {
+        if (type->tp_compare == NULL &&
+            type->tp_richcompare == NULL &&
+            type->tp_hash == NULL)
+        {
+            type->tp_compare = base->tp_compare;
+            type->tp_richcompare = base->tp_richcompare;
+            type->tp_hash = base->tp_hash;
+            /* Check for changes to inherited methods in Py3k*/
+            if (Py_Py3kWarningFlag) {
+                if (base->tp_hash &&
+                                (base->tp_hash != PyObject_HashNotImplemented) &&
+                                !OVERRIDES_HASH(type)) {
+                    if (OVERRIDES_CMP(type)) {
+                        PyErr_WarnPy3k("Overriding "
+                          "__cmp__ blocks inheritance "
+                          "of __hash__ in 3.x",
+                          1);
+                    }
+                    if (OVERRIDES_EQ(type)) {
+                        PyErr_WarnPy3k("Overriding "
+                          "__eq__ blocks inheritance "
+                          "of __hash__ in 3.x",
+                          1);
+                    }
+                }
+            }
+        }
+    }
+    else {
+        COPYSLOT(tp_compare);
+    }
+    if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_ITER) {
+        COPYSLOT(tp_iter);
+        COPYSLOT(tp_iternext);
+    }
+    if (type->tp_flags & base->tp_flags & Py_TPFLAGS_HAVE_CLASS) {
+        COPYSLOT(tp_descr_get);
+        COPYSLOT(tp_descr_set);
+        COPYSLOT(tp_dictoffset);
+        COPYSLOT(tp_init);
+        COPYSLOT(tp_alloc);
+        COPYSLOT(tp_is_gc);
+        if ((type->tp_flags & Py_TPFLAGS_HAVE_GC) ==
+            (base->tp_flags & Py_TPFLAGS_HAVE_GC)) {
+            /* They agree about gc. */
+            COPYSLOT(tp_free);
+        }
+        else if ((type->tp_flags & Py_TPFLAGS_HAVE_GC) &&
+                 type->tp_free == NULL &&
+                 base->tp_free == _PyObject_Del) {
+            /* A bit of magic to plug in the correct default
+             * tp_free function when a derived class adds gc,
+             * didn't define tp_free, and the base uses the
+             * default non-gc tp_free.
+             */
+            type->tp_free = PyObject_GC_Del;
+        }
+        /* else they didn't agree about gc, and there isn't something
+         * obvious to be done -- the type is on its own.
+         */
+    }
 }
 
 static int add_operators(PyTypeObject *);
@@ -3936,244 +3936,244 @@
 int
 PyType_Ready(PyTypeObject *type)
 {
-	PyObject *dict, *bases;
-	PyTypeObject *base;
-	Py_ssize_t i, n;
+    PyObject *dict, *bases;
+    PyTypeObject *base;
+    Py_ssize_t i, n;
 
-	if (type->tp_flags & Py_TPFLAGS_READY) {
-		assert(type->tp_dict != NULL);
-		return 0;
-	}
-	assert((type->tp_flags & Py_TPFLAGS_READYING) == 0);
+    if (type->tp_flags & Py_TPFLAGS_READY) {
+        assert(type->tp_dict != NULL);
+        return 0;
+    }
+    assert((type->tp_flags & Py_TPFLAGS_READYING) == 0);
 
-	type->tp_flags |= Py_TPFLAGS_READYING;
+    type->tp_flags |= Py_TPFLAGS_READYING;
 
 #ifdef Py_TRACE_REFS
-	/* PyType_Ready is the closest thing we have to a choke point
-	 * for type objects, so is the best place I can think of to try
-	 * to get type objects into the doubly-linked list of all objects.
-	 * Still, not all type objects go thru PyType_Ready.
-	 */
-	_Py_AddToAllObjects((PyObject *)type, 0);
+    /* PyType_Ready is the closest thing we have to a choke point
+     * for type objects, so is the best place I can think of to try
+     * to get type objects into the doubly-linked list of all objects.
+     * Still, not all type objects go thru PyType_Ready.
+     */
+    _Py_AddToAllObjects((PyObject *)type, 0);
 #endif
 
-	/* Initialize tp_base (defaults to BaseObject unless that's us) */
-	base = type->tp_base;
-	if (base == NULL && type != &PyBaseObject_Type) {
-		base = type->tp_base = &PyBaseObject_Type;
-		Py_INCREF(base);
-	}
+    /* Initialize tp_base (defaults to BaseObject unless that's us) */
+    base = type->tp_base;
+    if (base == NULL && type != &PyBaseObject_Type) {
+        base = type->tp_base = &PyBaseObject_Type;
+        Py_INCREF(base);
+    }
 
-	/* Now the only way base can still be NULL is if type is
-	 * &PyBaseObject_Type.
-	 */
+    /* Now the only way base can still be NULL is if type is
+     * &PyBaseObject_Type.
+     */
 
-	/* Initialize the base class */
-	if (base && base->tp_dict == NULL) {
-		if (PyType_Ready(base) < 0)
-			goto error;
-	}
+    /* Initialize the base class */
+    if (base && base->tp_dict == NULL) {
+        if (PyType_Ready(base) < 0)
+            goto error;
+    }
 
-	/* Initialize ob_type if NULL.	This means extensions that want to be
-	   compilable separately on Windows can call PyType_Ready() instead of
-	   initializing the ob_type field of their type objects. */
-	/* The test for base != NULL is really unnecessary, since base is only
-	   NULL when type is &PyBaseObject_Type, and we know its ob_type is
-	   not NULL (it's initialized to &PyType_Type).	 But coverity doesn't
-	   know that. */
-	if (Py_TYPE(type) == NULL && base != NULL)
-		Py_TYPE(type) = Py_TYPE(base);
+    /* Initialize ob_type if NULL.      This means extensions that want to be
+       compilable separately on Windows can call PyType_Ready() instead of
+       initializing the ob_type field of their type objects. */
+    /* The test for base != NULL is really unnecessary, since base is only
+       NULL when type is &PyBaseObject_Type, and we know its ob_type is
+       not NULL (it's initialized to &PyType_Type).      But coverity doesn't
+       know that. */
+    if (Py_TYPE(type) == NULL && base != NULL)
+        Py_TYPE(type) = Py_TYPE(base);
 
-	/* Initialize tp_bases */
-	bases = type->tp_bases;
-	if (bases == NULL) {
-		if (base == NULL)
-			bases = PyTuple_New(0);
-		else
-			bases = PyTuple_Pack(1, base);
-		if (bases == NULL)
-			goto error;
-		type->tp_bases = bases;
-	}
+    /* Initialize tp_bases */
+    bases = type->tp_bases;
+    if (bases == NULL) {
+        if (base == NULL)
+            bases = PyTuple_New(0);
+        else
+            bases = PyTuple_Pack(1, base);
+        if (bases == NULL)
+            goto error;
+        type->tp_bases = bases;
+    }
 
-	/* Initialize tp_dict */
-	dict = type->tp_dict;
-	if (dict == NULL) {
-		dict = PyDict_New();
-		if (dict == NULL)
-			goto error;
-		type->tp_dict = dict;
-	}
+    /* Initialize tp_dict */
+    dict = type->tp_dict;
+    if (dict == NULL) {
+        dict = PyDict_New();
+        if (dict == NULL)
+            goto error;
+        type->tp_dict = dict;
+    }
 
-	/* Add type-specific descriptors to tp_dict */
-	if (add_operators(type) < 0)
-		goto error;
-	if (type->tp_methods != NULL) {
-		if (add_methods(type, type->tp_methods) < 0)
-			goto error;
-	}
-	if (type->tp_members != NULL) {
-		if (add_members(type, type->tp_members) < 0)
-			goto error;
-	}
-	if (type->tp_getset != NULL) {
-		if (add_getset(type, type->tp_getset) < 0)
-			goto error;
-	}
+    /* Add type-specific descriptors to tp_dict */
+    if (add_operators(type) < 0)
+        goto error;
+    if (type->tp_methods != NULL) {
+        if (add_methods(type, type->tp_methods) < 0)
+            goto error;
+    }
+    if (type->tp_members != NULL) {
+        if (add_members(type, type->tp_members) < 0)
+            goto error;
+    }
+    if (type->tp_getset != NULL) {
+        if (add_getset(type, type->tp_getset) < 0)
+            goto error;
+    }
 
-	/* Calculate method resolution order */
-	if (mro_internal(type) < 0) {
-		goto error;
-	}
+    /* Calculate method resolution order */
+    if (mro_internal(type) < 0) {
+        goto error;
+    }
 
-	/* Inherit special flags from dominant base */
-	if (type->tp_base != NULL)
-		inherit_special(type, type->tp_base);
+    /* Inherit special flags from dominant base */
+    if (type->tp_base != NULL)
+        inherit_special(type, type->tp_base);
 
-	/* Initialize tp_dict properly */
-	bases = type->tp_mro;
-	assert(bases != NULL);
-	assert(PyTuple_Check(bases));
-	n = PyTuple_GET_SIZE(bases);
-	for (i = 1; i < n; i++) {
-		PyObject *b = PyTuple_GET_ITEM(bases, i);
-		if (PyType_Check(b))
-			inherit_slots(type, (PyTypeObject *)b);
-	}
+    /* Initialize tp_dict properly */
+    bases = type->tp_mro;
+    assert(bases != NULL);
+    assert(PyTuple_Check(bases));
+    n = PyTuple_GET_SIZE(bases);
+    for (i = 1; i < n; i++) {
+        PyObject *b = PyTuple_GET_ITEM(bases, i);
+        if (PyType_Check(b))
+            inherit_slots(type, (PyTypeObject *)b);
+    }
 
-	/* Sanity check for tp_free. */
-	if (PyType_IS_GC(type) && (type->tp_flags & Py_TPFLAGS_BASETYPE) &&
-	    (type->tp_free == NULL || type->tp_free == PyObject_Del)) {
-		/* This base class needs to call tp_free, but doesn't have
-		 * one, or its tp_free is for non-gc'ed objects.
-		 */
-		PyErr_Format(PyExc_TypeError, "type '%.100s' participates in "
-			     "gc and is a base type but has inappropriate "
-			     "tp_free slot",
-			     type->tp_name);
-		goto error;
-	}
+    /* Sanity check for tp_free. */
+    if (PyType_IS_GC(type) && (type->tp_flags & Py_TPFLAGS_BASETYPE) &&
+        (type->tp_free == NULL || type->tp_free == PyObject_Del)) {
+        /* This base class needs to call tp_free, but doesn't have
+         * one, or its tp_free is for non-gc'ed objects.
+         */
+        PyErr_Format(PyExc_TypeError, "type '%.100s' participates in "
+                     "gc and is a base type but has inappropriate "
+                     "tp_free slot",
+                     type->tp_name);
+        goto error;
+    }
 
-	/* if the type dictionary doesn't contain a __doc__, set it from
-	   the tp_doc slot.
-	 */
-	if (PyDict_GetItemString(type->tp_dict, "__doc__") == NULL) {
-		if (type->tp_doc != NULL) {
-			PyObject *doc = PyString_FromString(type->tp_doc);
-			if (doc == NULL)
-				goto error;
-			PyDict_SetItemString(type->tp_dict, "__doc__", doc);
-			Py_DECREF(doc);
-		} else {
-			PyDict_SetItemString(type->tp_dict,
-					     "__doc__", Py_None);
-		}
-	}
+    /* if the type dictionary doesn't contain a __doc__, set it from
+       the tp_doc slot.
+     */
+    if (PyDict_GetItemString(type->tp_dict, "__doc__") == NULL) {
+        if (type->tp_doc != NULL) {
+            PyObject *doc = PyString_FromString(type->tp_doc);
+            if (doc == NULL)
+                goto error;
+            PyDict_SetItemString(type->tp_dict, "__doc__", doc);
+            Py_DECREF(doc);
+        } else {
+            PyDict_SetItemString(type->tp_dict,
+                                 "__doc__", Py_None);
+        }
+    }
 
-	/* Some more special stuff */
-	base = type->tp_base;
-	if (base != NULL) {
-		if (type->tp_as_number == NULL)
-			type->tp_as_number = base->tp_as_number;
-		if (type->tp_as_sequence == NULL)
-			type->tp_as_sequence = base->tp_as_sequence;
-		if (type->tp_as_mapping == NULL)
-			type->tp_as_mapping = base->tp_as_mapping;
-		if (type->tp_as_buffer == NULL)
-			type->tp_as_buffer = base->tp_as_buffer;
-	}
+    /* Some more special stuff */
+    base = type->tp_base;
+    if (base != NULL) {
+        if (type->tp_as_number == NULL)
+            type->tp_as_number = base->tp_as_number;
+        if (type->tp_as_sequence == NULL)
+            type->tp_as_sequence = base->tp_as_sequence;
+        if (type->tp_as_mapping == NULL)
+            type->tp_as_mapping = base->tp_as_mapping;
+        if (type->tp_as_buffer == NULL)
+            type->tp_as_buffer = base->tp_as_buffer;
+    }
 
-	/* Link into each base class's list of subclasses */
-	bases = type->tp_bases;
-	n = PyTuple_GET_SIZE(bases);
-	for (i = 0; i < n; i++) {
-		PyObject *b = PyTuple_GET_ITEM(bases, i);
-		if (PyType_Check(b) &&
-		    add_subclass((PyTypeObject *)b, type) < 0)
-			goto error;
-	}
+    /* Link into each base class's list of subclasses */
+    bases = type->tp_bases;
+    n = PyTuple_GET_SIZE(bases);
+    for (i = 0; i < n; i++) {
+        PyObject *b = PyTuple_GET_ITEM(bases, i);
+        if (PyType_Check(b) &&
+            add_subclass((PyTypeObject *)b, type) < 0)
+            goto error;
+    }
 
-	/* All done -- set the ready flag */
-	assert(type->tp_dict != NULL);
-	type->tp_flags =
-		(type->tp_flags & ~Py_TPFLAGS_READYING) | Py_TPFLAGS_READY;
-	return 0;
+    /* All done -- set the ready flag */
+    assert(type->tp_dict != NULL);
+    type->tp_flags =
+        (type->tp_flags & ~Py_TPFLAGS_READYING) | Py_TPFLAGS_READY;
+    return 0;
 
   error:
-	type->tp_flags &= ~Py_TPFLAGS_READYING;
-	return -1;
+    type->tp_flags &= ~Py_TPFLAGS_READYING;
+    return -1;
 }
 
 static int
 add_subclass(PyTypeObject *base, PyTypeObject *type)
 {
-	Py_ssize_t i;
-	int result;
-	PyObject *list, *ref, *newobj;
+    Py_ssize_t i;
+    int result;
+    PyObject *list, *ref, *newobj;
 
-	list = base->tp_subclasses;
-	if (list == NULL) {
-		base->tp_subclasses = list = PyList_New(0);
-		if (list == NULL)
-			return -1;
-	}
-	assert(PyList_Check(list));
-	newobj = PyWeakref_NewRef((PyObject *)type, NULL);
-	i = PyList_GET_SIZE(list);
-	while (--i >= 0) {
-		ref = PyList_GET_ITEM(list, i);
-		assert(PyWeakref_CheckRef(ref));
-		if (PyWeakref_GET_OBJECT(ref) == Py_None)
-			return PyList_SetItem(list, i, newobj);
-	}
-	result = PyList_Append(list, newobj);
-	Py_DECREF(newobj);
-	return result;
+    list = base->tp_subclasses;
+    if (list == NULL) {
+        base->tp_subclasses = list = PyList_New(0);
+        if (list == NULL)
+            return -1;
+    }
+    assert(PyList_Check(list));
+    newobj = PyWeakref_NewRef((PyObject *)type, NULL);
+    i = PyList_GET_SIZE(list);
+    while (--i >= 0) {
+        ref = PyList_GET_ITEM(list, i);
+        assert(PyWeakref_CheckRef(ref));
+        if (PyWeakref_GET_OBJECT(ref) == Py_None)
+            return PyList_SetItem(list, i, newobj);
+    }
+    result = PyList_Append(list, newobj);
+    Py_DECREF(newobj);
+    return result;
 }
 
 static void
 remove_subclass(PyTypeObject *base, PyTypeObject *type)
 {
-	Py_ssize_t i;
-	PyObject *list, *ref;
+    Py_ssize_t i;
+    PyObject *list, *ref;
 
-	list = base->tp_subclasses;
-	if (list == NULL) {
-		return;
-	}
-	assert(PyList_Check(list));
-	i = PyList_GET_SIZE(list);
-	while (--i >= 0) {
-		ref = PyList_GET_ITEM(list, i);
-		assert(PyWeakref_CheckRef(ref));
-		if (PyWeakref_GET_OBJECT(ref) == (PyObject*)type) {
-			/* this can't fail, right? */
-			PySequence_DelItem(list, i);
-			return;
-		}
-	}
+    list = base->tp_subclasses;
+    if (list == NULL) {
+        return;
+    }
+    assert(PyList_Check(list));
+    i = PyList_GET_SIZE(list);
+    while (--i >= 0) {
+        ref = PyList_GET_ITEM(list, i);
+        assert(PyWeakref_CheckRef(ref));
+        if (PyWeakref_GET_OBJECT(ref) == (PyObject*)type) {
+            /* this can't fail, right? */
+            PySequence_DelItem(list, i);
+            return;
+        }
+    }
 }
 
 static int
 check_num_args(PyObject *ob, int n)
 {
-	if (!PyTuple_CheckExact(ob)) {
-		PyErr_SetString(PyExc_SystemError,
-		    "PyArg_UnpackTuple() argument list is not a tuple");
-		return 0;
-	}
-	if (n == PyTuple_GET_SIZE(ob))
-		return 1;
-	PyErr_Format(
-	    PyExc_TypeError, 
-	    "expected %d arguments, got %zd", n, PyTuple_GET_SIZE(ob));
-	return 0;
+    if (!PyTuple_CheckExact(ob)) {
+        PyErr_SetString(PyExc_SystemError,
+            "PyArg_UnpackTuple() argument list is not a tuple");
+        return 0;
+    }
+    if (n == PyTuple_GET_SIZE(ob))
+        return 1;
+    PyErr_Format(
+        PyExc_TypeError,
+        "expected %d arguments, got %zd", n, PyTuple_GET_SIZE(ob));
+    return 0;
 }
 
 /* Generic wrappers for overloadable 'operators' such as __getitem__ */
 
 /* There's a wrapper *function* for each distinct function typedef used
-   for type object slots (e.g. binaryfunc, ternaryfunc, etc.).	There's a
+   for type object slots (e.g. binaryfunc, ternaryfunc, etc.).  There's a
    wrapper *table* for each distinct operation (e.g. __len__, __add__).
    Most tables have only one entry; the tables for binary operators have two
    entries, one regular and one with reversed arguments. */
@@ -4181,357 +4181,357 @@
 static PyObject *
 wrap_lenfunc(PyObject *self, PyObject *args, void *wrapped)
 {
-	lenfunc func = (lenfunc)wrapped;
-	Py_ssize_t res;
+    lenfunc func = (lenfunc)wrapped;
+    Py_ssize_t res;
 
-	if (!check_num_args(args, 0))
-		return NULL;
-	res = (*func)(self);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	return PyInt_FromLong((long)res);
+    if (!check_num_args(args, 0))
+        return NULL;
+    res = (*func)(self);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    return PyInt_FromLong((long)res);
 }
 
 static PyObject *
 wrap_inquirypred(PyObject *self, PyObject *args, void *wrapped)
 {
-	inquiry func = (inquiry)wrapped;
-	int res;
+    inquiry func = (inquiry)wrapped;
+    int res;
 
-	if (!check_num_args(args, 0))
-		return NULL;
-	res = (*func)(self);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	return PyBool_FromLong((long)res);
+    if (!check_num_args(args, 0))
+        return NULL;
+    res = (*func)(self);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    return PyBool_FromLong((long)res);
 }
 
 static PyObject *
 wrap_binaryfunc(PyObject *self, PyObject *args, void *wrapped)
 {
-	binaryfunc func = (binaryfunc)wrapped;
-	PyObject *other;
+    binaryfunc func = (binaryfunc)wrapped;
+    PyObject *other;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	other = PyTuple_GET_ITEM(args, 0);
-	return (*func)(self, other);
+    if (!check_num_args(args, 1))
+        return NULL;
+    other = PyTuple_GET_ITEM(args, 0);
+    return (*func)(self, other);
 }
 
 static PyObject *
 wrap_binaryfunc_l(PyObject *self, PyObject *args, void *wrapped)
 {
-	binaryfunc func = (binaryfunc)wrapped;
-	PyObject *other;
+    binaryfunc func = (binaryfunc)wrapped;
+    PyObject *other;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	other = PyTuple_GET_ITEM(args, 0);
-	if (!(self->ob_type->tp_flags & Py_TPFLAGS_CHECKTYPES) &&
-	    !PyType_IsSubtype(other->ob_type, self->ob_type)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	return (*func)(self, other);
+    if (!check_num_args(args, 1))
+        return NULL;
+    other = PyTuple_GET_ITEM(args, 0);
+    if (!(self->ob_type->tp_flags & Py_TPFLAGS_CHECKTYPES) &&
+        !PyType_IsSubtype(other->ob_type, self->ob_type)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    return (*func)(self, other);
 }
 
 static PyObject *
 wrap_binaryfunc_r(PyObject *self, PyObject *args, void *wrapped)
 {
-	binaryfunc func = (binaryfunc)wrapped;
-	PyObject *other;
+    binaryfunc func = (binaryfunc)wrapped;
+    PyObject *other;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	other = PyTuple_GET_ITEM(args, 0);
-	if (!(self->ob_type->tp_flags & Py_TPFLAGS_CHECKTYPES) &&
-	    !PyType_IsSubtype(other->ob_type, self->ob_type)) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	return (*func)(other, self);
+    if (!check_num_args(args, 1))
+        return NULL;
+    other = PyTuple_GET_ITEM(args, 0);
+    if (!(self->ob_type->tp_flags & Py_TPFLAGS_CHECKTYPES) &&
+        !PyType_IsSubtype(other->ob_type, self->ob_type)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    return (*func)(other, self);
 }
 
 static PyObject *
 wrap_coercefunc(PyObject *self, PyObject *args, void *wrapped)
 {
-	coercion func = (coercion)wrapped;
-	PyObject *other, *res;
-	int ok;
+    coercion func = (coercion)wrapped;
+    PyObject *other, *res;
+    int ok;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	other = PyTuple_GET_ITEM(args, 0);
-	ok = func(&self, &other);
-	if (ok < 0)
-		return NULL;
-	if (ok > 0) {
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	res = PyTuple_New(2);
-	if (res == NULL) {
-		Py_DECREF(self);
-		Py_DECREF(other);
-		return NULL;
-	}
-	PyTuple_SET_ITEM(res, 0, self);
-	PyTuple_SET_ITEM(res, 1, other);
-	return res;
+    if (!check_num_args(args, 1))
+        return NULL;
+    other = PyTuple_GET_ITEM(args, 0);
+    ok = func(&self, &other);
+    if (ok < 0)
+        return NULL;
+    if (ok > 0) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    res = PyTuple_New(2);
+    if (res == NULL) {
+        Py_DECREF(self);
+        Py_DECREF(other);
+        return NULL;
+    }
+    PyTuple_SET_ITEM(res, 0, self);
+    PyTuple_SET_ITEM(res, 1, other);
+    return res;
 }
 
 static PyObject *
 wrap_ternaryfunc(PyObject *self, PyObject *args, void *wrapped)
 {
-	ternaryfunc func = (ternaryfunc)wrapped;
-	PyObject *other;
-	PyObject *third = Py_None;
+    ternaryfunc func = (ternaryfunc)wrapped;
+    PyObject *other;
+    PyObject *third = Py_None;
 
-	/* Note: This wrapper only works for __pow__() */
+    /* Note: This wrapper only works for __pow__() */
 
-	if (!PyArg_UnpackTuple(args, "", 1, 2, &other, &third))
-		return NULL;
-	return (*func)(self, other, third);
+    if (!PyArg_UnpackTuple(args, "", 1, 2, &other, &third))
+        return NULL;
+    return (*func)(self, other, third);
 }
 
 static PyObject *
 wrap_ternaryfunc_r(PyObject *self, PyObject *args, void *wrapped)
 {
-	ternaryfunc func = (ternaryfunc)wrapped;
-	PyObject *other;
-	PyObject *third = Py_None;
+    ternaryfunc func = (ternaryfunc)wrapped;
+    PyObject *other;
+    PyObject *third = Py_None;
 
-	/* Note: This wrapper only works for __pow__() */
+    /* Note: This wrapper only works for __pow__() */
 
-	if (!PyArg_UnpackTuple(args, "", 1, 2, &other, &third))
-		return NULL;
-	return (*func)(other, self, third);
+    if (!PyArg_UnpackTuple(args, "", 1, 2, &other, &third))
+        return NULL;
+    return (*func)(other, self, third);
 }
 
 static PyObject *
 wrap_unaryfunc(PyObject *self, PyObject *args, void *wrapped)
 {
-	unaryfunc func = (unaryfunc)wrapped;
+    unaryfunc func = (unaryfunc)wrapped;
 
-	if (!check_num_args(args, 0))
-		return NULL;
-	return (*func)(self);
+    if (!check_num_args(args, 0))
+        return NULL;
+    return (*func)(self);
 }
 
 static PyObject *
 wrap_indexargfunc(PyObject *self, PyObject *args, void *wrapped)
 {
-	ssizeargfunc func = (ssizeargfunc)wrapped;
-	PyObject* o;
-	Py_ssize_t i;
+    ssizeargfunc func = (ssizeargfunc)wrapped;
+    PyObject* o;
+    Py_ssize_t i;
 
-	if (!PyArg_UnpackTuple(args, "", 1, 1, &o))
-		return NULL;
-	i = PyNumber_AsSsize_t(o, PyExc_OverflowError);
-	if (i == -1 && PyErr_Occurred())
-		return NULL;
-	return (*func)(self, i);
+    if (!PyArg_UnpackTuple(args, "", 1, 1, &o))
+        return NULL;
+    i = PyNumber_AsSsize_t(o, PyExc_OverflowError);
+    if (i == -1 && PyErr_Occurred())
+        return NULL;
+    return (*func)(self, i);
 }
 
 static Py_ssize_t
 getindex(PyObject *self, PyObject *arg)
 {
-	Py_ssize_t i;
+    Py_ssize_t i;
 
-	i = PyNumber_AsSsize_t(arg, PyExc_OverflowError);
-	if (i == -1 && PyErr_Occurred())
-		return -1;
-	if (i < 0) {
-		PySequenceMethods *sq = Py_TYPE(self)->tp_as_sequence;
-		if (sq && sq->sq_length) {
-			Py_ssize_t n = (*sq->sq_length)(self);
-			if (n < 0)
-				return -1;
-			i += n;
-		}
-	}
-	return i;
+    i = PyNumber_AsSsize_t(arg, PyExc_OverflowError);
+    if (i == -1 && PyErr_Occurred())
+        return -1;
+    if (i < 0) {
+        PySequenceMethods *sq = Py_TYPE(self)->tp_as_sequence;
+        if (sq && sq->sq_length) {
+            Py_ssize_t n = (*sq->sq_length)(self);
+            if (n < 0)
+                return -1;
+            i += n;
+        }
+    }
+    return i;
 }
 
 static PyObject *
 wrap_sq_item(PyObject *self, PyObject *args, void *wrapped)
 {
-	ssizeargfunc func = (ssizeargfunc)wrapped;
-	PyObject *arg;
-	Py_ssize_t i;
+    ssizeargfunc func = (ssizeargfunc)wrapped;
+    PyObject *arg;
+    Py_ssize_t i;
 
-	if (PyTuple_GET_SIZE(args) == 1) {
-		arg = PyTuple_GET_ITEM(args, 0);
-		i = getindex(self, arg);
-		if (i == -1 && PyErr_Occurred())
-			return NULL;
-		return (*func)(self, i);
-	}
-	check_num_args(args, 1);
-	assert(PyErr_Occurred());
-	return NULL;
+    if (PyTuple_GET_SIZE(args) == 1) {
+        arg = PyTuple_GET_ITEM(args, 0);
+        i = getindex(self, arg);
+        if (i == -1 && PyErr_Occurred())
+            return NULL;
+        return (*func)(self, i);
+    }
+    check_num_args(args, 1);
+    assert(PyErr_Occurred());
+    return NULL;
 }
 
 static PyObject *
 wrap_ssizessizeargfunc(PyObject *self, PyObject *args, void *wrapped)
 {
-	ssizessizeargfunc func = (ssizessizeargfunc)wrapped;
-	Py_ssize_t i, j;
+    ssizessizeargfunc func = (ssizessizeargfunc)wrapped;
+    Py_ssize_t i, j;
 
-	if (!PyArg_ParseTuple(args, "nn", &i, &j))
-		return NULL;
-	return (*func)(self, i, j);
+    if (!PyArg_ParseTuple(args, "nn", &i, &j))
+        return NULL;
+    return (*func)(self, i, j);
 }
 
 static PyObject *
 wrap_sq_setitem(PyObject *self, PyObject *args, void *wrapped)
 {
-	ssizeobjargproc func = (ssizeobjargproc)wrapped;
-	Py_ssize_t i;
-	int res;
-	PyObject *arg, *value;
+    ssizeobjargproc func = (ssizeobjargproc)wrapped;
+    Py_ssize_t i;
+    int res;
+    PyObject *arg, *value;
 
-	if (!PyArg_UnpackTuple(args, "", 2, 2, &arg, &value))
-		return NULL;
-	i = getindex(self, arg);
-	if (i == -1 && PyErr_Occurred())
-		return NULL;
-	res = (*func)(self, i, value);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!PyArg_UnpackTuple(args, "", 2, 2, &arg, &value))
+        return NULL;
+    i = getindex(self, arg);
+    if (i == -1 && PyErr_Occurred())
+        return NULL;
+    res = (*func)(self, i, value);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 wrap_sq_delitem(PyObject *self, PyObject *args, void *wrapped)
 {
-	ssizeobjargproc func = (ssizeobjargproc)wrapped;
-	Py_ssize_t i;
-	int res;
-	PyObject *arg;
+    ssizeobjargproc func = (ssizeobjargproc)wrapped;
+    Py_ssize_t i;
+    int res;
+    PyObject *arg;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	arg = PyTuple_GET_ITEM(args, 0);
-	i = getindex(self, arg);
-	if (i == -1 && PyErr_Occurred())
-		return NULL;
-	res = (*func)(self, i, NULL);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!check_num_args(args, 1))
+        return NULL;
+    arg = PyTuple_GET_ITEM(args, 0);
+    i = getindex(self, arg);
+    if (i == -1 && PyErr_Occurred())
+        return NULL;
+    res = (*func)(self, i, NULL);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 wrap_ssizessizeobjargproc(PyObject *self, PyObject *args, void *wrapped)
 {
-	ssizessizeobjargproc func = (ssizessizeobjargproc)wrapped;
-	Py_ssize_t i, j;
-	int res;
-	PyObject *value;
+    ssizessizeobjargproc func = (ssizessizeobjargproc)wrapped;
+    Py_ssize_t i, j;
+    int res;
+    PyObject *value;
 
-	if (!PyArg_ParseTuple(args, "nnO", &i, &j, &value))
-		return NULL;
-	res = (*func)(self, i, j, value);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!PyArg_ParseTuple(args, "nnO", &i, &j, &value))
+        return NULL;
+    res = (*func)(self, i, j, value);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 wrap_delslice(PyObject *self, PyObject *args, void *wrapped)
 {
-	ssizessizeobjargproc func = (ssizessizeobjargproc)wrapped;
-	Py_ssize_t i, j;
-	int res;
+    ssizessizeobjargproc func = (ssizessizeobjargproc)wrapped;
+    Py_ssize_t i, j;
+    int res;
 
-	if (!PyArg_ParseTuple(args, "nn", &i, &j))
-		return NULL;
-	res = (*func)(self, i, j, NULL);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!PyArg_ParseTuple(args, "nn", &i, &j))
+        return NULL;
+    res = (*func)(self, i, j, NULL);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 /* XXX objobjproc is a misnomer; should be objargpred */
 static PyObject *
 wrap_objobjproc(PyObject *self, PyObject *args, void *wrapped)
 {
-	objobjproc func = (objobjproc)wrapped;
-	int res;
-	PyObject *value;
+    objobjproc func = (objobjproc)wrapped;
+    int res;
+    PyObject *value;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	value = PyTuple_GET_ITEM(args, 0);
-	res = (*func)(self, value);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	else
-		return PyBool_FromLong(res);
+    if (!check_num_args(args, 1))
+        return NULL;
+    value = PyTuple_GET_ITEM(args, 0);
+    res = (*func)(self, value);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    else
+        return PyBool_FromLong(res);
 }
 
 static PyObject *
 wrap_objobjargproc(PyObject *self, PyObject *args, void *wrapped)
 {
-	objobjargproc func = (objobjargproc)wrapped;
-	int res;
-	PyObject *key, *value;
+    objobjargproc func = (objobjargproc)wrapped;
+    int res;
+    PyObject *key, *value;
 
-	if (!PyArg_UnpackTuple(args, "", 2, 2, &key, &value))
-		return NULL;
-	res = (*func)(self, key, value);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!PyArg_UnpackTuple(args, "", 2, 2, &key, &value))
+        return NULL;
+    res = (*func)(self, key, value);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 wrap_delitem(PyObject *self, PyObject *args, void *wrapped)
 {
-	objobjargproc func = (objobjargproc)wrapped;
-	int res;
-	PyObject *key;
+    objobjargproc func = (objobjargproc)wrapped;
+    int res;
+    PyObject *key;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	key = PyTuple_GET_ITEM(args, 0);
-	res = (*func)(self, key, NULL);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!check_num_args(args, 1))
+        return NULL;
+    key = PyTuple_GET_ITEM(args, 0);
+    res = (*func)(self, key, NULL);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 wrap_cmpfunc(PyObject *self, PyObject *args, void *wrapped)
 {
-	cmpfunc func = (cmpfunc)wrapped;
-	int res;
-	PyObject *other;
+    cmpfunc func = (cmpfunc)wrapped;
+    int res;
+    PyObject *other;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	other = PyTuple_GET_ITEM(args, 0);
-	if (Py_TYPE(other)->tp_compare != func &&
-	    !PyType_IsSubtype(Py_TYPE(other), Py_TYPE(self))) {
-		PyErr_Format(
-			PyExc_TypeError,
-			"%s.__cmp__(x,y) requires y to be a '%s', not a '%s'",
-			Py_TYPE(self)->tp_name,
-			Py_TYPE(self)->tp_name,
-			Py_TYPE(other)->tp_name);
-		return NULL;
-	}
-	res = (*func)(self, other);
-	if (PyErr_Occurred())
-		return NULL;
-	return PyInt_FromLong((long)res);
+    if (!check_num_args(args, 1))
+        return NULL;
+    other = PyTuple_GET_ITEM(args, 0);
+    if (Py_TYPE(other)->tp_compare != func &&
+        !PyType_IsSubtype(Py_TYPE(other), Py_TYPE(self))) {
+        PyErr_Format(
+            PyExc_TypeError,
+            "%s.__cmp__(x,y) requires y to be a '%s', not a '%s'",
+            Py_TYPE(self)->tp_name,
+            Py_TYPE(self)->tp_name,
+            Py_TYPE(other)->tp_name);
+        return NULL;
+    }
+    res = (*func)(self, other);
+    if (PyErr_Occurred())
+        return NULL;
+    return PyInt_FromLong((long)res);
 }
 
 /* Helper to check for object.__setattr__ or __delattr__ applied to a type.
@@ -4539,90 +4539,90 @@
 static int
 hackcheck(PyObject *self, setattrofunc func, char *what)
 {
-	PyTypeObject *type = Py_TYPE(self);
-	while (type && type->tp_flags & Py_TPFLAGS_HEAPTYPE)
-		type = type->tp_base;
-	/* If type is NULL now, this is a really weird type.
-	   In the spirit of backwards compatibility (?), just shut up. */
-	if (type && type->tp_setattro != func) {
-		PyErr_Format(PyExc_TypeError,
-			     "can't apply this %s to %s object",
-			     what,
-			     type->tp_name);
-		return 0;
-	}
-	return 1;
+    PyTypeObject *type = Py_TYPE(self);
+    while (type && type->tp_flags & Py_TPFLAGS_HEAPTYPE)
+        type = type->tp_base;
+    /* If type is NULL now, this is a really weird type.
+       In the spirit of backwards compatibility (?), just shut up. */
+    if (type && type->tp_setattro != func) {
+        PyErr_Format(PyExc_TypeError,
+                     "can't apply this %s to %s object",
+                     what,
+                     type->tp_name);
+        return 0;
+    }
+    return 1;
 }
 
 static PyObject *
 wrap_setattr(PyObject *self, PyObject *args, void *wrapped)
 {
-	setattrofunc func = (setattrofunc)wrapped;
-	int res;
-	PyObject *name, *value;
+    setattrofunc func = (setattrofunc)wrapped;
+    int res;
+    PyObject *name, *value;
 
-	if (!PyArg_UnpackTuple(args, "", 2, 2, &name, &value))
-		return NULL;
-	if (!hackcheck(self, func, "__setattr__"))
-		return NULL;
-	res = (*func)(self, name, value);
-	if (res < 0)
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!PyArg_UnpackTuple(args, "", 2, 2, &name, &value))
+        return NULL;
+    if (!hackcheck(self, func, "__setattr__"))
+        return NULL;
+    res = (*func)(self, name, value);
+    if (res < 0)
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 wrap_delattr(PyObject *self, PyObject *args, void *wrapped)
 {
-	setattrofunc func = (setattrofunc)wrapped;
-	int res;
-	PyObject *name;
+    setattrofunc func = (setattrofunc)wrapped;
+    int res;
+    PyObject *name;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	name = PyTuple_GET_ITEM(args, 0);
-	if (!hackcheck(self, func, "__delattr__"))
-		return NULL;
-	res = (*func)(self, name, NULL);
-	if (res < 0)
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!check_num_args(args, 1))
+        return NULL;
+    name = PyTuple_GET_ITEM(args, 0);
+    if (!hackcheck(self, func, "__delattr__"))
+        return NULL;
+    res = (*func)(self, name, NULL);
+    if (res < 0)
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 wrap_hashfunc(PyObject *self, PyObject *args, void *wrapped)
 {
-	hashfunc func = (hashfunc)wrapped;
-	long res;
+    hashfunc func = (hashfunc)wrapped;
+    long res;
 
-	if (!check_num_args(args, 0))
-		return NULL;
-	res = (*func)(self);
-	if (res == -1 && PyErr_Occurred())
-		return NULL;
-	return PyInt_FromLong(res);
+    if (!check_num_args(args, 0))
+        return NULL;
+    res = (*func)(self);
+    if (res == -1 && PyErr_Occurred())
+        return NULL;
+    return PyInt_FromLong(res);
 }
 
 static PyObject *
 wrap_call(PyObject *self, PyObject *args, void *wrapped, PyObject *kwds)
 {
-	ternaryfunc func = (ternaryfunc)wrapped;
+    ternaryfunc func = (ternaryfunc)wrapped;
 
-	return (*func)(self, args, kwds);
+    return (*func)(self, args, kwds);
 }
 
 static PyObject *
 wrap_richcmpfunc(PyObject *self, PyObject *args, void *wrapped, int op)
 {
-	richcmpfunc func = (richcmpfunc)wrapped;
-	PyObject *other;
+    richcmpfunc func = (richcmpfunc)wrapped;
+    PyObject *other;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	other = PyTuple_GET_ITEM(args, 0);
-	return (*func)(self, other, op);
+    if (!check_num_args(args, 1))
+        return NULL;
+    other = PyTuple_GET_ITEM(args, 0);
+    return (*func)(self, other, op);
 }
 
 #undef RICHCMP_WRAPPER
@@ -4630,7 +4630,7 @@
 static PyObject * \
 richcmp_##NAME(PyObject *self, PyObject *args, void *wrapped) \
 { \
-	return wrap_richcmpfunc(self, args, wrapped, OP); \
+    return wrap_richcmpfunc(self, args, wrapped, OP); \
 }
 
 RICHCMP_WRAPPER(lt, Py_LT)
@@ -4643,164 +4643,164 @@
 static PyObject *
 wrap_next(PyObject *self, PyObject *args, void *wrapped)
 {
-	unaryfunc func = (unaryfunc)wrapped;
-	PyObject *res;
+    unaryfunc func = (unaryfunc)wrapped;
+    PyObject *res;
 
-	if (!check_num_args(args, 0))
-		return NULL;
-	res = (*func)(self);
-	if (res == NULL && !PyErr_Occurred())
-		PyErr_SetNone(PyExc_StopIteration);
-	return res;
+    if (!check_num_args(args, 0))
+        return NULL;
+    res = (*func)(self);
+    if (res == NULL && !PyErr_Occurred())
+        PyErr_SetNone(PyExc_StopIteration);
+    return res;
 }
 
 static PyObject *
 wrap_descr_get(PyObject *self, PyObject *args, void *wrapped)
 {
-	descrgetfunc func = (descrgetfunc)wrapped;
-	PyObject *obj;
-	PyObject *type = NULL;
+    descrgetfunc func = (descrgetfunc)wrapped;
+    PyObject *obj;
+    PyObject *type = NULL;
 
-	if (!PyArg_UnpackTuple(args, "", 1, 2, &obj, &type))
-		return NULL;
-	if (obj == Py_None)
-		obj = NULL;
-	if (type == Py_None)
-		type = NULL;
-	if (type == NULL &&obj == NULL) {
-		PyErr_SetString(PyExc_TypeError,
-				"__get__(None, None) is invalid");
-		return NULL;
-	}
-	return (*func)(self, obj, type);
+    if (!PyArg_UnpackTuple(args, "", 1, 2, &obj, &type))
+        return NULL;
+    if (obj == Py_None)
+        obj = NULL;
+    if (type == Py_None)
+        type = NULL;
+    if (type == NULL &&obj == NULL) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__get__(None, None) is invalid");
+        return NULL;
+    }
+    return (*func)(self, obj, type);
 }
 
 static PyObject *
 wrap_descr_set(PyObject *self, PyObject *args, void *wrapped)
 {
-	descrsetfunc func = (descrsetfunc)wrapped;
-	PyObject *obj, *value;
-	int ret;
+    descrsetfunc func = (descrsetfunc)wrapped;
+    PyObject *obj, *value;
+    int ret;
 
-	if (!PyArg_UnpackTuple(args, "", 2, 2, &obj, &value))
-		return NULL;
-	ret = (*func)(self, obj, value);
-	if (ret < 0)
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!PyArg_UnpackTuple(args, "", 2, 2, &obj, &value))
+        return NULL;
+    ret = (*func)(self, obj, value);
+    if (ret < 0)
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 wrap_descr_delete(PyObject *self, PyObject *args, void *wrapped)
 {
-	descrsetfunc func = (descrsetfunc)wrapped;
-	PyObject *obj;
-	int ret;
+    descrsetfunc func = (descrsetfunc)wrapped;
+    PyObject *obj;
+    int ret;
 
-	if (!check_num_args(args, 1))
-		return NULL;
-	obj = PyTuple_GET_ITEM(args, 0);
-	ret = (*func)(self, obj, NULL);
-	if (ret < 0)
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (!check_num_args(args, 1))
+        return NULL;
+    obj = PyTuple_GET_ITEM(args, 0);
+    ret = (*func)(self, obj, NULL);
+    if (ret < 0)
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 wrap_init(PyObject *self, PyObject *args, void *wrapped, PyObject *kwds)
 {
-	initproc func = (initproc)wrapped;
+    initproc func = (initproc)wrapped;
 
-	if (func(self, args, kwds) < 0)
-		return NULL;
-	Py_INCREF(Py_None);
-	return Py_None;
+    if (func(self, args, kwds) < 0)
+        return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 static PyObject *
 tp_new_wrapper(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	PyTypeObject *type, *subtype, *staticbase;
-	PyObject *arg0, *res;
+    PyTypeObject *type, *subtype, *staticbase;
+    PyObject *arg0, *res;
 
-	if (self == NULL || !PyType_Check(self))
-		Py_FatalError("__new__() called with non-type 'self'");
-	type = (PyTypeObject *)self;
-	if (!PyTuple_Check(args) || PyTuple_GET_SIZE(args) < 1) {
-		PyErr_Format(PyExc_TypeError,
-			     "%s.__new__(): not enough arguments",
-			     type->tp_name);
-		return NULL;
-	}
-	arg0 = PyTuple_GET_ITEM(args, 0);
-	if (!PyType_Check(arg0)) {
-		PyErr_Format(PyExc_TypeError,
-			     "%s.__new__(X): X is not a type object (%s)",
-			     type->tp_name,
-			     Py_TYPE(arg0)->tp_name);
-		return NULL;
-	}
-	subtype = (PyTypeObject *)arg0;
-	if (!PyType_IsSubtype(subtype, type)) {
-		PyErr_Format(PyExc_TypeError,
-			     "%s.__new__(%s): %s is not a subtype of %s",
-			     type->tp_name,
-			     subtype->tp_name,
-			     subtype->tp_name,
-			     type->tp_name);
-		return NULL;
-	}
+    if (self == NULL || !PyType_Check(self))
+        Py_FatalError("__new__() called with non-type 'self'");
+    type = (PyTypeObject *)self;
+    if (!PyTuple_Check(args) || PyTuple_GET_SIZE(args) < 1) {
+        PyErr_Format(PyExc_TypeError,
+                     "%s.__new__(): not enough arguments",
+                     type->tp_name);
+        return NULL;
+    }
+    arg0 = PyTuple_GET_ITEM(args, 0);
+    if (!PyType_Check(arg0)) {
+        PyErr_Format(PyExc_TypeError,
+                     "%s.__new__(X): X is not a type object (%s)",
+                     type->tp_name,
+                     Py_TYPE(arg0)->tp_name);
+        return NULL;
+    }
+    subtype = (PyTypeObject *)arg0;
+    if (!PyType_IsSubtype(subtype, type)) {
+        PyErr_Format(PyExc_TypeError,
+                     "%s.__new__(%s): %s is not a subtype of %s",
+                     type->tp_name,
+                     subtype->tp_name,
+                     subtype->tp_name,
+                     type->tp_name);
+        return NULL;
+    }
 
-	/* Check that the use doesn't do something silly and unsafe like
-	   object.__new__(dict).  To do this, we check that the
-	   most derived base that's not a heap type is this type. */
-	staticbase = subtype;
-	while (staticbase && (staticbase->tp_flags & Py_TPFLAGS_HEAPTYPE))
-		staticbase = staticbase->tp_base;
-	/* If staticbase is NULL now, it is a really weird type.
-	   In the spirit of backwards compatibility (?), just shut up. */
-	if (staticbase && staticbase->tp_new != type->tp_new) {
-		PyErr_Format(PyExc_TypeError,
-			     "%s.__new__(%s) is not safe, use %s.__new__()",
-			     type->tp_name,
-			     subtype->tp_name,
-			     staticbase == NULL ? "?" : staticbase->tp_name);
-		return NULL;
-	}
+    /* Check that the use doesn't do something silly and unsafe like
+       object.__new__(dict).  To do this, we check that the
+       most derived base that's not a heap type is this type. */
+    staticbase = subtype;
+    while (staticbase && (staticbase->tp_flags & Py_TPFLAGS_HEAPTYPE))
+        staticbase = staticbase->tp_base;
+    /* If staticbase is NULL now, it is a really weird type.
+       In the spirit of backwards compatibility (?), just shut up. */
+    if (staticbase && staticbase->tp_new != type->tp_new) {
+        PyErr_Format(PyExc_TypeError,
+                     "%s.__new__(%s) is not safe, use %s.__new__()",
+                     type->tp_name,
+                     subtype->tp_name,
+                     staticbase == NULL ? "?" : staticbase->tp_name);
+        return NULL;
+    }
 
-	args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args));
-	if (args == NULL)
-		return NULL;
-	res = type->tp_new(subtype, args, kwds);
-	Py_DECREF(args);
-	return res;
+    args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args));
+    if (args == NULL)
+        return NULL;
+    res = type->tp_new(subtype, args, kwds);
+    Py_DECREF(args);
+    return res;
 }
 
 static struct PyMethodDef tp_new_methoddef[] = {
-	{"__new__", (PyCFunction)tp_new_wrapper, METH_VARARGS|METH_KEYWORDS,
-	 PyDoc_STR("T.__new__(S, ...) -> "
-		   "a new object with type S, a subtype of T")},
-	{0}
+    {"__new__", (PyCFunction)tp_new_wrapper, METH_VARARGS|METH_KEYWORDS,
+     PyDoc_STR("T.__new__(S, ...) -> "
+               "a new object with type S, a subtype of T")},
+    {0}
 };
 
 static int
 add_tp_new_wrapper(PyTypeObject *type)
 {
-	PyObject *func;
+    PyObject *func;
 
-	if (PyDict_GetItemString(type->tp_dict, "__new__") != NULL)
-		return 0;
-	func = PyCFunction_New(tp_new_methoddef, (PyObject *)type);
-	if (func == NULL)
-		return -1;
-	if (PyDict_SetItemString(type->tp_dict, "__new__", func)) {
-		Py_DECREF(func);
-		return -1;
-	}
-	Py_DECREF(func);
-	return 0;
+    if (PyDict_GetItemString(type->tp_dict, "__new__") != NULL)
+        return 0;
+    func = PyCFunction_New(tp_new_methoddef, (PyObject *)type);
+    if (func == NULL)
+        return -1;
+    if (PyDict_SetItemString(type->tp_dict, "__new__", func)) {
+        Py_DECREF(func);
+        return -1;
+    }
+    Py_DECREF(func);
+    return 0;
 }
 
 /* Slot wrappers that call the corresponding __foo__ slot.  See comments
@@ -4810,16 +4810,16 @@
 static PyObject * \
 FUNCNAME(PyObject *self) \
 { \
-	static PyObject *cache_str; \
-	return call_method(self, OPSTR, &cache_str, "()"); \
+    static PyObject *cache_str; \
+    return call_method(self, OPSTR, &cache_str, "()"); \
 }
 
 #define SLOT1(FUNCNAME, OPSTR, ARG1TYPE, ARGCODES) \
 static PyObject * \
 FUNCNAME(PyObject *self, ARG1TYPE arg1) \
 { \
-	static PyObject *cache_str; \
-	return call_method(self, OPSTR, &cache_str, "(" ARGCODES ")", arg1); \
+    static PyObject *cache_str; \
+    return call_method(self, OPSTR, &cache_str, "(" ARGCODES ")", arg1); \
 }
 
 /* Boolean helper for SLOT1BINFULL().
@@ -4827,33 +4827,33 @@
 static int
 method_is_overloaded(PyObject *left, PyObject *right, char *name)
 {
-	PyObject *a, *b;
-	int ok;
+    PyObject *a, *b;
+    int ok;
 
-	b = PyObject_GetAttrString((PyObject *)(Py_TYPE(right)), name);
-	if (b == NULL) {
-		PyErr_Clear();
-		/* If right doesn't have it, it's not overloaded */
-		return 0;
-	}
+    b = PyObject_GetAttrString((PyObject *)(Py_TYPE(right)), name);
+    if (b == NULL) {
+        PyErr_Clear();
+        /* If right doesn't have it, it's not overloaded */
+        return 0;
+    }
 
-	a = PyObject_GetAttrString((PyObject *)(Py_TYPE(left)), name);
-	if (a == NULL) {
-		PyErr_Clear();
-		Py_DECREF(b);
-		/* If right has it but left doesn't, it's overloaded */
-		return 1;
-	}
+    a = PyObject_GetAttrString((PyObject *)(Py_TYPE(left)), name);
+    if (a == NULL) {
+        PyErr_Clear();
+        Py_DECREF(b);
+        /* If right has it but left doesn't, it's overloaded */
+        return 1;
+    }
 
-	ok = PyObject_RichCompareBool(a, b, Py_NE);
-	Py_DECREF(a);
-	Py_DECREF(b);
-	if (ok < 0) {
-		PyErr_Clear();
-		return 0;
-	}
+    ok = PyObject_RichCompareBool(a, b, Py_NE);
+    Py_DECREF(a);
+    Py_DECREF(b);
+    if (ok < 0) {
+        PyErr_Clear();
+        return 0;
+    }
 
-	return ok;
+    return ok;
 }
 
 
@@ -4861,68 +4861,68 @@
 static PyObject * \
 FUNCNAME(PyObject *self, PyObject *other) \
 { \
-	static PyObject *cache_str, *rcache_str; \
-	int do_other = Py_TYPE(self) != Py_TYPE(other) && \
-	    Py_TYPE(other)->tp_as_number != NULL && \
-	    Py_TYPE(other)->tp_as_number->SLOTNAME == TESTFUNC; \
-	if (Py_TYPE(self)->tp_as_number != NULL && \
-	    Py_TYPE(self)->tp_as_number->SLOTNAME == TESTFUNC) { \
-		PyObject *r; \
-		if (do_other && \
-		    PyType_IsSubtype(Py_TYPE(other), Py_TYPE(self)) && \
-		    method_is_overloaded(self, other, ROPSTR)) { \
-			r = call_maybe( \
-				other, ROPSTR, &rcache_str, "(O)", self); \
-			if (r != Py_NotImplemented) \
-				return r; \
-			Py_DECREF(r); \
-			do_other = 0; \
-		} \
-		r = call_maybe( \
-			self, OPSTR, &cache_str, "(O)", other); \
-		if (r != Py_NotImplemented || \
-		    Py_TYPE(other) == Py_TYPE(self)) \
-			return r; \
-		Py_DECREF(r); \
-	} \
-	if (do_other) { \
-		return call_maybe( \
-			other, ROPSTR, &rcache_str, "(O)", self); \
-	} \
-	Py_INCREF(Py_NotImplemented); \
-	return Py_NotImplemented; \
+    static PyObject *cache_str, *rcache_str; \
+    int do_other = Py_TYPE(self) != Py_TYPE(other) && \
+        Py_TYPE(other)->tp_as_number != NULL && \
+        Py_TYPE(other)->tp_as_number->SLOTNAME == TESTFUNC; \
+    if (Py_TYPE(self)->tp_as_number != NULL && \
+        Py_TYPE(self)->tp_as_number->SLOTNAME == TESTFUNC) { \
+        PyObject *r; \
+        if (do_other && \
+            PyType_IsSubtype(Py_TYPE(other), Py_TYPE(self)) && \
+            method_is_overloaded(self, other, ROPSTR)) { \
+            r = call_maybe( \
+                other, ROPSTR, &rcache_str, "(O)", self); \
+            if (r != Py_NotImplemented) \
+                return r; \
+            Py_DECREF(r); \
+            do_other = 0; \
+        } \
+        r = call_maybe( \
+            self, OPSTR, &cache_str, "(O)", other); \
+        if (r != Py_NotImplemented || \
+            Py_TYPE(other) == Py_TYPE(self)) \
+            return r; \
+        Py_DECREF(r); \
+    } \
+    if (do_other) { \
+        return call_maybe( \
+            other, ROPSTR, &rcache_str, "(O)", self); \
+    } \
+    Py_INCREF(Py_NotImplemented); \
+    return Py_NotImplemented; \
 }
 
 #define SLOT1BIN(FUNCNAME, SLOTNAME, OPSTR, ROPSTR) \
-	SLOT1BINFULL(FUNCNAME, FUNCNAME, SLOTNAME, OPSTR, ROPSTR)
+    SLOT1BINFULL(FUNCNAME, FUNCNAME, SLOTNAME, OPSTR, ROPSTR)
 
 #define SLOT2(FUNCNAME, OPSTR, ARG1TYPE, ARG2TYPE, ARGCODES) \
 static PyObject * \
 FUNCNAME(PyObject *self, ARG1TYPE arg1, ARG2TYPE arg2) \
 { \
-	static PyObject *cache_str; \
-	return call_method(self, OPSTR, &cache_str, \
-			   "(" ARGCODES ")", arg1, arg2); \
+    static PyObject *cache_str; \
+    return call_method(self, OPSTR, &cache_str, \
+                       "(" ARGCODES ")", arg1, arg2); \
 }
 
 static Py_ssize_t
 slot_sq_length(PyObject *self)
 {
-	static PyObject *len_str;
-	PyObject *res = call_method(self, "__len__", &len_str, "()");
-	Py_ssize_t len;
+    static PyObject *len_str;
+    PyObject *res = call_method(self, "__len__", &len_str, "()");
+    Py_ssize_t len;
 
-	if (res == NULL)
-		return -1;
-	len = PyInt_AsSsize_t(res);
-	Py_DECREF(res);
-	if (len < 0) {
-		if (!PyErr_Occurred())
-			PyErr_SetString(PyExc_ValueError,
-					"__len__() should return >= 0");
-		return -1;
-	}
-	return len;
+    if (res == NULL)
+        return -1;
+    len = PyInt_AsSsize_t(res);
+    Py_DECREF(res);
+    if (len < 0) {
+        if (!PyErr_Occurred())
+            PyErr_SetString(PyExc_ValueError,
+                            "__len__() should return >= 0");
+        return -1;
+    }
+    return len;
 }
 
 /* Super-optimized version of slot_sq_item.
@@ -4930,131 +4930,131 @@
 static PyObject *
 slot_sq_item(PyObject *self, Py_ssize_t i)
 {
-	static PyObject *getitem_str;
-	PyObject *func, *args = NULL, *ival = NULL, *retval = NULL;
-	descrgetfunc f;
+    static PyObject *getitem_str;
+    PyObject *func, *args = NULL, *ival = NULL, *retval = NULL;
+    descrgetfunc f;
 
-	if (getitem_str == NULL) {
-		getitem_str = PyString_InternFromString("__getitem__");
-		if (getitem_str == NULL)
-			return NULL;
-	}
-	func = _PyType_Lookup(Py_TYPE(self), getitem_str);
-	if (func != NULL) {
-		if ((f = Py_TYPE(func)->tp_descr_get) == NULL)
-			Py_INCREF(func);
-		else {
-			func = f(func, self, (PyObject *)(Py_TYPE(self)));
-			if (func == NULL) {
-				return NULL;
-			}
-		}
-		ival = PyInt_FromSsize_t(i);
-		if (ival != NULL) {
-			args = PyTuple_New(1);
-			if (args != NULL) {
-				PyTuple_SET_ITEM(args, 0, ival);
-				retval = PyObject_Call(func, args, NULL);
-				Py_XDECREF(args);
-				Py_XDECREF(func);
-				return retval;
-			}
-		}
-	}
-	else {
-		PyErr_SetObject(PyExc_AttributeError, getitem_str);
-	}
-	Py_XDECREF(args);
-	Py_XDECREF(ival);
-	Py_XDECREF(func);
-	return NULL;
+    if (getitem_str == NULL) {
+        getitem_str = PyString_InternFromString("__getitem__");
+        if (getitem_str == NULL)
+            return NULL;
+    }
+    func = _PyType_Lookup(Py_TYPE(self), getitem_str);
+    if (func != NULL) {
+        if ((f = Py_TYPE(func)->tp_descr_get) == NULL)
+            Py_INCREF(func);
+        else {
+            func = f(func, self, (PyObject *)(Py_TYPE(self)));
+            if (func == NULL) {
+                return NULL;
+            }
+        }
+        ival = PyInt_FromSsize_t(i);
+        if (ival != NULL) {
+            args = PyTuple_New(1);
+            if (args != NULL) {
+                PyTuple_SET_ITEM(args, 0, ival);
+                retval = PyObject_Call(func, args, NULL);
+                Py_XDECREF(args);
+                Py_XDECREF(func);
+                return retval;
+            }
+        }
+    }
+    else {
+        PyErr_SetObject(PyExc_AttributeError, getitem_str);
+    }
+    Py_XDECREF(args);
+    Py_XDECREF(ival);
+    Py_XDECREF(func);
+    return NULL;
 }
 
 static PyObject*
 slot_sq_slice(PyObject *self, Py_ssize_t i, Py_ssize_t j)
 {
-	static PyObject *getslice_str;
-	
-	if (PyErr_WarnPy3k("in 3.x, __getslice__ has been removed; "
-			    "use __getitem__", 1) < 0)
-		return NULL;
-	return call_method(self, "__getslice__", &getslice_str,
-		"nn", i, j);
+    static PyObject *getslice_str;
+
+    if (PyErr_WarnPy3k("in 3.x, __getslice__ has been removed; "
+                        "use __getitem__", 1) < 0)
+        return NULL;
+    return call_method(self, "__getslice__", &getslice_str,
+        "nn", i, j);
 }
 
 static int
 slot_sq_ass_item(PyObject *self, Py_ssize_t index, PyObject *value)
 {
-	PyObject *res;
-	static PyObject *delitem_str, *setitem_str;
+    PyObject *res;
+    static PyObject *delitem_str, *setitem_str;
 
-	if (value == NULL)
-		res = call_method(self, "__delitem__", &delitem_str,
-				  "(n)", index);
-	else
-		res = call_method(self, "__setitem__", &setitem_str,
-				  "(nO)", index, value);
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+    if (value == NULL)
+        res = call_method(self, "__delitem__", &delitem_str,
+                          "(n)", index);
+    else
+        res = call_method(self, "__setitem__", &setitem_str,
+                          "(nO)", index, value);
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 static int
 slot_sq_ass_slice(PyObject *self, Py_ssize_t i, Py_ssize_t j, PyObject *value)
 {
-	PyObject *res;
-	static PyObject *delslice_str, *setslice_str;
-	
-	if (value == NULL) {
-		if (PyErr_WarnPy3k("in 3.x, __delslice__ has been removed; "
-				   "use __delitem__", 1) < 0)
-			return -1;
-		res = call_method(self, "__delslice__", &delslice_str,
-				  "(nn)", i, j);
-	}
-	else {
-		if (PyErr_WarnPy3k("in 3.x, __setslice__ has been removed; "
-					"use __setitem__", 1) < 0)
-			return -1;		
-		res = call_method(self, "__setslice__", &setslice_str,
-			  "(nnO)", i, j, value);
-	}
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+    PyObject *res;
+    static PyObject *delslice_str, *setslice_str;
+
+    if (value == NULL) {
+        if (PyErr_WarnPy3k("in 3.x, __delslice__ has been removed; "
+                           "use __delitem__", 1) < 0)
+            return -1;
+        res = call_method(self, "__delslice__", &delslice_str,
+                          "(nn)", i, j);
+    }
+    else {
+        if (PyErr_WarnPy3k("in 3.x, __setslice__ has been removed; "
+                                "use __setitem__", 1) < 0)
+            return -1;
+        res = call_method(self, "__setslice__", &setslice_str,
+                  "(nnO)", i, j, value);
+    }
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 static int
 slot_sq_contains(PyObject *self, PyObject *value)
 {
-	PyObject *func, *res, *args;
-	int result = -1;
+    PyObject *func, *res, *args;
+    int result = -1;
 
-	static PyObject *contains_str;
+    static PyObject *contains_str;
 
-	func = lookup_maybe(self, "__contains__", &contains_str);
-	if (func != NULL) {
-		args = PyTuple_Pack(1, value);
-		if (args == NULL)
-			res = NULL;
-		else {
-			res = PyObject_Call(func, args, NULL);
-			Py_DECREF(args);
-		}
-		Py_DECREF(func);
-		if (res != NULL) {
-			result = PyObject_IsTrue(res);
-			Py_DECREF(res);
-		}
-	}
-	else if (! PyErr_Occurred()) {
-		/* Possible results: -1 and 1 */
-		result = (int)_PySequence_IterSearch(self, value,
-						 PY_ITERSEARCH_CONTAINS);
-	}
-	return result;
+    func = lookup_maybe(self, "__contains__", &contains_str);
+    if (func != NULL) {
+        args = PyTuple_Pack(1, value);
+        if (args == NULL)
+            res = NULL;
+        else {
+            res = PyObject_Call(func, args, NULL);
+            Py_DECREF(args);
+        }
+        Py_DECREF(func);
+        if (res != NULL) {
+            result = PyObject_IsTrue(res);
+            Py_DECREF(res);
+        }
+    }
+    else if (! PyErr_Occurred()) {
+        /* Possible results: -1 and 1 */
+        result = (int)_PySequence_IterSearch(self, value,
+                                         PY_ITERSEARCH_CONTAINS);
+    }
+    return result;
 }
 
 #define slot_mp_length slot_sq_length
@@ -5064,19 +5064,19 @@
 static int
 slot_mp_ass_subscript(PyObject *self, PyObject *key, PyObject *value)
 {
-	PyObject *res;
-	static PyObject *delitem_str, *setitem_str;
+    PyObject *res;
+    static PyObject *delitem_str, *setitem_str;
 
-	if (value == NULL)
-		res = call_method(self, "__delitem__", &delitem_str,
-				  "(O)", key);
-	else
-		res = call_method(self, "__setitem__", &setitem_str,
-				 "(OO)", key, value);
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+    if (value == NULL)
+        res = call_method(self, "__delitem__", &delitem_str,
+                          "(O)", key);
+    else
+        res = call_method(self, "__setitem__", &setitem_str,
+                         "(OO)", key, value);
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 SLOT1BIN(slot_nb_add, nb_add, "__add__", "__radd__")
@@ -5089,25 +5089,25 @@
 static PyObject *slot_nb_power(PyObject *, PyObject *, PyObject *);
 
 SLOT1BINFULL(slot_nb_power_binary, slot_nb_power,
-	     nb_power, "__pow__", "__rpow__")
+             nb_power, "__pow__", "__rpow__")
 
 static PyObject *
 slot_nb_power(PyObject *self, PyObject *other, PyObject *modulus)
 {
-	static PyObject *pow_str;
+    static PyObject *pow_str;
 
-	if (modulus == Py_None)
-		return slot_nb_power_binary(self, other);
-	/* Three-arg power doesn't use __rpow__.  But ternary_op
-	   can call this when the second argument's type uses
-	   slot_nb_power, so check before calling self.__pow__. */
-	if (Py_TYPE(self)->tp_as_number != NULL &&
-	    Py_TYPE(self)->tp_as_number->nb_power == slot_nb_power) {
-		return call_method(self, "__pow__", &pow_str,
-				   "(OO)", other, modulus);
-	}
-	Py_INCREF(Py_NotImplemented);
-	return Py_NotImplemented;
+    if (modulus == Py_None)
+        return slot_nb_power_binary(self, other);
+    /* Three-arg power doesn't use __rpow__.  But ternary_op
+       can call this when the second argument's type uses
+       slot_nb_power, so check before calling self.__pow__. */
+    if (Py_TYPE(self)->tp_as_number != NULL &&
+        Py_TYPE(self)->tp_as_number->nb_power == slot_nb_power) {
+        return call_method(self, "__pow__", &pow_str,
+                           "(OO)", other, modulus);
+    }
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
 }
 
 SLOT0(slot_nb_negative, "__neg__")
@@ -5117,49 +5117,49 @@
 static int
 slot_nb_nonzero(PyObject *self)
 {
-	PyObject *func, *args;
-	static PyObject *nonzero_str, *len_str;
-	int result = -1;
-	int using_len = 0;
+    PyObject *func, *args;
+    static PyObject *nonzero_str, *len_str;
+    int result = -1;
+    int using_len = 0;
 
-	func = lookup_maybe(self, "__nonzero__", &nonzero_str);
-	if (func == NULL) {
-		if (PyErr_Occurred())
-			return -1;
-		func = lookup_maybe(self, "__len__", &len_str);
-		if (func == NULL)
-			return PyErr_Occurred() ? -1 : 1;
-		using_len = 1;
-	}
-	args = PyTuple_New(0);
-	if (args != NULL) {
-		PyObject *temp = PyObject_Call(func, args, NULL);
-		Py_DECREF(args);
-		if (temp != NULL) {
-			if (PyInt_CheckExact(temp) || PyBool_Check(temp))
-				result = PyObject_IsTrue(temp);
-			else {
-				PyErr_Format(PyExc_TypeError,
-					     "%s should return "
-					     "bool or int, returned %s",
-					     (using_len ? "__len__"
-					                : "__nonzero__"),
-					     temp->ob_type->tp_name);
-				result = -1;
-			}
-			Py_DECREF(temp);
-		}
-	}
-	Py_DECREF(func);
-	return result;
+    func = lookup_maybe(self, "__nonzero__", &nonzero_str);
+    if (func == NULL) {
+        if (PyErr_Occurred())
+            return -1;
+        func = lookup_maybe(self, "__len__", &len_str);
+        if (func == NULL)
+            return PyErr_Occurred() ? -1 : 1;
+        using_len = 1;
+    }
+    args = PyTuple_New(0);
+    if (args != NULL) {
+        PyObject *temp = PyObject_Call(func, args, NULL);
+        Py_DECREF(args);
+        if (temp != NULL) {
+            if (PyInt_CheckExact(temp) || PyBool_Check(temp))
+                result = PyObject_IsTrue(temp);
+            else {
+                PyErr_Format(PyExc_TypeError,
+                             "%s should return "
+                             "bool or int, returned %s",
+                             (using_len ? "__len__"
+                                        : "__nonzero__"),
+                             temp->ob_type->tp_name);
+                result = -1;
+            }
+            Py_DECREF(temp);
+        }
+    }
+    Py_DECREF(func);
+    return result;
 }
 
 
 static PyObject *
 slot_nb_index(PyObject *self)
 {
-	static PyObject *index_str;
-	return call_method(self, "__index__", &index_str, "()");
+    static PyObject *index_str;
+    return call_method(self, "__index__", &index_str, "()");
 }
 
 
@@ -5173,59 +5173,59 @@
 static int
 slot_nb_coerce(PyObject **a, PyObject **b)
 {
-	static PyObject *coerce_str;
-	PyObject *self = *a, *other = *b;
+    static PyObject *coerce_str;
+    PyObject *self = *a, *other = *b;
 
-	if (self->ob_type->tp_as_number != NULL &&
-	    self->ob_type->tp_as_number->nb_coerce == slot_nb_coerce) {
-		PyObject *r;
-		r = call_maybe(
-			self, "__coerce__", &coerce_str, "(O)", other);
-		if (r == NULL)
-			return -1;
-		if (r == Py_NotImplemented) {
-			Py_DECREF(r);
-		}
-		else {
-			if (!PyTuple_Check(r) || PyTuple_GET_SIZE(r) != 2) {
-				PyErr_SetString(PyExc_TypeError,
-					"__coerce__ didn't return a 2-tuple");
-				Py_DECREF(r);
-				return -1;
-			}
-			*a = PyTuple_GET_ITEM(r, 0);
-			Py_INCREF(*a);
-			*b = PyTuple_GET_ITEM(r, 1);
-			Py_INCREF(*b);
-			Py_DECREF(r);
-			return 0;
-		}
-	}
-	if (other->ob_type->tp_as_number != NULL &&
-	    other->ob_type->tp_as_number->nb_coerce == slot_nb_coerce) {
-		PyObject *r;
-		r = call_maybe(
-			other, "__coerce__", &coerce_str, "(O)", self);
-		if (r == NULL)
-			return -1;
-		if (r == Py_NotImplemented) {
-			Py_DECREF(r);
-			return 1;
-		}
-		if (!PyTuple_Check(r) || PyTuple_GET_SIZE(r) != 2) {
-			PyErr_SetString(PyExc_TypeError,
-					"__coerce__ didn't return a 2-tuple");
-			Py_DECREF(r);
-			return -1;
-		}
-		*a = PyTuple_GET_ITEM(r, 1);
-		Py_INCREF(*a);
-		*b = PyTuple_GET_ITEM(r, 0);
-		Py_INCREF(*b);
-		Py_DECREF(r);
-		return 0;
-	}
-	return 1;
+    if (self->ob_type->tp_as_number != NULL &&
+        self->ob_type->tp_as_number->nb_coerce == slot_nb_coerce) {
+        PyObject *r;
+        r = call_maybe(
+            self, "__coerce__", &coerce_str, "(O)", other);
+        if (r == NULL)
+            return -1;
+        if (r == Py_NotImplemented) {
+            Py_DECREF(r);
+        }
+        else {
+            if (!PyTuple_Check(r) || PyTuple_GET_SIZE(r) != 2) {
+                PyErr_SetString(PyExc_TypeError,
+                    "__coerce__ didn't return a 2-tuple");
+                Py_DECREF(r);
+                return -1;
+            }
+            *a = PyTuple_GET_ITEM(r, 0);
+            Py_INCREF(*a);
+            *b = PyTuple_GET_ITEM(r, 1);
+            Py_INCREF(*b);
+            Py_DECREF(r);
+            return 0;
+        }
+    }
+    if (other->ob_type->tp_as_number != NULL &&
+        other->ob_type->tp_as_number->nb_coerce == slot_nb_coerce) {
+        PyObject *r;
+        r = call_maybe(
+            other, "__coerce__", &coerce_str, "(O)", self);
+        if (r == NULL)
+            return -1;
+        if (r == Py_NotImplemented) {
+            Py_DECREF(r);
+            return 1;
+        }
+        if (!PyTuple_Check(r) || PyTuple_GET_SIZE(r) != 2) {
+            PyErr_SetString(PyExc_TypeError,
+                            "__coerce__ didn't return a 2-tuple");
+            Py_DECREF(r);
+            return -1;
+        }
+        *a = PyTuple_GET_ITEM(r, 1);
+        Py_INCREF(*a);
+        *b = PyTuple_GET_ITEM(r, 0);
+        Py_INCREF(*b);
+        Py_DECREF(r);
+        return 0;
+    }
+    return 1;
 }
 
 SLOT0(slot_nb_int, "__int__")
@@ -5239,11 +5239,11 @@
 SLOT1(slot_nb_inplace_divide, "__idiv__", PyObject *, "O")
 SLOT1(slot_nb_inplace_remainder, "__imod__", PyObject *, "O")
 /* Can't use SLOT1 here, because nb_inplace_power is ternary */
-static PyObject * 
-slot_nb_inplace_power(PyObject *self, PyObject * arg1, PyObject *arg2) 
-{ 
-  static PyObject *cache_str; 
-  return call_method(self, "__ipow__", &cache_str, "(" "O" ")", arg1); 
+static PyObject *
+slot_nb_inplace_power(PyObject *self, PyObject * arg1, PyObject *arg2)
+{
+  static PyObject *cache_str;
+  return call_method(self, "__ipow__", &cache_str, "(" "O" ")", arg1);
 }
 SLOT1(slot_nb_inplace_lshift, "__ilshift__", PyObject *, "O")
 SLOT1(slot_nb_inplace_rshift, "__irshift__", PyObject *, "O")
@@ -5251,7 +5251,7 @@
 SLOT1(slot_nb_inplace_xor, "__ixor__", PyObject *, "O")
 SLOT1(slot_nb_inplace_or, "__ior__", PyObject *, "O")
 SLOT1BIN(slot_nb_floor_divide, nb_floor_divide,
-	 "__floordiv__", "__rfloordiv__")
+         "__floordiv__", "__rfloordiv__")
 SLOT1BIN(slot_nb_true_divide, nb_true_divide, "__truediv__", "__rtruediv__")
 SLOT1(slot_nb_inplace_floor_divide, "__ifloordiv__", PyObject *, "O")
 SLOT1(slot_nb_inplace_true_divide, "__itruediv__", PyObject *, "O")
@@ -5259,148 +5259,148 @@
 static int
 half_compare(PyObject *self, PyObject *other)
 {
-	PyObject *func, *args, *res;
-	static PyObject *cmp_str;
-	Py_ssize_t c;
+    PyObject *func, *args, *res;
+    static PyObject *cmp_str;
+    Py_ssize_t c;
 
-	func = lookup_method(self, "__cmp__", &cmp_str);
-	if (func == NULL) {
-		PyErr_Clear();
-	}
-	else {
-		args = PyTuple_Pack(1, other);
-		if (args == NULL)
-			res = NULL;
-		else {
-			res = PyObject_Call(func, args, NULL);
-			Py_DECREF(args);
-		}
-		Py_DECREF(func);
-		if (res != Py_NotImplemented) {
-			if (res == NULL)
-				return -2;
-			c = PyInt_AsLong(res);
-			Py_DECREF(res);
-			if (c == -1 && PyErr_Occurred())
-				return -2;
-			return (c < 0) ? -1 : (c > 0) ? 1 : 0;
-		}
-		Py_DECREF(res);
-	}
-	return 2;
+    func = lookup_method(self, "__cmp__", &cmp_str);
+    if (func == NULL) {
+        PyErr_Clear();
+    }
+    else {
+        args = PyTuple_Pack(1, other);
+        if (args == NULL)
+            res = NULL;
+        else {
+            res = PyObject_Call(func, args, NULL);
+            Py_DECREF(args);
+        }
+        Py_DECREF(func);
+        if (res != Py_NotImplemented) {
+            if (res == NULL)
+                return -2;
+            c = PyInt_AsLong(res);
+            Py_DECREF(res);
+            if (c == -1 && PyErr_Occurred())
+                return -2;
+            return (c < 0) ? -1 : (c > 0) ? 1 : 0;
+        }
+        Py_DECREF(res);
+    }
+    return 2;
 }
 
 /* This slot is published for the benefit of try_3way_compare in object.c */
 int
 _PyObject_SlotCompare(PyObject *self, PyObject *other)
 {
-	int c;
+    int c;
 
-	if (Py_TYPE(self)->tp_compare == _PyObject_SlotCompare) {
-		c = half_compare(self, other);
-		if (c <= 1)
-			return c;
-	}
-	if (Py_TYPE(other)->tp_compare == _PyObject_SlotCompare) {
-		c = half_compare(other, self);
-		if (c < -1)
-			return -2;
-		if (c <= 1)
-			return -c;
-	}
-	return (void *)self < (void *)other ? -1 :
-		(void *)self > (void *)other ? 1 : 0;
+    if (Py_TYPE(self)->tp_compare == _PyObject_SlotCompare) {
+        c = half_compare(self, other);
+        if (c <= 1)
+            return c;
+    }
+    if (Py_TYPE(other)->tp_compare == _PyObject_SlotCompare) {
+        c = half_compare(other, self);
+        if (c < -1)
+            return -2;
+        if (c <= 1)
+            return -c;
+    }
+    return (void *)self < (void *)other ? -1 :
+        (void *)self > (void *)other ? 1 : 0;
 }
 
 static PyObject *
 slot_tp_repr(PyObject *self)
 {
-	PyObject *func, *res;
-	static PyObject *repr_str;
+    PyObject *func, *res;
+    static PyObject *repr_str;
 
-	func = lookup_method(self, "__repr__", &repr_str);
-	if (func != NULL) {
-		res = PyEval_CallObject(func, NULL);
-		Py_DECREF(func);
-		return res;
-	}
-	PyErr_Clear();
-	return PyString_FromFormat("<%s object at %p>",
-				   Py_TYPE(self)->tp_name, self);
+    func = lookup_method(self, "__repr__", &repr_str);
+    if (func != NULL) {
+        res = PyEval_CallObject(func, NULL);
+        Py_DECREF(func);
+        return res;
+    }
+    PyErr_Clear();
+    return PyString_FromFormat("<%s object at %p>",
+                               Py_TYPE(self)->tp_name, self);
 }
 
 static PyObject *
 slot_tp_str(PyObject *self)
 {
-	PyObject *func, *res;
-	static PyObject *str_str;
+    PyObject *func, *res;
+    static PyObject *str_str;
 
-	func = lookup_method(self, "__str__", &str_str);
-	if (func != NULL) {
-		res = PyEval_CallObject(func, NULL);
-		Py_DECREF(func);
-		return res;
-	}
-	else {
-		PyErr_Clear();
-		return slot_tp_repr(self);
-	}
+    func = lookup_method(self, "__str__", &str_str);
+    if (func != NULL) {
+        res = PyEval_CallObject(func, NULL);
+        Py_DECREF(func);
+        return res;
+    }
+    else {
+        PyErr_Clear();
+        return slot_tp_repr(self);
+    }
 }
 
 static long
 slot_tp_hash(PyObject *self)
 {
-	PyObject *func;
-	static PyObject *hash_str, *eq_str, *cmp_str;
-	long h;
+    PyObject *func;
+    static PyObject *hash_str, *eq_str, *cmp_str;
+    long h;
 
-	func = lookup_method(self, "__hash__", &hash_str);
+    func = lookup_method(self, "__hash__", &hash_str);
 
-	if (func != NULL && func != Py_None) {
-		PyObject *res = PyEval_CallObject(func, NULL);
-		Py_DECREF(func);
-		if (res == NULL)
-			return -1;
-		if (PyLong_Check(res))
-			h = PyLong_Type.tp_hash(res);
-		else
-			h = PyInt_AsLong(res);
-		Py_DECREF(res);
-	}
-	else {
-		Py_XDECREF(func); /* may be None */
-		PyErr_Clear();
-		func = lookup_method(self, "__eq__", &eq_str);
-		if (func == NULL) {
-			PyErr_Clear();
-			func = lookup_method(self, "__cmp__", &cmp_str);
-		}
-		if (func != NULL) {
-			Py_DECREF(func);
-			return PyObject_HashNotImplemented(self);
-		}
-		PyErr_Clear();
-		h = _Py_HashPointer((void *)self);
-	}
-	if (h == -1 && !PyErr_Occurred())
-		h = -2;
-	return h;
+    if (func != NULL && func != Py_None) {
+        PyObject *res = PyEval_CallObject(func, NULL);
+        Py_DECREF(func);
+        if (res == NULL)
+            return -1;
+        if (PyLong_Check(res))
+            h = PyLong_Type.tp_hash(res);
+        else
+            h = PyInt_AsLong(res);
+        Py_DECREF(res);
+    }
+    else {
+        Py_XDECREF(func); /* may be None */
+        PyErr_Clear();
+        func = lookup_method(self, "__eq__", &eq_str);
+        if (func == NULL) {
+            PyErr_Clear();
+            func = lookup_method(self, "__cmp__", &cmp_str);
+        }
+        if (func != NULL) {
+            Py_DECREF(func);
+            return PyObject_HashNotImplemented(self);
+        }
+        PyErr_Clear();
+        h = _Py_HashPointer((void *)self);
+    }
+    if (h == -1 && !PyErr_Occurred())
+        h = -2;
+    return h;
 }
 
 static PyObject *
 slot_tp_call(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	static PyObject *call_str;
-	PyObject *meth = lookup_method(self, "__call__", &call_str);
-	PyObject *res;
+    static PyObject *call_str;
+    PyObject *meth = lookup_method(self, "__call__", &call_str);
+    PyObject *res;
 
-	if (meth == NULL)
-		return NULL;
+    if (meth == NULL)
+        return NULL;
 
-	res = PyObject_Call(meth, args, kwds);
+    res = PyObject_Call(meth, args, kwds);
 
-	Py_DECREF(meth);
-	return res;
+    Py_DECREF(meth);
+    return res;
 }
 
 /* There are two slot dispatch functions for tp_getattro.
@@ -5417,100 +5417,100 @@
 static PyObject *
 slot_tp_getattro(PyObject *self, PyObject *name)
 {
-	static PyObject *getattribute_str = NULL;
-	return call_method(self, "__getattribute__", &getattribute_str,
-			   "(O)", name);
+    static PyObject *getattribute_str = NULL;
+    return call_method(self, "__getattribute__", &getattribute_str,
+                       "(O)", name);
 }
 
 static PyObject *
 call_attribute(PyObject *self, PyObject *attr, PyObject *name)
 {
-	PyObject *res, *descr = NULL;
-	descrgetfunc f = Py_TYPE(attr)->tp_descr_get;
+    PyObject *res, *descr = NULL;
+    descrgetfunc f = Py_TYPE(attr)->tp_descr_get;
 
-	if (f != NULL) {
-		descr = f(attr, self, (PyObject *)(Py_TYPE(self)));
-		if (descr == NULL)
-			return NULL;
-		else
-			attr = descr;
-	}
-	res = PyObject_CallFunctionObjArgs(attr, name, NULL);
-	Py_XDECREF(descr);
-	return res;
+    if (f != NULL) {
+        descr = f(attr, self, (PyObject *)(Py_TYPE(self)));
+        if (descr == NULL)
+            return NULL;
+        else
+            attr = descr;
+    }
+    res = PyObject_CallFunctionObjArgs(attr, name, NULL);
+    Py_XDECREF(descr);
+    return res;
 }
 
 static PyObject *
 slot_tp_getattr_hook(PyObject *self, PyObject *name)
 {
-	PyTypeObject *tp = Py_TYPE(self);
-	PyObject *getattr, *getattribute, *res;
-	static PyObject *getattribute_str = NULL;
-	static PyObject *getattr_str = NULL;
+    PyTypeObject *tp = Py_TYPE(self);
+    PyObject *getattr, *getattribute, *res;
+    static PyObject *getattribute_str = NULL;
+    static PyObject *getattr_str = NULL;
 
-	if (getattr_str == NULL) {
-		getattr_str = PyString_InternFromString("__getattr__");
-		if (getattr_str == NULL)
-			return NULL;
-	}
-	if (getattribute_str == NULL) {
-		getattribute_str =
-			PyString_InternFromString("__getattribute__");
-		if (getattribute_str == NULL)
-			return NULL;
-	}
-	/* speed hack: we could use lookup_maybe, but that would resolve the
-	   method fully for each attribute lookup for classes with
-	   __getattr__, even when the attribute is present. So we use
-	   _PyType_Lookup and create the method only when needed, with
-	   call_attribute. */
-	getattr = _PyType_Lookup(tp, getattr_str);
-	if (getattr == NULL) {
-		/* No __getattr__ hook: use a simpler dispatcher */
-		tp->tp_getattro = slot_tp_getattro;
-		return slot_tp_getattro(self, name);
-	}
-	Py_INCREF(getattr);
-	/* speed hack: we could use lookup_maybe, but that would resolve the
-	   method fully for each attribute lookup for classes with
-	   __getattr__, even when self has the default __getattribute__
-	   method. So we use _PyType_Lookup and create the method only when
-	   needed, with call_attribute. */
-	getattribute = _PyType_Lookup(tp, getattribute_str);
-	if (getattribute == NULL ||
-	    (Py_TYPE(getattribute) == &PyWrapperDescr_Type &&
-	     ((PyWrapperDescrObject *)getattribute)->d_wrapped ==
-	     (void *)PyObject_GenericGetAttr))
-		res = PyObject_GenericGetAttr(self, name);
-	else {
-		Py_INCREF(getattribute);
-		res = call_attribute(self, getattribute, name);
-		Py_DECREF(getattribute);
-	}
-	if (res == NULL && PyErr_ExceptionMatches(PyExc_AttributeError)) {
-		PyErr_Clear();
-		res = call_attribute(self, getattr, name);
-	}
-	Py_DECREF(getattr);
-	return res;
+    if (getattr_str == NULL) {
+        getattr_str = PyString_InternFromString("__getattr__");
+        if (getattr_str == NULL)
+            return NULL;
+    }
+    if (getattribute_str == NULL) {
+        getattribute_str =
+            PyString_InternFromString("__getattribute__");
+        if (getattribute_str == NULL)
+            return NULL;
+    }
+    /* speed hack: we could use lookup_maybe, but that would resolve the
+       method fully for each attribute lookup for classes with
+       __getattr__, even when the attribute is present. So we use
+       _PyType_Lookup and create the method only when needed, with
+       call_attribute. */
+    getattr = _PyType_Lookup(tp, getattr_str);
+    if (getattr == NULL) {
+        /* No __getattr__ hook: use a simpler dispatcher */
+        tp->tp_getattro = slot_tp_getattro;
+        return slot_tp_getattro(self, name);
+    }
+    Py_INCREF(getattr);
+    /* speed hack: we could use lookup_maybe, but that would resolve the
+       method fully for each attribute lookup for classes with
+       __getattr__, even when self has the default __getattribute__
+       method. So we use _PyType_Lookup and create the method only when
+       needed, with call_attribute. */
+    getattribute = _PyType_Lookup(tp, getattribute_str);
+    if (getattribute == NULL ||
+        (Py_TYPE(getattribute) == &PyWrapperDescr_Type &&
+         ((PyWrapperDescrObject *)getattribute)->d_wrapped ==
+         (void *)PyObject_GenericGetAttr))
+        res = PyObject_GenericGetAttr(self, name);
+    else {
+        Py_INCREF(getattribute);
+        res = call_attribute(self, getattribute, name);
+        Py_DECREF(getattribute);
+    }
+    if (res == NULL && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+        PyErr_Clear();
+        res = call_attribute(self, getattr, name);
+    }
+    Py_DECREF(getattr);
+    return res;
 }
 
 static int
 slot_tp_setattro(PyObject *self, PyObject *name, PyObject *value)
 {
-	PyObject *res;
-	static PyObject *delattr_str, *setattr_str;
+    PyObject *res;
+    static PyObject *delattr_str, *setattr_str;
 
-	if (value == NULL)
-		res = call_method(self, "__delattr__", &delattr_str,
-				  "(O)", name);
-	else
-		res = call_method(self, "__setattr__", &setattr_str,
-				  "(OO)", name, value);
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+    if (value == NULL)
+        res = call_method(self, "__delattr__", &delattr_str,
+                          "(O)", name);
+    else
+        res = call_method(self, "__setattr__", &setattr_str,
+                          "(OO)", name, value);
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 static char *name_op[] = {
@@ -5525,244 +5525,244 @@
 static PyObject *
 half_richcompare(PyObject *self, PyObject *other, int op)
 {
-	PyObject *func, *args, *res;
-	static PyObject *op_str[6];
+    PyObject *func, *args, *res;
+    static PyObject *op_str[6];
 
-	func = lookup_method(self, name_op[op], &op_str[op]);
-	if (func == NULL) {
-		PyErr_Clear();
-		Py_INCREF(Py_NotImplemented);
-		return Py_NotImplemented;
-	}
-	args = PyTuple_Pack(1, other);
-	if (args == NULL)
-		res = NULL;
-	else {
-		res = PyObject_Call(func, args, NULL);
-		Py_DECREF(args);
-	}
-	Py_DECREF(func);
-	return res;
+    func = lookup_method(self, name_op[op], &op_str[op]);
+    if (func == NULL) {
+        PyErr_Clear();
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    args = PyTuple_Pack(1, other);
+    if (args == NULL)
+        res = NULL;
+    else {
+        res = PyObject_Call(func, args, NULL);
+        Py_DECREF(args);
+    }
+    Py_DECREF(func);
+    return res;
 }
 
 static PyObject *
 slot_tp_richcompare(PyObject *self, PyObject *other, int op)
 {
-	PyObject *res;
+    PyObject *res;
 
-	if (Py_TYPE(self)->tp_richcompare == slot_tp_richcompare) {
-		res = half_richcompare(self, other, op);
-		if (res != Py_NotImplemented)
-			return res;
-		Py_DECREF(res);
-	}
-	if (Py_TYPE(other)->tp_richcompare == slot_tp_richcompare) {
-		res = half_richcompare(other, self, _Py_SwappedOp[op]);
-		if (res != Py_NotImplemented) {
-			return res;
-		}
-		Py_DECREF(res);
-	}
-	Py_INCREF(Py_NotImplemented);
-	return Py_NotImplemented;
+    if (Py_TYPE(self)->tp_richcompare == slot_tp_richcompare) {
+        res = half_richcompare(self, other, op);
+        if (res != Py_NotImplemented)
+            return res;
+        Py_DECREF(res);
+    }
+    if (Py_TYPE(other)->tp_richcompare == slot_tp_richcompare) {
+        res = half_richcompare(other, self, _Py_SwappedOp[op]);
+        if (res != Py_NotImplemented) {
+            return res;
+        }
+        Py_DECREF(res);
+    }
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
 }
 
 static PyObject *
 slot_tp_iter(PyObject *self)
 {
-	PyObject *func, *res;
-	static PyObject *iter_str, *getitem_str;
+    PyObject *func, *res;
+    static PyObject *iter_str, *getitem_str;
 
-	func = lookup_method(self, "__iter__", &iter_str);
-	if (func != NULL) {
-		PyObject *args;
-		args = res = PyTuple_New(0);
-		if (args != NULL) {
-			res = PyObject_Call(func, args, NULL);
-			Py_DECREF(args);
-		}
-		Py_DECREF(func);
-		return res;
-	}
-	PyErr_Clear();
-	func = lookup_method(self, "__getitem__", &getitem_str);
-	if (func == NULL) {
-		PyErr_Format(PyExc_TypeError,
-			     "'%.200s' object is not iterable",
-			     Py_TYPE(self)->tp_name);
-		return NULL;
-	}
-	Py_DECREF(func);
-	return PySeqIter_New(self);
+    func = lookup_method(self, "__iter__", &iter_str);
+    if (func != NULL) {
+        PyObject *args;
+        args = res = PyTuple_New(0);
+        if (args != NULL) {
+            res = PyObject_Call(func, args, NULL);
+            Py_DECREF(args);
+        }
+        Py_DECREF(func);
+        return res;
+    }
+    PyErr_Clear();
+    func = lookup_method(self, "__getitem__", &getitem_str);
+    if (func == NULL) {
+        PyErr_Format(PyExc_TypeError,
+                     "'%.200s' object is not iterable",
+                     Py_TYPE(self)->tp_name);
+        return NULL;
+    }
+    Py_DECREF(func);
+    return PySeqIter_New(self);
 }
 
 static PyObject *
 slot_tp_iternext(PyObject *self)
 {
-	static PyObject *next_str;
-	return call_method(self, "next", &next_str, "()");
+    static PyObject *next_str;
+    return call_method(self, "next", &next_str, "()");
 }
 
 static PyObject *
 slot_tp_descr_get(PyObject *self, PyObject *obj, PyObject *type)
 {
-	PyTypeObject *tp = Py_TYPE(self);
-	PyObject *get;
-	static PyObject *get_str = NULL;
+    PyTypeObject *tp = Py_TYPE(self);
+    PyObject *get;
+    static PyObject *get_str = NULL;
 
-	if (get_str == NULL) {
-		get_str = PyString_InternFromString("__get__");
-		if (get_str == NULL)
-			return NULL;
-	}
-	get = _PyType_Lookup(tp, get_str);
-	if (get == NULL) {
-		/* Avoid further slowdowns */
-		if (tp->tp_descr_get == slot_tp_descr_get)
-			tp->tp_descr_get = NULL;
-		Py_INCREF(self);
-		return self;
-	}
-	if (obj == NULL)
-		obj = Py_None;
-	if (type == NULL)
-		type = Py_None;
-	return PyObject_CallFunctionObjArgs(get, self, obj, type, NULL);
+    if (get_str == NULL) {
+        get_str = PyString_InternFromString("__get__");
+        if (get_str == NULL)
+            return NULL;
+    }
+    get = _PyType_Lookup(tp, get_str);
+    if (get == NULL) {
+        /* Avoid further slowdowns */
+        if (tp->tp_descr_get == slot_tp_descr_get)
+            tp->tp_descr_get = NULL;
+        Py_INCREF(self);
+        return self;
+    }
+    if (obj == NULL)
+        obj = Py_None;
+    if (type == NULL)
+        type = Py_None;
+    return PyObject_CallFunctionObjArgs(get, self, obj, type, NULL);
 }
 
 static int
 slot_tp_descr_set(PyObject *self, PyObject *target, PyObject *value)
 {
-	PyObject *res;
-	static PyObject *del_str, *set_str;
+    PyObject *res;
+    static PyObject *del_str, *set_str;
 
-	if (value == NULL)
-		res = call_method(self, "__delete__", &del_str,
-				  "(O)", target);
-	else
-		res = call_method(self, "__set__", &set_str,
-				  "(OO)", target, value);
-	if (res == NULL)
-		return -1;
-	Py_DECREF(res);
-	return 0;
+    if (value == NULL)
+        res = call_method(self, "__delete__", &del_str,
+                          "(O)", target);
+    else
+        res = call_method(self, "__set__", &set_str,
+                          "(OO)", target, value);
+    if (res == NULL)
+        return -1;
+    Py_DECREF(res);
+    return 0;
 }
 
 static int
 slot_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	static PyObject *init_str;
-	PyObject *meth = lookup_method(self, "__init__", &init_str);
-	PyObject *res;
+    static PyObject *init_str;
+    PyObject *meth = lookup_method(self, "__init__", &init_str);
+    PyObject *res;
 
-	if (meth == NULL)
-		return -1;
-	res = PyObject_Call(meth, args, kwds);
-	Py_DECREF(meth);
-	if (res == NULL)
-		return -1;
-	if (res != Py_None) {
-		PyErr_Format(PyExc_TypeError,
-			     "__init__() should return None, not '%.200s'",
-			     Py_TYPE(res)->tp_name);
-		Py_DECREF(res);
-		return -1;
-	}
-	Py_DECREF(res);
-	return 0;
+    if (meth == NULL)
+        return -1;
+    res = PyObject_Call(meth, args, kwds);
+    Py_DECREF(meth);
+    if (res == NULL)
+        return -1;
+    if (res != Py_None) {
+        PyErr_Format(PyExc_TypeError,
+                     "__init__() should return None, not '%.200s'",
+                     Py_TYPE(res)->tp_name);
+        Py_DECREF(res);
+        return -1;
+    }
+    Py_DECREF(res);
+    return 0;
 }
 
 static PyObject *
 slot_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	static PyObject *new_str;
-	PyObject *func;
-	PyObject *newargs, *x;
-	Py_ssize_t i, n;
+    static PyObject *new_str;
+    PyObject *func;
+    PyObject *newargs, *x;
+    Py_ssize_t i, n;
 
-	if (new_str == NULL) {
-		new_str = PyString_InternFromString("__new__");
-		if (new_str == NULL)
-			return NULL;
-	}
-	func = PyObject_GetAttr((PyObject *)type, new_str);
-	if (func == NULL)
-		return NULL;
-	assert(PyTuple_Check(args));
-	n = PyTuple_GET_SIZE(args);
-	newargs = PyTuple_New(n+1);
-	if (newargs == NULL)
-		return NULL;
-	Py_INCREF(type);
-	PyTuple_SET_ITEM(newargs, 0, (PyObject *)type);
-	for (i = 0; i < n; i++) {
-		x = PyTuple_GET_ITEM(args, i);
-		Py_INCREF(x);
-		PyTuple_SET_ITEM(newargs, i+1, x);
-	}
-	x = PyObject_Call(func, newargs, kwds);
-	Py_DECREF(newargs);
-	Py_DECREF(func);
-	return x;
+    if (new_str == NULL) {
+        new_str = PyString_InternFromString("__new__");
+        if (new_str == NULL)
+            return NULL;
+    }
+    func = PyObject_GetAttr((PyObject *)type, new_str);
+    if (func == NULL)
+        return NULL;
+    assert(PyTuple_Check(args));
+    n = PyTuple_GET_SIZE(args);
+    newargs = PyTuple_New(n+1);
+    if (newargs == NULL)
+        return NULL;
+    Py_INCREF(type);
+    PyTuple_SET_ITEM(newargs, 0, (PyObject *)type);
+    for (i = 0; i < n; i++) {
+        x = PyTuple_GET_ITEM(args, i);
+        Py_INCREF(x);
+        PyTuple_SET_ITEM(newargs, i+1, x);
+    }
+    x = PyObject_Call(func, newargs, kwds);
+    Py_DECREF(newargs);
+    Py_DECREF(func);
+    return x;
 }
 
 static void
 slot_tp_del(PyObject *self)
 {
-	static PyObject *del_str = NULL;
-	PyObject *del, *res;
-	PyObject *error_type, *error_value, *error_traceback;
+    static PyObject *del_str = NULL;
+    PyObject *del, *res;
+    PyObject *error_type, *error_value, *error_traceback;
 
-	/* Temporarily resurrect the object. */
-	assert(self->ob_refcnt == 0);
-	self->ob_refcnt = 1;
+    /* Temporarily resurrect the object. */
+    assert(self->ob_refcnt == 0);
+    self->ob_refcnt = 1;
 
-	/* Save the current exception, if any. */
-	PyErr_Fetch(&error_type, &error_value, &error_traceback);
+    /* Save the current exception, if any. */
+    PyErr_Fetch(&error_type, &error_value, &error_traceback);
 
-	/* Execute __del__ method, if any. */
-	del = lookup_maybe(self, "__del__", &del_str);
-	if (del != NULL) {
-		res = PyEval_CallObject(del, NULL);
-		if (res == NULL)
-			PyErr_WriteUnraisable(del);
-		else
-			Py_DECREF(res);
-		Py_DECREF(del);
-	}
+    /* Execute __del__ method, if any. */
+    del = lookup_maybe(self, "__del__", &del_str);
+    if (del != NULL) {
+        res = PyEval_CallObject(del, NULL);
+        if (res == NULL)
+            PyErr_WriteUnraisable(del);
+        else
+            Py_DECREF(res);
+        Py_DECREF(del);
+    }
 
-	/* Restore the saved exception. */
-	PyErr_Restore(error_type, error_value, error_traceback);
+    /* Restore the saved exception. */
+    PyErr_Restore(error_type, error_value, error_traceback);
 
-	/* Undo the temporary resurrection; can't use DECREF here, it would
-	 * cause a recursive call.
-	 */
-	assert(self->ob_refcnt > 0);
-	if (--self->ob_refcnt == 0)
-		return;	/* this is the normal path out */
+    /* Undo the temporary resurrection; can't use DECREF here, it would
+     * cause a recursive call.
+     */
+    assert(self->ob_refcnt > 0);
+    if (--self->ob_refcnt == 0)
+        return;         /* this is the normal path out */
 
-	/* __del__ resurrected it!  Make it look like the original Py_DECREF
-	 * never happened.
-	 */
-	{
-		Py_ssize_t refcnt = self->ob_refcnt;
-		_Py_NewReference(self);
-		self->ob_refcnt = refcnt;
-	}
-	assert(!PyType_IS_GC(Py_TYPE(self)) ||
-	       _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
-	/* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
-	 * we need to undo that. */
-	_Py_DEC_REFTOTAL;
-	/* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
-	 * chain, so no more to do there.
-	 * If COUNT_ALLOCS, the original decref bumped tp_frees, and
-	 * _Py_NewReference bumped tp_allocs:  both of those need to be
-	 * undone.
-	 */
+    /* __del__ resurrected it!  Make it look like the original Py_DECREF
+     * never happened.
+     */
+    {
+        Py_ssize_t refcnt = self->ob_refcnt;
+        _Py_NewReference(self);
+        self->ob_refcnt = refcnt;
+    }
+    assert(!PyType_IS_GC(Py_TYPE(self)) ||
+           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
+    /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
+     * we need to undo that. */
+    _Py_DEC_REFTOTAL;
+    /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
+     * chain, so no more to do there.
+     * If COUNT_ALLOCS, the original decref bumped tp_frees, and
+     * _Py_NewReference bumped tp_allocs:  both of those need to be
+     * undone.
+     */
 #ifdef COUNT_ALLOCS
-	--Py_TYPE(self)->tp_frees;
-	--Py_TYPE(self)->tp_allocs;
+    --Py_TYPE(self)->tp_frees;
+    --Py_TYPE(self)->tp_allocs;
 #endif
 }
 
@@ -5791,267 +5791,267 @@
 #undef RBINSLOT
 
 #define TPSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
-	{NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
-	 PyDoc_STR(DOC)}
+    {NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
+     PyDoc_STR(DOC)}
 #define FLSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC, FLAGS) \
-	{NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
-	 PyDoc_STR(DOC), FLAGS}
+    {NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
+     PyDoc_STR(DOC), FLAGS}
 #define ETSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
-	{NAME, offsetof(PyHeapTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
-	 PyDoc_STR(DOC)}
+    {NAME, offsetof(PyHeapTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
+     PyDoc_STR(DOC)}
 #define SQSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
-	ETSLOT(NAME, as_sequence.SLOT, FUNCTION, WRAPPER, DOC)
+    ETSLOT(NAME, as_sequence.SLOT, FUNCTION, WRAPPER, DOC)
 #define MPSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
-	ETSLOT(NAME, as_mapping.SLOT, FUNCTION, WRAPPER, DOC)
+    ETSLOT(NAME, as_mapping.SLOT, FUNCTION, WRAPPER, DOC)
 #define NBSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
-	ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, DOC)
+    ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, DOC)
 #define UNSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
-	ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \
-	       "x." NAME "() <==> " DOC)
+    ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \
+           "x." NAME "() <==> " DOC)
 #define IBSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
-	ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \
-	       "x." NAME "(y) <==> x" DOC "y")
+    ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \
+           "x." NAME "(y) <==> x" DOC "y")
 #define BINSLOT(NAME, SLOT, FUNCTION, DOC) \
-	ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \
-	       "x." NAME "(y) <==> x" DOC "y")
+    ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \
+           "x." NAME "(y) <==> x" DOC "y")
 #define RBINSLOT(NAME, SLOT, FUNCTION, DOC) \
-	ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
-	       "x." NAME "(y) <==> y" DOC "x")
+    ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
+           "x." NAME "(y) <==> y" DOC "x")
 #define BINSLOTNOTINFIX(NAME, SLOT, FUNCTION, DOC) \
-	ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \
-	       "x." NAME "(y) <==> " DOC)
+    ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \
+           "x." NAME "(y) <==> " DOC)
 #define RBINSLOTNOTINFIX(NAME, SLOT, FUNCTION, DOC) \
-	ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
-	       "x." NAME "(y) <==> " DOC)
+    ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
+           "x." NAME "(y) <==> " DOC)
 
 static slotdef slotdefs[] = {
-	SQSLOT("__len__", sq_length, slot_sq_length, wrap_lenfunc,
-	       "x.__len__() <==> len(x)"),
-	/* Heap types defining __add__/__mul__ have sq_concat/sq_repeat == NULL.
-	   The logic in abstract.c always falls back to nb_add/nb_multiply in
-	   this case.  Defining both the nb_* and the sq_* slots to call the
-	   user-defined methods has unexpected side-effects, as shown by
-	   test_descr.notimplemented() */
-	SQSLOT("__add__", sq_concat, NULL, wrap_binaryfunc,
-	  "x.__add__(y) <==> x+y"),
-	SQSLOT("__mul__", sq_repeat, NULL, wrap_indexargfunc,
-	  "x.__mul__(n) <==> x*n"),
-	SQSLOT("__rmul__", sq_repeat, NULL, wrap_indexargfunc,
-	  "x.__rmul__(n) <==> n*x"),
-	SQSLOT("__getitem__", sq_item, slot_sq_item, wrap_sq_item,
-	       "x.__getitem__(y) <==> x[y]"),
-	SQSLOT("__getslice__", sq_slice, slot_sq_slice, wrap_ssizessizeargfunc,
-	       "x.__getslice__(i, j) <==> x[i:j]\n\
-	       \n\
-	       Use of negative indices is not supported."),
-	SQSLOT("__setitem__", sq_ass_item, slot_sq_ass_item, wrap_sq_setitem,
-	       "x.__setitem__(i, y) <==> x[i]=y"),
-	SQSLOT("__delitem__", sq_ass_item, slot_sq_ass_item, wrap_sq_delitem,
-	       "x.__delitem__(y) <==> del x[y]"),
-	SQSLOT("__setslice__", sq_ass_slice, slot_sq_ass_slice,
-	       wrap_ssizessizeobjargproc,
-	       "x.__setslice__(i, j, y) <==> x[i:j]=y\n\
-	       \n\
-	       Use  of negative indices is not supported."),
-	SQSLOT("__delslice__", sq_ass_slice, slot_sq_ass_slice, wrap_delslice,
-	       "x.__delslice__(i, j) <==> del x[i:j]\n\
-	       \n\
-	       Use of negative indices is not supported."),
-	SQSLOT("__contains__", sq_contains, slot_sq_contains, wrap_objobjproc,
-	       "x.__contains__(y) <==> y in x"),
-	SQSLOT("__iadd__", sq_inplace_concat, NULL,
-	  wrap_binaryfunc, "x.__iadd__(y) <==> x+=y"),
-	SQSLOT("__imul__", sq_inplace_repeat, NULL,
-	  wrap_indexargfunc, "x.__imul__(y) <==> x*=y"),
+    SQSLOT("__len__", sq_length, slot_sq_length, wrap_lenfunc,
+           "x.__len__() <==> len(x)"),
+    /* Heap types defining __add__/__mul__ have sq_concat/sq_repeat == NULL.
+       The logic in abstract.c always falls back to nb_add/nb_multiply in
+       this case.  Defining both the nb_* and the sq_* slots to call the
+       user-defined methods has unexpected side-effects, as shown by
+       test_descr.notimplemented() */
+    SQSLOT("__add__", sq_concat, NULL, wrap_binaryfunc,
+      "x.__add__(y) <==> x+y"),
+    SQSLOT("__mul__", sq_repeat, NULL, wrap_indexargfunc,
+      "x.__mul__(n) <==> x*n"),
+    SQSLOT("__rmul__", sq_repeat, NULL, wrap_indexargfunc,
+      "x.__rmul__(n) <==> n*x"),
+    SQSLOT("__getitem__", sq_item, slot_sq_item, wrap_sq_item,
+           "x.__getitem__(y) <==> x[y]"),
+    SQSLOT("__getslice__", sq_slice, slot_sq_slice, wrap_ssizessizeargfunc,
+           "x.__getslice__(i, j) <==> x[i:j]\n\
+           \n\
+           Use of negative indices is not supported."),
+    SQSLOT("__setitem__", sq_ass_item, slot_sq_ass_item, wrap_sq_setitem,
+           "x.__setitem__(i, y) <==> x[i]=y"),
+    SQSLOT("__delitem__", sq_ass_item, slot_sq_ass_item, wrap_sq_delitem,
+           "x.__delitem__(y) <==> del x[y]"),
+    SQSLOT("__setslice__", sq_ass_slice, slot_sq_ass_slice,
+           wrap_ssizessizeobjargproc,
+           "x.__setslice__(i, j, y) <==> x[i:j]=y\n\
+           \n\
+           Use  of negative indices is not supported."),
+    SQSLOT("__delslice__", sq_ass_slice, slot_sq_ass_slice, wrap_delslice,
+           "x.__delslice__(i, j) <==> del x[i:j]\n\
+           \n\
+           Use of negative indices is not supported."),
+    SQSLOT("__contains__", sq_contains, slot_sq_contains, wrap_objobjproc,
+           "x.__contains__(y) <==> y in x"),
+    SQSLOT("__iadd__", sq_inplace_concat, NULL,
+      wrap_binaryfunc, "x.__iadd__(y) <==> x+=y"),
+    SQSLOT("__imul__", sq_inplace_repeat, NULL,
+      wrap_indexargfunc, "x.__imul__(y) <==> x*=y"),
 
-	MPSLOT("__len__", mp_length, slot_mp_length, wrap_lenfunc,
-	       "x.__len__() <==> len(x)"),
-	MPSLOT("__getitem__", mp_subscript, slot_mp_subscript,
-	       wrap_binaryfunc,
-	       "x.__getitem__(y) <==> x[y]"),
-	MPSLOT("__setitem__", mp_ass_subscript, slot_mp_ass_subscript,
-	       wrap_objobjargproc,
-	       "x.__setitem__(i, y) <==> x[i]=y"),
-	MPSLOT("__delitem__", mp_ass_subscript, slot_mp_ass_subscript,
-	       wrap_delitem,
-	       "x.__delitem__(y) <==> del x[y]"),
+    MPSLOT("__len__", mp_length, slot_mp_length, wrap_lenfunc,
+           "x.__len__() <==> len(x)"),
+    MPSLOT("__getitem__", mp_subscript, slot_mp_subscript,
+           wrap_binaryfunc,
+           "x.__getitem__(y) <==> x[y]"),
+    MPSLOT("__setitem__", mp_ass_subscript, slot_mp_ass_subscript,
+           wrap_objobjargproc,
+           "x.__setitem__(i, y) <==> x[i]=y"),
+    MPSLOT("__delitem__", mp_ass_subscript, slot_mp_ass_subscript,
+           wrap_delitem,
+           "x.__delitem__(y) <==> del x[y]"),
 
-	BINSLOT("__add__", nb_add, slot_nb_add,
-		"+"),
-	RBINSLOT("__radd__", nb_add, slot_nb_add,
-		 "+"),
-	BINSLOT("__sub__", nb_subtract, slot_nb_subtract,
-		"-"),
-	RBINSLOT("__rsub__", nb_subtract, slot_nb_subtract,
-		 "-"),
-	BINSLOT("__mul__", nb_multiply, slot_nb_multiply,
-		"*"),
-	RBINSLOT("__rmul__", nb_multiply, slot_nb_multiply,
-		 "*"),
-	BINSLOT("__div__", nb_divide, slot_nb_divide,
-		"/"),
-	RBINSLOT("__rdiv__", nb_divide, slot_nb_divide,
-		 "/"),
-	BINSLOT("__mod__", nb_remainder, slot_nb_remainder,
-		"%"),
-	RBINSLOT("__rmod__", nb_remainder, slot_nb_remainder,
-		 "%"),
-	BINSLOTNOTINFIX("__divmod__", nb_divmod, slot_nb_divmod,
-		"divmod(x, y)"),
-	RBINSLOTNOTINFIX("__rdivmod__", nb_divmod, slot_nb_divmod,
-		 "divmod(y, x)"),
-	NBSLOT("__pow__", nb_power, slot_nb_power, wrap_ternaryfunc,
-	       "x.__pow__(y[, z]) <==> pow(x, y[, z])"),
-	NBSLOT("__rpow__", nb_power, slot_nb_power, wrap_ternaryfunc_r,
-	       "y.__rpow__(x[, z]) <==> pow(x, y[, z])"),
-	UNSLOT("__neg__", nb_negative, slot_nb_negative, wrap_unaryfunc, "-x"),
-	UNSLOT("__pos__", nb_positive, slot_nb_positive, wrap_unaryfunc, "+x"),
-	UNSLOT("__abs__", nb_absolute, slot_nb_absolute, wrap_unaryfunc,
-	       "abs(x)"),
-	UNSLOT("__nonzero__", nb_nonzero, slot_nb_nonzero, wrap_inquirypred,
-	       "x != 0"),
-	UNSLOT("__invert__", nb_invert, slot_nb_invert, wrap_unaryfunc, "~x"),
-	BINSLOT("__lshift__", nb_lshift, slot_nb_lshift, "<<"),
-	RBINSLOT("__rlshift__", nb_lshift, slot_nb_lshift, "<<"),
-	BINSLOT("__rshift__", nb_rshift, slot_nb_rshift, ">>"),
-	RBINSLOT("__rrshift__", nb_rshift, slot_nb_rshift, ">>"),
-	BINSLOT("__and__", nb_and, slot_nb_and, "&"),
-	RBINSLOT("__rand__", nb_and, slot_nb_and, "&"),
-	BINSLOT("__xor__", nb_xor, slot_nb_xor, "^"),
-	RBINSLOT("__rxor__", nb_xor, slot_nb_xor, "^"),
-	BINSLOT("__or__", nb_or, slot_nb_or, "|"),
-	RBINSLOT("__ror__", nb_or, slot_nb_or, "|"),
-	NBSLOT("__coerce__", nb_coerce, slot_nb_coerce, wrap_coercefunc,
-	       "x.__coerce__(y) <==> coerce(x, y)"),
-	UNSLOT("__int__", nb_int, slot_nb_int, wrap_unaryfunc,
-	       "int(x)"),
-	UNSLOT("__long__", nb_long, slot_nb_long, wrap_unaryfunc,
-	       "long(x)"),
-	UNSLOT("__float__", nb_float, slot_nb_float, wrap_unaryfunc,
-	       "float(x)"),
-	UNSLOT("__oct__", nb_oct, slot_nb_oct, wrap_unaryfunc,
-	       "oct(x)"),
-	UNSLOT("__hex__", nb_hex, slot_nb_hex, wrap_unaryfunc,
-	       "hex(x)"),
-	NBSLOT("__index__", nb_index, slot_nb_index, wrap_unaryfunc, 
-	       "x[y:z] <==> x[y.__index__():z.__index__()]"),
-	IBSLOT("__iadd__", nb_inplace_add, slot_nb_inplace_add,
-	       wrap_binaryfunc, "+"),
-	IBSLOT("__isub__", nb_inplace_subtract, slot_nb_inplace_subtract,
-	       wrap_binaryfunc, "-"),
-	IBSLOT("__imul__", nb_inplace_multiply, slot_nb_inplace_multiply,
-	       wrap_binaryfunc, "*"),
-	IBSLOT("__idiv__", nb_inplace_divide, slot_nb_inplace_divide,
-	       wrap_binaryfunc, "/"),
-	IBSLOT("__imod__", nb_inplace_remainder, slot_nb_inplace_remainder,
-	       wrap_binaryfunc, "%"),
-	IBSLOT("__ipow__", nb_inplace_power, slot_nb_inplace_power,
-	       wrap_binaryfunc, "**"),
-	IBSLOT("__ilshift__", nb_inplace_lshift, slot_nb_inplace_lshift,
-	       wrap_binaryfunc, "<<"),
-	IBSLOT("__irshift__", nb_inplace_rshift, slot_nb_inplace_rshift,
-	       wrap_binaryfunc, ">>"),
-	IBSLOT("__iand__", nb_inplace_and, slot_nb_inplace_and,
-	       wrap_binaryfunc, "&"),
-	IBSLOT("__ixor__", nb_inplace_xor, slot_nb_inplace_xor,
-	       wrap_binaryfunc, "^"),
-	IBSLOT("__ior__", nb_inplace_or, slot_nb_inplace_or,
-	       wrap_binaryfunc, "|"),
-	BINSLOT("__floordiv__", nb_floor_divide, slot_nb_floor_divide, "//"),
-	RBINSLOT("__rfloordiv__", nb_floor_divide, slot_nb_floor_divide, "//"),
-	BINSLOT("__truediv__", nb_true_divide, slot_nb_true_divide, "/"),
-	RBINSLOT("__rtruediv__", nb_true_divide, slot_nb_true_divide, "/"),
-	IBSLOT("__ifloordiv__", nb_inplace_floor_divide,
-	       slot_nb_inplace_floor_divide, wrap_binaryfunc, "//"),
-	IBSLOT("__itruediv__", nb_inplace_true_divide,
-	       slot_nb_inplace_true_divide, wrap_binaryfunc, "/"),
+    BINSLOT("__add__", nb_add, slot_nb_add,
+        "+"),
+    RBINSLOT("__radd__", nb_add, slot_nb_add,
+             "+"),
+    BINSLOT("__sub__", nb_subtract, slot_nb_subtract,
+        "-"),
+    RBINSLOT("__rsub__", nb_subtract, slot_nb_subtract,
+             "-"),
+    BINSLOT("__mul__", nb_multiply, slot_nb_multiply,
+        "*"),
+    RBINSLOT("__rmul__", nb_multiply, slot_nb_multiply,
+             "*"),
+    BINSLOT("__div__", nb_divide, slot_nb_divide,
+        "/"),
+    RBINSLOT("__rdiv__", nb_divide, slot_nb_divide,
+             "/"),
+    BINSLOT("__mod__", nb_remainder, slot_nb_remainder,
+        "%"),
+    RBINSLOT("__rmod__", nb_remainder, slot_nb_remainder,
+             "%"),
+    BINSLOTNOTINFIX("__divmod__", nb_divmod, slot_nb_divmod,
+        "divmod(x, y)"),
+    RBINSLOTNOTINFIX("__rdivmod__", nb_divmod, slot_nb_divmod,
+             "divmod(y, x)"),
+    NBSLOT("__pow__", nb_power, slot_nb_power, wrap_ternaryfunc,
+           "x.__pow__(y[, z]) <==> pow(x, y[, z])"),
+    NBSLOT("__rpow__", nb_power, slot_nb_power, wrap_ternaryfunc_r,
+           "y.__rpow__(x[, z]) <==> pow(x, y[, z])"),
+    UNSLOT("__neg__", nb_negative, slot_nb_negative, wrap_unaryfunc, "-x"),
+    UNSLOT("__pos__", nb_positive, slot_nb_positive, wrap_unaryfunc, "+x"),
+    UNSLOT("__abs__", nb_absolute, slot_nb_absolute, wrap_unaryfunc,
+           "abs(x)"),
+    UNSLOT("__nonzero__", nb_nonzero, slot_nb_nonzero, wrap_inquirypred,
+           "x != 0"),
+    UNSLOT("__invert__", nb_invert, slot_nb_invert, wrap_unaryfunc, "~x"),
+    BINSLOT("__lshift__", nb_lshift, slot_nb_lshift, "<<"),
+    RBINSLOT("__rlshift__", nb_lshift, slot_nb_lshift, "<<"),
+    BINSLOT("__rshift__", nb_rshift, slot_nb_rshift, ">>"),
+    RBINSLOT("__rrshift__", nb_rshift, slot_nb_rshift, ">>"),
+    BINSLOT("__and__", nb_and, slot_nb_and, "&"),
+    RBINSLOT("__rand__", nb_and, slot_nb_and, "&"),
+    BINSLOT("__xor__", nb_xor, slot_nb_xor, "^"),
+    RBINSLOT("__rxor__", nb_xor, slot_nb_xor, "^"),
+    BINSLOT("__or__", nb_or, slot_nb_or, "|"),
+    RBINSLOT("__ror__", nb_or, slot_nb_or, "|"),
+    NBSLOT("__coerce__", nb_coerce, slot_nb_coerce, wrap_coercefunc,
+           "x.__coerce__(y) <==> coerce(x, y)"),
+    UNSLOT("__int__", nb_int, slot_nb_int, wrap_unaryfunc,
+           "int(x)"),
+    UNSLOT("__long__", nb_long, slot_nb_long, wrap_unaryfunc,
+           "long(x)"),
+    UNSLOT("__float__", nb_float, slot_nb_float, wrap_unaryfunc,
+           "float(x)"),
+    UNSLOT("__oct__", nb_oct, slot_nb_oct, wrap_unaryfunc,
+           "oct(x)"),
+    UNSLOT("__hex__", nb_hex, slot_nb_hex, wrap_unaryfunc,
+           "hex(x)"),
+    NBSLOT("__index__", nb_index, slot_nb_index, wrap_unaryfunc,
+           "x[y:z] <==> x[y.__index__():z.__index__()]"),
+    IBSLOT("__iadd__", nb_inplace_add, slot_nb_inplace_add,
+           wrap_binaryfunc, "+"),
+    IBSLOT("__isub__", nb_inplace_subtract, slot_nb_inplace_subtract,
+           wrap_binaryfunc, "-"),
+    IBSLOT("__imul__", nb_inplace_multiply, slot_nb_inplace_multiply,
+           wrap_binaryfunc, "*"),
+    IBSLOT("__idiv__", nb_inplace_divide, slot_nb_inplace_divide,
+           wrap_binaryfunc, "/"),
+    IBSLOT("__imod__", nb_inplace_remainder, slot_nb_inplace_remainder,
+           wrap_binaryfunc, "%"),
+    IBSLOT("__ipow__", nb_inplace_power, slot_nb_inplace_power,
+           wrap_binaryfunc, "**"),
+    IBSLOT("__ilshift__", nb_inplace_lshift, slot_nb_inplace_lshift,
+           wrap_binaryfunc, "<<"),
+    IBSLOT("__irshift__", nb_inplace_rshift, slot_nb_inplace_rshift,
+           wrap_binaryfunc, ">>"),
+    IBSLOT("__iand__", nb_inplace_and, slot_nb_inplace_and,
+           wrap_binaryfunc, "&"),
+    IBSLOT("__ixor__", nb_inplace_xor, slot_nb_inplace_xor,
+           wrap_binaryfunc, "^"),
+    IBSLOT("__ior__", nb_inplace_or, slot_nb_inplace_or,
+           wrap_binaryfunc, "|"),
+    BINSLOT("__floordiv__", nb_floor_divide, slot_nb_floor_divide, "//"),
+    RBINSLOT("__rfloordiv__", nb_floor_divide, slot_nb_floor_divide, "//"),
+    BINSLOT("__truediv__", nb_true_divide, slot_nb_true_divide, "/"),
+    RBINSLOT("__rtruediv__", nb_true_divide, slot_nb_true_divide, "/"),
+    IBSLOT("__ifloordiv__", nb_inplace_floor_divide,
+           slot_nb_inplace_floor_divide, wrap_binaryfunc, "//"),
+    IBSLOT("__itruediv__", nb_inplace_true_divide,
+           slot_nb_inplace_true_divide, wrap_binaryfunc, "/"),
 
-	TPSLOT("__str__", tp_str, slot_tp_str, wrap_unaryfunc,
-	       "x.__str__() <==> str(x)"),
-	TPSLOT("__str__", tp_print, NULL, NULL, ""),
-	TPSLOT("__repr__", tp_repr, slot_tp_repr, wrap_unaryfunc,
-	       "x.__repr__() <==> repr(x)"),
-	TPSLOT("__repr__", tp_print, NULL, NULL, ""),
-	TPSLOT("__cmp__", tp_compare, _PyObject_SlotCompare, wrap_cmpfunc,
-	       "x.__cmp__(y) <==> cmp(x,y)"),
-	TPSLOT("__hash__", tp_hash, slot_tp_hash, wrap_hashfunc,
-	       "x.__hash__() <==> hash(x)"),
-	FLSLOT("__call__", tp_call, slot_tp_call, (wrapperfunc)wrap_call,
-	       "x.__call__(...) <==> x(...)", PyWrapperFlag_KEYWORDS),
-	TPSLOT("__getattribute__", tp_getattro, slot_tp_getattr_hook,
-	       wrap_binaryfunc, "x.__getattribute__('name') <==> x.name"),
-	TPSLOT("__getattribute__", tp_getattr, NULL, NULL, ""),
-	TPSLOT("__getattr__", tp_getattro, slot_tp_getattr_hook, NULL, ""),
-	TPSLOT("__getattr__", tp_getattr, NULL, NULL, ""),
-	TPSLOT("__setattr__", tp_setattro, slot_tp_setattro, wrap_setattr,
-	       "x.__setattr__('name', value) <==> x.name = value"),
-	TPSLOT("__setattr__", tp_setattr, NULL, NULL, ""),
-	TPSLOT("__delattr__", tp_setattro, slot_tp_setattro, wrap_delattr,
-	       "x.__delattr__('name') <==> del x.name"),
-	TPSLOT("__delattr__", tp_setattr, NULL, NULL, ""),
-	TPSLOT("__lt__", tp_richcompare, slot_tp_richcompare, richcmp_lt,
-	       "x.__lt__(y) <==> x<y"),
-	TPSLOT("__le__", tp_richcompare, slot_tp_richcompare, richcmp_le,
-	       "x.__le__(y) <==> x<=y"),
-	TPSLOT("__eq__", tp_richcompare, slot_tp_richcompare, richcmp_eq,
-	       "x.__eq__(y) <==> x==y"),
-	TPSLOT("__ne__", tp_richcompare, slot_tp_richcompare, richcmp_ne,
-	       "x.__ne__(y) <==> x!=y"),
-	TPSLOT("__gt__", tp_richcompare, slot_tp_richcompare, richcmp_gt,
-	       "x.__gt__(y) <==> x>y"),
-	TPSLOT("__ge__", tp_richcompare, slot_tp_richcompare, richcmp_ge,
-	       "x.__ge__(y) <==> x>=y"),
-	TPSLOT("__iter__", tp_iter, slot_tp_iter, wrap_unaryfunc,
-	       "x.__iter__() <==> iter(x)"),
-	TPSLOT("next", tp_iternext, slot_tp_iternext, wrap_next,
-	       "x.next() -> the next value, or raise StopIteration"),
-	TPSLOT("__get__", tp_descr_get, slot_tp_descr_get, wrap_descr_get,
-	       "descr.__get__(obj[, type]) -> value"),
-	TPSLOT("__set__", tp_descr_set, slot_tp_descr_set, wrap_descr_set,
-	       "descr.__set__(obj, value)"),
-	TPSLOT("__delete__", tp_descr_set, slot_tp_descr_set,
-	       wrap_descr_delete, "descr.__delete__(obj)"),
-	FLSLOT("__init__", tp_init, slot_tp_init, (wrapperfunc)wrap_init,
-	       "x.__init__(...) initializes x; "
-	       "see x.__class__.__doc__ for signature",
-	       PyWrapperFlag_KEYWORDS),
-	TPSLOT("__new__", tp_new, slot_tp_new, NULL, ""),
-	TPSLOT("__del__", tp_del, slot_tp_del, NULL, ""),
-	{NULL}
+    TPSLOT("__str__", tp_str, slot_tp_str, wrap_unaryfunc,
+           "x.__str__() <==> str(x)"),
+    TPSLOT("__str__", tp_print, NULL, NULL, ""),
+    TPSLOT("__repr__", tp_repr, slot_tp_repr, wrap_unaryfunc,
+           "x.__repr__() <==> repr(x)"),
+    TPSLOT("__repr__", tp_print, NULL, NULL, ""),
+    TPSLOT("__cmp__", tp_compare, _PyObject_SlotCompare, wrap_cmpfunc,
+           "x.__cmp__(y) <==> cmp(x,y)"),
+    TPSLOT("__hash__", tp_hash, slot_tp_hash, wrap_hashfunc,
+           "x.__hash__() <==> hash(x)"),
+    FLSLOT("__call__", tp_call, slot_tp_call, (wrapperfunc)wrap_call,
+           "x.__call__(...) <==> x(...)", PyWrapperFlag_KEYWORDS),
+    TPSLOT("__getattribute__", tp_getattro, slot_tp_getattr_hook,
+           wrap_binaryfunc, "x.__getattribute__('name') <==> x.name"),
+    TPSLOT("__getattribute__", tp_getattr, NULL, NULL, ""),
+    TPSLOT("__getattr__", tp_getattro, slot_tp_getattr_hook, NULL, ""),
+    TPSLOT("__getattr__", tp_getattr, NULL, NULL, ""),
+    TPSLOT("__setattr__", tp_setattro, slot_tp_setattro, wrap_setattr,
+           "x.__setattr__('name', value) <==> x.name = value"),
+    TPSLOT("__setattr__", tp_setattr, NULL, NULL, ""),
+    TPSLOT("__delattr__", tp_setattro, slot_tp_setattro, wrap_delattr,
+           "x.__delattr__('name') <==> del x.name"),
+    TPSLOT("__delattr__", tp_setattr, NULL, NULL, ""),
+    TPSLOT("__lt__", tp_richcompare, slot_tp_richcompare, richcmp_lt,
+           "x.__lt__(y) <==> x<y"),
+    TPSLOT("__le__", tp_richcompare, slot_tp_richcompare, richcmp_le,
+           "x.__le__(y) <==> x<=y"),
+    TPSLOT("__eq__", tp_richcompare, slot_tp_richcompare, richcmp_eq,
+           "x.__eq__(y) <==> x==y"),
+    TPSLOT("__ne__", tp_richcompare, slot_tp_richcompare, richcmp_ne,
+           "x.__ne__(y) <==> x!=y"),
+    TPSLOT("__gt__", tp_richcompare, slot_tp_richcompare, richcmp_gt,
+           "x.__gt__(y) <==> x>y"),
+    TPSLOT("__ge__", tp_richcompare, slot_tp_richcompare, richcmp_ge,
+           "x.__ge__(y) <==> x>=y"),
+    TPSLOT("__iter__", tp_iter, slot_tp_iter, wrap_unaryfunc,
+           "x.__iter__() <==> iter(x)"),
+    TPSLOT("next", tp_iternext, slot_tp_iternext, wrap_next,
+           "x.next() -> the next value, or raise StopIteration"),
+    TPSLOT("__get__", tp_descr_get, slot_tp_descr_get, wrap_descr_get,
+           "descr.__get__(obj[, type]) -> value"),
+    TPSLOT("__set__", tp_descr_set, slot_tp_descr_set, wrap_descr_set,
+           "descr.__set__(obj, value)"),
+    TPSLOT("__delete__", tp_descr_set, slot_tp_descr_set,
+           wrap_descr_delete, "descr.__delete__(obj)"),
+    FLSLOT("__init__", tp_init, slot_tp_init, (wrapperfunc)wrap_init,
+           "x.__init__(...) initializes x; "
+           "see x.__class__.__doc__ for signature",
+           PyWrapperFlag_KEYWORDS),
+    TPSLOT("__new__", tp_new, slot_tp_new, NULL, ""),
+    TPSLOT("__del__", tp_del, slot_tp_del, NULL, ""),
+    {NULL}
 };
 
 /* Given a type pointer and an offset gotten from a slotdef entry, return a
-   pointer to the actual slot.	This is not quite the same as simply adding
+   pointer to the actual slot.  This is not quite the same as simply adding
    the offset to the type pointer, since it takes care to indirect through the
    proper indirection pointer (as_buffer, etc.); it returns NULL if the
    indirection pointer is NULL. */
 static void **
 slotptr(PyTypeObject *type, int ioffset)
 {
-	char *ptr;
-	long offset = ioffset;
+    char *ptr;
+    long offset = ioffset;
 
-	/* Note: this depends on the order of the members of PyHeapTypeObject! */
-	assert(offset >= 0);
-	assert((size_t)offset < offsetof(PyHeapTypeObject, as_buffer));
-	if ((size_t)offset >= offsetof(PyHeapTypeObject, as_sequence)) {
-		ptr = (char *)type->tp_as_sequence;
-		offset -= offsetof(PyHeapTypeObject, as_sequence);
-	}
-	else if ((size_t)offset >= offsetof(PyHeapTypeObject, as_mapping)) {
-		ptr = (char *)type->tp_as_mapping;
-		offset -= offsetof(PyHeapTypeObject, as_mapping);
-	}
-	else if ((size_t)offset >= offsetof(PyHeapTypeObject, as_number)) {
-		ptr = (char *)type->tp_as_number;
-		offset -= offsetof(PyHeapTypeObject, as_number);
-	}
-	else {
-		ptr = (char *)type;
-	}
-	if (ptr != NULL)
-		ptr += offset;
-	return (void **)ptr;
+    /* Note: this depends on the order of the members of PyHeapTypeObject! */
+    assert(offset >= 0);
+    assert((size_t)offset < offsetof(PyHeapTypeObject, as_buffer));
+    if ((size_t)offset >= offsetof(PyHeapTypeObject, as_sequence)) {
+        ptr = (char *)type->tp_as_sequence;
+        offset -= offsetof(PyHeapTypeObject, as_sequence);
+    }
+    else if ((size_t)offset >= offsetof(PyHeapTypeObject, as_mapping)) {
+        ptr = (char *)type->tp_as_mapping;
+        offset -= offsetof(PyHeapTypeObject, as_mapping);
+    }
+    else if ((size_t)offset >= offsetof(PyHeapTypeObject, as_number)) {
+        ptr = (char *)type->tp_as_number;
+        offset -= offsetof(PyHeapTypeObject, as_number);
+    }
+    else {
+        ptr = (char *)type;
+    }
+    if (ptr != NULL)
+        ptr += offset;
+    return (void **)ptr;
 }
 
 /* Length of array of slotdef pointers used to store slots with the
@@ -6065,37 +6065,37 @@
 static void **
 resolve_slotdups(PyTypeObject *type, PyObject *name)
 {
-	/* XXX Maybe this could be optimized more -- but is it worth it? */
+    /* XXX Maybe this could be optimized more -- but is it worth it? */
 
-	/* pname and ptrs act as a little cache */
-	static PyObject *pname;
-	static slotdef *ptrs[MAX_EQUIV];
-	slotdef *p, **pp;
-	void **res, **ptr;
+    /* pname and ptrs act as a little cache */
+    static PyObject *pname;
+    static slotdef *ptrs[MAX_EQUIV];
+    slotdef *p, **pp;
+    void **res, **ptr;
 
-	if (pname != name) {
-		/* Collect all slotdefs that match name into ptrs. */
-		pname = name;
-		pp = ptrs;
-		for (p = slotdefs; p->name_strobj; p++) {
-			if (p->name_strobj == name)
-				*pp++ = p;
-		}
-		*pp = NULL;
-	}
+    if (pname != name) {
+        /* Collect all slotdefs that match name into ptrs. */
+        pname = name;
+        pp = ptrs;
+        for (p = slotdefs; p->name_strobj; p++) {
+            if (p->name_strobj == name)
+                *pp++ = p;
+        }
+        *pp = NULL;
+    }
 
-	/* Look in all matching slots of the type; if exactly one of these has
-	   a filled-in slot, return its value.	Otherwise return NULL. */
-	res = NULL;
-	for (pp = ptrs; *pp; pp++) {
-		ptr = slotptr(type, (*pp)->offset);
-		if (ptr == NULL || *ptr == NULL)
-			continue;
-		if (res != NULL)
-			return NULL;
-		res = ptr;
-	}
-	return res;
+    /* Look in all matching slots of the type; if exactly one of these has
+       a filled-in slot, return its value.      Otherwise return NULL. */
+    res = NULL;
+    for (pp = ptrs; *pp; pp++) {
+        ptr = slotptr(type, (*pp)->offset);
+        if (ptr == NULL || *ptr == NULL)
+            continue;
+        if (res != NULL)
+            return NULL;
+        res = ptr;
+    }
+    return res;
 }
 
 /* Common code for update_slots_callback() and fixup_slot_dispatchers().  This
@@ -6107,81 +6107,81 @@
 static slotdef *
 update_one_slot(PyTypeObject *type, slotdef *p)
 {
-	PyObject *descr;
-	PyWrapperDescrObject *d;
-	void *generic = NULL, *specific = NULL;
-	int use_generic = 0;
-	int offset = p->offset;
-	void **ptr = slotptr(type, offset);
+    PyObject *descr;
+    PyWrapperDescrObject *d;
+    void *generic = NULL, *specific = NULL;
+    int use_generic = 0;
+    int offset = p->offset;
+    void **ptr = slotptr(type, offset);
 
-	if (ptr == NULL) {
-		do {
-			++p;
-		} while (p->offset == offset);
-		return p;
-	}
-	do {
-		descr = _PyType_Lookup(type, p->name_strobj);
-		if (descr == NULL) {
-			if (ptr == (void**)&type->tp_iternext) {
-				specific = _PyObject_NextNotImplemented;
-			}
-			continue;
-		}
-		if (Py_TYPE(descr) == &PyWrapperDescr_Type) {
-			void **tptr = resolve_slotdups(type, p->name_strobj);
-			if (tptr == NULL || tptr == ptr)
-				generic = p->function;
-			d = (PyWrapperDescrObject *)descr;
-			if (d->d_base->wrapper == p->wrapper &&
-			    PyType_IsSubtype(type, d->d_type))
-			{
-				if (specific == NULL ||
-				    specific == d->d_wrapped)
-					specific = d->d_wrapped;
-				else
-					use_generic = 1;
-			}
-		}
-		else if (Py_TYPE(descr) == &PyCFunction_Type &&
-			 PyCFunction_GET_FUNCTION(descr) ==
-			 (PyCFunction)tp_new_wrapper &&
-			 ptr == (void**)&type->tp_new)
-		{
-			/* The __new__ wrapper is not a wrapper descriptor,
-			   so must be special-cased differently.
-			   If we don't do this, creating an instance will
-			   always use slot_tp_new which will look up
-			   __new__ in the MRO which will call tp_new_wrapper
-			   which will look through the base classes looking
-			   for a static base and call its tp_new (usually
-			   PyType_GenericNew), after performing various
-			   sanity checks and constructing a new argument
-			   list.  Cut all that nonsense short -- this speeds
-			   up instance creation tremendously. */
-			specific = (void *)type->tp_new;
-			/* XXX I'm not 100% sure that there isn't a hole
-			   in this reasoning that requires additional
-			   sanity checks.  I'll buy the first person to
-			   point out a bug in this reasoning a beer. */
-		}
-		else if (descr == Py_None &&
-			 ptr == (void**)&type->tp_hash) {
-			/* We specifically allow __hash__ to be set to None
-			   to prevent inheritance of the default
-			   implementation from object.__hash__ */
-			specific = PyObject_HashNotImplemented;
-		}
-		else {
-			use_generic = 1;
-			generic = p->function;
-		}
-	} while ((++p)->offset == offset);
-	if (specific && !use_generic)
-		*ptr = specific;
-	else
-		*ptr = generic;
-	return p;
+    if (ptr == NULL) {
+        do {
+            ++p;
+        } while (p->offset == offset);
+        return p;
+    }
+    do {
+        descr = _PyType_Lookup(type, p->name_strobj);
+        if (descr == NULL) {
+            if (ptr == (void**)&type->tp_iternext) {
+                specific = _PyObject_NextNotImplemented;
+            }
+            continue;
+        }
+        if (Py_TYPE(descr) == &PyWrapperDescr_Type) {
+            void **tptr = resolve_slotdups(type, p->name_strobj);
+            if (tptr == NULL || tptr == ptr)
+                generic = p->function;
+            d = (PyWrapperDescrObject *)descr;
+            if (d->d_base->wrapper == p->wrapper &&
+                PyType_IsSubtype(type, d->d_type))
+            {
+                if (specific == NULL ||
+                    specific == d->d_wrapped)
+                    specific = d->d_wrapped;
+                else
+                    use_generic = 1;
+            }
+        }
+        else if (Py_TYPE(descr) == &PyCFunction_Type &&
+                 PyCFunction_GET_FUNCTION(descr) ==
+                 (PyCFunction)tp_new_wrapper &&
+                 ptr == (void**)&type->tp_new)
+        {
+            /* The __new__ wrapper is not a wrapper descriptor,
+               so must be special-cased differently.
+               If we don't do this, creating an instance will
+               always use slot_tp_new which will look up
+               __new__ in the MRO which will call tp_new_wrapper
+               which will look through the base classes looking
+               for a static base and call its tp_new (usually
+               PyType_GenericNew), after performing various
+               sanity checks and constructing a new argument
+               list.  Cut all that nonsense short -- this speeds
+               up instance creation tremendously. */
+            specific = (void *)type->tp_new;
+            /* XXX I'm not 100% sure that there isn't a hole
+               in this reasoning that requires additional
+               sanity checks.  I'll buy the first person to
+               point out a bug in this reasoning a beer. */
+        }
+        else if (descr == Py_None &&
+                 ptr == (void**)&type->tp_hash) {
+            /* We specifically allow __hash__ to be set to None
+               to prevent inheritance of the default
+               implementation from object.__hash__ */
+            specific = PyObject_HashNotImplemented;
+        }
+        else {
+            use_generic = 1;
+            generic = p->function;
+        }
+    } while ((++p)->offset == offset);
+    if (specific && !use_generic)
+        *ptr = specific;
+    else
+        *ptr = generic;
+    return p;
 }
 
 /* In the type, update the slots whose slotdefs are gathered in the pp array.
@@ -6189,11 +6189,11 @@
 static int
 update_slots_callback(PyTypeObject *type, void *data)
 {
-	slotdef **pp = (slotdef **)data;
+    slotdef **pp = (slotdef **)data;
 
-	for (; *pp; pp++)
-		update_one_slot(type, *pp);
-	return 0;
+    for (; *pp; pp++)
+        update_one_slot(type, *pp);
+    return 0;
 }
 
 /* Comparison function for qsort() to compare slotdefs by their offset, and
@@ -6201,14 +6201,14 @@
 static int
 slotdef_cmp(const void *aa, const void *bb)
 {
-	const slotdef *a = (const slotdef *)aa, *b = (const slotdef *)bb;
-	int c = a->offset - b->offset;
-	if (c != 0)
-		return c;
-	else
-		/* Cannot use a-b, as this gives off_t, 
-		   which may lose precision when converted to int. */
-		return (a > b) ? 1 : (a < b) ? -1 : 0;
+    const slotdef *a = (const slotdef *)aa, *b = (const slotdef *)bb;
+    int c = a->offset - b->offset;
+    if (c != 0)
+        return c;
+    else
+        /* Cannot use a-b, as this gives off_t,
+           which may lose precision when converted to int. */
+        return (a > b) ? 1 : (a < b) ? -1 : 0;
 }
 
 /* Initialize the slotdefs table by adding interned string objects for the
@@ -6216,56 +6216,56 @@
 static void
 init_slotdefs(void)
 {
-	slotdef *p;
-	static int initialized = 0;
+    slotdef *p;
+    static int initialized = 0;
 
-	if (initialized)
-		return;
-	for (p = slotdefs; p->name; p++) {
-		p->name_strobj = PyString_InternFromString(p->name);
-		if (!p->name_strobj)
-			Py_FatalError("Out of memory interning slotdef names");
-	}
-	qsort((void *)slotdefs, (size_t)(p-slotdefs), sizeof(slotdef),
-	      slotdef_cmp);
-	initialized = 1;
+    if (initialized)
+        return;
+    for (p = slotdefs; p->name; p++) {
+        p->name_strobj = PyString_InternFromString(p->name);
+        if (!p->name_strobj)
+            Py_FatalError("Out of memory interning slotdef names");
+    }
+    qsort((void *)slotdefs, (size_t)(p-slotdefs), sizeof(slotdef),
+          slotdef_cmp);
+    initialized = 1;
 }
 
 /* Update the slots after assignment to a class (type) attribute. */
 static int
 update_slot(PyTypeObject *type, PyObject *name)
 {
-	slotdef *ptrs[MAX_EQUIV];
-	slotdef *p;
-	slotdef **pp;
-	int offset;
+    slotdef *ptrs[MAX_EQUIV];
+    slotdef *p;
+    slotdef **pp;
+    int offset;
 
-	/* Clear the VALID_VERSION flag of 'type' and all its
-	   subclasses.  This could possibly be unified with the
-	   update_subclasses() recursion below, but carefully:
-	   they each have their own conditions on which to stop
-	   recursing into subclasses. */
-	PyType_Modified(type);
+    /* Clear the VALID_VERSION flag of 'type' and all its
+       subclasses.  This could possibly be unified with the
+       update_subclasses() recursion below, but carefully:
+       they each have their own conditions on which to stop
+       recursing into subclasses. */
+    PyType_Modified(type);
 
-	init_slotdefs();
-	pp = ptrs;
-	for (p = slotdefs; p->name; p++) {
-		/* XXX assume name is interned! */
-		if (p->name_strobj == name)
-			*pp++ = p;
-	}
-	*pp = NULL;
-	for (pp = ptrs; *pp; pp++) {
-		p = *pp;
-		offset = p->offset;
-		while (p > slotdefs && (p-1)->offset == offset)
-			--p;
-		*pp = p;
-	}
-	if (ptrs[0] == NULL)
-		return 0; /* Not an attribute that affects any slots */
-	return update_subclasses(type, name,
-				 update_slots_callback, (void *)ptrs);
+    init_slotdefs();
+    pp = ptrs;
+    for (p = slotdefs; p->name; p++) {
+        /* XXX assume name is interned! */
+        if (p->name_strobj == name)
+            *pp++ = p;
+    }
+    *pp = NULL;
+    for (pp = ptrs; *pp; pp++) {
+        p = *pp;
+        offset = p->offset;
+        while (p > slotdefs && (p-1)->offset == offset)
+            --p;
+        *pp = p;
+    }
+    if (ptrs[0] == NULL)
+        return 0; /* Not an attribute that affects any slots */
+    return update_subclasses(type, name,
+                             update_slots_callback, (void *)ptrs);
 }
 
 /* Store the proper functions in the slot dispatches at class (type)
@@ -6274,23 +6274,23 @@
 static void
 fixup_slot_dispatchers(PyTypeObject *type)
 {
-	slotdef *p;
+    slotdef *p;
 
-	init_slotdefs();
-	for (p = slotdefs; p->name; )
-		p = update_one_slot(type, p);
+    init_slotdefs();
+    for (p = slotdefs; p->name; )
+        p = update_one_slot(type, p);
 }
 
 static void
 update_all_slots(PyTypeObject* type)
 {
-	slotdef *p;
+    slotdef *p;
 
-	init_slotdefs();
-	for (p = slotdefs; p->name; p++) {
-		/* update_slot returns int but can't actually fail */
-		update_slot(type, p->name_strobj);
-	}
+    init_slotdefs();
+    for (p = slotdefs; p->name; p++) {
+        /* update_slot returns int but can't actually fail */
+        update_slot(type, p->name_strobj);
+    }
 }
 
 /* recurse_down_subclasses() and update_subclasses() are mutually
@@ -6299,56 +6299,56 @@
 
 static int
 update_subclasses(PyTypeObject *type, PyObject *name,
-		  update_callback callback, void *data)
+                  update_callback callback, void *data)
 {
-	if (callback(type, data) < 0)
-		return -1;
-	return recurse_down_subclasses(type, name, callback, data);
+    if (callback(type, data) < 0)
+        return -1;
+    return recurse_down_subclasses(type, name, callback, data);
 }
 
 static int
 recurse_down_subclasses(PyTypeObject *type, PyObject *name,
-			update_callback callback, void *data)
+                        update_callback callback, void *data)
 {
-	PyTypeObject *subclass;
-	PyObject *ref, *subclasses, *dict;
-	Py_ssize_t i, n;
+    PyTypeObject *subclass;
+    PyObject *ref, *subclasses, *dict;
+    Py_ssize_t i, n;
 
-	subclasses = type->tp_subclasses;
-	if (subclasses == NULL)
-		return 0;
-	assert(PyList_Check(subclasses));
-	n = PyList_GET_SIZE(subclasses);
-	for (i = 0; i < n; i++) {
-		ref = PyList_GET_ITEM(subclasses, i);
-		assert(PyWeakref_CheckRef(ref));
-		subclass = (PyTypeObject *)PyWeakref_GET_OBJECT(ref);
-		assert(subclass != NULL);
-		if ((PyObject *)subclass == Py_None)
-			continue;
-		assert(PyType_Check(subclass));
-		/* Avoid recursing down into unaffected classes */
-		dict = subclass->tp_dict;
-		if (dict != NULL && PyDict_Check(dict) &&
-		    PyDict_GetItem(dict, name) != NULL)
-			continue;
-		if (update_subclasses(subclass, name, callback, data) < 0)
-			return -1;
-	}
-	return 0;
+    subclasses = type->tp_subclasses;
+    if (subclasses == NULL)
+        return 0;
+    assert(PyList_Check(subclasses));
+    n = PyList_GET_SIZE(subclasses);
+    for (i = 0; i < n; i++) {
+        ref = PyList_GET_ITEM(subclasses, i);
+        assert(PyWeakref_CheckRef(ref));
+        subclass = (PyTypeObject *)PyWeakref_GET_OBJECT(ref);
+        assert(subclass != NULL);
+        if ((PyObject *)subclass == Py_None)
+            continue;
+        assert(PyType_Check(subclass));
+        /* Avoid recursing down into unaffected classes */
+        dict = subclass->tp_dict;
+        if (dict != NULL && PyDict_Check(dict) &&
+            PyDict_GetItem(dict, name) != NULL)
+            continue;
+        if (update_subclasses(subclass, name, callback, data) < 0)
+            return -1;
+    }
+    return 0;
 }
 
 /* This function is called by PyType_Ready() to populate the type's
    dictionary with method descriptors for function slots.  For each
    function slot (like tp_repr) that's defined in the type, one or more
    corresponding descriptors are added in the type's tp_dict dictionary
-   under the appropriate name (like __repr__).	Some function slots
+   under the appropriate name (like __repr__).  Some function slots
    cause more than one descriptor to be added (for example, the nb_add
    slot adds both __add__ and __radd__ descriptors) and some function
    slots compete for the same descriptor (for example both sq_item and
    mp_subscript generate a __getitem__ descriptor).
 
-   In the latter case, the first slotdef entry encoutered wins.	 Since
+   In the latter case, the first slotdef entry encoutered wins.  Since
    slotdef entries are sorted by the offset of the slot in the
    PyHeapTypeObject, this gives us some control over disambiguating
    between competing slots: the members of PyHeapTypeObject are listed
@@ -6371,282 +6371,282 @@
 static int
 add_operators(PyTypeObject *type)
 {
-	PyObject *dict = type->tp_dict;
-	slotdef *p;
-	PyObject *descr;
-	void **ptr;
+    PyObject *dict = type->tp_dict;
+    slotdef *p;
+    PyObject *descr;
+    void **ptr;
 
-	init_slotdefs();
-	for (p = slotdefs; p->name; p++) {
-		if (p->wrapper == NULL)
-			continue;
-		ptr = slotptr(type, p->offset);
-		if (!ptr || !*ptr)
-			continue;
-		if (PyDict_GetItem(dict, p->name_strobj))
-			continue;
-		if (*ptr == PyObject_HashNotImplemented) {
-			/* Classes may prevent the inheritance of the tp_hash
-			   slot by storing PyObject_HashNotImplemented in it. Make it
- 			   visible as a None value for the __hash__ attribute. */
-			if (PyDict_SetItem(dict, p->name_strobj, Py_None) < 0)
-				return -1;
-		}
-		else {
-			descr = PyDescr_NewWrapper(type, p, *ptr);
-			if (descr == NULL)
-				return -1;
-			if (PyDict_SetItem(dict, p->name_strobj, descr) < 0)
-				return -1;
-			Py_DECREF(descr);
-		}
-	}
-	if (type->tp_new != NULL) {
-		if (add_tp_new_wrapper(type) < 0)
-			return -1;
-	}
-	return 0;
+    init_slotdefs();
+    for (p = slotdefs; p->name; p++) {
+        if (p->wrapper == NULL)
+            continue;
+        ptr = slotptr(type, p->offset);
+        if (!ptr || !*ptr)
+            continue;
+        if (PyDict_GetItem(dict, p->name_strobj))
+            continue;
+        if (*ptr == PyObject_HashNotImplemented) {
+            /* Classes may prevent the inheritance of the tp_hash
+               slot by storing PyObject_HashNotImplemented in it. Make it
+               visible as a None value for the __hash__ attribute. */
+            if (PyDict_SetItem(dict, p->name_strobj, Py_None) < 0)
+                return -1;
+        }
+        else {
+            descr = PyDescr_NewWrapper(type, p, *ptr);
+            if (descr == NULL)
+                return -1;
+            if (PyDict_SetItem(dict, p->name_strobj, descr) < 0)
+                return -1;
+            Py_DECREF(descr);
+        }
+    }
+    if (type->tp_new != NULL) {
+        if (add_tp_new_wrapper(type) < 0)
+            return -1;
+    }
+    return 0;
 }
 
 
 /* Cooperative 'super' */
 
 typedef struct {
-	PyObject_HEAD
-	PyTypeObject *type;
-	PyObject *obj;
-	PyTypeObject *obj_type;
+    PyObject_HEAD
+    PyTypeObject *type;
+    PyObject *obj;
+    PyTypeObject *obj_type;
 } superobject;
 
 static PyMemberDef super_members[] = {
-	{"__thisclass__", T_OBJECT, offsetof(superobject, type), READONLY,
-	 "the class invoking super()"},
-	{"__self__",  T_OBJECT, offsetof(superobject, obj), READONLY,
-	 "the instance invoking super(); may be None"},
-	{"__self_class__", T_OBJECT, offsetof(superobject, obj_type), READONLY,
-	 "the type of the instance invoking super(); may be None"},
-	{0}
+    {"__thisclass__", T_OBJECT, offsetof(superobject, type), READONLY,
+     "the class invoking super()"},
+    {"__self__",  T_OBJECT, offsetof(superobject, obj), READONLY,
+     "the instance invoking super(); may be None"},
+    {"__self_class__", T_OBJECT, offsetof(superobject, obj_type), READONLY,
+     "the type of the instance invoking super(); may be None"},
+    {0}
 };
 
 static void
 super_dealloc(PyObject *self)
 {
-	superobject *su = (superobject *)self;
+    superobject *su = (superobject *)self;
 
-	_PyObject_GC_UNTRACK(self);
-	Py_XDECREF(su->obj);
-	Py_XDECREF(su->type);
-	Py_XDECREF(su->obj_type);
-	Py_TYPE(self)->tp_free(self);
+    _PyObject_GC_UNTRACK(self);
+    Py_XDECREF(su->obj);
+    Py_XDECREF(su->type);
+    Py_XDECREF(su->obj_type);
+    Py_TYPE(self)->tp_free(self);
 }
 
 static PyObject *
 super_repr(PyObject *self)
 {
-	superobject *su = (superobject *)self;
+    superobject *su = (superobject *)self;
 
-	if (su->obj_type)
-		return PyString_FromFormat(
-			"<super: <class '%s'>, <%s object>>",
-			su->type ? su->type->tp_name : "NULL",
-			su->obj_type->tp_name);
-	else
-		return PyString_FromFormat(
-			"<super: <class '%s'>, NULL>",
-			su->type ? su->type->tp_name : "NULL");
+    if (su->obj_type)
+        return PyString_FromFormat(
+            "<super: <class '%s'>, <%s object>>",
+            su->type ? su->type->tp_name : "NULL",
+            su->obj_type->tp_name);
+    else
+        return PyString_FromFormat(
+            "<super: <class '%s'>, NULL>",
+            su->type ? su->type->tp_name : "NULL");
 }
 
 static PyObject *
 super_getattro(PyObject *self, PyObject *name)
 {
-	superobject *su = (superobject *)self;
-	int skip = su->obj_type == NULL;
+    superobject *su = (superobject *)self;
+    int skip = su->obj_type == NULL;
 
-	if (!skip) {
-		/* We want __class__ to return the class of the super object
-		   (i.e. super, or a subclass), not the class of su->obj. */
-		skip = (PyString_Check(name) &&
-			PyString_GET_SIZE(name) == 9 &&
-			strcmp(PyString_AS_STRING(name), "__class__") == 0);
-	}
+    if (!skip) {
+        /* We want __class__ to return the class of the super object
+           (i.e. super, or a subclass), not the class of su->obj. */
+        skip = (PyString_Check(name) &&
+            PyString_GET_SIZE(name) == 9 &&
+            strcmp(PyString_AS_STRING(name), "__class__") == 0);
+    }
 
-	if (!skip) {
-		PyObject *mro, *res, *tmp, *dict;
-		PyTypeObject *starttype;
-		descrgetfunc f;
-		Py_ssize_t i, n;
+    if (!skip) {
+        PyObject *mro, *res, *tmp, *dict;
+        PyTypeObject *starttype;
+        descrgetfunc f;
+        Py_ssize_t i, n;
 
-		starttype = su->obj_type;
-		mro = starttype->tp_mro;
+        starttype = su->obj_type;
+        mro = starttype->tp_mro;
 
-		if (mro == NULL)
-			n = 0;
-		else {
-			assert(PyTuple_Check(mro));
-			n = PyTuple_GET_SIZE(mro);
-		}
-		for (i = 0; i < n; i++) {
-			if ((PyObject *)(su->type) == PyTuple_GET_ITEM(mro, i))
-				break;
-		}
-		i++;
-		res = NULL;
-		for (; i < n; i++) {
-			tmp = PyTuple_GET_ITEM(mro, i);
-			if (PyType_Check(tmp))
-				dict = ((PyTypeObject *)tmp)->tp_dict;
-			else if (PyClass_Check(tmp))
-				dict = ((PyClassObject *)tmp)->cl_dict;
-			else
-				continue;
-			res = PyDict_GetItem(dict, name);
-			if (res != NULL) {
-				Py_INCREF(res);
-				f = Py_TYPE(res)->tp_descr_get;
-				if (f != NULL) {
-					tmp = f(res,
-						/* Only pass 'obj' param if
-						   this is instance-mode super 
-						   (See SF ID #743627)
-						*/
-						(su->obj == (PyObject *)
-							    su->obj_type 
-							? (PyObject *)NULL 
-							: su->obj),
-						(PyObject *)starttype);
-					Py_DECREF(res);
-					res = tmp;
-				}
-				return res;
-			}
-		}
-	}
-	return PyObject_GenericGetAttr(self, name);
+        if (mro == NULL)
+            n = 0;
+        else {
+            assert(PyTuple_Check(mro));
+            n = PyTuple_GET_SIZE(mro);
+        }
+        for (i = 0; i < n; i++) {
+            if ((PyObject *)(su->type) == PyTuple_GET_ITEM(mro, i))
+                break;
+        }
+        i++;
+        res = NULL;
+        for (; i < n; i++) {
+            tmp = PyTuple_GET_ITEM(mro, i);
+            if (PyType_Check(tmp))
+                dict = ((PyTypeObject *)tmp)->tp_dict;
+            else if (PyClass_Check(tmp))
+                dict = ((PyClassObject *)tmp)->cl_dict;
+            else
+                continue;
+            res = PyDict_GetItem(dict, name);
+            if (res != NULL) {
+                Py_INCREF(res);
+                f = Py_TYPE(res)->tp_descr_get;
+                if (f != NULL) {
+                    tmp = f(res,
+                        /* Only pass 'obj' param if
+                           this is instance-mode super
+                           (See SF ID #743627)
+                        */
+                        (su->obj == (PyObject *)
+                                    su->obj_type
+                            ? (PyObject *)NULL
+                            : su->obj),
+                        (PyObject *)starttype);
+                    Py_DECREF(res);
+                    res = tmp;
+                }
+                return res;
+            }
+        }
+    }
+    return PyObject_GenericGetAttr(self, name);
 }
 
 static PyTypeObject *
 supercheck(PyTypeObject *type, PyObject *obj)
 {
-	/* Check that a super() call makes sense.  Return a type object.
+    /* Check that a super() call makes sense.  Return a type object.
 
-	   obj can be a new-style class, or an instance of one:
+       obj can be a new-style class, or an instance of one:
 
-	   - If it is a class, it must be a subclass of 'type'.	 This case is
-	     used for class methods; the return value is obj.
+       - If it is a class, it must be a subclass of 'type'.      This case is
+         used for class methods; the return value is obj.
 
-	   - If it is an instance, it must be an instance of 'type'.  This is
-	     the normal case; the return value is obj.__class__.
+       - If it is an instance, it must be an instance of 'type'.  This is
+         the normal case; the return value is obj.__class__.
 
-	   But... when obj is an instance, we want to allow for the case where
-	   Py_TYPE(obj) is not a subclass of type, but obj.__class__ is!
-	   This will allow using super() with a proxy for obj.
-	*/
+       But... when obj is an instance, we want to allow for the case where
+       Py_TYPE(obj) is not a subclass of type, but obj.__class__ is!
+       This will allow using super() with a proxy for obj.
+    */
 
-	/* Check for first bullet above (special case) */
-	if (PyType_Check(obj) && PyType_IsSubtype((PyTypeObject *)obj, type)) {
-		Py_INCREF(obj);
-		return (PyTypeObject *)obj;
-	}
+    /* Check for first bullet above (special case) */
+    if (PyType_Check(obj) && PyType_IsSubtype((PyTypeObject *)obj, type)) {
+        Py_INCREF(obj);
+        return (PyTypeObject *)obj;
+    }
 
-	/* Normal case */
-	if (PyType_IsSubtype(Py_TYPE(obj), type)) {
-		Py_INCREF(Py_TYPE(obj));
-		return Py_TYPE(obj);
-	}
-	else {
-		/* Try the slow way */
-		static PyObject *class_str = NULL;
-		PyObject *class_attr;
+    /* Normal case */
+    if (PyType_IsSubtype(Py_TYPE(obj), type)) {
+        Py_INCREF(Py_TYPE(obj));
+        return Py_TYPE(obj);
+    }
+    else {
+        /* Try the slow way */
+        static PyObject *class_str = NULL;
+        PyObject *class_attr;
 
-		if (class_str == NULL) {
-			class_str = PyString_FromString("__class__");
-			if (class_str == NULL)
-				return NULL;
-		}
+        if (class_str == NULL) {
+            class_str = PyString_FromString("__class__");
+            if (class_str == NULL)
+                return NULL;
+        }
 
-		class_attr = PyObject_GetAttr(obj, class_str);
+        class_attr = PyObject_GetAttr(obj, class_str);
 
-		if (class_attr != NULL &&
-		    PyType_Check(class_attr) &&
-		    (PyTypeObject *)class_attr != Py_TYPE(obj))
-		{
-			int ok = PyType_IsSubtype(
-				(PyTypeObject *)class_attr, type);
-			if (ok)
-				return (PyTypeObject *)class_attr;
-		}
+        if (class_attr != NULL &&
+            PyType_Check(class_attr) &&
+            (PyTypeObject *)class_attr != Py_TYPE(obj))
+        {
+            int ok = PyType_IsSubtype(
+                (PyTypeObject *)class_attr, type);
+            if (ok)
+                return (PyTypeObject *)class_attr;
+        }
 
-		if (class_attr == NULL)
-			PyErr_Clear();
-		else
-			Py_DECREF(class_attr);
-	}
+        if (class_attr == NULL)
+            PyErr_Clear();
+        else
+            Py_DECREF(class_attr);
+    }
 
-	PyErr_SetString(PyExc_TypeError,
-			"super(type, obj): "
-			"obj must be an instance or subtype of type");
-	return NULL;
+    PyErr_SetString(PyExc_TypeError,
+                    "super(type, obj): "
+                    "obj must be an instance or subtype of type");
+    return NULL;
 }
 
 static PyObject *
 super_descr_get(PyObject *self, PyObject *obj, PyObject *type)
 {
-	superobject *su = (superobject *)self;
-	superobject *newobj;
+    superobject *su = (superobject *)self;
+    superobject *newobj;
 
-	if (obj == NULL || obj == Py_None || su->obj != NULL) {
-		/* Not binding to an object, or already bound */
-		Py_INCREF(self);
-		return self;
-	}
-	if (Py_TYPE(su) != &PySuper_Type)
-		/* If su is an instance of a (strict) subclass of super,
-		   call its type */
-		return PyObject_CallFunctionObjArgs((PyObject *)Py_TYPE(su),
-						    su->type, obj, NULL);
-	else {
-		/* Inline the common case */
-		PyTypeObject *obj_type = supercheck(su->type, obj);
-		if (obj_type == NULL)
-			return NULL;
-		newobj = (superobject *)PySuper_Type.tp_new(&PySuper_Type,
-							 NULL, NULL);
-		if (newobj == NULL)
-			return NULL;
-		Py_INCREF(su->type);
-		Py_INCREF(obj);
-		newobj->type = su->type;
-		newobj->obj = obj;
-		newobj->obj_type = obj_type;
-		return (PyObject *)newobj;
-	}
+    if (obj == NULL || obj == Py_None || su->obj != NULL) {
+        /* Not binding to an object, or already bound */
+        Py_INCREF(self);
+        return self;
+    }
+    if (Py_TYPE(su) != &PySuper_Type)
+        /* If su is an instance of a (strict) subclass of super,
+           call its type */
+        return PyObject_CallFunctionObjArgs((PyObject *)Py_TYPE(su),
+                                            su->type, obj, NULL);
+    else {
+        /* Inline the common case */
+        PyTypeObject *obj_type = supercheck(su->type, obj);
+        if (obj_type == NULL)
+            return NULL;
+        newobj = (superobject *)PySuper_Type.tp_new(&PySuper_Type,
+                                                 NULL, NULL);
+        if (newobj == NULL)
+            return NULL;
+        Py_INCREF(su->type);
+        Py_INCREF(obj);
+        newobj->type = su->type;
+        newobj->obj = obj;
+        newobj->obj_type = obj_type;
+        return (PyObject *)newobj;
+    }
 }
 
 static int
 super_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-	superobject *su = (superobject *)self;
-	PyTypeObject *type;
-	PyObject *obj = NULL;
-	PyTypeObject *obj_type = NULL;
+    superobject *su = (superobject *)self;
+    PyTypeObject *type;
+    PyObject *obj = NULL;
+    PyTypeObject *obj_type = NULL;
 
-	if (!_PyArg_NoKeywords("super", kwds))
-		return -1;
-	if (!PyArg_ParseTuple(args, "O!|O:super", &PyType_Type, &type, &obj))
-		return -1;
-	if (obj == Py_None)
-		obj = NULL;
-	if (obj != NULL) {
-		obj_type = supercheck(type, obj);
-		if (obj_type == NULL)
-			return -1;
-		Py_INCREF(obj);
-	}
-	Py_INCREF(type);
-	su->type = type;
-	su->obj = obj;
-	su->obj_type = obj_type;
-	return 0;
+    if (!_PyArg_NoKeywords("super", kwds))
+        return -1;
+    if (!PyArg_ParseTuple(args, "O!|O:super", &PyType_Type, &type, &obj))
+        return -1;
+    if (obj == Py_None)
+        obj = NULL;
+    if (obj != NULL) {
+        obj_type = supercheck(type, obj);
+        if (obj_type == NULL)
+            return -1;
+        Py_INCREF(obj);
+    }
+    Py_INCREF(type);
+    su->type = type;
+    su->obj = obj;
+    su->obj_type = obj_type;
+    return 0;
 }
 
 PyDoc_STRVAR(super_doc,
@@ -6656,60 +6656,60 @@
 "Typical use to call a cooperative superclass method:\n"
 "class C(B):\n"
 "    def meth(self, arg):\n"
-"	 super(C, self).meth(arg)");
+"        super(C, self).meth(arg)");
 
 static int
 super_traverse(PyObject *self, visitproc visit, void *arg)
 {
-	superobject *su = (superobject *)self;
+    superobject *su = (superobject *)self;
 
-	Py_VISIT(su->obj);
-	Py_VISIT(su->type);
-	Py_VISIT(su->obj_type);
+    Py_VISIT(su->obj);
+    Py_VISIT(su->type);
+    Py_VISIT(su->obj_type);
 
-	return 0;
+    return 0;
 }
 
 PyTypeObject PySuper_Type = {
-	PyVarObject_HEAD_INIT(&PyType_Type, 0)
-	"super",				/* tp_name */
-	sizeof(superobject),			/* tp_basicsize */
-	0,					/* tp_itemsize */
-	/* methods */
-	super_dealloc,				/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	super_repr,				/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	super_getattro,				/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
-		Py_TPFLAGS_BASETYPE,		/* tp_flags */
-	super_doc,				/* tp_doc */
-	super_traverse,				/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	0,					/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	0,					/* tp_methods */
-	super_members,				/* tp_members */
-	0,					/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	super_descr_get,			/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	super_init,				/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	PyType_GenericNew,			/* tp_new */
-	PyObject_GC_Del,			/* tp_free */
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+    "super",                                    /* tp_name */
+    sizeof(superobject),                        /* tp_basicsize */
+    0,                                          /* tp_itemsize */
+    /* methods */
+    super_dealloc,                              /* tp_dealloc */
+    0,                                          /* tp_print */
+    0,                                          /* tp_getattr */
+    0,                                          /* tp_setattr */
+    0,                                          /* tp_compare */
+    super_repr,                                 /* tp_repr */
+    0,                                          /* tp_as_number */
+    0,                                          /* tp_as_sequence */
+    0,                                          /* tp_as_mapping */
+    0,                                          /* tp_hash */
+    0,                                          /* tp_call */
+    0,                                          /* tp_str */
+    super_getattro,                             /* tp_getattro */
+    0,                                          /* tp_setattro */
+    0,                                          /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+        Py_TPFLAGS_BASETYPE,                    /* tp_flags */
+    super_doc,                                  /* tp_doc */
+    super_traverse,                             /* tp_traverse */
+    0,                                          /* tp_clear */
+    0,                                          /* tp_richcompare */
+    0,                                          /* tp_weaklistoffset */
+    0,                                          /* tp_iter */
+    0,                                          /* tp_iternext */
+    0,                                          /* tp_methods */
+    super_members,                              /* tp_members */
+    0,                                          /* tp_getset */
+    0,                                          /* tp_base */
+    0,                                          /* tp_dict */
+    super_descr_get,                            /* tp_descr_get */
+    0,                                          /* tp_descr_set */
+    0,                                          /* tp_dictoffset */
+    super_init,                                 /* tp_init */
+    PyType_GenericAlloc,                        /* tp_alloc */
+    PyType_GenericNew,                          /* tp_new */
+    PyObject_GC_Del,                            /* tp_free */
 };
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index 1a998b6..0e46d92 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -57,9 +57,9 @@
             PyWeakref_GET_OBJECT(self));
 
         if (*list == self)
-	    /* If 'self' is the end of the list (and thus self->wr_next == NULL)
-	       then the weakref list itself (and thus the value of *list) will
-	       end up being set to NULL. */
+            /* If 'self' is the end of the list (and thus self->wr_next == NULL)
+               then the weakref list itself (and thus the value of *list) will
+               end up being set to NULL. */
             *list = self->wr_next;
         self->wr_object = Py_None;
         if (self->wr_prev != NULL)
@@ -161,21 +161,21 @@
         PyOS_snprintf(buffer, sizeof(buffer), "<weakref at %p; dead>", self);
     }
     else {
-	char *name = NULL;
-	PyObject *nameobj = PyObject_GetAttrString(PyWeakref_GET_OBJECT(self),
-						   "__name__");
-	if (nameobj == NULL)
-		PyErr_Clear();
-	else if (PyString_Check(nameobj))
-		name = PyString_AS_STRING(nameobj);
+        char *name = NULL;
+        PyObject *nameobj = PyObject_GetAttrString(PyWeakref_GET_OBJECT(self),
+                                                   "__name__");
+        if (nameobj == NULL)
+                PyErr_Clear();
+        else if (PyString_Check(nameobj))
+                name = PyString_AS_STRING(nameobj);
         PyOS_snprintf(buffer, sizeof(buffer),
-		      name ? "<weakref at %p; to '%.50s' at %p (%s)>"
-		           : "<weakref at %p; to '%.50s' at %p>",
-		      self,
-		      Py_TYPE(PyWeakref_GET_OBJECT(self))->tp_name,
-		      PyWeakref_GET_OBJECT(self),
-		      name);
-	Py_XDECREF(nameobj);
+                      name ? "<weakref at %p; to '%.50s' at %p (%s)>"
+                           : "<weakref at %p; to '%.50s' at %p>",
+                      self,
+                      Py_TYPE(PyWeakref_GET_OBJECT(self))->tp_name,
+                      PyWeakref_GET_OBJECT(self),
+                      name);
+        Py_XDECREF(nameobj);
     }
     return PyString_FromString(buffer);
 }
@@ -337,10 +337,10 @@
     sizeof(PyWeakReference),
     0,
     weakref_dealloc,            /*tp_dealloc*/
-    0,	                        /*tp_print*/
+    0,                          /*tp_print*/
     0,                          /*tp_getattr*/
     0,                          /*tp_setattr*/
-    0,	                        /*tp_compare*/
+    0,                          /*tp_compare*/
     (reprfunc)weakref_repr,     /*tp_repr*/
     0,                          /*tp_as_number*/
     0,                          /*tp_as_sequence*/
@@ -356,7 +356,7 @@
     0,                          /*tp_doc*/
     (traverseproc)gc_traverse,  /*tp_traverse*/
     (inquiry)gc_clear,          /*tp_clear*/
-    (richcmpfunc)weakref_richcompare,	/*tp_richcompare*/
+    (richcmpfunc)weakref_richcompare,   /*tp_richcompare*/
     0,                          /*tp_weaklistoffset*/
     0,                          /*tp_iter*/
     0,                          /*tp_iternext*/
@@ -436,9 +436,9 @@
 #define WRAP_METHOD(method, special) \
     static PyObject * \
     method(PyObject *proxy) { \
-	    UNWRAP(proxy); \
-		return PyObject_CallMethod(proxy, special, ""); \
-	}
+            UNWRAP(proxy); \
+                return PyObject_CallMethod(proxy, special, ""); \
+        }
 
 
 /* direct slots */
@@ -452,9 +452,9 @@
 {
     char buf[160];
     PyOS_snprintf(buf, sizeof(buf),
-		  "<weakproxy at %p to %.100s at %p>", proxy,
-		  Py_TYPE(PyWeakref_GET_OBJECT(proxy))->tp_name,
-		  PyWeakref_GET_OBJECT(proxy));
+                  "<weakproxy at %p to %.100s at %p>", proxy,
+                  Py_TYPE(PyWeakref_GET_OBJECT(proxy))->tp_name,
+                  PyWeakref_GET_OBJECT(proxy));
     return PyString_FromString(buf);
 }
 
@@ -604,8 +604,8 @@
 
 
 static PyMethodDef proxy_methods[] = {
-	{"__unicode__", (PyCFunction)proxy_unicode, METH_NOARGS},
-	{NULL, NULL}
+        {"__unicode__", (PyCFunction)proxy_unicode, METH_NOARGS},
+        {NULL, NULL}
 };
 
 
@@ -677,20 +677,20 @@
     0,
     /* methods */
     (destructor)proxy_dealloc,          /* tp_dealloc */
-    0,				        /* tp_print */
-    0,				        /* tp_getattr */
-    0, 				        /* tp_setattr */
-    proxy_compare,		        /* tp_compare */
-    (reprfunc)proxy_repr,	        /* tp_repr */
-    &proxy_as_number,		        /* tp_as_number */
-    &proxy_as_sequence,		        /* tp_as_sequence */
-    &proxy_as_mapping,		        /* tp_as_mapping */
-    0,	                                /* tp_hash */
-    0,	                                /* tp_call */
+    0,                                  /* tp_print */
+    0,                                  /* tp_getattr */
+    0,                                  /* tp_setattr */
+    proxy_compare,                      /* tp_compare */
+    (reprfunc)proxy_repr,               /* tp_repr */
+    &proxy_as_number,                   /* tp_as_number */
+    &proxy_as_sequence,                 /* tp_as_sequence */
+    &proxy_as_mapping,                  /* tp_as_mapping */
+    0,                                  /* tp_hash */
+    0,                                  /* tp_call */
     proxy_str,                          /* tp_str */
     proxy_getattr,                      /* tp_getattro */
     (setattrofunc)proxy_setattr,        /* tp_setattro */
-    0,				        /* tp_as_buffer */
+    0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC
     | Py_TPFLAGS_CHECKTYPES,            /* tp_flags */
     0,                                  /* tp_doc */
@@ -700,7 +700,7 @@
     0,                                  /* tp_weaklistoffset */
     (getiterfunc)proxy_iter,            /* tp_iter */
     (iternextfunc)proxy_iternext,       /* tp_iternext */
-	proxy_methods,                      /* tp_methods */
+        proxy_methods,                      /* tp_methods */
 };
 
 
@@ -712,20 +712,20 @@
     0,
     /* methods */
     (destructor)proxy_dealloc,          /* tp_dealloc */
-    0,				        /* tp_print */
-    0,				        /* tp_getattr */
-    0, 				        /* tp_setattr */
-    proxy_compare,		        /* tp_compare */
-    (unaryfunc)proxy_repr,	        /* tp_repr */
-    &proxy_as_number,		        /* tp_as_number */
-    &proxy_as_sequence,		        /* tp_as_sequence */
-    &proxy_as_mapping,		        /* tp_as_mapping */
-    0,	                                /* tp_hash */
-    proxy_call,	                        /* tp_call */
-    proxy_str,	                        /* tp_str */
+    0,                                  /* tp_print */
+    0,                                  /* tp_getattr */
+    0,                                  /* tp_setattr */
+    proxy_compare,                      /* tp_compare */
+    (unaryfunc)proxy_repr,              /* tp_repr */
+    &proxy_as_number,                   /* tp_as_number */
+    &proxy_as_sequence,                 /* tp_as_sequence */
+    &proxy_as_mapping,                  /* tp_as_mapping */
+    0,                                  /* tp_hash */
+    proxy_call,                         /* tp_call */
+    proxy_str,                          /* tp_str */
     proxy_getattr,                      /* tp_getattro */
     (setattrofunc)proxy_setattr,        /* tp_setattro */
-    0,				        /* tp_as_buffer */
+    0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC
     | Py_TPFLAGS_CHECKTYPES,            /* tp_flags */
     0,                                  /* tp_doc */
@@ -748,7 +748,7 @@
 
     if (!PyType_SUPPORTS_WEAKREFS(Py_TYPE(ob))) {
         PyErr_Format(PyExc_TypeError,
-		     "cannot create weak reference to '%s' object",
+                     "cannot create weak reference to '%s' object",
                      Py_TYPE(ob)->tp_name);
         return NULL;
     }
@@ -807,7 +807,7 @@
 
     if (!PyType_SUPPORTS_WEAKREFS(Py_TYPE(ob))) {
         PyErr_Format(PyExc_TypeError,
-		     "cannot create weak reference to '%s' object",
+                     "cannot create weak reference to '%s' object",
                      Py_TYPE(ob)->tp_name);
         return NULL;
     }
@@ -932,7 +932,7 @@
         else {
             PyObject *tuple;
             Py_ssize_t i = 0;
-    
+
             tuple = PyTuple_New(count * 2);
             if (tuple == NULL) {
                 if (restore_error)