mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Use getitem dunder for StatementHandlerRegistry
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user