Packing a long long type
Erno Kuusela
erno-news at erno.iki.fi
Thu Jun 21 11:14:26 EDT 2001
In article <j4u21aj5r8.fsf at informatik.hu-berlin.de>, Martin von Loewis
<loewis at informatik.hu-berlin.de> writes:
| crj003 at yahoo.com (Rich J) writes:
|| Does anyone know how it would be possible to pack a list containing
|| 'long long' types (like 111111111111111L)
[...]
| The Python version in the CVS supports a 'q' format, see
| http://python.sourceforge.net/devel-docs/lib/module-struct.html
note that python longs don't necessarily fit in a long long,
since the c long long is of limited width (often 64 bits) and
python longs can be arbitrary length. one representation
that works for all python longs is what you get
from repr(), although it is not too space-efficient.
-- erno
More information about the Python-list
mailing list