diff options
-rw-r--r-- | Lib/pickle.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 8a07925..4cc6629 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -163,6 +163,10 @@ class Pickler: try: f = self.dispatch[t] except KeyError: + if issubclass(t, TypeType): + self.save_global(object) + return + pid = self.inst_persistent_id(object) if pid is not None: self.save_pers(pid) |