Answer the question
In order to leave comments, you need to log in
Unresolved reference Python?
There is a declared variable previous_direction. I use it in a class function.
def change_direction(self,event):
if event.keysym in self.mapping:
if previous_direction==antidirections[event.keysym]:
....
else:
previous_direction=...
When I use this variable twice, an Unresolved reference error occurs. What to do in this case?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question