Terry J. Reedy <tjre...@udel.edu> added the comment:
The docstring for .after says the 2nd argument must be a 'function'. Whether this issue is a bugfix or enhancement request depends whether one interprets 'function' as 'callable' or something narrower that only includes objects that necessarily have __name__ attributes. The latter would exclude partials and instances of user classes with __call__ methods. While a one-time-use partial as in the example is superfluous, I think other uses and parameterized callback classes should be supported. So I agree with changing the tkinter code rather than qualifying 'function' with 'has a .__name__ attribute'. I think 'type(func).__name__' should be safe. ---------- nosy: +terry.reedy _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44404> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com