> > TypeError: MyStuff.SomeClass.foo() takes exactly 1 argument (2 > >given) > > AFAICT, this would at least require a compiler change, and a change to the > layout of code objects, so that a code object would know its "dotted name". Perhaps. I had the idea that methods already had some notion of the name of the class they were defined in, but maybe that's only bound methods. In any case, I think it would be worth making this change. > Don't tracebacks give line number and file? Yes, but the exception occurs just *before* the function is entered, so the traceback stops one level short of showing you where the function being called is defined! That's what makes this problem so annoying. 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