I am making a small project with tkinter. There is a problem that I don't understand:
self.img_see = tk.PhotoImage(file='see.png')
self.img_hide = tk.PhotoImage(file='hide.png')
self.check = tk.Button(self.frm_inp, image=self.img_hide, bg='#ffffff', border=0, command=self.change)
self.check.place(x=183, y=1, in_=self.inp_pass)
print(self.check['image'])
self.check.config(image=self.img_see)
print(self.check['image'])
print(self.check['image'], self.img_see, bool(self.check['image'] == self.img_see))
The result turns out like this:
pyimage2
pyimage1
pyimage1 pyimage1 False
Why both of them are pyimage1 but it said False. Can anyone explain it for me, please? Thank you a lot.