Permalink
Browse files

use ret == False instead of ret is False

per review
  • Loading branch information...
1 parent 2ac78c7 commit 73371b04166640caf9fc92eec26d5b120308490a @minrk committed Nov 15, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/matplotlib/backend_bases.py
@@ -1118,14 +1118,14 @@ def _timer_set_single_shot(self):
def _on_timer(self):
'''
Runs all function that have been registered as callbacks. Functions
- can return False if they should not be called any more. If there
+ can return False (or 0) if they should not be called any more. If there
are no callbacks, the timer is automatically stopped.
'''
for func, args, kwargs in self.callbacks:
ret = func(*args, **kwargs)
- # docstring above explains why we use `if ret is False` here,
+ # docstring above explains why we use `if ret == False` here,
# instead of `if not ret`.
- if ret is False:
+ if ret == False:
self.callbacks.remove((func, args, kwargs))
if len(self.callbacks) == 0:

0 comments on commit 73371b0

Please sign in to comment.