getattr

getattr(object, name[, default])

Fetches a named attribute.

Returns the value of the named attribute of object. name must be a string. If the string is the name of one of the object’s attributes, the result is the value of that attribute. For example, getattr(x, 'foobar') is equivalent to x.foobar. If the named attribute does not exist, default is returned if provided, otherwise AttributeError is raised.

 

A Django site. this page was rendered by a django application in 0.01s 2008-10-13 00:49:22.867962. hosted by webfaction.