(option, value)
Validate the type of method arguments that expect a document.
Validate the type of method arguments that expect a document.
Validate the type of method arguments that expect a document .
def validate_is_mapping(option, value):
    """Validate the type of method arguments that expect a document."""
    if not isinstance(value, collections.Mapping):
        raise TypeError("%s must be an instance of dict, bson.son.SON, or "
                        "other type that inherits from "
                        "collections.Mapping" % (option,))
def validate_is_mapping ( option , value ) : if not isinstance ( value , collections . Mapping ) : raise TypeError ( "%s must be an instance of dict, bson.son.SON, or " "other type that inherits from " "collections.Mapping" % ( option , ) )