CSSE1001 / MyPyTutor

Interactive tutorial application for Python3.
Other
7 stars 12 forks source link

string_digits problem #80

Closed pjritee closed 9 years ago

pjritee commented 9 years ago

If I leave out the return I get

----------------------------------------
None is not an instance of <class 'str'>
----------------------------------------

that could be fixed in this case by checking for a return but lets say the student wrote

return int(result)

then it would be

42 is not an instance of <class 'str'>

Could we do better?

sapi commented 9 years ago

The name of that test is 'get_digits returns a string'

I think in that context, the error message is sufficiently descriptive.

jgat commented 9 years ago

+1. There's also the obvious learning benefit of having students familiarise themselves with trying to read slightly-unusual error messages.