[Python-bugs-list] [ python-Bugs-811898 ] int ("ffffffd3",
16) gives error
SourceForge.net
noreply at sourceforge.net
Wed Oct 1 21:17:35 EDT 2003
Bugs item #811898, was opened at 2003-09-24 11:44
Message generated for change (Comment added) made by gaul
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=811898&group_id=5470
Category: None
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal D. Becker (nbecker)
Assigned to: Nobody/Anonymous (nobody)
Summary: int ("ffffffd3", 16) gives error
Initial Comment:
Subject says it all. This should not give an error
on a machine that uses 32-bit 2's complement
representation for int.
----------------------------------------------------------------------
Comment By: Andrew Gaul (gaul)
Date: 2003-10-01 20:17
Message:
Logged In: YES
user_id=139865
ints in Python 2.2 on a 32 bit machine can only hold values
from -(2 ** 31) to (2 ** 31) - 1. int() will not return a
negative number without a minus sign, the opposite of what
hex literals do. In Python 2.3, int('ffffffd3', 16) returns
4294967251L. In Python 2.4, 0xffffffd3 will mean
4294967251L. See PEP 237 for more information.
Mark as invalid.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=811898&group_id=5470
More information about the Python-bugs-list
mailing list