def delete_attachment(self, doc, attachment_name, datastore_name=""):
        if not isinstance(attachment_name, str):
            raise BadRequest("attachment_name is not a string")

        if isinstance(doc, str):
            doc = self.read_doc(doc_id=doc, datastore_name=datastore_name)

        ds, datastore_name = self._get_datastore(datastore_name)

        log.debug('Delete attachment %s of document %s', attachment_name, doc["_id"])
        ds.delete_attachment(doc, attachment_name)
        self._count(delete_attachment=1)


    # -------------------------------------------------------------------------
    # View operations
List the subtree rooted at this entry, including this
dataset/ETHPy150Open ooici/pyon/pyon/datastore/couchdb/base_store.py/CouchDataStore.delete_attachment--crossover with--dataset/ETHPy150Open twisted/ldaptor/ldaptor/interfaces.py/IConnectedLDAPEntry.subtree