mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
#17489: Add explanatory comment that __getstate__ is not called.
We don't put coverage directives in the stdlib, but anyone looking at a coverage report for Random should see the comment and understand why the lines aren't covered.
This commit is contained in:
parent
e3e1c17e08
commit
d9ebf4dc1f
1 changed files with 3 additions and 0 deletions
|
@ -151,6 +151,9 @@ class Random(_random.Random):
|
|||
|
||||
## -------------------- pickle support -------------------
|
||||
|
||||
# Issue 17489: Since __reduce__ was defined to fix #759889 this is no
|
||||
# longer called; we leave it here because it has been here since random was
|
||||
# rewritten back in 2001 and why risk breaking something.
|
||||
def __getstate__(self): # for pickle
|
||||
return self.getstate()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue