Th visitor optimization looking for plain string needs to
accommodate for u"" in Python 2 due to the unicode_literals
future.
Fixes: #4800
Change-Id: I5e3136f2f2cbd5f24d89186b599f59ea2e7f1550
"""
if "__visit_name__" in cls.__dict__:
visit_name = cls.__visit_name__
- if isinstance(visit_name, str):
+
+ if isinstance(visit_name, util.compat.string_types):
# There is an optimization opportunity here because the
# the string name of the class's __visit_name__ is known at
# this early stage (import time) so it can be pre-constructed.