Terry Reedy wrote: > "KraftDiner" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > So what type / class should one use to represent a 16 bit integers > > (signed or unsigned)? > > For most purposes, Python just has integers, with 'small' ones (depending > on the machine) handled more efficiently. For special purposes, you may > want to use the array or struct modules. > > tjr
Ok so the bottom line is.. if I have two arrays... a = array.array('L') a.append(65536L) b = array.array('H') b.append(a[0]) I will get the error: File "<stdin>", line 1, in ? OverflowError: unsigned short is greater than maximum This is obvious... but how do I crop off the high order bits if necessary? a[0]&0xFFFF ? -- http://mail.python.org/mailman/listinfo/python-list