Re: [Python-3000] str.format vs. string.Formatter exceptions

2007-09-04 Thread Eric Smith
Guido van Rossum wrote: > Since IndexError and KeyError are conceptually like ValueError but in > a more narrowly defined context, I think IndexError and KeyError > actually make sense here (even though they don't inherit from > ValueError). > > --Guido Okay, I'll change these to IndexError and K

Re: [Python-3000] str.format vs. string.Formatter exceptions

2007-09-03 Thread Guido van Rossum
Since IndexError and KeyError are conceptually like ValueError but in a more narrowly defined context, I think IndexError and KeyError actually make sense here (even though they don't inherit from ValueError). --Guido On 9/3/07, Eric Smith <[EMAIL PROTECTED]> wrote: > Ron Adam points out some dif

Re: [Python-3000] str.format vs. string.Formatter exceptions

2007-09-03 Thread Ron Adam
Eric Smith wrote: > Ron Adam points out some differences in which exceptions are thrown by > str.format and string.Formatter. For example, on a missing positional > argument: > > >>> "{0}".format() > Traceback (most recent call last): >File "", line 1, in > ValueError: Not enough positi

[Python-3000] str.format vs. string.Formatter exceptions

2007-09-03 Thread Eric Smith
Ron Adam points out some differences in which exceptions are thrown by str.format and string.Formatter. For example, on a missing positional argument: >>> "{0}".format() Traceback (most recent call last): File "", line 1, in ValueError: Not enough positional arguments in format string >>