Phil Elson added the comment:

> I didn't see a test case relating to the example in his comment, namely
>
> f.format("{0:{}}", 'foo', 5)
>
> Did I miss it?


The example should fail, which it wouldn't have done with the patch previously 
proposed. I believe the case is covered by the block:

    with self.assertRaises(ValueError):
        fmt.format("foo{1}{}", "bar", 6)

Though there is no harm in adding another test along the lines of:

    with self.assertRaises(ValueError):
        fmt.format("{0:{}}", "bar", 6)

If you think it is worthwhile?


I'm uncertain which documentation to update since the method which has had its 
signature updated is private and is called solely by Formatter.vformat .

Cheers,

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13598>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to