Return a :class:`~pyasn1.type.tag.TagSet` object of the currently initialized component or self (if |ASN.1| is tagged).
330691
def effectiveTagSet(self):
        """"""
        if self.tagSet:
            return self.tagSet
        else:
            component = self.getComponent()
            return component.effectiveTagSet
154148
def v1_tag_associations(tags, tag):
    '''
    '''
    tag = tag.decode('utf-8').strip()
    return {'associations': tags.assocs_by_tag(tag)}
276555
def tag(self, tags):
        
        # Get tag list and add/remove given tags
        tags = tags.lower()
        previous = self.tagged
        tagset = previous.copy()
        for tag in tags.replace(',', ' ').split():
            if tag.startswith('-'):
                tagset.discard(tag[1:])
            elif tag.startswith('+'):
                tagset.add(tag[1:])
            else:
                tagset.add(tag)

        # Write back new tagset, if changed
        tagset.discard('')
        if tagset != previous:
            tagset = ' '.join(sorted(tagset))
            self._make_it_so("setting tags %r on" % (tagset,), ["custom.set"], "tags", tagset)
            self._fields["custom_tags"] = tagset
932365
def tag2id(self, xs):
        
        if isinstance(xs, list):
            return [self._tag2id.get(x, self.UNK) for x in xs]
        return self._tag2id.get(xs, self.UNK)
71987
public Set<String> getTags() {
    Set<String> tags = new HashSet<String>(classIndex.objectsList());
    tags.remove(flags.backgroundSymbol);
    return tags;
  }
885219
def tag(self):
        
        name_or_id = self.task.tag
        if name_or_id is None:
            return defer.succeed(None)
        if isinstance(name_or_id, StringType):
            return defer.succeed(name_or_id)
        if isinstance(name_or_id, int):
            return self.task.connection.cache.tag_name(name_or_id)
        return defer.fail()
451782
def tags(self):
        
        if 'tags' in self._values:
            return self._values['tags']
        self._values['tags'] = copy.deepcopy(self._defaults['tags'])
        return self._values['tags']
1094918
function isA(elt, set) {
  if (typeof set === 'string') {
    // convenience case for testing a particular HTML element
    return elt.namespaceURI === NAMESPACE.HTML &&
      elt.localName === set;
  }
  var tagnames = set[elt.namespaceURI];
  return tagnames && tagnames[elt.localName];
}
1092619
def Tag(self, key, value):
        
        if not self._tags:
            self._tags = {}
        self._tags[key] = value
580235
public Tag get(int theIndex) {
		if (myOrderedTags == null) {
			myOrderedTags = new ArrayList<Tag>();
			for (Tag next : myTagSet) {
				myOrderedTags.add(next);
			}
		}
		return myOrderedTags.get(theIndex);
	}
893502
def get_tagged_version(self):
		
		tags = list(self.get_tags())
		if 'tip' in tags and not self.is_modified():
			tags = self.get_parent_tags('tip')
		versions = self.__versions_from_tags(tags)
		return self.__best_version(versions)
304922
def _get_init_release_tag(self):
        
        self.init_version = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                                      open(self.init_file, "r").read(),
                                      re.M).group(1)
13038
def instantiate_tags(tag_classes)
      tag_classes.each do |cls|
        tag = cls.new()

        Array(tag.pattern).each do |pattern|
          @patterns[pattern] = tag
        end

        if tag.tagname
          @tagnames[tag.tagname] = tag
        end

        if tag.signature
          tag.signature[:tagname] = tag.tagname
          @signatures << tag.signature
        end

        @tags << tag
      end
    end
304639
def tag(self, *tags):
        
        if any([not isinstance(tag, collections.Hashable) for tag in tags]):
            raise TypeError('Every tag should be hashable')

        if not all(isinstance(tag, collections.Hashable) for tag in tags):
            raise TypeError('Tags must be hashable')
        self.tags.update(tags)
        return self
730590
def tag_stuff(self):
        """"""

        # For each packet in the pcap process the contents
        for item in self.input_stream:

            # Make sure it has a tags field (which is a set)
            if 'tags' not in item:
                item['tags'] = set()

            # For each tag_methods run it on the item
            for tag_method in self.tag_methods:
                item['tags'].add(tag_method(item))

            # Not interested in None tags
            if None in item['tags']:
                item['tags'].remove(None)
            # All done
            yield item
773114
def _taglist(self, other_model=None, queryset=None):
        
        from taggit.models import TaggedItem
        filter = None
        if queryset is not None:
            filter = set()
            for item in queryset.all():
                filter.update(item.tags.all())
            filter = set([tag.id for tag in filter])
        elif other_model is not None:
            filter = set(TaggedItem.objects.filter(
                content_type__model=other_model.__name__.lower()
            ).values_list('tag_id', flat=True))
        tags = set(TaggedItem.objects.filter(
            content_type__model=self.model.__name__.lower()
        ).values_list('tag_id', flat=True))
        if filter is not None:
            tags = tags.intersection(filter)
        return list(tags)
970910
protected TagView getInputTag() {
        if (isAppendMode) {
            final int inputTagIndex = getChildCount() - 1;
            final TagView inputTag = getTagAt(inputTagIndex);
            if (inputTag != null && inputTag.mState == TagView.STATE_INPUT) {
                return inputTag;
            } else {
                return null;
            }
        } else {
            return null;
        }
    }