Fix use of 'callable' function with Python 3.1
Merge pull request #2352 from astrofrog/fix-python-31

Fix use of 'callable' function with Python 3.1