[Python-checkins] r84633 - python/branches/py3k/Lib/random.py

raymond.hettinger python-checkins at python.org
Wed Sep 8 20:58:34 CEST 2010


Author: raymond.hettinger
Date: Wed Sep  8 20:58:33 2010
New Revision: 84633

Log:
One more conversion from pow() to **.

Modified:
   python/branches/py3k/Lib/random.py

Modified: python/branches/py3k/Lib/random.py
==============================================================================
--- python/branches/py3k/Lib/random.py	(original)
+++ python/branches/py3k/Lib/random.py	Wed Sep  8 20:58:33 2010
@@ -599,7 +599,7 @@
         # Jain, pg. 495
 
         u = 1.0 - self.random()
-        return 1.0 / pow(u, 1.0/alpha)
+        return 1.0 / u ** (1.0/alpha)
 
 ## -------------------- Weibull --------------------
 


More information about the Python-checkins mailing list