Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(33)  |  Call(33)  |  Derive(0)  |  Import(0)

src/z/o/zope.index-4.0.1/src/zope/index/text/baseindex.py   zope.index(Download)
        self._docwords[docid] = widcode.encode(wids)
        try:
            self.documentCount.change(1)
        except AttributeError:
            # upgrade documentCount to Length object
        del self._docweight[docid]
        try:
            self.documentCount.change(-1)
        except AttributeError:
            # upgrade documentCount to Length object
            doc2score = {} # XXX Holy ConflictError, Batman!
            try:
                self.wordCount.change(1)
            except AttributeError:
                # upgrade wordCount to Length object
                self.wordCount = Length.Length(len(self._wordinfo))
                self.wordCount.change(1)
            self._wordinfo[wid] = doc2score # not redundant:  Persistency!
        try:
            self.wordCount.change(new_word_count)
        except AttributeError:
            # upgrade wordCount to Length object

src/h/y/hypatia-0.1/hypatia/text/baseindex.py   hypatia(Download)
        self._docwords[docid] = widcode.encode(wids)
        try:
            self.indexed_count.change(1)
        except AttributeError:
            # upgrade indexed_count to Length object
        del self._docweight[docid]
        try:
            self.indexed_count.change(-1)
        except AttributeError:
            # upgrade indexed_count to Length object
            doc2score = {} # XXX Holy ConflictError, Batman!
            try:
                self.word_count.change(1)
            except AttributeError:
                # upgrade word_count to Length object
                self.word_count = Length.Length(len(self._wordinfo))
                self.word_count.change(1)
            self._wordinfo[wid] = doc2score # not redundant:  Persistency!
        try:
            self.word_count.change(new_word_count)
        except AttributeError:
            # upgrade word_count to Length object

src/h/y/hypatia-HEAD/hypatia/text/baseindex.py   hypatia(Download)
        self._docwords[docid] = widcode.encode(wids)
        try:
            self.indexed_count.change(1)
        except AttributeError:
            # upgrade indexed_count to Length object
        del self._docweight[docid]
        try:
            self.indexed_count.change(-1)
        except AttributeError:
            # upgrade indexed_count to Length object
            doc2score = {} # XXX Holy ConflictError, Batman!
            try:
                self.word_count.change(1)
            except AttributeError:
                # upgrade word_count to Length object
                self.word_count = Length.Length(len(self._wordinfo))
                self.word_count.change(1)
            self._wordinfo[wid] = doc2score # not redundant:  Persistency!
        try:
            self.word_count.change(new_word_count)
        except AttributeError:
            # upgrade word_count to Length object

src/p/r/Products.CacheSetup-1.2.1/Products/CacheSetup/content/cache_tool.py   Products.CacheSetup(Download)
        if self._catalog_count is None:
            self._catalog_count = Length.Length()
        self._catalog_count.change(1)
        self.updateChangeDate()
 
        if self._permission_count is None:
            self._permission_count = Length.Length()
        self._permission_count.change(1)
        self.updateChangeDate()
 

src/z/o/zope.index-4.0.1/src/zope/index/text/okapiindex.py   zope.index(Download)
    def _change_doc_len(self, delta):
        # Change total doc length used for scoring
        delta = int(delta)
        try:
            self._totaldoclen.change(delta)

src/h/y/hypatia-0.1/hypatia/text/okapiindex.py   hypatia(Download)
    def _change_doc_len(self, delta):
        # Change total doc length used for scoring
        delta = int(delta)
        try:
            self._totaldoclen.change(delta)

src/p/r/Products.ZCTextIndex-2.13.5/src/Products/ZCTextIndex/BaseIndex.py   Products.ZCTextIndex(Download)
        self._docwords[docid] = WidCode.encode(wids)
        try:
            self.document_count.change(1)
        except AttributeError:
            # Upgrade document_count to Length object
        del self._docweight[docid]
        try:
            self.document_count.change(-1)
        except AttributeError:
            # Upgrade document_count to Length object

src/h/y/hypatia-HEAD/hypatia/text/okapiindex.py   hypatia(Download)
    def _change_doc_len(self, delta):
        # Change total doc length used for scoring
        delta = int(delta)
        try:
            self._totaldoclen.change(delta)

src/r/e/repoze.folder-0.6.3/repoze/folder/__init__.py   repoze.folder(Download)
 
        self.data[name] = other
        self._num_objects.change(1)
 
        if self._order is not None:
 
        del self.data[name]
        self._num_objects.change(-1)
 
        if self._order is not None:

src/p/r/Products.ZCTextIndex-2.13.5/src/Products/ZCTextIndex/OkapiIndex.py   Products.ZCTextIndex(Download)
            return
        try:
            self._totaldoclen.change(delta)
        except AttributeError:
            # Opportunistically upgrade _totaldoclen attribute to Length object

  1 | 2  Next