This fixes the inconsistency between the fact that unions of SomeUnicodeCodePoint
and SomeChar
were allowed, while other forms of implicit conversions between str
and unicode
are not, i.e. the fact that union(u'ab', union(u'c', "d"))
works but union(union(u'ab', u'c'), "d")
raises AnnotatorError. For consistency, str-unicode comparisons are also forbidden.
This is an updated version of !477 (closed) but significantly simpler now that pypy barely uses unicode any more.