Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

TypeError: class must have base classes #341

Open
m4ns0ur opened this issue Jul 1, 2017 · 3 comments
Open

TypeError: class must have base classes #341

m4ns0ur opened this issue Jul 1, 2017 · 3 comments

Comments

@m4ns0ur
Copy link
Contributor

m4ns0ur commented Jul 1, 2017

any transcompiled simple (empty) python class, raising same error:

TypeError: class must have base classes

to reproduce the issue, create a python file with below code, then transcompile, and run:

class c:
    pass

it is happening because of a sanity check here, anyway it needs more investigation to see why base class is empty there.

@m4ns0ur
Copy link
Contributor Author

m4ns0ur commented Jul 4, 2017

@trotterdylan any comment on this?

@trotterdylan
Copy link
Contributor

Classes without a list of bases are old style classes, and Grumpy doesn't current support them. I've debated whether to bother supporting old style classes since Python 3 gets rid of them.

Unfortunately there are subtle behavioral differences between new and old style classes so we can't just pretend to support them by replacing the empty list of bases with (object).

For modules that use old style classes, I've just been modifying the code to add the object base class and hoping that they continue to work correctly.

@m4ns0ur
Copy link
Contributor Author

m4ns0ur commented Jul 5, 2017

@trotterdylan thanks! I'll try to do same for the modules.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants