]> granicus.if.org Git - python/commitdiff
Fix error message for import * in function/class scope
authorJeremy Hylton <jeremy@alum.mit.edu>
Mon, 6 Aug 2001 19:55:17 +0000 (19:55 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Mon, 6 Aug 2001 19:55:17 +0000 (19:55 +0000)
Python/compile.c

index dc31d2fce40e2b1a24febd59f7bef36db86aa7a3..a30d663219f3fc08f25b2cb49689605979bd72da 100644 (file)
@@ -5296,7 +5296,7 @@ symtable_import(struct symtable *st, node *n)
                if (TYPE(CHILD(n, 3)) == STAR) {
                        if (st->st_cur->ste_type != TYPE_MODULE) {
                                symtable_warn(st,
-                                     "import * not allowed inside function");
+                                     "import * only allowed at module level");
                                return;
                        }
                        st->st_cur->ste_optimized |= OPT_IMPORT_STAR;