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

2013-12-15 Thread Stephen J. Turnbull
Steven D'Aprano writes: > That's a good point, but I think most coders would have a very fuzzy > idea of the difference between type(obj).__name__ and > obj.__class__.__name__, and when to use one versus the other. > Likewise, I think that most of the time it is useful to distinguish > be

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

2013-12-15 Thread Steven D'Aprano
On Mon, Dec 16, 2013 at 07:30:56AM +1000, Nick Coghlan wrote: > On 16 Dec 2013 02:58, "Ethan Furman" wrote: > > > > On 12/14/2013 07:51 PM, Steven D'Aprano wrote: > >> > >> On Sun, Dec 15, 2013 at 11:25:10AM +1000, Nick Coghlan wrote: > >> > >>> Oh, yes, a %T shortcut for "length limited type name

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

2013-12-15 Thread Nick Coghlan
On 16 Dec 2013 02:58, "Ethan Furman" wrote: > > On 12/14/2013 07:51 PM, Steven D'Aprano wrote: >> >> On Sun, Dec 15, 2013 at 11:25:10AM +1000, Nick Coghlan wrote: >> >>> Oh, yes, a %T shortcut for "length limited type name of the supplied >>> object" would be brilliant. We need this frequently for

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

2013-12-15 Thread Ethan Furman
On 12/14/2013 07:51 PM, Steven D'Aprano wrote: On Sun, Dec 15, 2013 at 11:25:10AM +1000, Nick Coghlan wrote: 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 a