-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When extending JS classes, the super class' constructor isn't called + an exception is raised when calling super()
in the subclass
#2393
Comments
Hum, it seems calling I'll have to check more in depth the error as I currently have |
It seems when calling
|
super()
in the subclass
super()
in the subclasssuper()
in the subclass
Proposal: When extending a JS class:
|
Alternative Proposal: When doing : class Wrapper:
def __init__(self, *args):
self.__js = JSClass.new(*args)
def foo(self):
self.__js.foo()
class PyClass(Wrapper):
pass This could be implemented in two ways :
|
It seems Brython doesn't call the constructor of the super class when inheriting a JS class.
The JS class:
The Brython class:
It prints:
The text was updated successfully, but these errors were encountered: