Skip to main content

Practice ยท 1 of 2

Notifiable Protocol

Define a @runtime_checkable Protocol named Notifiable with method send(message: str) -> None. Then implement class EmailSink with send appending to its own .sent list. backup(n) below must work with any Notifiable.

Difficulty: intermediate

Back to lesson: Practice: Protocol Drills