Closed michaelficarra closed 5 months ago
Probably the appropriate place to perform this check is immediately after reading it? We generally validate early, when doing validation.
Either this is an API which behaves like most existing APIs in allowing strings as iterables, or is a new API which rejects strings as iterables. If it's allowing them, it should allow them for all of iterables
, paddingOption
, and the iterators being zipped. If it's rejecting them, it should reject them for all three.
Prior to this PR they were rejected for iterables
but allowed for paddingOption
and the iterators being zipped. After this PR they are rejected for iterables
and paddingOption
but still allowed in the iterators being zipped.
I'm not sure whether we want to permit iterables
to yield strings. I think I'll open a PR and run it by committee.
Approved but I still think the appropriate place to perform this check is immediately after reading _paddingOption_
.
I can do that.
Fixes #22. /cc @bakkot