On 9/22/20 6:44 PM, Eduardo Habkost wrote:
Does this need to require a Sequence? It looks like it could be
Iterable.
I don't think this should block the patch, though, so:
Reviewed-by: Eduardo Habkost<ehabk...@redhat.com>
gen_if can take an Iterator, gen_endif needs a Sequence because it uses
reversed().
I have not been very fastidious about choosing the MOST possibly
abstracted type, but you are right that we SHOULD. I was hoping to find
all occurrences of List and try slackening them to
Collection/Sequence/Iterable etc, but as a follow-up.
In this case, since gen_endif actually does want the stricter type, I'm
deciding to leave them as Sequence for signature parity.
--js
(P.S. in case it comes up in future review, there is a bug that prevents
us from using Collection in 3.6:
https://github.com/PyCQA/pylint/issues/2377 )