def main(argv):

  # Initialize parser #
  parser = argparse.ArgumentParser()

  # Add options #
  parser.add_argument('-A', dest='A_num', action='store', type=int,
    help='Prints traliing lines for each match')
  parser.add_argument('-B', dest='B_num', action='store', type=int,
    help='Prints leading lines for each match')
  parser.add_argument('-i', action='store_true',
    help='Makes pattern case insensitive')

  parser.add_argument('files', nargs=argparse.REMAINDER)

  argv = parser.parse_args()

  argv.A = False
  argv.B = False
  if argv.A_num:
    argv.A = True
  if argv.B_num:
    argv.B = True

  if 2 < len(argv.files):
    parser.print_help()
    return

  argv.pattern = argv.files[0]
  argv.files = argv.files[1:]

  _grep(args=argv)
dataset/ETHPy150Open vhpanisa/pythonix/bin/phase3/grep.py/main/swapped operands of `<`