(self, attr, value)
| 6840 | return self |
| 6841 | |
| 6842 | def __setattr__(self, attr, value): |
| 6843 | if not self.__has_singleton(): |
| 6844 | # allow the singleton to be initialized |
| 6845 | return super().__setattr__(attr, value) |
| 6846 | elif self is self.__singleton: |
| 6847 | raise AttributeError( |
| 6848 | f"attributes of {self!r} are not writeable") |
| 6849 | else: |
| 6850 | # duplicate instance - we can end up here from __array_finalize__, |
| 6851 | # where we set the __class__ attribute |
| 6852 | return super().__setattr__(attr, value) |
| 6853 | |
| 6854 | |
| 6855 | masked = masked_singleton = MaskedConstant() |
nothing calls this directly
no test coverage detected