This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients epaine, phil.tgd, serhiy.storchaka, terry.reedy
Date 2021-06-18.21:23:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1624051390.77.0.821872586479.issue44404@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-06-18 21:23:10terry.reedysetrecipients: + terry.reedy, serhiy.storchaka, epaine, phil.tgd
2021-06-18 21:23:10terry.reedysetmessageid: <1624051390.77.0.821872586479.issue44404@roundup.psfhosted.org>
2021-06-18 21:23:10terry.reedylinkissue44404 messages
2021-06-18 21:23:10terry.reedycreate