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

@ -237,7 +237,7 @@ class CSVWriter:
self.cl = cl
self.filename = filename
self.callback = callback
if '__call__' in dir(self.callback): # callback is really callable
if callable(self.callback): # callback is really callable
self.update = self.update_real
else:
self.update = self.update_empty