TypeError: edit_undo() takes 1 positional argument but 2 were given
The functions that you pass to bind
(event handlers) are expected to take one event
argument. edit_undo
doesn't take any arguments (except for self
that is...).
If you are not interested in the actual event
, you can instead pass a function that ignores it, something like:
self.text.bind("<Return>", lambda e: self.entry.edit_undo())