unless I'm looking at the source funny, "compat.string_types" is exactly the same as "str if compat.py3k else basestring".   we still marginally support 2.4 so can't do a ternary here.