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.988e-06
Marked as misclassified No
Message-id <>
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>
  File "/usr/lib/python3.2/", line 180, in format
    return self.vformat(format_string, args, kwargs)
  File "/usr/lib/python3.2/", line 184, in vformat
    result = self._vformat(format_string, args, kwargs, used_args, 2)
  File "/usr/lib/python3.2/", line 206, in _vformat
    obj, arg_used = self.get_field(field_name, args, kwargs)
  File "/usr/lib/python3.2/", line 267, in get_field
    obj = self.get_value(first, args, kwargs)
  File "/usr/lib/python3.2/", line 226, in get_value
    return kwargs[key]
KeyError: ''
Date User Action Args
2011-12-14 03:59:22Ramchandra Aptesetrecipients: + Ramchandra Apte
2011-12-14 03:59:22Ramchandra Aptesetmessageid: <>
2011-12-14 03:59:21Ramchandra Aptelinkissue13598 messages
2011-12-14 03:59:21Ramchandra Aptecreate