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

All Samples(80)  |  Call(48)  |  Derive(0)  |  Import(32)
difference(o1, o2) -- compute the difference between o1 and o2

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/BooleanIndex/BooleanIndex.py   Products.ZCatalog(Download)
from App.special_dtml import DTMLFile
from BTrees.IIBTree import IIBTree, IITreeSet, IISet
from BTrees.IIBTree import union, intersection, difference
import BTrees.Length
from ZODB.POSException import ConflictError
                # Otherwise, remove from resultset or _unindex
                if resultset is None:
                    return (union(difference(self._unindex, index), IISet([])),
                            (self.id, ))
                else:
                    return (difference(resultset, index), (self.id, ))

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/common/UnIndex.py   Products.ZCatalog(Download)
import sys
 
from BTrees.IIBTree import difference
from BTrees.IIBTree import intersection
from BTrees.IIBTree import IITreeSet
                if not_parm:
                    exclude = self._apply_not(not_parm, resultset)
                    result = difference(result, exclude)
                return result, (self.id,)
 
                if not_parm:
                    exclude = self._apply_not(not_parm, resultset)
                    result = difference(result, exclude)
                return result, (self.id,)
 
        if not_parm:
            exclude = self._apply_not(not_parm, resultset)
            r = difference(r, exclude)
        return r, (self.id,)
 

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py   Products.ZCatalog(Download)
from App.special_dtml import DTMLFile
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import difference
from BTrees.IIBTree import intersection
from BTrees.IIBTree import multiunion
                                    (self._since_field, self._until_field))
                        else:
                            return (difference(resultset, cached),
                                    (self._since_field, self._until_field))
 
                cache[cachekey] = result
 
            return (difference(resultset, result),
                    (self._since_field, self._until_field))
 

src/p/r/Products.BooleanIndex-1.0.2/Products/BooleanIndex/BooleanIndex.py   Products.BooleanIndex(Download)
 
from BTrees.IIBTree import IIBTree, IITreeSet, IISet
from BTrees.IIBTree import union, intersection, difference
import BTrees.Length
 
                # Otherwise, remove from res or _unindex
                if res is None:
                    return union(difference(self._unindex, index), IISet([])), (self.id,)
                else:
                    return difference(res, index), (self.id,)

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/common/ResultList.py   Products.ZCatalog(Download)
##############################################################################
 
from BTrees.IIBTree import difference
from BTrees.IIBTree import IIBucket
from BTrees.IIBTree import weightedIntersection
    def and_not(self, x):
        return self.__class__(
            difference(self._dict, x._dict),
            self._words,
            self._index,

src/p/r/Products.AdvancedQuery-3.0.3/Products/AdvancedQuery/AdvancedQuery.py   Products.AdvancedQuery(Download)
 
from DateTime import DateTime
from BTrees.IIBTree import IISet, IITreeSet, \
     difference, union, multiunion, intersection
from BTrees.OOBTree import OOBTree
  def _eval(self,context):
    return difference(context._getObjectIds(),self._query._eval(context))
 
 
class _CompositeQuery(_BaseQuery):
    r = None
    for q in nsq: r = intersection(r, q._eval(context))
    for q in notsq: r = difference(r, q._query._eval(context))
    return r
 

src/d/e/dewey-0.3.0/src/dewey/indices.py   dewey(Download)
import persistent
from BTrees.IIBTree import IIBTree, IISet, IITreeSet
from BTrees.IIBTree import difference, intersection, multiunion
from BTrees.IOBTree import IOBTree
from BTrees.OIBTree import OIBTree
                if i not in self.levels:
                    break
                rids = difference(rids, self.levels[i])
        if lower is not None:
            lower += level

src/e/x/experimental.catalogqueryplan-3.2.8/experimental/catalogqueryplan/daterangeindex.py   experimental.catalogqueryplan(Download)
from BTrees.IIBTree import multiunion
from BTrees.IIBTree import intersection
from BTrees.IIBTree import difference
from DateTime.DateTime import DateTime
from Products.PluginIndexes.common.util import parseIndexRequest
                        return cached, (self._since_field, self._until_field)
                    else:
                        return (difference(res, cached),
                            (self._since_field, self._until_field))
 
        if REQUEST is not None and catalog is not None:
            cache[cachekey] = result
        return difference(res, result), (self._since_field, self._until_field)
 
 

src/p/r/Products.ZCTextIndex-2.13.5/src/Products/ZCTextIndex/BaseIndex.py   Products.ZCTextIndex(Download)
from BTrees.IIBTree import IIBTree
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import difference
from BTrees.IIBTree import intersection
from BTrees.Length import Length
 
        in_both_widset = intersection(old_widset, new_widset)
        only_old_widset = difference(old_widset, in_both_widset)
        only_new_widset = difference(new_widset, in_both_widset)
        del old_widset, new_widset

src/c/o/collective.recipe.zope2wsgi-0.1/collective/recipe/zope2wsgi/utilities/check_catalog.py   collective.recipe.zope2wsgi(Download)
import os,sys,re,getopt
from types import IntType
from BTrees.IIBTree import IISet,difference,intersection
 
def checkCatalog(path,indexes):
                    map(RIDS.insert , rids.keys())
 
            diff = difference(RIDS, IISet(_cat.data.keys()))
            if len(diff)!=0:
                print '\tERR: Problem with forward entries'
                map(RIDS.insert , rids.values()[0])
 
            diff = difference(RIDS, IISet(_cat.data.keys()))
            if len(diff)!=0:
                print '\tERR: Problem with forward entries'
            # check backward entries
            RIDS = IISet(idx._unindex.keys())
            diff = difference(RIDS, IISet(_cat.data.keys()))
            if len(diff)!=0:
                print '\tERR: Problem with backward entries'

  1 | 2 | 3  Next