STINNER Victor added the comment:

SyntaxError exceptions have a text attribute which contains the line where the 
error occurred. It's really a special case. For other exceptions, Python only 
knows that the error occurred in the file called "<string>".

Being able to display the line for any exception requires a complex 
development. I'm not interested to implement it, I don't think that it's very 
useful (compared to the time needed to develop it).

----------
nosy: +haypo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23035>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to