def st_delete(parser, args, output_manager):
    parser.add_argument(
        '-a', '--all', action='store_true', dest='yes_all',
        default=False, help='Delete all containers and objects.')
    parser.add_argument(
        '-p', '--prefix', dest='prefix',
        help='Only delete items beginning with the <prefix>.')
    parser.add_argument(
        '--leave-segments', action='store_true',
        dest='leave_segments', default=False,
        help='Do not delete segments of manifest objects.')
    parser.add_argument(
        '--object-threads', type=int,
        default=10, help='Number of threads to use for deleting objects. '
        'Its value must be a positive integer. Default is 10.')
    parser.add_argument(
        '--container-threads', type=int,
        default=10, help='Number of threads to use for deleting containers. '
        'Its value must be a positive integer. Default is 10.')
    (options, args) = parse_args(parser, args)
    args = args[1:]
    if (not args and not options.yes_all) or (args and options.yes_all):
        output_manager.error('Usage: %s delete %s\n%s',
                             BASENAME, st_delete_options,
                             st_delete_help)
        return

    if options.object_threads <= 0:
        output_manager.error(
            'ERROR: option --object-threads should be a positive integer.'
            '\n\nUsage: %s delete %s\n%s',
            BASENAME, st_delete_options,
            st_delete_help)
        return

    if options.container_threads <= 0:
        output_manager.error(
            'ERROR: option --container-threads should be a positive integer.'
            '\n\nUsage: %s delete %s\n%s',
            BASENAME, st_delete_options,
            st_delete_help)
        return

    _opts = vars(options)
    _opts['object_dd_threads'] = options.object_threads
    with SwiftService(options=_opts) as swift:
        try:
            if not args:
                del_iter = swift.delete()
            else:
                container = args[0]
                if container in '/':
                    output_manager.error(
                        'WARNING: / in container name; you '
                        "might have meant '%s' instead of '%s'." %
                        (container.replace('/', ' ', 1), container)
                    )
                    return
                objects = args[1:]
                if objects:
                    del_iter = swift.delete(container=container,
                                            objects=objects)
                else:
                    del_iter = swift.delete(container=container)

            for r in del_iter:
                c = r.get('container', '')
                o = r.get('object', '')
                a = r.get('attempts')

                if r['action'] == 'bulk_delete':
                    if r['success']:
                        objs = r.get('objects', [])
                        for o, err in r.get('result', {}).get('Errors', []):
                            # o will be of the form quote("/<cont>/<obj>")
                            o = unquote(o)
                            if PY2:
                                # In PY3, unquote(unicode) uses utf-8 like we
                                # want, but PY2 uses latin-1
                                o = o.encode('latin-1').decode('utf-8')
                            output_manager.error('Error Deleting: {0}: {1}'
                                                 .format(o[1:], err))
                            try:
                                objs.remove(o[len(c) + 2:])
                            except ValueError:
                                # shouldn't happen, but ignoring it won't hurt
                                pass

                        for o in objs:
                            if options.yes_all:
                                p = '{0}/{1}'.format(c, o)
                            else:
                                p = o
                            output_manager.print_msg('{0}{1}'.format(p, a))
                    else:
                        for o in r.get('objects', []):
                            output_manager.error('Error Deleting: {0}/{1}: {2}'
                                                 .format(c, o, r['error']))
                else:
                    if r['success']:
                        if options.verbose:
                            a = (' [after {0} attempts]'.format(a)
                                 if a > 1 else '')

                            if r['action'] == 'delete_object':
                                if options.yes_all:
                                    p = '{0}/{1}'.format(c, o)
                                else:
                                    p = o
                            elif r['action'] == 'delete_segment':
                                p = '{0}/{1}'.format(c, o)
                            elif r['action'] == 'delete_container':
                                p = c

                            output_manager.print_msg('{0}{1}'.format(p, a))
                    else:
                        p = '{0}/{1}'.format(c, o) if o else c
                        output_manager.error('Error Deleting: {0}: {1}'
                                             .format(p, r['error']))
        except SwiftError as err:
            output_manager.error(err.value)
dataset/ETHPy150Open openstack/python-swiftclient/swiftclient/shell.py/st_delete/swapped operands of `in`