Misleading error message of the day

Heiko Wundram modelnine at modelnine.org
Thu Dec 8 10:50:44 EST 2011


Am 08.12.2011 16:42, schrieb Roy Smith:
> The exception was raised when i() returned it's third value, so saying "expected 2, got 3" is exactly correct.  Yes, it is true that it might have gotten more if it kept going, but that's immaterial; the fact that it got to 3 is what caused the Holy Hand Grenade to be thrown.

Please explain how that error message (in case you're not aiming at the 
actual count of elements in the source) differs from the curent wording 
"too many values", as you're simply displaying "expected n, got n+1" 
where n is visible from the immediate exception output...

-- 
--- Heiko.



More information about the Python-list mailing list