From: Benjamin Peterson Date: Sat, 19 Oct 2013 20:14:39 +0000 (-0400) Subject: strengthen condition and add assertion X-Git-Tag: v3.4.0a4~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8a38b8e4f6a4273cfda8480458447f91310edf6;p=python strengthen condition and add assertion --- diff --git a/Python/compile.c b/Python/compile.c index 85ea1d098d..9176e3131d 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -670,7 +670,8 @@ compiler_scope_qualname(struct compiler *c, identifier scope_name) 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;