diff --git a/pandas/core/arrays/base.py b/pandas/core/arrays/base.py index f3325f6ffd9d9..53ae1094c6765 100644 --- a/pandas/core/arrays/base.py +++ b/pandas/core/arrays/base.py @@ -27,8 +27,6 @@ from pandas.core.missing import backfill_1d, pad_1d from pandas.core.sorting import nargsort -_not_implemented_message = "{} does not implement {}." - _extension_array_shared_docs: Dict[str, str] = dict() @@ -330,9 +328,7 @@ def __setitem__(self, key: Union[int, np.ndarray], value: Any) -> None: # __init__ method coerces that value, then so should __setitem__ # Note, also, that Series/DataFrame.where internally use __setitem__ # on a copy of the data. - raise NotImplementedError( - _not_implemented_message.format(type(self), "__setitem__") - ) + raise NotImplementedError(f"{type(self)} does not implement __setitem__.") def __len__(self) -> int: """