def batchPutAttributes(self, domain, attributes_by_item_name, 
            replace_by_item_name=None):
        """
        Batch put attributes into domain.
       
        **Arguments:**
         * *domain* -- Domain name
         * *attributes_by_item_name* -- Dictionary of dictionaries. First 
           level keys are the item name, value is dictionary of key/value 
           pairs. Example: ``{"item_name":{"attribute_name":"value"}}``
         
         **Keyword arguments:**
         * *replace_by_item_name* -- Dictionary of lists. First level keys
           are the item names, value is a list of of attributes that should
           be overwritten. ``{"item_name":["attribute_name"]}`` (Default 
           empty dictionary)
        """   
        if replace_by_item_name is None:
            replace_by_item_name = {}
        if len(attributes_by_item_name) > 25:
            raise Exception("Too many items in batchPutAttributes. Up to 25 items per call allowed.")
        for item_name in replace_by_item_name:            
            if not isinstance(replace_by_item_name[item_name], list):
                raise Exception("Replace argument '%s' must be a list." % item_name)
        for item_name in attributes_by_item_name:
            if not isinstance(attributes_by_item_name[item_name], dict):
                raise Exception("Attributes argument '%s' must be a dictionary." % item_name)
        parameters = {}
        parameters["Action"] = "BatchPutAttributes"
        parameters["DomainName"] = domain
        i = 0
        for item_name in attributes_by_item_name:
            parameters["Item.%s.ItemName" % i] = item_name
            attributes_list = []
            for attribute in attributes_by_item_name[item_name].items():
                # If the attribute is a list, split into multiple attributes.
                if isinstance(attribute[1], list):
                    for value in attribute[1]:
                        attributes_list.append((attribute[0], value))
                else:
                    attributes_list.append(attribute)
            j = 0
            for attribute in attributes_list:
                parameters["Item.%s.Attribute.%s.Name" % (i,j)] = attribute[0]
                parameters["Item.%s.Attribute.%s.Value" % (i,j)] = attribute[1]
                if item_name in replace_by_item_name:
                    if replace_by_item_name[item_name] in attribute[0]:
                        parameters["Item.%s.Attribute.%s.Replace" % (i,j)] = "true"
                j += 1
            i += 1
        d = self._request(parameters)
        d.addCallback(
            self._batchPutAttributesCallback, 
            domain, 
            attributes_by_item_name)
        d.addErrback(self._genericErrback)
        return d
dataset/ETHPy150Open wehriam/awspider/awspider/aws/sdb.py/AmazonSDB.batchPutAttributes/swapped operands of `in`