Alex Martelli <aleaxit at yahoo.com>: > Python's error messages are slowly but surely getting better in that, > instead of just saying that something (e.g.) "must be int" (and > leaving the coder in the dark about WHAT it was instead) While we're on the subject of error messages, I'd like to point out another one that could be improved. Often one sees things like TypeError: foo() takes exactly 1 argument (2 given) In the case where foo() is a method of some class, and there are various versions of foo() defined in various superclasses, it's sometimes hard to tell exactly *which* foo it was trying to call. It would be much more useful if the module and class names were included in the error message, e.g. TypeError: MyStuff.SomeClass.foo() takes exactly 1 argument (2 given) The same goes for function names quoted in the traceback. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4