11-digit integer literal on a 32-bit CPU

Patrick Phalen python-list at teleo.net
Tue Mar 7 02:00:56 CET 2000


Oh. I should add that the ID needs to be included in a delimited text
data file, so 10000000000L doesn't work.


[Patrick Phalen, on Mon, 06 Mar 2000]
:: I need to assign an 11-digit Transaction ID, according to specs I'm
:: given by a client.
:: 
:: Begin with 10000000000
:: 
:: Increment by 1 for each new transaction -- 10000000001, etc.
:: 
:: (Store as string in a file between transactions)
:: 
:: As an integer literal, this overflows on an Intel CPU.
:: 
:: What's a nice trick for dealing with this?
:: 
:: Total transactions aren't likely to exceed 999,999
:: 
:: -- 
:: http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list