Title: Determinism and compatibility of random module · Issue #1269 · RustPython/RustPython · GitHub
Open Graph Title: Determinism and compatibility of random module · Issue #1269 · RustPython/RustPython
X Title: Determinism and compatibility of random module · Issue #1269 · RustPython/RustPython
Description: Should random.random() always be same when same random.seed() is applied? Should this be same across interpreter process? Should this be same across RustPython version? Should this be same with how CPython does? Python document states th...
Open Graph Description: Should random.random() always be same when same random.seed() is applied? Should this be same across interpreter process? Should this be same across RustPython version? Should this be same with how...
X Description: Should random.random() always be same when same random.seed() is applied? Should this be same across interpreter process? Should this be same across RustPython version? Should this be same with how...
Opengraph URL: https://github.com/RustPython/RustPython/issues/1269
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Determinism and compatibility of random module","articleBody":"Should `random.random()` always be same when same `random.seed()` is applied? Should this be same across interpreter process? Should this be same across RustPython version? Should this be same with how CPython does?\r\n\r\nPython document states this in https://docs.python.org/3/library/random.html#notes-on-reproducibility\r\n\r\n\u003e Sometimes it is useful to be able to reproduce the sequences given by a pseudo random number generator. By re-using a seed value, the same sequence should be reproducible from run to run as long as multiple threads are not running.\r\n\u003e \r\n\u003e Most of the random module’s algorithms and seeding functions are subject to change across Python versions, but two aspects are guaranteed not to change:\r\n\u003e \r\n\u003e - If a new seeding method is added, then a backward compatible seeder will be offered.\r\n\u003e \r\n\u003e - The generator’s random() method will continue to produce the same sequence when the compatible seeder is given the same seed.\r\n\r\n`random.seed()` takes `version` argument which can be 1 or 2.\r\n\r\n\u003e With version 2 (the default), a str, bytes, or bytearray object gets converted to an int and all of its bits are used.\r\n\u003e \r\n\u003e With version 1 (provided for reproducing random sequences from older versions of Python), the algorithm for str and bytes generates a narrower range of seeds.","author":{"url":"https://github.com/HyeonuPark","@type":"Person","name":"HyeonuPark"},"datePublished":"2019-08-15T07:21:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1269/RustPython/issues/1269"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bf3f4536-4999-6704-5c78-ca2942b8c9a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF92:9FB41:2C1906F:3F44A43:6A590879 |
| html-safe-nonce | 341798aba0978b6940ba805575f0f2236de290521469c28b441b83668e3514cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjkyOjlGQjQxOjJDMTkwNkY6M0Y0NEE0Mzo2QTU5MDg3OSIsInZpc2l0b3JfaWQiOiI1MDE4MjA1MjcxNzc4NDYxODE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 21576427f85a2e3f161ac95704f4bb3a74644d9182f5a1f822864320c1b82188 |
| hovercard-subject-tag | issue:481027773 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RustPython/RustPython/1269/issue_layout |
| twitter:image | https://opengraph.githubassets.com/033968f8829da26bfec46b911d7986bf29222e204c08051abe6b212ed44a2b95/RustPython/RustPython/issues/1269 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/033968f8829da26bfec46b911d7986bf29222e204c08051abe6b212ed44a2b95/RustPython/RustPython/issues/1269 |
| og:image:alt | Should random.random() always be same when same random.seed() is applied? Should this be same across interpreter process? Should this be same across RustPython version? Should this be same with how... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | HyeonuPark |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9842457e8d7e3b2e1635a63af28da35614845510 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width