Add a comment above the Dictionary Dispatch call

This commit is contained in:
2026-06-21 21:22:41 -06:00
parent 363379b2c2
commit 1fde37bb91
+4
View File
@@ -715,6 +715,10 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
confirm(cfg) confirm(cfg)
# Dictionary dispatch: map each mode name to its handler function (the values
# are the functions themselves -- no parentheses), look up the one for `mode`,
# then call it with (cfg). Equivalent to an if/elif chain over `mode`. `mode`
# is always one of these three keys by now, so the lookup can't KeyError.
{"cdm": cdm_profile, "slog": slog_profile, "dd": dd_profile}[mode](cfg) {"cdm": cdm_profile, "slog": slog_profile, "dd": dd_profile}[mode](cfg)
return 0 return 0