Using sequence indexes greater than 2^32 on 64 bit computers

Jean Hemmi jean.hemmi at arakne.com
Wed Mar 1 05:36:39 EST 2000


Hello,

We're using a custom python sequence type on which we need to pass index

values greater than 2^32 (64 bit integers)...

We modified the definition of the sequence fonctions, so that they'd
accept
a long as parameter, instead of an int, but the interpreter still
truncates
the index values to the first 32 bits...

We made a workaround with special methods (slice_get(), slice_set(),
item_get(), item_set()), but the limitation prevents us from using the
build-in features (both the[] notation and the operator functions - e.g.

operator.getitem().

I believe this is a portage problem.
Shouldn't the 'off_t' type be used, instead of 'int' for all parameters
and
types describing index values ?

64 bit computer and the use of multi-terabyte systems / multi-gigabytes
files are coming around...
Is there any plan for fixing the problem ?

Thanks,

Frederic Giacometti
Arakne
fred at arakne.com




More information about the Python-list mailing list