You can't use
someValue
in the
except
statement, because it would never be created if you enter the except block.
someValue
would contain the parsed integer, but if you can't do the parsing, the variable assignment will never happen. So "the variable gets deleted" is false, "the variable never gets created" would be a correct statement.
Try this instead:
user_input = input('> ')
try:
some_value = int(user_input)
except ValueError:
print(user_input)