def optmatch(pattern, match):
    """
    Easier argument specs than argparse

    >>> optmatch("l?ist|ls", "lis")
    True
    >>> optmatch("l?ist|ls", "ls")
    True
    >>> optmatch("l?ist|ls", "l")
    True
    >>> optmatch("l?ist|ls", "loo")
    False
    """
    match = str(match).lower().split('=', 1)[0]
    for variant in pattern.split('|'):
        req, opt = (variant + '?').split('?')[0:2]
        if req == match:
            return True
        for char in opt:
            req = req + char
            if req == match:
                return True
    return False
