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 petr.viktorin
Recipients jdemeyer, petr.viktorin, vstinner
Date 2019-08-15.15:02:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565881346.14.0.199294461284.issue37645@roundup.psfhosted.org>
In-reply-to
Content
I am not convinced.

I'm wary of making error messages depend on the str representation of a function; that would prevent us from changing it later.
I'm wary of "%S" used in error messages. Those are for the programmer, not the user, so they should prefer __repr__.

I train beginners to recognize "<function f at 0x7f9f4bbe5e18>" as a sign of omitted parentheses. The ugliness is useful: it shows you're dealing with an internal object, not a data value.

So, I think "<function f>" is much better than just "f()". I wouldn't mind "<function f()>" (maybe even with the full signature), but that doesn't quite help this case.
(I don't care much for the "at 0x7f9f4bbe5e18" part, but that's not the issue here.)
History
Date User Action Args
2019-08-15 15:02:26petr.viktorinsetrecipients: + petr.viktorin, vstinner, jdemeyer
2019-08-15 15:02:26petr.viktorinsetmessageid: <1565881346.14.0.199294461284.issue37645@roundup.psfhosted.org>
2019-08-15 15:02:26petr.viktorinlinkissue37645 messages
2019-08-15 15:02:25petr.viktorincreate