Пример #1
0
    def remove(self, value) -> None:
        """
        Remove the first item from the LDAPValueList whose value is `value`.

        :param value: the item to be removed.
        :raises ValueError: if `value` is not int the list.
        """
        contain, obj = bonsai._unique_contains(self, value)
        if not contain:
            raise ValueError("%r is not in the list." % value)
        super().remove(obj)
        self.__status = 1
        self.__balance(self.__added, self.__deleted, obj)
Пример #2
0
    def remove(self, value):
        """
        Remove the first item from the LDAPValueList whose value is `value`.

        :param value: the item to be removed.
        :raises ValueError: if `value` is not int the list.
        """
        contain, obj = bonsai._unique_contains(self, value)
        if not contain:
            raise ValueError("%r is not in the list." % value)
        super().remove(obj)
        self.__status = 1
        self.__balance(self.__added, self.__deleted, obj)
Пример #3
0
 def __contains__(self, item) -> bool:
     return bonsai._unique_contains(self, item)[0]
Пример #4
0
 def __contains__(self, item):
     return bonsai._unique_contains(self, item)[0]