Does Python need a '>>>' operator?

Ken Peek Ken.Peek at SpiritSongDesigns.comNOSPAM
Wed Apr 17 00:32:19 EDT 2002


"Jon Ribbens" <jon+usenet at unequivocal.co.uk> wrote in message
news:slrnabobcu.2k3.jon+usenet at snowy.squish.net...
| In article <3cbb996d at news.mhogaming.com>, Ken Peek wrote:
| >| So you think that:
| >|
| >|   long(hex(-1l), 16)
| >|
| >| should not equal -1 but, err, some random choice of 15, 255, 4095,
| >| 65535, etc?
| >
| > No, since we are "unifying" the int and long type, it is none
| > of your business HOW they are stored-- so we do away with the
| > 'int()' and 'long()' functions...
|
| So you think that:
|
|   number(hex(-1), 16)
|
| should not equal -1 but, err, some random choice of 15, 255, 4095,
| 65535, etc?

This is a non-sequitur.  If you want to convert an integer that is holding a
number to a string and back (for whatever reason)-- use decimal representation.
Hexadecimal is for examining bit patterns, which are not necessarily numbers,
although integers can also be used to hold them both.








More information about the Python-list mailing list