Is there a reason mypy could not assume that all AtomicStr
methods that return strings actually return an AtomicStr, without
impacting runtime behavior...? Maybe it's not possible and I'm just not
familiar enough with the behavior of the type checkers.
I don't know but I could say that being problematic if parts of a project expects strings to be iterable and some expect them to atomic.
If mypy assumes `isinstance(obj, Iterable)` returns false on `str` then its not really helping in the case where `obj: Union[str, Iterable[str]]`
And while I don't really know much about mypy, I do know it understands stuff like `if isisnstance`, it seems like it would take tremendous hackery to get it to understand that when `isinstance(obj, Iterable)` returns True, you still can't pass that object to a function that consumes an iterable without also checking `not isinstance(obj, (str, bytes))`.
assert """
In practice this would be a very odd decision given that the definition
of Iterable is "has an __iter__". And there are plenty of times people
will find the resulting behavior surprising since str DOES have an
__iter__ method and there are plenty of times you might want to iterate
on sequences and strs in the same context.
""" in set_of_draw_backs