Cant directly use `@patch_to` to redefine a class constructor
diego898 opened this issue · comments
class A():
def __init__(self):
super().__init__()
print('hi')
A()
@patch_to(A)
def __init__(self):
super().__init__()
print('hello')
A()
returns RuntimeError: super(): __class__ cell not found
.
Is it worth adding to the docs that this is the case?
class A():
def __init__(self):
super().__init__()
print('hi')
A()
@patch_to(A)
def __init__(self):
super(A, self).__init__()
print('hello')
A()