def instance_contains ( container , item ) : return item in ( member for _ , member in inspect . getmembers ( container ) )
python contains logicl test
Search into instance attributes properties and return values of no - args methods .
def instance_contains(container, item):
    """Search into instance attributes, properties and return values of no-args methods."""
    return item in (member for _, member in inspect.getmembers(container))