Staging
v0.5.0
https://github.com/python/cpython
Revision a1eb2274943e86987fdd5a4c08ebd8c301522e3b authored by Guido van Rossum on 11 October 2002, 00:09:51 UTC, committed by Guido van Rossum on 11 October 2002, 00:09:51 UTC
The string formatting code has a test to switch to Unicode when %s
sees a Unicode argument.  Unfortunately this test was also executed
for %r, because %s and %r share almost all of their code.  This meant
that, if u is a unicode object while repr(u) is an 8-bit string
containing ASCII characters, '%r' % u is a *unicode* string containing
only ASCII characters!

Fixed by executing the test only for %s.
1 parent 3d3a0fa
History
Tip revision: a1eb2274943e86987fdd5a4c08ebd8c301522e3b authored by Guido van Rossum on 11 October 2002, 00:09:51 UTC
Backport the relevant part of 2.192:
Tip revision: a1eb227
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.cvsignore -rw-r--r-- 109 bytes
.hgtags -rw-r--r-- 2.3 KB
LICENSE -rw-r--r-- 12.3 KB
Makefile.pre.in -rw-r--r-- 25.9 KB
PLAN.txt -rw-r--r-- 14.1 KB
README -rw-r--r-- 41.7 KB
acconfig.h -rw-r--r-- 7.5 KB
configure -rwxr-xr-x 210.1 KB
configure.in -rw-r--r-- 55.6 KB
install-sh -rwxr-xr-x 5.5 KB
pyconfig.h.in -rw-r--r-- 19.6 KB
setup.py -rw-r--r-- 34.5 KB

README

back to top