[Python-Dev] TypeError: foo, bar

Charles G Waldman cgw@fnal.gov
Fri, 1 Dec 2000 07:41:04 -0600 (CST)


Fredrik Lundh writes:

 > how about changing "read-only character buffer" to "string
 > or read-only character buffer", and the "foo, bar" format to
 > "expected foo, found bar", so we get:
 > 
 >     "TypeError: expected string or read-only character
 >     buffer, found dictionary"

+100.  Recently, I've been teaching Python to some beginners and they
find this message absolutely inscrutable.

Also agree with Tim about "found" vs. "got", but this is of secondary
importance.