selectors.py
branchstable
changeset 6869 900cb9b1b687
parent 6615 9807fb5d5f8d
child 6870 658039c5eeac
equal deleted inserted replaced
6868:2d40f3c48f31 6869:900cb9b1b687
   814     """Return score according to an arbitrary function given as argument which
   814     """Return score according to an arbitrary function given as argument which
   815     will be called with input content entity as argument.
   815     will be called with input content entity as argument.
   816 
   816 
   817     This is a very useful selector that will usually interest you since it
   817     This is a very useful selector that will usually interest you since it
   818     allows a lot of things without having to write a specific selector.
   818     allows a lot of things without having to write a specific selector.
       
   819 
       
   820     The function can return arbitrary value which will be casted to an integer
       
   821     value at the end.
   819 
   822 
   820     See :class:`~cubicweb.selectors.EntitySelector` documentation for entity
   823     See :class:`~cubicweb.selectors.EntitySelector` documentation for entity
   821     lookup / score rules according to the input context.
   824     lookup / score rules according to the input context.
   822     """
   825     """
   823     def __init__(self, scorefunc, once_is_enough=False):
   826     def __init__(self, scorefunc, once_is_enough=False):