Petr Viktorin <encu...@gmail.com> added the comment:
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.) ---------- nosy: +petr.viktorin _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37645> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com