Mercurial > cpython-lru_cache-weakref
diff Python/symtable.c @ 48251:2d76af7f7702 legacy-trunk
include filename and line number in SyntaxError
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 16 Aug 2008 22:11:33 +0000 |
| parents | 52294af4b663 |
| children | 9de68ad86078 |
line wrap: on
line diff
--- a/Python/symtable.c Sat Aug 16 22:00:27 2008 +0000 +++ b/Python/symtable.c Sat Aug 16 22:11:33 2008 +0000 @@ -373,6 +373,9 @@ PyErr_Format(PyExc_SyntaxError, "name '%s' is local and global", PyString_AS_STRING(name)); + PyErr_SyntaxLocation(ste->ste_table->st_filename, + ste->ste_lineno); + return 0; } SET_SCOPE(dict, name, GLOBAL_EXPLICIT);
