You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a function expects an iterable of strings, is it possible to forbid passing in a string, since strings are iterable? Seems like there are many cases where this would be an error, but I don't see an obvious way to check 't','h','i','s'.
The text was updated successfully, but these errors were encountered:
jtatum
changed the title
Possible to distinguish between Iterable[str] and str?
Possible to distinguish between Sequence[str]/Iterable[str] and str?
Jul 29, 2016
The PEP 484 type system currently can't express this, sorry. You'll have to start a discussion in the PEP 484 tracker: https://github.com/python/typing/
If a function expects an iterable of strings, is it possible to forbid passing in a string, since strings are iterable? Seems like there are many cases where this would be an error, but I don't see an obvious way to check 't','h','i','s'.
The text was updated successfully, but these errors were encountered: