print longs

Nathan Clegg nathan at islanddata.com
Tue Oct 5 11:08:30 EDT 1999


On 05-Oct-99 Tim Peters wrote:
> It can't ever be changed in Python1.  Too much existing e.g.
>     str(long)[:-1]
> and
>     hex(long)[2:-1]
> code would silently break.

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.


----------------------------------
Nathan Clegg
 nathan at islanddata.com






More information about the Python-list mailing list