This will print a tuple in Python 2.x unless ``from __future__ import print_function`` import is in effect. There are similar issues later in this PR. Could you please review that? 

There are 2 possible fixes: either use print with a single argument (e.g. ``print("    %s" % func.__doc__)`` or add ``from __future__ import print_function`` to the top of the file. Single-argument prints are better because to understand what are they doing there is no need to check if print_function future import is active. Future import has an another advantage: it raises an exception if one tries to use print with Python 3.x incompatile syntax.