[Python-Dev] Re: More informative error messages
Kevin J. Butler
python-kbutler at sabaydi.com
Wed Oct 8 11:34:54 EDT 2003
>
>
>From: Nick Coghlan <ncoghlan at iinet.net.au>=
>
> Given this, perhaps a simple addition to the error string might be
> enough to
>
>help reduce confusion:
>
>
Agreed.
>-------------
>TypeError: foo() takes exactly 1 argument (2 given). (Note: For bound methods,
>the argument count includes the object the method is bound to)
>-------------
>
>
Agreed, but then the newbies will wonder what bounds methods are, and to
what a method would be bound.
Shorter and easier for the uninitiated:
TypeError: foo() takes exactly 1 argument (2 given). Counts may include 'self'.
kb
More information about the Python-Dev
mailing list