我无法从同一类中的方法访问实例变量。
class GetImagesFromSinglePage(object):
def __init__(self,source):
self.source = source
self.imgLinks = []
def retrieveImg(source):
#.....tasks
self.imgLinks = tempimgLinks #there it show can't access that variable
def getLink(self):
return self.imgLinks
我该怎么办? 问候, 约翰