Neat! Very clean-code! This seems another approach to the pattern. You tried to separate the class creation based on the file extensions. But you had to use if-else. That's what I tried to show, that using python dispatcher, we can map functions or classes to certain enums, strings, int or whatever your approach will be. We can implement in many other ways. That's the beauty of programming and Python 😃
Thanks for sharing.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Neat! Very clean-code! This seems another approach to the pattern. You tried to separate the class creation based on the file extensions. But you had to use
if-else
. That's what I tried to show, that using python dispatcher, we can map functions or classes to certain enums, strings, int or whatever your approach will be. We can implement in many other ways. That's the beauty of programming and Python 😃Thanks for sharing.