This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pelson
Recipients Ramchandra Apte, binkert, eric.araujo, eric.smith, ezio.melotti, flox, meador.inge, ncoghlan, pelson, terry.reedy, vinay.sajip
Date 2013-03-04.12:09:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1362398946.01.0.0670046715806.issue13598@psf.upfronthosting.co.za>
In-reply-to
Content
> 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,
History
Date User Action Args
2013-03-04 12:09:06pelsonsetrecipients: + pelson, terry.reedy, vinay.sajip, ncoghlan, eric.smith, ezio.melotti, eric.araujo, flox, meador.inge, Ramchandra Apte, binkert
2013-03-04 12:09:06pelsonsetmessageid: <1362398946.01.0.0670046715806.issue13598@psf.upfronthosting.co.za>
2013-03-04 12:09:05pelsonlinkissue13598 messages
2013-03-04 12:09:05pelsoncreate