[issue34254] Include type annotations in error messages for better errors

2018-08-05 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the feedback on this. Brett also gave feedback on the python-ideas mailing list as below : > Two things to quickly mention: one is that type hints have no run-time > semantics, so adding them to such a critical exception would be

[issue34254] Include type annotations in error messages for better errors

2018-08-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: FWIW I am rather -1 on this. More detailed errors messages are always good, but in the proposed form it looks more like a distraction. I think just showing a fully qualified name of the function would be both more concise and more informative, since the

[issue34254] Include type annotations in error messages for better errors

2018-07-28 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I have added support for functions defined inside a function and methods of a class along with some basic tests. Since directly taking co_name from code object returns only the name without any context like Foo.square inside square when I try to

[issue34254] Include type annotations in error messages for better errors

2018-07-28 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : Python 3 supports type annotations in functions but when there is a TypeError due to calling a function then only the arguments are given in the error message. If the function has type annotations then adding them to the error message will give