[Tutor] Value Error
Roel Schroeven
roel at roelschroeven.net
Wed Jun 12 23:49:50 CEST 2013
Jim Mooney schreef:
> Although I'm not sure why int('blah') wouldn't be a type error rather
> than a value error.
Because passing a string to int() is perfectly okay, as long as the
string has an appropriate value: int('42') works, int('forty two')
raises ValueError.
--
"People almost invariably arrive at their beliefs not on the basis of
proof but on the basis of what they find attractive."
-- Pascal Blaise
roel at roelschroeven.net
More information about the Tutor
mailing list