py3k: Remove callable() function

callable(c) is isinstance(x, collections.Callable) in py3k.
This commit is contained in:
Brian Crowell 2012-10-15 15:47:53 -05:00 committed by Brian Crowell
parent 718dbcc8ca
commit b386ed14dd

View File

@ -71,6 +71,7 @@ import os, sys
# type stuff
from types import IntType, StringType, TupleType
import collections
try:
UnicodeStringType = type(unicode(""))
@ -802,7 +803,7 @@ class Image:
self.load()
if callable(filter):
if isinstance(filter, collections.Callable):
filter = filter()
if not hasattr(filter, "filter"):
raise TypeError("filter argument should be ImageFilter.Filter instance or class")