-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-tkintertype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
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.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-tkintertype-featureA feature request or enhancementA feature request or enhancement