# HG changeset patch # User Sylvain Thénault # Date 1295264547 -3600 # Node ID b4befa12bbccdb149d3a55aca2ffb5bf9cc5caf8 # Parent 8fe4b003c1bcf18e414a740b4c465de6b0d8d6a5 [doc] fix match_rtype_sets docstring diff -r 8fe4b003c1bc -r b4befa12bbcc server/hook.py --- a/server/hook.py Mon Jan 17 12:41:45 2011 +0100 +++ b/server/hook.py Mon Jan 17 12:42:27 2011 +0100 @@ -373,8 +373,23 @@ class match_rtype_sets(ExpectedValueSelector): - """accept if parameters specified as initializer arguments are specified - in named arguments given to the selector + """accept if the relation type is in one of the sets given as initializer + argument. The goal of this selector is that it keeps reference to original sets, + so modification to thoses sets are considered by the selector. For instance + + MYSET = set() + + class Hook1(Hook): + __regid__ = 'hook1' + __select__ = Hook.__select__ & match_rtype_sets(MYSET) + ... + + class Hook2(Hook): + __regid__ = 'hook2' + __select__ = Hook.__select__ & match_rtype_sets(MYSET) + + Client code can now change `MYSET`, this will changes the selection criteria + of :class:`Hook1` and :class:`Hook1`. """ def __init__(self, *expected):