Answer the question
In order to leave comments, you need to log in
Python Moved object processing into a function - why doesn't it work?
Everything worked, but it was necessary to move the processing of the object into a separate function
. The following error appeared:
TypeError: unsupported operand type(s) for *: 'float' and 'method'
for i in api.followers(u):
f=subscribe(i, me, s)
def subscribe(i, me, s=[]):
if i.followers_count>=0.5*i.friends and i.followers_count>=5000: #Ошибка здесь
Answer the question
In order to leave comments, you need to log in
The screenshot tells me that friends is a method, so you need to write friends()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question