>>> def f(x):
... global x
Traceback (most recent call last):
-SyntaxError: name 'x' is local and global
+SyntaxError: name 'x' is local and global (<doctest test.test_syntax[0]>, line 1)
The tests are all raise SyntaxErrors. They were created by checking
each C call that raises SyntaxError. There are several modules that
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);