I have a site product with a code like this:
class AClass(grok.View):
""" Code of AClass """
pass
class BClass(AClass):
""" Code of BClass with 'update' method defined """
pass
class CClass(BClass):
def update(self):
self.panel = BClass(self.context, self.request)
# more code
My doubt is why BClass
is instantiate/called in CClass
code with two parameters (self.context
and self.request
).
BClass
has a update method without other parameters (just self
) and doesn't have a __init__
method explicitly.
So, what's the function of self.context
and self.request
in this case? Is this a kind of inheritance or acquisition?
After that I saw this, I think so that I didn't fully understand the omnipresent concepts of context and container in Plone.