def docopt(doc, argv=sys.argv[1:], help=True, version=None):
    DocoptExit.usage = docopt.usage = usage = printable_usage(doc)
    pot_options = parse_doc_options(doc)
    formal_pattern = parse_pattern(formal_usage(usage), options=pot_options)
    argv = parse_args(argv, options=pot_options)
    extras(help, version, argv, doc)
    matched, left, arguments = formal_pattern.fix().match(argv)
    if matched and left == []:  # better message if left?
        options = [o for o in argv if type(o) is Option]
        pot_arguments = [a for a in formal_pattern.flat
                         if [Argument, Command] in type(a)]
        return Dict((a.name, a.value) for a in
                    (pot_options + options + pot_arguments + arguments))
    raise DocoptExit()
dataset/ETHPy150Open kmike/port-for/port_for/docopt.py/docopt/swapped operands of `in`