def __setattr__(self, item, value):

        if item in [ 'schedule', 'replica_flags', 'transport_guid',
                     'source_dsa_obj_guid', 'source_dsa_invocation_id',
                     'consecutive_sync_failures', 'last_success',
                     'last_attempt' ]:

            if item in ['replica_flags']:
                self.__dict__['update_flags'] |= drsuapi.DRSUAPI_DRS_UPDATE_FLAGS
            elif item in ['schedule']:
                self.__dict__['update_flags'] |= drsuapi.DRSUAPI_DRS_UPDATE_SCHEDULE

            setattr(self.__dict__['ndr_blob'].ctr, item, value)

        elif item in ['dns_name1']:
            self.__dict__['dns_name1'] = value

            if self.__dict__['ndr_blob'].version == 0x1:
                self.__dict__['ndr_blob'].ctr.other_info.dns_name = \
                    self.__dict__['dns_name1']
            else:
                self.__dict__['ndr_blob'].ctr.other_info.dns_name1 = \
                    self.__dict__['dns_name1']

        elif item in ['dns_name2']:
            self.__dict__['dns_name2'] = value

            if self.__dict__['ndr_blob'].version == 0x1:
                raise AttributeError(item)
            else:
                self.__dict__['ndr_blob'].ctr.other_info.dns_name2 = \
                    self.__dict__['dns_name2']

        elif ['nc_dnstr'] in item:
            self.__dict__['nc_dnstr'] = value

        elif item in ['to_be_deleted']:
            self.__dict__['to_be_deleted'] = value

        elif item in ['version']:
            raise AttributeError, "Attempt to set readonly attribute %s" % item
        else:
            raise AttributeError, "Unknown attribute %s" % item

        self.__dict__['update_flags'] |= drsuapi.DRSUAPI_DRS_UPDATE_ADDRESS
dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/kcc_utils.py/RepsFromTo.__setattr__/swapped operands of `in`