diff Python/compile.c @ 36988:49c6eb688906

Checkpoint. 218 tests are okay; 53 are failing. Done so far: - all classes are new-style (but ripping out classobject.[ch] isn't done) - int/int -> float - all exceptions must derive from BaseException - absolute import - 'as' and 'with' are keywords
author Guido van Rossum <guido@python.org>
date Wed, 15 Mar 2006 04:58:47 +0000
parents 9a08724110d0
children 25007c155668
line wrap: on
line diff
--- a/Python/compile.c	Tue Mar 14 22:22:15 2006 +0000
+++ b/Python/compile.c	Wed Mar 15 04:58:47 2006 +0000
@@ -2464,11 +2464,7 @@
 		int r;
 		PyObject *level;
 
-		if (c->c_flags && (c->c_flags->cf_flags & CO_FUTURE_ABSIMPORT))
-			level = PyInt_FromLong(0);
-		else
-			level = PyInt_FromLong(-1);
-
+                level = PyInt_FromLong(0);
 		if (level == NULL)
 			return 0;
 
@@ -2511,12 +2507,7 @@
 	if (!names)
 		return 0;
 
-	if (s->v.ImportFrom.level == 0 && c->c_flags &&
-	    !(c->c_flags->cf_flags & CO_FUTURE_ABSIMPORT))
-		level = PyInt_FromLong(-1);
-	else
-		level = PyInt_FromLong(s->v.ImportFrom.level);
-
+        level = PyInt_FromLong(s->v.ImportFrom.level);
 	if (!level) {
 		Py_DECREF(names);
 		return 0;
@@ -2746,10 +2737,7 @@
 	case Mult:
 		return BINARY_MULTIPLY;
 	case Div:
-		if (c->c_flags && c->c_flags->cf_flags & CO_FUTURE_DIVISION)
-			return BINARY_TRUE_DIVIDE;
-		else
-			return BINARY_DIVIDE;
+		return BINARY_TRUE_DIVIDE;
 	case Mod:
 		return BINARY_MODULO;
 	case Pow:
@@ -2809,10 +2797,7 @@
 	case Mult:
 		return INPLACE_MULTIPLY;
 	case Div:
-		if (c->c_flags && c->c_flags->cf_flags & CO_FUTURE_DIVISION)
-			return INPLACE_TRUE_DIVIDE;
-		else
-			return INPLACE_DIVIDE;
+		return INPLACE_TRUE_DIVIDE;
 	case Mod:
 		return INPLACE_MODULO;
 	case Pow: