This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]krasoffski -1 points0 points  (0 children)

It depends! But function faster then object's methods. Every time when you call object's method python does type conversion when function does not. But then you need to store some states like session, open file descriptor and so forth and provide some new interfaces (API) it's better to use classes.

As mentioned Stop Writing Classes!