Use simplified super() calling in classes
Closed this issue · 0 comments
soulee-dev commented
Issue Description
With the introduction of Python 3, the super()
function can be called without any arguments in instance methods, automatically determining the class and self. This helps in making the code cleaner and more maintainable.
Current Code
The current usage of super()
in the classes is as follows:
super(ClassName, self).__init__(from_packet, event_size, table_map)
Proposed Change
The new and more concise usage, available from Python 3 onwards, should be applied:
super().__init__(from_packet, event_size, table_map)
Benefits
- Code readability: Simplifying the call to
super()
makes the code easier to read. - Code maintainability: If the class name changes in the future, you won't have to update the call to
super()
.
Suggested Implementation
I can make a pull request implementing these changes across the codebase, if that's acceptable.