-
Notifications
You must be signed in to change notification settings - Fork 9
Closed as not planned
Closed as not planned
Copy link
Labels
part:experimentalAffects the experimental packageAffects the experimental packagetype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Milestone
Description
What's needed?
It still seems hard to justify the special case, in particular because if we add more simple predicates it could be really easy to get ChangedOnly while allowing to create more types of predicates more easily.
Specially once #354 and #355 are implemented.
Proposed solution
If we add these:
def is_equal(prev_message: object, new_message: object) -> bool:
"""Return whether `prev_message` is equal to `new_message`."""
return prev_message == new_message
def is_same(prev_message: object, new_message: object) -> bool:
"""Return whether `prev_message` is the same instance as `new_message`."""
return prev_message is new_messageThen ChangedOnly is basically is drop_while(is_equal), which it is a bit more verbose, but actually makes it more obvious what's really going on.
Metadata
Metadata
Assignees
Labels
part:experimentalAffects the experimental packageAffects the experimental packagetype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users