[Python-Dev] How long the wrong type of argument should we limit (or not) in the error message (C-api)?

Antoine Pitrou solipsis at pitrou.net
Sun Dec 15 00:16:54 CET 2013

On Sun, 15 Dec 2013 09:10:08 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> The question should probably be addressed directly in PEP 7, and I'd
> be inclined to just bless the "%.400s" variant for future code.

Shouldn't we have a special "%T" shortcut instead of trying to
harmonize all the occurrences of `"%.400s", Py_TYPE(self)->tp_name` ?

Sprinkling the same magic number / convention everywhere doesn't sound
very future-proof, nor convenient.



More information about the Python-Dev mailing list