On 15 December 2013 09:52, Victor Stinner <[email protected]> wrote: > 2013/12/15 Antoine Pitrou <[email protected]>: >> 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 | [email protected] | Brisbane, Australia _______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
