Re: Inconsistency in hex()

2005-07-14 Thread Steven D'Aprano
On Wed, 13 Jul 2005 20:57:54 -0700, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> >>> hex(75) >> '0x4b' >> >>> hex(75*256**4) >> '0x4BL' >> >> By accident or design? Apart from the aesthetic value that lowercase hex >> digits are ugly, should we care? > > Use ('%x' %

Re: Inconsistency in hex()

2005-07-13 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > >>> hex(75) > '0x4b' > >>> hex(75*256**4) > '0x4BL' > > By accident or design? Apart from the aesthetic value that lowercase hex > digits are ugly, should we care? Use ('%x' % 75) or ('%X' % 75) if you care. -- http://mail.python.org/mailman/

Re: Inconsistency in hex()

2005-07-12 Thread Raymond Hettinger
[Steven D'Aprano] > > hex() of an int appears to return lowercase hex digits, and hex() of a > > long uppercase. [Terry Reedy] > Already bug-reported and fixed for 2.5 (to use lowercase, I believe). > http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=1224347 Score another

Re: Inconsistency in hex()

2005-07-12 Thread Bengt Richter
On Tue, 12 Jul 2005 21:17:07 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >hex() of an int appears to return lowercase hex digits, and hex() of a >long uppercase. > hex(75) >'0x4b' hex(75*256**4) >'0x4BL' > >By accident or design? Apart from the aesthetic value that lowercas

Re: Inconsistency in hex()

2005-07-12 Thread Terry Reedy
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hex() of an int appears to return lowercase hex digits, and hex() of a > long uppercase. Already bug-reported and fixed for 2.5 (to use lowercase, I believe). http://sourceforge.net/tracker/?group_id=5470&atid=105470

Re: Inconsistency in hex()

2005-07-12 Thread Dan Bishop
Steven D'Aprano wrote: > hex() of an int appears to return lowercase hex digits, and hex() of a > long uppercase. > > >>> hex(75) > '0x4b' > >>> hex(75*256**4) > '0x4BL' > > By accident or design? Apart from the aesthetic value that lowercase hex > digits are ugly, should we care? > > It wo

Re: Inconsistency in hex()

2005-07-12 Thread [EMAIL PROTECTED]
Steven D'Aprano wrote: > hex() of an int appears to return lowercase hex digits, and hex() of a > long uppercase. > > >>> hex(75) > '0x4b' > >>> hex(75*256**4) > '0x4BL' > > By accident or design? Apart from the aesthetic value that lowercase hex > digits are ugly, should we care? No, ju

Inconsistency in hex()

2005-07-12 Thread Steven D'Aprano
hex() of an int appears to return lowercase hex digits, and hex() of a long uppercase. >>> hex(75) '0x4b' >>> hex(75*256**4) '0x4BL' By accident or design? Apart from the aesthetic value that lowercase hex digits are ugly, should we care? It would also be nice if that trailing L would di