> I'm using python's random.getrandbits() to generate unique identifiers in<br>
my program. However, I've discovered that when I start it from the<br>
Journal, I get errors,<br><br>Perhaps its not the best practice to rely on a random number generator to give unique identifiers. Would you not store a number with your program, to guarantee uniqueness?<br>Unless I have mistaken the issue.<br>
<br><br><br><div class="gmail_quote">2009/6/5 Benjamin M. Schwartz <span dir="ltr"><<a href="mailto:bmschwar@fas.harvard.edu">bmschwar@fas.harvard.edu</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm using python's random.getrandbits() to generate unique identifiers in<br>
my program. However, I've discovered that when I start it from the<br>
Journal, I get errors, which I can trace to the random number generator<br>
producing the same sequence of random numbers that was generated when I<br>
started it the first time. It is as if the random seed is being reset<br>
every time I launch from the Journal.<br>
<br>
Does anyone know what's going on here?<br>
<br>
Thanks,<br>
Ben<br>
<br>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br>