[ python-Bugs-1224347 ] int/long unification and hex()

SourceForge.net noreply at sourceforge.net
Wed Jun 22 20:10:49 CEST 2005


Bugs item #1224347, was opened at 2005-06-20 15:22
Message generated for change (Comment added) made by tjreedy
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1224347&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Josiah Carlson (josiahcarlson)
Assigned to: Nobody/Anonymous (nobody)
Summary: int/long unification and hex()

Initial Comment:
There seems to be a bit of an inconsistancy with
int/long unification while using hex().  Specifically;
>>> hex(int(987259835))
'0x3ad863bb'
>>> hex(long(987259835))
'0x3AD863BBL'

I understand that longs will have the trailing 'L'
until Py3k, but I believe the capitalization should be
consistant.  If consistancy is desired, I believe that
lowercase should be the standard, being that
string.encode('hex') also produces lowercase.

If the cases are supposed to be different, or making
the change would produce known backwards
incompatibility for some set of modules, feel free to
close this bug report.

----------------------------------------------------------------------

>Comment By: Terry J. Reedy (tjreedy)
Date: 2005-06-22 14:10

Message:
Logged In: YES 
user_id=593130

The trailing L is perhaps easier to see as not a digit if other 
letters are lowercase:  0x3ad863bbL, versus above.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1224347&group_id=5470


More information about the Python-bugs-list mailing list