Skip to content

Error when a class inherits from a class with same name #2662

Description

@epeios-q37

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 attribute

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions