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 vstinner, ysj.ray
Date 2011-02-21.20:24:19
SpamBayes Score 4.798545e-05
Marked as misclassified No
Message-id <1298319867.7.0.779493025849.issue11246@psf.upfronthosting.co.za>
In-reply-to
Content
+        text = PyUnicode_FromFormat(b'repr=%V', 'abcdef', b'abcdef')
+        self.assertEqual(text, 'repr=abcdef')

How do you know which argument is used? For example, you should use instead 'abc' and b'xyz'.

+        text = PyUnicode_FromFormat(b'repr=%V', None, '人民'.encode('UTF-8'))
+        self.assertEqual(text, 'repr=人民')

I prefer ASCII literals using \x or \u: '\xe4\xba\xe6\xb0\u2018'.

You should also add a test specific to the replace error handler, e.g. (None, b'abc\xff') => 'abc\ufffd'.
History
Date User Action Args
2011-02-21 20:24:27vstinnersetrecipients: + vstinner, ysj.ray
2011-02-21 20:24:27vstinnersetmessageid: <1298319867.7.0.779493025849.issue11246@psf.upfronthosting.co.za>
2011-02-21 20:24:19vstinnerlinkissue11246 messages
2011-02-21 20:24:19vstinnercreate