Terry J. Reedy <tjre...@udel.edu> added the comment:

In 3.1, I get
>>> exec("1/0")
Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    exec("1/0")
  File "<string>", line 1, in <module>
ZeroDivisionError: int division or modulo by zero

In your example, would you really prefer that the warning message start with 
"<string>1" (or the 2.x equivalent) instead of "t.py1"? If I were running a 
multi-file app with warnings turned on, I would prefer the latter. The message 
"DeprecationWarning: raising a string exception is deprecated" is certainly 
enough to suggest that one search the file for 'raise'.

In any case, this would only be a bug if it disagreed with docs or if this were 
different from the usual behavior with deprecation warnings. It is too late for 
new features in 2.x and this does not apply to 3.x.

----------
nosy: +tjreedy
resolution:  -> rejected
status: open -> closed
type:  -> feature request

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

Reply via email to