Skip to content

Commit 9cd6e4f

Browse files
cleanup
1 parent a9df51b commit 9cd6e4f

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

pandas/core/arrays/base.py

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -515,53 +515,6 @@ def __setitem__(self, key, value) -> None:
515515

516516
raise NotImplementedError(f"{type(self)} does not implement __setitem__.")
517517

518-
@property
519-
def readonly(self) -> bool:
520-
"""
521-
Whether the array is readonly.
522-
523-
If True, attempts to modify the array via __setitem__ will raise
524-
a ValueError.
525-
526-
Returns
527-
-------
528-
bool
529-
True if the array is readonly, False otherwise.
530-
531-
Examples
532-
--------
533-
>>> arr = pd.array([1, 2, 3])
534-
>>> arr.readonly
535-
False
536-
>>> arr.readonly = True
537-
>>> arr[0] = 5
538-
Traceback (most recent call last):
539-
...
540-
ValueError: Cannot modify readonly ExtensionArray
541-
"""
542-
return getattr(self, "_readonly", False)
543-
544-
@readonly.setter
545-
def readonly(self, value: bool) -> None:
546-
"""
547-
Set the readonly state of the array.
548-
549-
Parameters
550-
----------
551-
value : bool
552-
True to make the array readonly, False to make it writable.
553-
554-
Examples
555-
--------
556-
>>> arr = pd.array([1, 2, 3])
557-
>>> arr.readonly = True
558-
>>> arr.readonly
559-
True
560-
"""
561-
if not isinstance(value, bool):
562-
raise TypeError("readonly must be a boolean")
563-
self._readonly = value
564-
565518
def __len__(self) -> int:
566519
"""
567520
Length of this array

0 commit comments

Comments
 (0)