def get_word_alignment(num, force_arch=64, _machine_word_size=MACHINE_WORD_SIZE):
 max_uint64 = 18446744073709551615L
 max_uint32 = 4294967295
 max_uint16 = 65535
 max_uint8 = 255
 if ((force_arch == 64) and (_machine_word_size >= 64) and (num > max_uint32)):
  return (64, 8, max_uint64, 'Q')
 elif (num > max_uint16):
  return (32, 4, max_uint32, 'L')
 elif (num > max_uint8):
  return (16, 2, max_uint16, 'H')
 else:
  return (8, 1, max_uint8, 'B')

def get_word_alignment ( num , force_arch = 64 , _machine_word_size = MACHINE_WORD_SIZE ) : max_uint64 = 18446744073709551615 L max_uint32 = 4294967295 max_uint16 = 65535 max_uint8 = 255 if ( ( force_arch == 64 ) and ( _machine_word_size >= 64 ) and ( num > max_uint32 ) ) : return ( 64 , 8 , max_uint64 , 'Q' ) elif ( num > max_uint16 ) : return ( 32 , 4 , max_uint32 , 'L' ) elif ( num > max_uint8 ) : return ( 16 , 2 , max_uint16 , 'H' ) else : return ( 8 , 1 , max_uint8 , 'B' )
returns alignment details for the given number based on the platform python is running on .