summaryrefslogtreecommitdiff
path: root/Lib/random.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2017-05-29 10:03:41 -0700
committerGitHub <noreply@github.com>2017-05-29 10:03:41 -0700
commit163468a766e16604bdea04a1ab808c0d3e729e5d (patch)
treed9c9bb6da480f4d7e9070e83a010798da5c30a6f /Lib/random.py
parenteba68e2c42e149acecb15bbeb692786e2540157d (diff)
downloadcpython-git-163468a766e16604bdea04a1ab808c0d3e729e5d.tar.gz
bpo-16500: Don't use string constants for os.register_at_fork() behavior (#1834)
Instead use keyword only arguments to os.register_at_fork for each of the scenarios. Updates the documentation for clarity.
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 52df7d8f74..b54d524488 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -765,7 +765,7 @@ setstate = _inst.setstate
getrandbits = _inst.getrandbits
if hasattr(_os, "fork"):
- _os.register_at_fork(_inst.seed, when='child')
+ _os.register_at_fork(after_in_child=_inst.seed)
if __name__ == '__main__':