python - How to extend init method with inheritance -
i have following code, in trying extend init method of baseexporter:
from apps.ingest.platform_export import baseexporter class vudu(baseexporter): def __init__(self): baseexporter.__init__() self.platform = ' vudu' basically, of init'd variables baseexporter plus additional variable of self.platform = 'vudu'. how correctly?
you on right track, missing self on parent class
from apps.ingest.platform_export import baseexporter class vudu(baseexporter): def __init__(self): baseexporter.__init__(self) self.platform = ' vudu'
Comments
Post a Comment