diff options
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r-- | Lib/pickle.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index c01a6af..20b3646 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -297,8 +297,8 @@ class _Pickler: f(self, obj) # Call unbound method with explicit self return - # Check copyreg.dispatch_table - reduce = dispatch_table.get(t) + # Check private dispatch table if any, or else copyreg.dispatch_table + reduce = getattr(self, 'dispatch_table', dispatch_table).get(t) if reduce: rv = reduce(obj) else: |