[issue13598] string.Formatter doesn't support empty curly braces {}

2014-05-08 Thread Armin Ronacher
Armin Ronacher added the comment: Is there any chance this will be fixed for 2.7 as well? -- nosy: +aronacher ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2014-04-14 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2014-04-14 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2014-04-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 50fe497983fd by Eric V. Smith in branch '3.4': Issue #13598: Added acknowledgements to Misc/NEWS. http://hg.python.org/cpython/rev/50fe497983fd -- ___ Python tracker rep...@bugs.python.org

[issue13598] string.Formatter doesn't support empty curly braces {}

2014-04-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset ad74229a6fba by Eric V. Smith in branch '3.4': Issue #13598: Add auto-numbering of replacement fields to string.Formatter. http://hg.python.org/cpython/rev/ad74229a6fba -- nosy: +python-dev ___ Python

[issue13598] string.Formatter doesn't support empty curly braces {}

2013-03-04 Thread Phil Elson
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

[issue13598] string.Formatter doesn't support empty curly braces {}

2013-03-04 Thread Vinay Sajip
Vinay Sajip added the comment: I believe the case is covered by the block: [snip] Ah, right. I wasn't sure that was the exact same code path that was being exercised. But I didn't look very closely. If you think it is worthwhile? Only if it exercises a different code path. --

[issue13598] string.Formatter doesn't support empty curly braces {}

2013-02-25 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +binkert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list

[issue13598] string.Formatter doesn't support empty curly braces {}

2013-01-20 Thread Vinay Sajip
Vinay Sajip added the comment: Looking at Phil Elson's patch: 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 documentation also needs to be updated. -- ___ Python tracker

[issue13598] string.Formatter doesn't support empty curly braces {}

2013-01-19 Thread Ramchandra Apte
Ramchandra Apte added the comment: Buump. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list mailing list

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-10-31 Thread Phil Elson
Changes by Phil Elson pelson@gmail.com: -- nosy: +pelson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list mailing

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-10-31 Thread Phil Elson
Phil Elson added the comment: The current patch fails to catch the fact that auto vs manual numbering has been used in following corner case: from string import Formatter print(Formatter().format({0:{}}, 'foo', 5)) To fix this, without adding state to the formatter instance, some more

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-10-31 Thread Phil Elson
Phil Elson added the comment: Ramchandra's fix looks fairly good, although there is at least one remaining issue (see my last comment). I have attached a patch which addresses (and tests) this. I'd be happy to pick this up if there are any remaining issues that need to be addressed,

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-10-09 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-12 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: One brief comment on the wording of the error message: the inconsistent naming is actually copied from the str.format code. {foo} {} {bar}.format(2, foo='fooval', bar='barval') 'fooval 2 barval' {foo} {0} {} {bar}.format(2, foo='fooval',

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-09 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: Its not a bug though it has maintenance problems because if you change manual is False to not manual it no longer works correctly. -- ___ Python tracker rep...@bugs.python.org

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: it has maintenance problems because if you change manual is False to not manual it no longer works correctly. So you should probably comment the initialisation appropriately. -- ___ Python

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-08 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Is there a reason manual is None, True, or False? Wouldn't just True or False suffice? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-08 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Is there a reason manual is None, True, or False? Wouldn't just True or False suffice? I suppose before we see the first bracketed form ({} or {\d+}) we don't know which it is. -- ___ Python

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-08 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Yes, I guess that's so. I'll have to add a comment, as at first glance it just looks like a bug. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-04 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: Added a new patch which addresses Éric's comments. -- Added file: http://bugs.python.org/file25816/issue13598.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-04 Thread Ramchandra Apte
Changes by Ramchandra Apte maniandra...@gmail.com: Added file: http://bugs.python.org/file25817/test_string.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-03 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: What is the status of the bug? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Could you upload just one patch with fix and test, addressing my previous comments, and remove the old patches? It will make it easier for Eric to review when he gets some time. Please also keep lines under 80 characters. Thanks in advance.

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-03 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: It seems like the patch doesn't consider mixing of positional and keyword arguments: if you have the format string {foo} {} {bar}, then manual will be set to True when foo is seen as the field_name, and fail soon after when is seen as

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-03 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-02-16 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: @Nick I don't understand why should my patch make Formatter thread-unsafe - the auto_field_count and manual variables are local variables just like the variables in the other functions in Formatter. --

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-02-16 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: I have submitted a new patch, I have moved the increment to the end of if loop. -- Added file: http://bugs.python.org/file24542/issue13598.diff ___ Python tracker rep...@bugs.python.org

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-02-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: One potential problem with the simple approach to fixing this is that up until now, string.Formatter has been thread safe. Because all the formatting state was held in local variables and passed around as method arguments, there was no state

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-01-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: test_string.diff looks good, except that it should probably only test the exception type, not the message (they are not a guaranteed part of the Python language and may change arbitrarily between versions or implementations (e.g. PyPy), so

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-16 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-15 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: This bug is assigned to me. Sometimes it takes a while before a committer has time to review a bug and act on it. I can assure you that I will review this before the next release of Python. Thank you for the bug report, and especially thanks

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-15 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: On Thu, Dec 15, 2011 at 1:42 AM, maniram maniram rep...@bugs.python.org wrote: Why isn't anybody commiting or commenting on my patches? Your patch is much appreciated. Thank you. It takes some time to get things reviewed. Please read the Dev

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-14 Thread maniram maniram
maniram maniram maniandra...@gmail.com added the comment: Attached is a patch for test.test_string to test for this bug. Can somebody please comment on my paches or commit my patches. -- Added file: http://bugs.python.org/file23955/test_string.diff

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-14 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - eric.smith nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-14 Thread maniram maniram
maniram maniram maniandra...@gmail.com added the comment: Why isn't anybody commiting or commenting on my patches? -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-14 Thread maniram maniram
Changes by maniram maniram maniandra...@gmail.com: -- status: languishing - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-13 Thread maniram maniram
New submission from maniram maniram maniandra...@gmail.com: string.Formatter doesn't support empty curly braces {} unlike str.format . import string a = string.Formatter() a.format({},test) Traceback (most recent call last): File pyshell#2, line 1, in module a.format({},hello) File

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-13 Thread maniram maniram
maniram maniram maniandra...@gmail.com added the comment: Attached is patch to fix this issue. -- keywords: +patch type: - behavior Added file: http://bugs.python.org/file23950/issue13598.diff ___ Python tracker rep...@bugs.python.org

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-13 Thread maniram maniram
Changes by maniram maniram maniandra...@gmail.com: -- components: +Library (Lib) versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-13 Thread maniram maniram
maniram maniram maniandra...@gmail.com added the comment: Sorry, the patch has an mistake. ValueErro should be ValueError. -- Added file: http://bugs.python.org/file23952/issue13598.diff ___ Python tracker rep...@bugs.python.org

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-13 Thread maniram maniram
Changes by maniram maniram maniandra...@gmail.com: Removed file: http://bugs.python.org/file23950/issue13598.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___