first post here.
I am trying to make a list of movies. The movies will be shown in a list on Tkinter. The plan was when you click an update button the program will updat
Use this instead:
lambda x=x: self.update_rating(x)
Demonstration:
>>> x = 1
>>> a = lambda x=x:x
>>> a()
1
>>> x = 2
>>> a()
1
The idea here is that default arguments are evaluated when a function is defined as opposed to creating a closure which evaluates picks up the variables from the enclosing scope when the function is called.