| commit | 97394bc7950d898843f7136c5af69279ea9bb080 | [log] [tgz] |
|---|---|---|
| author | Raymond Hettinger <[email protected]> | Tue May 21 17:22:02 2002 +0000 |
| committer | Raymond Hettinger <[email protected]> | Tue May 21 17:22:02 2002 +0000 |
| tree | 8bb445830d06581fedd5928f2aa6636c45bcbca7 | |
| parent | 7f7d5bf43873b13c21cff8ab452df3ebde3a39ce [diff] [blame] |
Patch 533291. Deprecate None return form of __reduce__.
diff --git a/Lib/pickle.py b/Lib/pickle.py index 5837884..d24786a 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py
@@ -862,6 +862,10 @@ "unpickling" % callable if arg_tup is None: + import warnings + warnings.warn("The None return argument form of __reduce__ is " + "deprecated. Return a tuple of arguments instead.", + DeprecationWarning) value = callable.__basicnew__() else: value = apply(callable, arg_tup)