Staging
v0.5.1
swh:1:snp:635f4099902912592851108bcac178ff574f7c5f
Revision 711088d9b8c6898aad571fb251cb40a8b7d42f64 authored by Tim Peters on 12 April 2001, 00:35:51 UTC, committed by Tim Peters on 12 April 2001, 00:35:51 UTC
http://sourceforge.net/tracker/index.php?func=detail&aid=415514&group_id=5470&atid=105470
For short ints, Python defers to the platform C library to figure out what
%#x should do.  The code asserted that the platform C returned a string
beginning with "0x".  However, that's not true when-- and only when --the
*value* being formatted is 0.  Changed the code to live with C's inconsistency
here.  In the meantime, the problem does not arise if you format a long 0 (0L)
instead.  However, that's because the code *we* wrote to do %#x conversions on
longs produces a leading "0x" regardless of value.  That's probably wrong too:
we should drop leading "0x", for consistency with C, when (& only when) formatting
0L.  So I changed the long formatting code to do that too.
1 parent 4642cb9
History
Tip revision: 550e4673be538d98b6ddf5550b3922539cf5c4b2 authored by Victor Stinner on 08 December 2020, 23:32:54 UTC
bpo-32381: Add _PyRun_SimpleFileObject() (GH-23709)
Tip revision: 550e467
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.cvsignore -rw-r--r-- 79 bytes
.hgtags -rw-r--r-- 1.9 KB
LICENSE -rw-r--r-- 9.2 KB
Makefile.pre.in -rw-r--r-- 21.8 KB
README -rw-r--r-- 37.9 KB
acconfig.h -rw-r--r-- 6.0 KB
config.h.in -rw-r--r-- 16.5 KB
configure -rwxr-xr-x 177.3 KB
configure.in -rw-r--r-- 36.3 KB
install-sh -rwxr-xr-x 5.5 KB
setup.py -rw-r--r-- 24.5 KB

README

back to top