matplotlib/matplotlib — pull request #1630 by mdboom (2013-01-02 17:01:21+00:00)
Title: A disconnected callback cannot be reconnected

Consider the following example:
```
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
p = lambda event: print(event)
cid = fig.canvas.mpl_connect("button_press_event", p)
print("connection", cid)
if __debug__:
print("disconnect, reconnect")
fig.canvas.mpl_disconnect(cid)
cid = fig.canvas.mpl_connect("button_press_event", p)
print("connection", cid)
plt.show()
```

One would expect the callback to be connected whether `__debug__` is True or False, but in fact after the disconnection and reconnection, nothing happens anymore on button press.