This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Arfrever, PaulMcMillan, alex, barry, benjamin.peterson, christian.heimes, dmalcolm, georg.brandl, gvanrossum, pitrou, terry.reedy, vstinner
Date 2012-01-04.01:58:03
SpamBayes Score 2.5097455e-05
Marked as misclassified No
Message-id <1325642213.3356.8.camel@localhost.localdomain>
In-reply-to <1325642093.98.0.114808804311.issue13703@psf.upfronthosting.co.za>
Content
> > 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.
History
Date User Action Args
2012-01-04 01:58:04pitrousetrecipients: + pitrou, gvanrossum, barry, georg.brandl, terry.reedy, vstinner, christian.heimes, benjamin.peterson, Arfrever, alex, dmalcolm, PaulMcMillan
2012-01-04 01:58:04pitroulinkissue13703 messages
2012-01-04 01:58:03pitroucreate