def __init__(self, key, values=None, _tag=None): """ The tag can be initialized with an optional list of values which expected type depends on the IPTC type of the tag. :param key: the key of the tag :type key: string :param values: the values of the tag """ super(IptcTag, self).__init__() if _tag is not None: self._tag = _tag else: self._tag = libexiv2python._IptcTag(key) self._raw_values = None self._values = None self._values_cookie = False if values is not None: self._set_values(values)
def __setstate__(self, state): key, raw_value = state self._tag = libexiv2python._IptcTag(key) self.raw_value = raw_value