From: R David Murray Date: Tue, 2 Apr 2013 17:10:52 +0000 (-0400) Subject: #17489: Add explanatory comment that __getstate__ is not called. X-Git-Tag: v3.4.0a1~1047 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9ebf4dc1f2a816ea708e055d544efb2e2d0a7d5;p=python #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. --- diff --git a/Lib/random.py b/Lib/random.py index b2e9ae1b84..b183f56687 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -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()