mtabinijperrasramsey I see. Like:
try:
valid = int(input_string)
except ValueError:
# handle error …
pass
else:
send_to_mainframe(input_string)
Makes sense in that context. Ways around it, of course, but agreed that’s a trap.
Indeed not sure how I feel about it working in the cast. (-: