R
Ravi
I have to create a few helper/utility application-wide functions.
There are two options:
1. Create a Utility class and all functions as static method of that
class.
2. Create a module, utility.py and member functions.
Which is a better approach.
My personal view is that I should create a module with functions.
Classes are appropriate only when I am creating new types.
There are two options:
1. Create a Utility class and all functions as static method of that
class.
2. Create a module, utility.py and member functions.
Which is a better approach.
My personal view is that I should create a module with functions.
Classes are appropriate only when I am creating new types.