1👍
Python lets you inherit from multiple classes, so go ahead an put your methods into a separate base class and inherit from it, too.
Also, python lets you pull in from other files with the import statement.
0👍
Although there are several ways to do this, the first one I would recommend is to create mixin classes from both files.
So in your main module
import myfunctions1
import myfunctionsA
class SOAPService(ServiceBase,myfunctions1.mixin,myfunctionsA.mixin):
pass
and in your included modules myfunctions1, myfunctionA etc.
class mixin:
def myfunction1(self):
return
def myfunction2(self, arg1):
return
- [Answer]-Stack Overflow OAuth – Python Social Auth
- [Answer]-Browser won't show favicon.ico but can browse to it – using Django, nginx gunicorn
- [Answer]-I can't display extended values of my user model
- [Answer]-How can I save an empty model (I only need it's pk created)
- [Answer]-Django – sorting foreign key objects by date
Source:stackexchange.com