On 15 December 2013 09:52, Victor Stinner <victor.stin...@gmail.com> wrote:
> 2013/12/15 Antoine Pitrou <solip...@pitrou.net>:
>> Shouldn't we have a special "%T" shortcut instead of trying to
>> harmonize all the occurrences of `"%.400s", Py_TYPE(self)->tp_name` ?
>
> Oh, I like this proposition! The following pattern is very common in Python:
>
> "... %.400s ...", Py_TYPE(self)->tp_name

Oh, yes, a %T shortcut for "length limited type name of the supplied
object" would be brilliant. We need this frequently for C level error
messages, and I almost always have to look at an existing example to
remember the exact incantation :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to