Re: Error messages from format()

2012-11-13 Thread Steven D'Aprano
On Tue, 13 Nov 2012 15:24:53 -0500, Colin J. Williams wrote: > On 13/11/2012 1:38 PM, Steven D'Aprano wrote: >> On Tue, 13 Nov 2012 10:08:59 -0500, Colin J. Williams wrote: >> >>> Is there some way to get more informative error messages from the >>> builtin format? >> >> Yes -- post a feature requ

Re: Error messages from format()

2012-11-13 Thread Colin J. Williams
On 13/11/2012 4:18 PM, Dave Angel wrote: On 11/13/2012 03:24 PM, Colin J. Williams wrote: I am working on the assumption that the first argument of the format builtin function and be a sequence of values, which can be selected with {1:}, {2:},

Re: Error messages from format()

2012-11-13 Thread Dave Angel
On 11/13/2012 03:24 PM, Colin J. Williams wrote: > > > I am working on the assumption that the first argument of the format > builtin function and be a sequence of values, which can be selected > with {1:}, {2:}, {0:} etc. > > The docs don't make this clear. I would appreciate advice. > The buil

Re: Error messages from format()

2012-11-13 Thread Colin J. Williams
On 13/11/2012 1:38 PM, Steven D'Aprano wrote: On Tue, 13 Nov 2012 10:08:59 -0500, Colin J. Williams wrote: Is there some way to get more informative error messages from the builtin format? Yes -- post a feature request on the Python bug tracker, then wait until Python 3.4 comes out in about 1

Re: Error messages from format()

2012-11-13 Thread Steven D'Aprano
On Tue, 13 Nov 2012 10:08:59 -0500, Colin J. Williams wrote: > Is there some way to get more informative error messages from the > builtin format? Yes -- post a feature request on the Python bug tracker, then wait until Python 3.4 comes out in about 16 months. :( > Most messages are such as:

Error messages from format()

2012-11-13 Thread Colin J. Williams
Is there some way to get more informative error messages from the builtin format? Most messages are such as: Traceback (most recent call last): File "", line 1, in ValueError: Invalid conversion specification This example doesn't point to the first invalid case. [Dbg]>>> format((25, 31),'{0