Removed unused custom exception support for ImmutableList.
If the warning provided was an instance of Exception, then it would be used as-is. In practice this is untested, unused and ImmutableList is an undocumented internal datastructure.
This commit is contained in:
parent
c3d9b8b28f
commit
1a8ad8a5c6
|
@ -230,11 +230,8 @@ class ImmutableList(tuple):
|
||||||
self.warning = warning
|
self.warning = warning
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def complain(self, *wargs, **kwargs):
|
def complain(self, *args, **kwargs):
|
||||||
if isinstance(self.warning, Exception):
|
raise AttributeError(self.warning)
|
||||||
raise self.warning
|
|
||||||
else:
|
|
||||||
raise AttributeError(self.warning)
|
|
||||||
|
|
||||||
# All list mutation functions complain.
|
# All list mutation functions complain.
|
||||||
__delitem__ = complain
|
__delitem__ = complain
|
||||||
|
|
Loading…
Reference in New Issue