python interface: add type check to __str__ methods
python interface: add type check to __str__ methods

Currently, all classes have a __str__ method, but the next commit
makes this optional.  It will then be possible for a subclass
to not have a __str__ method while its superclass does have one.
Calling the method on an object of the subclass will then end up
calling the method of the superclass.  This method therefore
needs to check that its argument is of the correct type before
calling the corresponding *_to_str function.

Signed-off-by: Sven Verdoolaege <e5350bbed4977f5eb8ae1dc6abd9ae59d21ace75@kotnet.org>

inducer/isl-mirror,PollyLabs/isl,Meinersbur/isl,nicolasvasilache/isl,PollyLabs/isl,UBERTC/isl,Meinersbur/isl,nicolasvasilache/isl,tobig/isl,Meinersbur/isl,inducer/isl-mirror,inducer/isl-mirror,PollyLabs/isl,inducer/isl-mirror,tobig/isl,nicolasvasilache/isl,inducer/isl-mirror,nicolasvasilache/isl,UBERTC/isl,PollyLabs/isl,nicolasvasilache/isl,Meinersbur/isl,tobig/isl,PollyLabs/isl,UBERTC/isl,UBERTC/isl,tobig/isl