[issue10873] String formatting example invalid

2011-01-09 Thread Ashwin Purohit

New submission from Ashwin Purohit :

Your example on page http://docs.python.org/tutorial/inputoutput.html is 
outdated and won't work in Python 2.7:

Basic usage of the str.format() method looks like this:

>>> print 'We are the {} who say "{}!"'.format('knights', 'Ni')
We are the knights who say "Ni!"


Now, all brackets have to have a numeric or keyword argument.

--
assignee: d...@python
components: Documentation
messages: 125838
nosy: doagie, d...@python
priority: normal
severity: normal
status: open
title: String formatting example invalid
type: behavior
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue10873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10873] String formatting example invalid

2011-01-09 Thread Ashwin Purohit

Ashwin Purohit  added the comment:

Yes, apologies (I was using 2.6).

On Jan 9, 2011 5:52 AM, "SilentGhost"  wrote:

SilentGhost  added the comment:

Works as advertised for me. Unless more information is added, it looks like
an invalid issue.

--
nosy: +SilentGhost

___ Python tracker <
rep...@bugs.python.org> <http://bugs.python...

--
Added file: http://bugs.python.org/file20330/unnamed

___
Python tracker 
<http://bugs.python.org/issue10873>
___Yes, apologies (I was using 2.6).
On Jan 9, 2011 5:52 AM, "SilentGhost" 
<mailto:rep...@bugs.python.org";>rep...@bugs.python.org> 
wrote:
SilentGhost <mailto:ghost@gmail.com";>ghost@gmail.com> added the 
comment:

Works as advertised for me. Unless more information is added, it looks like an 
invalid issue.

--
nosy: +SilentGhost

___
Python tracker <mailto:rep...@bugs.python.org";>rep...@bugs.python.org>
<http://bugs.python.";>http://bugs.python...
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com