[Python-3000] PEP 3101 Updated

Talin talin at acm.org
Thu Aug 16 05:12:24 CEST 2007


Eric Smith wrote:
> James Thiele wrote:
>> I think the example:
>>
>>     "My name is {0.name}".format(file('out.txt'))
>>
>> Would be easier to understand if you added:
>>
>> Which would produce:
>>
>>         "My name is 'out.txt'"
> 
> I agree.
> 
> Also, the example a couple of paragraphs down:
> "My name is {0[name]}".format(dict(name='Fred'))
> should show the expected output:
> "My name is Fred"

Those examples are kind of contrived to begin with. Maybe we should 
replace them with more realistic ones.

-- Talin


More information about the Python-3000 mailing list