+ 2
Is it more recommended to use class instead? (Using Python)
In a project I have many cases where I would need only one instance of a class. Is it more recommended to use the class instead of the 1 instance? Magic methods aren't playing big role. What are the pros or cons of using either of the 2 cases? : Case 1: Creating one instance with object methods and attributes. Case 2: Using the class with equivalent static methods and attributes.
3 Answers
+ 2
But you have several classes in your program? Or just one?
(Because if it was only one or a few and you always only need 1 instances tops, maybe good old procedural style would be a better fit?)
+ 1
HonFu A sentillion classes! More than 10.
0
Hm, okay...