Closed doubleliang closed 4 years ago
I could not reproduce the issue in the new version of reloadr
(0.4.1) and after porting your code to Python 3 and running it on Python 3.6.
My version:
import time
from reloadr import reloadr
class C:
def __init__(self, name):
print('base C : ', name)
@reloadr
class Car(C):
def __init__(self, name):
super().__init__(name)
self.name = name
def position(self):
return self.name, 1
if __name__ == "__main__":
print("Here we go")
car = Car('t1')
while True:
print(car.position())
time.sleep(1)
Car._reload()
When using the following script:
got this error when run the script: