message.is_blatant_spam # true if blatant spam
message.is_spam and not message.is_blatant_spam # true if possibly spam
not message.is_spam # true if not spam
But there's nothing stopping adding that middle one as another property, again without breaking compatibility:
@property
def is_possibly_spam(self) -> bool:
return self.is_spam and not self.is_blatant_spam
The point is, you don't actually have to break compatibility here, you can just define more predicates to add the extra granularity without breaking the existing ones.
You don't, although it is perhaps quite awkard:
But there's nothing stopping adding that middle one as another property, again without breaking compatibility: The point is, you don't actually have to break compatibility here, you can just define more predicates to add the extra granularity without breaking the existing ones.