int('blah') is not a type error because the int() function is expecting to be given a string, and it was given a string. The 'blah' is of the correct type. The problem is that int() couldn't do anything useful with the value of that string.
Steve On 12-Jun-2013, at 14:41, Jim Mooney <cybervigila...@gmail.com> wrote: > Dave Angel <da...@davea.name> > > import math > print math.sqrt(-1) > > Ah, that's what I was looking for. I already saw it trip on type mismatches > like int('blah'). I was looking for what would be an actual inappropriate > value that was still the right type. Although I'm not sure why int('blah') > wouldn't be a type error rather than a value error. > > Jim > > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor