Package logilab :: Package common :: Module registry :: Class MultiPredicate

[frames] | no frames]

# Class MultiPredicate

source code

    object --+
             |
     Predicate --+
                 |
                MultiPredicate

    base class for compound selector classes

Instance Methods

__init__(self, *selectors) x.__init__(...) initializes x; see help(type(x)) for signature | source code

__str__(self) str(x) | source code

search_selector(self, selector) search for the given selector or selector instance (or tuple of selectors) in the selectors tree. | source code

Inherited from `Predicate`: `__and__`, `__call__`, `__iand__`, `__invert__`, `__ior__`, `__or__`, `__rand__`, `__repr__`, `__ror__`, `func_name` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Methods

merge_selectors(cls, selectors) deal with selector instanciation when necessary and merge multi-selectors if possible: | source code

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, *selectors)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
  (inherited documentation)

### __str__(self)
(Informal representation operator)

source code

str(x)

Overrides: object.__str__
  (inherited documentation)

### merge_selectors(cls, selectors)
Class Method

source code

    deal with selector instanciation when necessary and merge
    multi-selectors if possible:

    AndPredicate(AndPredicate(sel1, sel2), AndPredicate(sel3, sel4))
    ==> AndPredicate(sel1, sel2, sel3, sel4)

### search_selector(self, selector)

source code

    search for the given selector or selector instance (or tuple of
    selectors) in the selectors tree. Return None if not found

Overrides: Predicate.search_selector