diff options
-rw-r--r-- | logilab/common/registry.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/logilab/common/registry.py b/logilab/common/registry.py index 7820689..27b72b6 100644 --- a/logilab/common/registry.py +++ b/logilab/common/registry.py @@ -410,7 +410,7 @@ class Registry(dict): An optional argument `debug_callback` can be passed, it will be called once the selection is done and will return a dict of the following form:: - {"all_objects": [], "end_score": 0, "winners": [], + {"all_objects": [], "end_score": 0, "winners": [], "winner": None or winner, "self": self, "args": args, "kwargs": kwargs, } """ @@ -440,6 +440,7 @@ class Registry(dict): if debug_callback: debug_registry_select_best["winners"] = winners.copy() if winners else [] + debug_registry_select_best["winner"] = winners[0] if winners else winners debug_registry_select_best["end_score"] = score debug_callback(debug_registry_select_best) |