python - Object is not callable -
why object not callable? know problem? code in main main.py
:
def average_wind(dia): wind_list=[] area=klass.windpower(dia) print(area)
and code in class:
class windpower(object): def __init__(self,digit): self.digit=digit def calc_area(self,dia): area=(dia**2*math.pi)/4 return area windpower = windpower(10)
klass.windpower
object of windpower class, can't instantiate again. think meant call calc_area
method?
area = klass.windpower.calc_area(dia)
Comments
Post a Comment