[Tutor] checking for expected types from input file
alan.gauld at btinternet.com
Thu Jul 31 07:56:00 CEST 2008
"Bryan Fodness" <bryan.fodness at gmail.com> wrote
> I have many variables of different types, and I want to do a check
> case something like ReferencePositionX = abc occurs.
In Python its usual to tackle that using try/except.
If you get a TypeError then try type conversion.
The saying goes somethinng like:
"Its better to ask forgivness than permission"
More information about the Tutor