diff Objects/floatobject.c @ 41580:a68467cc06d3 legacy-trunk

Remove dead code. This code couldn't be reached because earlier in the function there is another check for z != Py_None.
author Neal Norwitz <nnorwitz@gmail.com>
date Thu, 03 May 2007 07:20:57 +0000
parents 981181d2a4fe
children 6620a510e9a9
line wrap: on
line diff
--- a/Objects/floatobject.c	Thu May 03 06:47:18 2007 +0000
+++ b/Objects/floatobject.c	Thu May 03 07:20:57 2007 +0000
@@ -764,18 +764,7 @@
 
 	/* Sort out special cases here instead of relying on pow() */
 	if (iw == 0) { 		/* v**0 is 1, even 0**0 */
-		PyFPE_START_PROTECT("pow", return NULL)
-		if ((PyObject *)z != Py_None) {
-			double iz;
-			CONVERT_TO_DOUBLE(z, iz);
-			ix = fmod(1.0, iz);
-			if (ix != 0 && iz < 0)
-				ix += iz;
-		}
-		else
-			ix = 1.0;
-		PyFPE_END_PROTECT(ix)
-		return PyFloat_FromDouble(ix);
+		return PyFloat_FromDouble(1.0);
 	}
 	if (iv == 0.0) {  /* 0**w is error if w<0, else 1 */
 		if (iw < 0.0) {