Exponential backoff generator
A few suggestions:


Possibly I’m using the given code incorrectly, but it doesn’t seem to work for me. I defined a send_message() function that would always fail:

class MessageSendFailed(Exception):
    pass

def send_message(msg):
    raise MessageSendFailed


but when I run it, it immediately fails with the following error: 

$ python expofailed.py
Traceback (most recent call last):
  File "expofailed.py", line 29, in &lt;module&gt;
    time.sleep(backoff_generator.send(False))
TypeError: can't send non-None value to a just-started generator


Alternatively, if I have a copy of send_message() that never throws an error, I get the same error.
I’m not a big fan of the foo = bar if condition else baz style of Python ternary operator, because it tends towards unreadability by cramming everything onto a single line. I prefer splitting it into an explicit if block like so: 

if succeeded:
    num_failed = 0
else:
    num_failed += 1


And now you extend those branches more easily, and write a comment about why each branch behaves it does (because it’s not entirely obvious to me).
Use a better variable name than k as the argument to your function – perhaps interval? Don’t skimp on variable names – characters are cheap.
Your generator should have a docstring and a comment.
You’ve misspelt “succeeded”.