diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 9a85ee6e..41f623ad 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -15,3 +15,5 @@ ## Bug Fixes - Fix `NopReceiver.ready()` to properly terminate when receiver is closed. + +- The `__str__` representation of broadcast receivers now include the receiver's name. diff --git a/src/frequenz/channels/_broadcast.py b/src/frequenz/channels/_broadcast.py index 3d6bb78d..2c167d5e 100644 --- a/src/frequenz/channels/_broadcast.py +++ b/src/frequenz/channels/_broadcast.py @@ -515,7 +515,7 @@ def close(self) -> None: def __str__(self) -> str: """Return a string representation of this receiver.""" - return f"{self._channel}:{type(self).__name__}" + return f"{self._channel}:{type(self).__name__}:{self._name}" def __repr__(self) -> str: """Return a string representation of this receiver."""