Skip to content

Commit ca12d81

Browse files
authored
Merge pull request #2821 from devitocodes/no_rcls
misc: Scrap _rcls on Reconstructable since it's unused
2 parents 87e0263 + d1afd4b commit ca12d81

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

devito/tools/abc.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,7 @@ def __init__(self, a, b, c=4):
146146
except AttributeError:
147147
pass
148148

149-
# Should we use a custom reconstructor?
150-
try:
151-
cls = self._rcls
152-
except AttributeError:
153-
cls = self.__class__
154-
155-
return cls(*args, **kwargs)
149+
return self.__class__(*args, **kwargs)
156150

157151

158152
class Pickable(Reconstructable):
@@ -218,10 +212,7 @@ def _pickle_reconstructor(self):
218212
except AttributeError:
219213
pass
220214

221-
try:
222-
return self._rcls
223-
except AttributeError:
224-
return None
215+
return None
225216

226217
def __reduce_ex__(self, proto):
227218
ret = object.__reduce_ex__(self, proto)

0 commit comments

Comments
 (0)