Maybe something like passing in a list of patterns which should match some data, or a list of files/urls to download would be examples of where I would like to be generic, but taking in a string would be bad.
But the real solution be to convert it to foo(*args: str)
. But maybe if you take 2 Container[str]
as input so you can't use *args
. But no real world example comes to mind.
Yes, that's a good alternative for
Collection[str]
but not so much forIterable[str]
as you lose the lazyness of Generators.