• Tim Peters's avatar
    Derived from Martin's SF patch 110609: support unbounded ints in %d,i,u,x,X,o formats. · 38fd5b64
    Tim Peters yazdı
    Note a curious extension to the std C rules:  x, X and o formatting can never produce
    a sign character in C, so the '+' and ' ' flags are meaningless for them.  But
    unbounded ints *can* produce a sign character under these conversions (no fixed-
    width bitstring is wide enough to hold all negative values in 2's-comp form).  So
    these flags become meaningful in Python when formatting a Python long which is too
    big to fit in a C long.  This required shuffling around existing code, which hacked
    x and X conversions to death when both the '#' and '0' flags were specified:  the
    hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or
    '+' flags too, since signs were always meaningless before for x and X conversions.
    Isomorphic shuffling was required in unicodeobject.c.
    Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
    38fd5b64
Adı
Son kayıt (commit)
Son güncelleme
BeOS Loading commit data...
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.in Loading commit data...
README Loading commit data...
acconfig.h Loading commit data...
config.h.in Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...