I've not tested on my side, but shouldn't this line be

> if not get_flag_from_argv(arg):

same as in the case of `if`? Sorry If I'm wrong.