Add the argument **kw to the method after so that the keyword argument can passed to func Conveniently.
The current function definition of the after is as follows:
def after(self, ms, func=None, *args): ...
If we have the argument **kw, we can do this:
import tkinter root = tkinter.Tk() root.after(1000, root.configure, bg="red") root.mainloop()
Otherwise, we may need something like this:
import tkinter root = tkinter.Tk() root.after(1000, lambda: root.configure(bg="red")) root.mainloop()
Obviously, the lambda here looks a bit redundant.
This is a minor feature, which does not need previous discussion elsewhere
No response
gh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc.after…
pythongh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc…
Activity
gh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc.after…
pythongh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc…
pythongh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc…
pythongh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc…