def post(self):
    kind = self.request.get('kind')

    keys = []
    index = 0
    num_keys = int(self.request.get('numkeys'))
    for i in xrange(1, num_keys+1):
      key = self.request.get('key%d' % i)
      if key:
        keys.append(key)

    if self.request.get('action') == 'Delete':
      num_deleted = 0
      for key in keys:
        datastore.Delete(datastore.Key(key))
        num_deleted = num_deleted + 1
      message = '%d entit%s deleted.' % (
        num_deleted, ('ies', 'y')[num_deleted == 1])
      self.redirect(
        (self.request.get('next'), urllib.quote_plus(message)) % '%s&msg=%s')
      return

    self.error(404)
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/admin/__init__.py/DatastoreBatchEditHandler.post/swapped operands of `%`