Error when a class inherits from a class with same name
Author: epeios-q37Created Feb 13, 2026Updated Feb 13, 2026
Hello Pierre,
Following code does not work properly with Brython:
class A:
pass
class B:
class A(A):
pass
print("Success!") With regular Python:
Success!With Brython:
Traceback (most recent call last):
File <string>, line 4, in <module>
File <string>, line 5, in B
AttributeError: Javascript object 'undefined' has no attributeThanks!
Source: brython-dev/brython