Did I find the right examples for you? yes no

All Samples(40)  |  Call(21)  |  Derive(0)  |  Import(19)

src/p/r/Products.ZCTextIndex-2.13.5/src/Products/ZCTextIndex/QueryParser.py   Products.ZCTextIndex(Download)
            return L[0]
        else:
            return ParseTree.AndNode(L)
 
    def _parseNotExpr(self):
            if len(nodes) == 1:
                return nodes[0]
            tree = ParseTree.AndNode(nodes)
        return tree
 

src/p/r/Products.PloneGlossary-1.7/Products/PloneGlossary/patches.py   Products.PloneGlossary(Download)
from Products.PluginIndexes.common.util import parseIndexRequest
from Products.ZCTextIndex.QueryParser import QueryParser
from Products.ZCTextIndex.ParseTree import OrNode, AndNode, AtomNode
 
from Products.PloneGlossary.utils import LOG
            final_gloss_query = None
        elif term_count > 1:
            final_gloss_query = AndNode(final_gloss_query)
        else:
            final_gloss_query = final_gloss_query[0]
    elif len(nodes) > 1:
        if isinstance(tree, AtomNode):
            return AndNode(nodes)
        else:
            tree._value = nodes

src/p/r/Products.ZCTextIndex-2.13.5/src/Products/ZCTextIndex/tests/testQueryParser.py   Products.ZCTextIndex(Download)
    def compareParseTrees(self, got, expected, msg=None):
        from Products.ZCTextIndex.ParseTree import AndNode
        from Products.ZCTextIndex.ParseTree import AtomNode
        from Products.ZCTextIndex.ParseTree import GlobNode
        from Products.ZCTextIndex.ParseTree import NotNode
    def test003(self):
        from Products.ZCTextIndex.ParseTree import AndNode
        from Products.ZCTextIndex.ParseTree import AtomNode
        self.expect("aa and bb AND cc",
                    AndNode([AtomNode("aa"), AtomNode("bb"), AtomNode("cc")]))
    def test005(self):
        from Products.ZCTextIndex.ParseTree import AndNode
        from Products.ZCTextIndex.ParseTree import AtomNode
        from Products.ZCTextIndex.ParseTree import OrNode
        self.expect("aa AND bb OR cc AnD dd",
                    OrNode([AndNode([AtomNode("aa"), AtomNode("bb")]),

src/p/r/Products.ZCTextIndex-2.13.5/src/Products/ZCTextIndex/tests/testParseTree.py   Products.ZCTextIndex(Download)
    def test_AndNode_conforms_to_IQueryParseTree(self):
        from Products.ZCTextIndex.ParseTree import AndNode
        self._conforms(AndNode)
 
    def test_NotNode_conforms_to_IQueryParseTree(self):