March 2003
Intermediate to advanced
656 pages
39h 30m
English
getattr
getattr(obj,name[,default])
Returns obj’s attribute
named by string name.
getattr(
obj
,'ident')
is like
obj.ident.
When default is present and
name is not found in
obj, getattr returns
default instead of raising
AttributeError. See also Section 5.1.4.