Package logilab :: Package common :: Module registry :: Class yes

[frames] | no frames]

# Class yes

source code

    object --+
             |
     Predicate --+
                 |
                yes

    Return the score given as parameter, with a default score of 0.5 so any
    other selector take precedence.

    Usually used for objects which can be selected whatever the context, or
    also sometimes to add arbitrary points to a score.

    Take care, `yes(0)` could be named 'no'...

Instance Methods

__init__(self, score=0.5) x.__init__(...) initializes x; see help(type(x)) for signature | source code

__call__(self, *args, **kwargs) | source code

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

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, score=0.5)
(Constructor)

source code

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

Overrides: object.__init__
  (inherited documentation)

### __call__(self, *args, **kwargs)
(Call operator)

source code

Overrides: Predicate.__call__