Ejemplo: se esperaba 1 argumento posicional pero se dieron 2
#Happens when a function expects only 1 value to be passed through it
#But multiple are passed through
class thing(object):
def __init__(self):
pass
def function(self)
print("hello")
thingy = thing()
thingy.bind("<KeyPress>", thingy.function)
#You don't expect above to pass two values through, however it passes an event
#and self which is why it will give a positional argument error
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)