Read only name tag
439826
def name(self):
        
        name = super(Interface, self).name
        return name if name else self.data.get('name')
761495
def lookup_tag(name):
    """"""
    return next((_TAGS[t] for t in _TAGS if t == name),
                DmapTag(_read_unknown, 'unknown tag'))
1300047
def getNamedItem(self, name: str) -> Optional[Attr]:
        
        return self._dict.get(name, None)
624657
function( node, tagNames, onlyOfType ){
			var i = node.children.length,
				countAll = 0,
				countOfType = 0,
				child,
				out = null;

			while(i--) {
				child = node.children[i];
				if(child.nodeType === 1) {
					if(tagNames){
						// count just only-of-type
						if(this.hasTagName(child, tagNames)){
							out = child;
							countOfType++;
						}
					}else{
						// count all elements
						out = child;
						countAll++;
					}
				}
			}
			if(onlyOfType === true){
				return (countOfType === 1)? out : null;
			}else{
				return (countAll === 1)? out : null;
			}
		}
931185
def readInstanceTag(instanceID, tagName="Name", connection=None):
  
  assert isinstance(instanceID, basestring), ("instanceID must be a string but is %r" % instanceID)
  assert isinstance(tagName, basestring), ("tagName must be a string but is %r" % tagName)

  if not connection:
    # Assume AWS credentials are in the environment or the instance is using an IAM role
    connection = boto.ec2.connect_to_region(myRegion())

  # Filter the tag values for our instance_id
  # http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-DescribeTags.html
  tagData = connection.get_all_tags(filters={"resource-id": instanceID, "key": tagName})
  if tagData:
    tagValue = tagData[0].value
  else:
    raise RuntimeError, "%s: No such tag on %s" % (tagName, instanceID)
  return tagValue
778490
private Tag readTag(int depth) throws IOException {
        int typeId = is.readByte() & 0xFF;
        TagType type = TagType.getById(typeId);

        String name;
        if (type != TagType.TAG_END) {
            int nameLength = is.readShort() & 0xFFFF;
            byte[] nameBytes = new byte[nameLength];
            is.readFully(nameBytes);
            name = new String(nameBytes, NBTConstants.CHARSET.name());
        } else {
            name = "";
        }

        return readTagPayload(type, name, depth);
    }
102109
def GetNSAndWsdlname(self, tag):
      
      idx = tag.find(":")
      if idx >= 0:
         prefix, name = tag[:idx], tag[idx + 1:]
      else:
         prefix, name = None, tag
      # Map prefix to ns
      ns = self._GetNamespaceFromPrefix(prefix)
      return ns, name
1140960
def get_link_name (self, tag, attrs, attr):
        """"""
        if tag == 'a' and attr == 'href':
            # Look for name only up to MAX_NAMELEN characters
            data = self.parser.peek(MAX_NAMELEN)
            data = data.decode(self.parser.encoding, "ignore")
            name = linkname.href_name(data)
            if not name:
                name = attrs.get_true('title', u'')
        elif tag == 'img':
            name = attrs.get_true('alt', u'')
            if not name:
                name = attrs.get_true('title', u'')
        else:
            name = u""
        return name
340014
def _parse_tag(self, name):
        """"""
        from_ = self._get_from(b'tag')
        tagger = self._get_user_info(b'tag', b'tagger',
                accept_just_who=True)
        message = self._get_data(b'tag', b'message')
        return commands.TagCommand(name, from_, tagger, message)
221779
def read_name(self, start: int, line: int, col: int, prev: Token) -> Token:
        """"""
        body = self.source.body
        body_length = len(body)
        position = start + 1
        while position < body_length:
            char = body[position]
            if not (
                char == "_"
                or "0" <= char <= "9"
                or "A" <= char <= "Z"
                or "a" <= char <= "z"
            ):
                break
            position += 1
        return Token(
            TokenKind.NAME, start, position, line, col, prev, body[start:position]
        )
612902
def read(self, name, pwd=None):
        """"""
        with self.open(name, "r", pwd) as fp:
            return fp.read()
74282
def _parseTagName(self):
        
        for el in self._element.split():
            el = el.replace("/", "").replace("<", "").replace(">", "")

            if el.strip():
                self._tagname = el.rstrip()
                return
73575
private String getNamedTagText(final Element element, final String tagName) {
		Element foundElement = XmlElementUtil.getFirstElementByTagName(element, tagName);
		if (foundElement == null) {
			return "";
		} else {
			return foundElement.getTextContent();
		}
	}
987813
def visit_Name(self, node: ast.Name) -> Any:
        """"""
        if not isinstance(node.ctx, ast.Load):
            raise NotImplementedError("Can only compute a value of Load on a name {}, but got context: {}".format(
                node.id, node.ctx))

        result = None  # type: Optional[Any]

        if node.id in self._name_to_value:
            result = self._name_to_value[node.id]

        if result is None and hasattr(builtins, node.id):
            result = getattr(builtins, node.id)

        if result is None and node.id != "None":
            # The variable refers to a name local of the lambda (e.g., a target in the generator expression).
            # Since we evaluate generator expressions with runtime compilation, None is returned here as a placeholder.
            return PLACEHOLDER

        self.recomputed_values[node] = result
        return result
1158031
def namedb_get_name(cur, name, current_block, include_expired=False, include_history=True, only_registered=True):
    

    if not include_expired:

        unexpired_fragment, unexpired_args = namedb_select_where_unexpired_names(current_block, only_registered=only_registered)
        select_query = "SELECT name_records.* FROM name_records JOIN namespaces ON name_records.namespace_id = namespaces.namespace_id " + \
                       "WHERE name = ? AND " + unexpired_fragment + ";"
        args = (name, ) + unexpired_args

    else:
        select_query = "SELECT * FROM name_records WHERE name = ?;"
        args = (name,)

    # log.debug(namedb_format_query(select_query, args))

    name_rows = namedb_query_execute( cur, select_query, args )
    name_row = name_rows.fetchone()
    if name_row is None:
        # no such name
        return None 

    name_rec = {}
    name_rec.update( name_row )
    
    if include_history:
        name_history = namedb_get_history( cur, name )
        name_rec['history'] = name_history

    return name_rec
1188144
def get_tag(self, name, params=None):
        
        return self.tag(name, action='GET', params=params)
253950
def get_name(self, name):
        """"""
        if name not in self.get_names():
            raise exceptions.NameNotFoundError('name %s not found' % name)
        return self.get_names()[name]