Get an attribute of the holder (read-only access).
969338
def get(self, name, strict=True):
        """"""
        if not isinstance(name, str) or name.startswith('_'):
            raise AttributeError(self.__class__.__name__, name)
        elif strict and name not in self._possible_attributes:
            raise AttributeError('%s is not a valid attribute of %r.' %
                                 (name, self))
        elif name in self._attributes:
            return self._attributes[name]
        else:
            raise exceptions.AttributeNotProvided(name)
478663
public Integer get(String name) throws IOException {
        if (name.equalsIgnoreCase(SKIP_CERTS))
            return (new Integer(skipCerts));
        else
            throw new IOException("Attribute name not recognized by " +
                                  "CertAttrSet:InhibitAnyPolicy.");
    }
1255250
def getAttributeValue(self, namespaceURI, localName):
        '''
        
        '''
        if self.hasAttribute(namespaceURI, localName):
            attr = self.node.getAttributeNodeNS(namespaceURI,localName)
            return attr.value
        return None
1235431
public AuthorisationDecision getReadPriviledge() {

        return checkPriviledge(new Priviledge() {
            @Override
            public boolean isGranted(Constraints c) {

                boolean readable = c.isReadResource();
                if (!readable)
                    Log.info("read privilege denied for: " + c.getResourceAddress());
                return readable;
            }
        }, false);

    }
564734
def getAttributeNode(self, attr: str) -> Optional[Attr]:
        
        return self.attributes.getNamedItem(attr)
565433
def PopAttributeContainer(self):
    
    try:
      serialized_data = self._list.pop(0)
      self.data_size -= len(serialized_data)
      return serialized_data

    except IndexError:
      return None
1001575
@SuppressWarnings("resource")
	@Pure
	public int getAttributeCount() {
		try {
			final DBaseFileReader dbReader = getReader();
			synchronized (dbReader) {
				return dbReader.getDBFFieldCount();
			}
		} catch (IOException exception) {
			return 0;
		}
	}
993249
public Object getAttribute(String attrName) {
        Lock lock = lockForRead();
        try {
            return attributes != null ? attributes.get(attrName) : null;
        } finally {
            lock.unlock();
        }
    }
347740
def get_resource_attribute(self, attr):
        
        if attr not in self.resource_attributes:
            raise KeyError("%s is not in resource attributes" % attr)

        return self.resource_attributes[attr]
682341
def attribute_is_public(self, permission):
        
        try:
            parent = getattr(self, "parent_{}".format(permission))
            student = getattr(self, "self_{}".format(permission))
            return (parent and student)
        except Exception:
            logger.error("Could not retrieve permissions for {}".format(permission))
974381
public AccessControlList read(ObjectReader in) throws UnknownClassIdException, IOException
   {
      // read id
      int key;
      if ((key = in.readInt()) != SerializationConstants.ACCESS_CONTROL_LIST)
      {
         throw new UnknownClassIdException("There is unexpected class [" + key + "]");
      }

      // reading owner
      String owner;
      if (in.readByte() == SerializationConstants.NOT_NULL_DATA)
      {
         owner = in.readString();
      }
      else
      {
         owner = null;
      }

      List<AccessControlEntry> accessList = new ArrayList<AccessControlEntry>();
      // reading access control entrys size
      int listSize = in.readInt();
      for (int i = 0; i < listSize; i++)
      {
         // reading access control entrys identity
         String ident = in.readString();
         // reading permission
         String perm = in.readString();

         accessList.add(new AccessControlEntry(ident, perm));
      }

      return new AccessControlList(owner, accessList);
   }
847129
def GetValuesForAttribute(self, attribute, only_one=False):
    """"""
    if not only_one and self.age_policy == NEWEST_TIME:
      raise ValueError("Attempting to read all attribute versions for an "
                       "object opened for NEWEST_TIME. This is probably "
                       "not what you want.")

    if attribute is None:
      return []

    elif isinstance(attribute, string_types):
      attribute = Attribute.GetAttributeByName(attribute)

    return attribute.GetValues(self)
338518
def getattrdeep(obj, attr, *default):
    ''
    attrs = attr.split('.')
    if default:
        getattr_default = lambda o,a,d=default[0]: getattr(o, a, d)
    else:
        getattr_default = lambda o,a: getattr(o, a)

    for a in attrs[:-1]:
        obj = getattr_default(obj, a)

    return getattr_default(obj, attrs[-1])
1238500
def getAttribute(self, attr: str) -> _AttrValueType:
        
        if attr == 'class':
            if self.classList:
                return self.classList.toString()
            return None
        attr_node = self.getAttributeNode(attr)
        if attr_node is None:
            return None
        return attr_node.value
96652
def visit_Attribute(self, node: ast.Attribute) -> None:
        """"""
        if node in self._recomputed_values:
            value = self._recomputed_values[node]

            if _representable(value=value):
                text = self._atok.get_text(node)
                self.reprs[text] = value

        self.generic_visit(node=node)
482616
def get():
        """"""
        return {
            attr: getattr(Conf, attr)
            for attr in dir(Conf()) if not callable(getattr(Conf, attr)) and not attr.startswith("__")
        }
929141
def get(self, name):
        
        # read the attribute
        attr = getattr(self.context, name, None)
        if callable(attr):
            return attr()
        return attr