diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2018-07-09 20:14:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-09 20:14:54 (GMT) |
commit | 2708578736d1aa15685495e9b94b827a8e185a8c (patch) | |
tree | 45954e6122da29176499ecb643534f27917b9f68 /Lib/pickle.py | |
parent | 9863de0355caf23c44b708a5d68b603e135f7ae9 (diff) | |
download | cpython-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.py | 6 |
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 |