Same AttributeError message in some getter function #62
-
I see many getter methods raise same @property
def extremes_method(self) -> typing.Literal["BM", "POT"]:
if self.__extremes_method is None:
raise AttributeError(
"extreme values must first be extracted "
"using the '.get_extremes' method"
)
return self.__extremes_method All of them with same error message |
Beta Was this translation helpful? Give feedback.
Answered by
georgebv
Jun 8, 2023
Replies: 1 comment
-
The idea is that those attributes should not exist until user calls |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
shenxiangzhuang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The idea is that those attributes should not exist until user calls
get_extremes
. I had a choice between returningNone
and throwing an exception. Message is indeed the same - could be refactored to use global variable.