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

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

No files matched your search

+1 -1
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