This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Incorrect use of 'int' and 'long' descriptions
Type: Stage:
Components: Documentation Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, johnjsal
Priority: normal Keywords:

Created on 2006-12-01 19:22 by johnjsal, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg30730 - (view) Author: John (johnjsal) Date: 2006-12-01 19:22
On the main page for the array module, the following is in the type code chart:

'I' unsigned int     long     2
'l' signed long      int      4

Should 'long' and 'int' be switched in the second column?

Thanks,
John
msg30731 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-12-01 19:40
No, the second column refers to the Python type used. This is "int" for signed longs, because this is the base type for a Python int, and "long" for unsigned ints, because on most 32-bit platforms int == long and therefore an unsigned int is outside the range of a Python int.
History
Date User Action Args
2022-04-11 14:56:21adminsetgithub: 44294
2006-12-01 19:22:18johnjsalcreate