From 8462b5967f2ebab3487f2971a625a1942c9cf542 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 25 Oct 2023 16:15:08 +0300 Subject: Update __pk__ --- gn3/debug.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gn3/debug.py b/gn3/debug.py index 0c8f2f5..ccfcba1 100644 --- a/gn3/debug.py +++ b/gn3/debug.py @@ -1,10 +1,9 @@ """Debug utilities""" - import logging - logger = logging.getLogger(__name__) -def __pk__(value, title="DEBUG"): - """Peek the value and return it.""" - logger.debug("%s: %s", title, value) +def __pk__(*args): + value = args[-1] + title_vals = " => ".join(args[0:-1]) + logger.debug("%s: %s", title_vals, value) return value -- cgit v1.2.3