You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.
In the below code, two results of "[a.random() for i in xrange(10)]" should be
same:
E:\2.5test\ironpythonCompatableFor2.5\25\Lib>ipy
IronPython console: IronPython 2.0A5 (2.0.11011.00) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import random
a = random.Random()
a.seed()
state = a.getstate()
[a.random() for i in xrange(10)]
[0.0606536218248, 0.227661377856, 0.383911680143, 0.0532521740781,
0.64292679896
7, 0.626307238651, 0.583549570564, 0.294446938808, 0.777077497345,
0.693130396629]
a.setstate(state)
[a.random() for i in xrange(10)]
[0.296399478939, 0.512523207121, 0.643615922725, 0.0341588538299,
0.415964689765
, 0.108518776534, 0.686661085899, 0.505765370329, 0.971637266675,
0.706592465614
]
Two result in Cpython 2.5 are same:
E:\2.5test\ironpythonCompatableFor2.5\25\Lib>python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on
win
32
Type "help", "copyright", "credits" or "license" for more information.
import random
a = random.Random()
a.seed()
state = a.getstate()
[a.random() for i in xrange(10)]
[0.29828293888054935, 0.0088578084426363946, 0.6956068877658238,
0.60082415615727158, 0.024660010547330358, 0.93204550535867003,
0.18639283049196298, 0.88948524149415675, 0.14358934586660388,
0.43360810573501363]
a.setstate(state)
[a.random() for i in xrange(10)]
[0.29828293888054935, 0.0088578084426363946, 0.6956068877658238,
0.60082415615727158, 0.024660010547330358, 0.93204550535867003,
0.18639283049196298, 0.88948524149415675, 0.14358934586660388,
0.43360810573501363]
Original CodePlex Issue:Issue 23820 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jul 27, 2009 at 11:57 PM Reported by: dfugate Updated on: Feb 22, 2013 at 2:12 AM Updated by: jdhardy Custom value: Reported internally at Microsoft. Test: test_random.py CreatedDate: 11/6/2007 NewInternalID: 409627 OldInternalID: 319175 AreaPath: IronPython\Modules
The text was updated successfully, but these errors were encountered:
* Fix#278, #581, #577, #580
test_random is still not passing though
* Reduce using LINQ
* Update based on feedback from @slozier
Swap objects in the print
In the below code, two results of "[a.random() for i in xrange(10)]" should be
same:
Two result in Cpython 2.5 are same:
Work Item Details
Original CodePlex Issue: Issue 23820
Status: Active
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jul 27, 2009 at 11:57 PM
Reported by: dfugate
Updated on: Feb 22, 2013 at 2:12 AM
Updated by: jdhardy
Custom value: Reported internally at Microsoft.
Test: test_random.py
CreatedDate: 11/6/2007
NewInternalID: 409627
OldInternalID: 319175
AreaPath: IronPython\Modules
The text was updated successfully, but these errors were encountered: