On 8/23/2010 7:48 AM, Russell Keith-Magee wrote: > On Mon, Aug 23, 2010 at 7:32 PM, Andy <selforgani...@gmail.com> wrote: [...] >> Also how random is random - would I get a uniform distribution of >> records among the shards? > > Depending on your level of mathematical rigor, that's not a simple > question. To a simple approximation, yes, you'll get a uniform > distribution. However, the patterns and underlying distribution of > random number generators is the subject of continued research and > improvement > I'll go further and say that the principal authors of the random module have a degree of numerical and mathematical sophistication that will tend to guarantee results better than most regular programmers could provide with their own attempts.
The random number generation functions are based on the Mersenne twister algorithm. I certainly wouldn't try to do better myself. http://en.wikipedia.org/wiki/Mersenne_twister regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.