March 2003
Intermediate to advanced
656 pages
39h 30m
English
getmembers
getmembers(obj,filter=None)
Returns all attributes (members) of obj, a
sorted list of
(
name,value
)
pairs. When filter is not
None, returns only attributes for which callable
filter returns a true result when called
on the attribute’s value,
like:
[ (n, v) for n, v in getmembers(obj) if filter(v) ]