 |
 |
 |
 |
 |
 |
 |
 |
>>> dir(an_object)
|
|
|
Return a
list of attributes of an_obj
|
|
|
>>> hasattr(an_object, name)
|
|
|
Return 1
if name is an attribute of an_object.
|
|
|
>>> getattr(an_obj, name)
|
|
|
Get the
value for the attribute name
|
|
|
>>> getattr(a_list, ‘sort’)()
|
|
is the dynamic
version of
|
|
|
>>> a_list.sort()
|
|