[py-svn] r38726 - py/trunk/py/test/rsession

fijal at codespeak.net fijal at codespeak.net
Tue Feb 13 17:37:28 CET 2007


Author: fijal
Date: Tue Feb 13 17:37:26 2007
New Revision: 38726

Modified:
   py/trunk/py/test/rsession/web.py
Log:
shuffle -> sample


Modified: py/trunk/py/test/rsession/web.py
==============================================================================
--- py/trunk/py/test/rsession/web.py	(original)
+++ py/trunk/py/test/rsession/web.py	Tue Feb 13 17:37:26 2007
@@ -178,9 +178,8 @@
         self._sesslock.acquire()
         try:
             while 1:
-                chars = list(py.std.string.lowercase)
-                py.std.random.shuffle(chars)
-                sessid = ''.join(chars[:8])
+                sessid = ''.join(py.std.random.sample(
+                                 py.std.string.lowercase, 8))
                 if sessid not in self._sessids:
                     self._sessids.append(sessid)
                     break


More information about the py-svn mailing list