Replace __call__ in dir(*) with callable(*) for performance gain

svn: r10856
This commit is contained in:
Gerald Britton
2008-07-14 15:47:15 +00:00
parent dda6988dfc
commit 709c58b4eb
6 changed files with 6 additions and 6 deletions

View File

@@ -53,7 +53,7 @@ class UpdateCallback:
@param interval: number of seconds at most between the updates
@type interval: int
"""
if '__call__' in dir(callback): # callback is really callable
if callable(callback): # callback is really callable
self.update = self.update_real
self.callback = callback
self.interval = interval