diff Python/compile.c @ 86495:50bb4300bf2b

strengthen condition and add assertion
author Benjamin Peterson <benjamin@python.org>
date Sat, 19 Oct 2013 16:14:39 -0400
parents 35b384ed594b
children b4a325275fb0
line wrap: on
line diff
--- a/Python/compile.c	Sat Oct 19 22:36:17 2013 +0200
+++ b/Python/compile.c	Sat Oct 19 16:14:39 2013 -0400
@@ -670,7 +670,8 @@
         return NULL;
 
     stack_size = PyList_GET_SIZE(c->c_stack);
-    global_scope = stack_size <= 1;
+    assert(stack_size >= 1);
+    global_scope = stack_size == 1;
     if (scope_name != NULL && !global_scope) {
         int scope;
         PyObject *mangled;