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 Ramchandra Apte
Recipients Ramchandra Apte
Date 2011-12-14.03:59:21
SpamBayes Score 3.988001e-06
Marked as misclassified No
Message-id <1323835162.4.0.792542335688.issue13598@psf.upfronthosting.co.za>
In-reply-to
Content
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 "/usr/lib/python3.2/string.py", line 180, in format
    return self.vformat(format_string, args, kwargs)
  File "/usr/lib/python3.2/string.py", line 184, in vformat
    result = self._vformat(format_string, args, kwargs, used_args, 2)
  File "/usr/lib/python3.2/string.py", line 206, in _vformat
    obj, arg_used = self.get_field(field_name, args, kwargs)
  File "/usr/lib/python3.2/string.py", line 267, in get_field
    obj = self.get_value(first, args, kwargs)
  File "/usr/lib/python3.2/string.py", line 226, in get_value
    return kwargs[key]
KeyError: ''
History
Date User Action Args
2011-12-14 03:59:22Ramchandra Aptesetrecipients: + Ramchandra Apte
2011-12-14 03:59:22Ramchandra Aptesetmessageid: <1323835162.4.0.792542335688.issue13598@psf.upfronthosting.co.za>
2011-12-14 03:59:21Ramchandra Aptelinkissue13598 messages
2011-12-14 03:59:21Ramchandra Aptecreate