[Python-3000] Open Issues for string.format PEP
Ian Bicking
ianb at colorstudy.com
Mon Apr 24 19:52:09 CEST 2006
Talin wrote:
>>>Here's a condensed list of the open issues that have been raised by people
>>>so far:
>>
>>I'm not sure whether this was raised explicitly, but Ian at least
>>mentioned it: Are they keys to the dictionary in some way restricted?
>>
>>For instance, I think it would be reasonable to say that only valid
>>names (or possibly expressions starting with a valid name) would be
>>looked up in the dictionary, as a way of explaining why {0} means
>>position zero, rather than dict['0'].
>
>
> Think 'keyword arguments', not 'dict keys'. You can't call a function with '0'
> as a keyword.
Sure you can, func(**{'0': 'x'}). Anytime you use ** as a first-class
way of passing in a dictionary argument, keywords that are not valid
Python identifiers will get passed in, often intentionally.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Python-3000
mailing list