Commit 43b15097 authored by Kurt B. Kaiser's avatar Kurt B. Kaiser

Interpreter wasn't displaying the location of a SyntaxError

Issue1692
parent 4c3eda3a
...@@ -12,6 +12,8 @@ What's New in Python 3.0a3? ...@@ -12,6 +12,8 @@ What's New in Python 3.0a3?
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #1692: Interpreter was not displaying location of SyntaxError
- Improve some exception messages when Windows fails to load an extension - Improve some exception messages when Windows fails to load an extension
module. Now we get for example '%1 is not a valid Win32 application' instead module. Now we get for example '%1 is not a valid Win32 application' instead
of 'error code 193'. Also use Unicode strings to deal with non-English of 'error code 193'. Also use Unicode strings to deal with non-English
......
...@@ -1103,7 +1103,7 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename, ...@@ -1103,7 +1103,7 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename,
goto finally; goto finally;
if (v == Py_None) if (v == Py_None)
*filename = NULL; *filename = NULL;
else if (! (*filename = PyString_AsString(v))) else if (! (*filename = PyUnicode_AsString(v)))
goto finally; goto finally;
Py_DECREF(v); Py_DECREF(v);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment