New submission from Floris van Manen: I recently noticed that the standard random() function generates values >= 1.0
As processes are called from an event scheduler, each process has its own Random() instance. self.random = random.Random(seed) self.randomState = self.random.getstate() keeping track of multiple objects: self.random.setstate(self.randomState) self.random.jumpahead(1) self.randomState = self.random.getstate() Also gammavariate() generates errors as it too makes use of the _random() call A workaround is to check each response of random() for values >= 1.0 ---------- assignee: ronaldoussoren components: Macintosh messages: 180480 nosy: klankschap, ronaldoussoren priority: normal severity: normal status: open title: random.random() generating values >= 1.0 type: compile error versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17020> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com