theRealWorld
theRealWorld

Reputation: 1208

Does it make sense to make a class in python when it would never get instantiated?

I have some methods in a file and all of them are defined in the global scope (a module). I did not bother to make a class because the class would never get instantiated and everything would still have to be accessed statically if I defined a class. Does it make sense to leave it as it is, or is it better design to make a class and make all my methods static? and why?
FYI: My script methods will get accessed by third party users.

Upvotes: 4

Views: 201

Answers (1)

Evpok
Evpok

Reputation: 4485

Python is not Java, use module-level methods without worry.

Upvotes: 9

Related Questions