[issue9805] Documentation on old-style formatting of dicts is overly restrictive

2010-09-09 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> %-formatting and dicts ___ Python tracker ___

[issue9805] Documentation on old-style formatting of dicts is overly restrictive

2010-09-09 Thread Ken Basye
Ken Basye added the comment: I think Eric is correct; it's a dupe. And I was wrong about not otherwise being able to format an empty dictionary - "%s" % (d,) will always work and is arguably the right thing to do anyway. -- type: behavior -> versions: -Python 3.1, Python 3.2 _

[issue9805] Documentation on old-style formatting of dicts is overly restrictive

2010-09-08 Thread Eric Smith
Eric Smith added the comment: I think this might be a dupe of issue 1467929. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue9805] Documentation on old-style formatting of dicts is overly restrictive

2010-09-08 Thread R. David Murray
R. David Murray added the comment: Python 3.2a2+ (py3k:84613, Sep 7 2010, 19:17:31) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> "%s %(abc)s" % dict(abc=2) "{'abc': 2} 2" I did not expect this result. Looks like a bug to me. >>> "%s %(abc)

[issue9805] Documentation on old-style formatting of dicts is overly restrictive

2010-09-08 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue9805] Documentation on old-style formatting of dicts is overly restrictive

2010-09-08 Thread Ken Basye
Ken Basye added the comment: If someone's going to fix this, perhaps they might consider also adding the following clarification sentence after 'The mapping key selects the value to be formatted from the mapping.' The mapping key is interpreted as a string; a key error is raised if the dic

[issue9805] Documentation on old-style formatting of dicts is overly restrictive

2010-09-08 Thread Ken Basye
New submission from Ken Basye : >From http://docs.python.org/library/stdtypes.html#string-formatting-operations >: "When the right argument is a dictionary (or other mapping type), then the formats in the string must include a parenthesised mapping key into that dictionary inserted immediatel