bastibe / transplant

Transplant is an easy way of calling Matlab from Python
https://transplant.readthedocs.io
Other
108 stars 26 forks source link

fix super() call in Matlab.exit #82

Closed dlaidig closed 4 years ago

dlaidig commented 4 years ago

Before, creating a subclass leads to a RecursionError on exit as self.__class__ refers to the subclass instead of transplant.Matlab.

I am not sure if the current way of calling super was intentional and if there are side effects when just using super() without any arguments. It looks to me like something left from Python 2 times and everything still seems to work fine after the change.

Test script:

import transplant

class Matlab(transplant.Matlab):
    pass

m = Matlab()
m.version()
bastibe commented 4 years ago

Good catch, thank you!