Is abstract class field in python possible?

Which of these is most efficient in terms of performance, in Python: a module with only functions, a module with a single class and that class having only staticmethods, and a module with a single class having non static methods?

  • Ex: Say you are writing a wrapper for python memcached, which of the above three is usually preferred in terms of maintenance and performance

  • Answer:

    Calling each type of function has the exact same cost.  There is no speed difference that can be realized from one of these.  Write your code to be usable.

Alex Gaynor at Quora Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.