def sort_arg(string):
    """converter appropriate for command line argument conversion"""
    forward = True
    if string.startswith('-'):
        forward = False
        string = string[1:]
    return int(string), forward
