print - bug or feature - concatenated format strings in a print statement

John Machin sjmachin at lexicon.net
Mon Mar 16 04:26:29 EDT 2009


On Mar 16, 7: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?

Here's a question for you:
Is the difference between
   print(30 % 7)
and
   print(10 + 20 % 7)
a bug or a feature?

Cheers,
John



More information about the Python-list mailing list