print longs
Tim Peters
tim_one at email.msn.com
Wed Oct 6 01:24:05 EDT 1999
[Nathan Clegg]
> But making %ld work the way it "should" wouldn't break anything. It
> would treat ints as %d and longs as str(long)[:-1]. Anyone who
> chopped the string explicitly wouldn't be affected. Surely this would
> be a simple fix and make everyone happy.
OK by me, although I'm not interested enough to write a patch.
If someone is, push harder: make %d do this. It already "chops the L" off
a long, but overflows if the long is "too long" to convert to int. This is
bad, if for no other reason than that "too long to convert to int" is
platform-dependent.
you-won't-be-laughing-when-merced-is-in-your-toaster<wink>-ly y'rs - tim
More information about the Python-list
mailing list