Here’s a fun thing with Python’s type annotations.
Sometimes one might use
Iterable as a type annotation to try to indicate something might be a set, a list, or a
Iterable really just means something that implements
And “a” is a
str, just like “abc” is a
So this type checks:
my_var: Iterable[str] = "abc" (!!!).
A fun footgun to be aware of :). Get more specific with types to avoid unexpectedly correct-but-not-what-was-meant annotations.