print - bug or feature - concatenated format strings in a print statement
R. David Murray
rdmurray at bitdance.com
Mon Mar 16 15:37:09 CET 2009
> On Mar 16, 5:00 pm, bdb112 <boyd.blackw... at gmail.com> wrote:
> > # is the difference between
> > print(" %d, %d, buckle my shoe" % (1,2))
> > # and
> > print(" %d, " + " %d, buckle my shoe" % (1,2))
> > # a bug or a feature?
It is correct behavior. On the other hand, it is one of the, well,
bugs, that is avoided by the 'format' method in 3.x.
R. David Murray http://www.bitdance.com
More information about the Python-list