It makes no sense to both subclass from BClass and have a BClass as an instance. I don't understand what the line self.panel = BClass(self.context, self.request)
is supposed to achieve.
context and container are in no way omnipresent. The context is the object which you are viewing. It is set in the classes __init__
method. The container is an attribute of the context, typically __parent__
.