mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
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.
This commit is contained in:
parent
eba68e2c42
commit
163468a766
8 changed files with 128 additions and 75 deletions
|
@ -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__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue