def implements(obj, *interfaces):
    """Returns 1 if obj implements *all* interfaces, 0 otherwise."""
    for interface in interfaces:
        if not interface.implements(obj):
            return 0
    return 1
Returns 1 if obj implements *all* interfaces, 0 otherwise.
recipes/Python/164901_Simplified_Interface_Framework/recipe-164901.py