As the title says, my create_button function doesn't give an error when using a command as a lambda function and another as "comm".
Here is a code snippet to make the question more clear:
self.create_button("pi", 8, 1, comm=self.pi)
self.create_button("e", 8, 2, comm=self.euler)
self.create_button("His.", 8, 3, comm=self.history)
#functie care creaza butoanele
def create_button(self, text, row, column, comm=None):
button = tk.Button(self.button_frame, text=text, width=4, height=1, font=self.display_font, activebackground='Gold', command=lambda: self.button_click(text), comm=comm)
button.grid(row=row, column=column, padx=5, pady=5)
Why does "comm=comm" work in calling a function? For example, if I change "comm" with "cmd", upon running the file I will get the next error: _tkinter.TclError: unknown option "-cmd".
So does anyone have any idea why it works?