I have a python class and within the class I call 2 different methods from one of the other methods. One works and one gives me a TypeError: get_doms() takes exactly 1 argument (2 given) :
def start(self,cursor):
recs = self.get_recs(cursor) # No errors here
doms = self.get_doms(cursor) # I get a TypeError here
def get_doms(self,cursor):
cursor.execute("select domain from domains")
doms = []
for i in cursor._rows:
doms.append(i[0])
return doms
def get_recs(self,cursor):
cursor.execute("select * from records")
recs = []
print cursor._rows
recs = [list(i) for i in cursor._rows]
return recs
How do I successfully call methods within my class from other methods within the same class? Why does one work and the other not? ~~thanks~~