Python is doing string multiplication where I would expect it to do numeric multiplication, and I don't know why.
>>> print('%d' % 2 * 4)
2222
>>> print('%d' % (2 * 4))
8
Even forcing the type to integer does nothing. (I realize this is redundant, but it's an idiot-check for me:
>>> print('%d' % int(2) * int(4))
2222
Obviously I solved my problem (adding the parenthesis does it) but what's going on here? If this is just a quirk I have to remember, that's fine, but I'd rather understand the logic behind this.