Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

python takes 2 positional arguments but 3 were given

#if you're getting this issue out of a class function
#don't forget to add "self" as the first parameter for your function
class myClass:
def myFunction(self,argument1,argument2)

#calling
#self isn't defined when calling the function
test = myClass()
test.myFunction(1,2)
 
PREVIOUS NEXT
Tagged: #python #takes #positional #arguments
ADD COMMENT
Topic
Name
6+4 =