[Python-Dev] Integer behaviour in Python 2.6.4 (original) (raw)
Curt Hagenlocher curt at hagenlocher.org
Mon Nov 2 04:49:18 CET 2009
- Previous message: [Python-Dev] Integer behaviour in Python 2.6.4
- Next message: [Python-Dev] Integer behaviour in Python 2.6.4
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Nov 1, 2009 at 8:22 PM, Sturla Molden <sturla at molden.no> wrote:
Why does this happen? >>> type(2**31-1) <type 'long'>
Does that not happen on non-Windows platforms? 2**31 can't be represented as a 32-bit signed integer, so it's automatically promoted to a long.
-- Curt Hagenlocher curt at hagenlocher.org
- Previous message: [Python-Dev] Integer behaviour in Python 2.6.4
- Next message: [Python-Dev] Integer behaviour in Python 2.6.4
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]