replace basestring with pyramid.compat.string_types in comparator