{ } Raw JSON

bundles / traitlets 5.15.0 / traitlets / traitlets / getmembers

function

traitlets.traitlets:getmembers

source: /traitlets/traitlets.py :241

Signature

def   getmembers ( object : t.Any predicate : t.Any = None )  →  list[tuple[str, t.Any]]

Summary

A safe version of inspect.getmembers that handles missing attributes.

Extended Summary

This is useful when there are descriptor based attributes that for some reason raise AttributeError even though they exist. This happens in zope.interface with the __provides__ attribute.

Aliases

  • traitlets.traitlets.getmembers