Message150569
> > r = array.array('l', os.urandom(2**size_exponent))
> > len_r = len(r)
>
> r size should not depend on the size of a long. You should write something like:
>
> sizeof_long = ctypes.sizeof(ctypes.c_long)
> r_bits = 8
> r = array.array('l', os.urandom((2**r_bits) * sizeof_long))
> r_mask = 2**r_bits-1
The final code will be in C and will use neither ctypes nor array.array.
Arguing about this looks quite pointless IMO. |
|
Date |
User |
Action |
Args |
2012-01-04 01:58:04 | pitrou | set | recipients:
+ pitrou, gvanrossum, barry, georg.brandl, terry.reedy, vstinner, christian.heimes, benjamin.peterson, Arfrever, alex, dmalcolm, PaulMcMillan |
2012-01-04 01:58:04 | pitrou | link | issue13703 messages |
2012-01-04 01:58:03 | pitrou | create | |
|