[英]Class 'x' has no 'y' member
I've been trying to use variables of another method, that belongs to the same class, for compare it.我一直在尝试使用属于同一个 class 的另一种方法的变量来进行比较。
My code looks like this:我的代码如下所示:
def __init__ (self, Title, Complexity, Time):
self.Title = Title
self.Complexity = Complexity
self.Time = Time
def organizatingTime(self):
if Activitie.Complexity() > 6:
time = Activitie.Time()
but VS shows me但是VS向我展示了
Class 'Activitie' has no 'Time' member
Class 'Activitie' has no 'Complexity' member
Anything that works is good.任何有效的东西都是好的。
Try尝试
def __init__ (self, Title, Complexity, Time):
self.Title = Title
self.Complexity = Complexity
self.Time = Time
def organizatingTime(self):
if self.Complexity() > 6:
time = self.Time()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.