我得到错误:
object.__new__() takes no parameters
当我运行以下程序时:
import urllib as net
class weather:
api = "http://www.google/ig/api?weather="
wData = None
def _init_(self,location):
self.api = self.api + location
self.wData = net.urlopen(self.api).read()
def showXML(self):
return self.wData
w = weather("11570")
w.showXML()