summaryrefslogtreecommitdiffstats
path: root/Lib/pickle.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2018-07-09 20:14:54 (GMT)
committerGitHub <noreply@github.com>2018-07-09 20:14:54 (GMT)
commit2708578736d1aa15685495e9b94b827a8e185a8c (patch)
tree45954e6122da29176499ecb643534f27917b9f68 /Lib/pickle.py
parent9863de0355caf23c44b708a5d68b603e135f7ae9 (diff)
downloadcpython-2708578736d1aa15685495e9b94b827a8e185a8c.zip
cpython-2708578736d1aa15685495e9b94b827a8e185a8c.tar.gz
cpython-2708578736d1aa15685495e9b94b827a8e185a8c.tar.bz2
bpo-11572: Make minor improvements to copy module (GH-8208)
* When doing getattr lookups with a default of "None", it now uses an "is" comparison against None which is more correct * Removed outdated code Patch by Brandon Rhodes.
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r--Lib/pickle.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index b852fbd..d533e66 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -510,11 +510,7 @@ class _Pickler:
rv = reduce(obj)
else:
# Check for a class with a custom metaclass; treat as regular class
- try:
- issc = issubclass(t, type)
- except TypeError: # t is not a class (old Boost; see SF #502085)
- issc = False
- if issc:
+ if issubclass(t, type):
self.save_global(obj)
return