From e1013c2de758948a6b367f9a25e9580d71340d0b Mon Sep 17 00:00:00 2001 From: Mark Joshwel Date: Sat, 2 Sep 2023 10:24:57 +0000 Subject: [PATCH] s+: add seen_names to debug prints --- surplus.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/surplus.py b/surplus.py index df3160b..98da935 100644 --- a/surplus.py +++ b/surplus.py @@ -475,7 +475,9 @@ class Behaviour(NamedTuple): exceptions are handled by the caller. reverser: Callable[[str], dict[str, Any]] Latlong object to dictionary function, must take in a string and return a - dict. exceptions are handled by the caller. + dict. keys found in SHAREABLE_TEXT_LINE_*_KEYS used to access address details + are placed top-level in the dict. exceptions are handled by the caller. see + the playground notebook for example output. stderr: TextIO = stderr TextIO-like object representing a writeable file. defaults to sys.stderr. stdout: TextIO = stdout @@ -852,6 +854,9 @@ def _generate_text( if detail != "" ] + if debug: + behaviour.stderr.write(f"debug: {seen_names=}\n") + general_global_info: list[str] = [ str(location.get(detail, "")) for detail in st_line6_keys ]