From d0a8e96b702ef9f7f685047c8e414a3ba3a371d1 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Sun, 5 Oct 2025 20:10:07 +0530 Subject: [PATCH] Use getitem dunder for StatementHandlerRegistry --- pythonbpf/functions/func_registry_handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonbpf/functions/func_registry_handlers.py b/pythonbpf/functions/func_registry_handlers.py index 010e3ed..afe54f6 100644 --- a/pythonbpf/functions/func_registry_handlers.py +++ b/pythonbpf/functions/func_registry_handlers.py @@ -17,6 +17,6 @@ class StatementHandlerRegistry: return decorator @classmethod - def get_handler(cls, stmt_type): + def __getitem__(cls, stmt_type): """Get the handler for a specific statement type.""" return cls._handlers.get(stmt_type, None)