[Python-checkins] cpython: #17489: Add explanatory comment that __getstate__ is not called.

r.david.murray python-checkins at python.org
Tue Apr 2 19:13:30 CEST 2013


http://hg.python.org/cpython/rev/68ed5b2ca867
changeset: 83063:68ed5b2ca867
user: R David Murray <rdmurray at bitdance.com>
date: Tue Apr 02 13:10:52 2013 -0400
summary:
 #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.
files:
 Lib/random.py | 3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Lib/random.py b/Lib/random.py
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -151,6 +151,9 @@
 
 ## -------------------- 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()
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /