On Wed, Sep 23, 2020 at 01:57:25PM -0400, John Snow wrote:
> 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.

I hadn't noticed reversed() requires a Sequence.  I agree using
the same type on both is better.  Thanks!

-- 
Eduardo


Reply via email to