Author: Stephan <[email protected]>
Branch: 
Changeset: r164:4596f8c75079
Date: 2011-12-21 13:54 +0100
http://bitbucket.org/pypy/lang-js/changeset/4596f8c75079/

Log:    math random builtin

diff --git a/js/builtins_math.py b/js/builtins_math.py
--- a/js/builtins_math.py
+++ b/js/builtins_math.py
@@ -60,6 +60,9 @@
 _random = rrandom.Random(int(time.time()))
 
 # 15.8.2.14
+def random(this, *args):
+    return _random.random()
+
 # 15.8.1.1
 E = math.e
 
@@ -83,6 +86,3 @@
 
 # 15.8.1.8
 SQRT2 = math.sqrt(2)
-def random(this, *args):
-    return _random.random()
-
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to