[Python-ideas] String formatting and namedtuple
Oleg Broytmann
phd at phd.pp.ru
Fri Feb 13 10:30:19 CET 2009
On Fri, Feb 13, 2009 at 10:20:19AM +0100, spir wrote:
> print 'Hello. My name is [name] and I am [age].'
I found this exceptionally funny.
print 'Hello. My name is {0} and I am {1}.'
uses indexes where
print 'Hello. My name is [name] and I am [age].'
uses strings; time to talk about consistency with tuples/lists and dicts!
<Big grin>
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-ideas
mailing list