Commit 4a66a166 by Chris Wanstrath

Use `isinstance(it, collections.Callable)` for callable check

parent 152c4e02
import re
import cgi
import collections
modifiers = {}
def modifier(symbol):
......@@ -80,7 +81,7 @@ class Template(object):
it = get_or_attr(context, section_name, None)
replacer = ''
if it and callable(it):
if it and isinstance(it, collections.Callable):
replacer = it(inner)
elif it and not hasattr(it, '__iter__'):
if section[2] != '^':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment