This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients asvetlov, r.david.murray, vstinner
Date 2013-08-15.18:18:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376590681.49.0.306870634329.issue18750@psf.upfronthosting.co.za>
In-reply-to
Content
I don't understand why str % list and str % dict behaves differently than str % int:

>>> 'abc' % [1]
'abc'
>>> 'abc' % ([1],)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: not all arguments converted during string formatting
>>> 'abc' % 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: not all arguments converted during string formatting
>>> 'abc' % {1:2}
'abc'
>>> 'abc' % ({1:2},)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: not all arguments converted during string formatting
History
Date User Action Args
2013-08-15 18:18:01vstinnersetrecipients: + vstinner, r.david.murray, asvetlov
2013-08-15 18:18:01vstinnersetmessageid: <1376590681.49.0.306870634329.issue18750@psf.upfronthosting.co.za>
2013-08-15 18:18:01vstinnerlinkissue18750 messages
2013-08-15 18:18:00vstinnercreate