(self, attr, value)
| 6641 | return self |
| 6642 | |
| 6643 | def __setattr__(self, attr, value): |
| 6644 | if not self.__has_singleton(): |
| 6645 | # allow the singleton to be initialized |
| 6646 | return super().__setattr__(attr, value) |
| 6647 | elif self is self.__singleton: |
| 6648 | raise AttributeError( |
| 6649 | f"attributes of {self!r} are not writeable") |
| 6650 | else: |
| 6651 | # duplicate instance - we can end up here from __array_finalize__, |
| 6652 | # where we set the __class__ attribute |
| 6653 | return super().__setattr__(attr, value) |
| 6654 | |
| 6655 | |
| 6656 | masked = masked_singleton = MaskedConstant() |
nothing calls this directly
no test coverage detected