> On Oct 17, 2021, at 3:40 AM, Serhiy Storchaka <storch...@gmail.com> wrote:
> 
> 16.10.21 17:07, Erik Demaine пише:
>> (*it for it in its)  # tuple with the concatenation of iterables in 'its'
> 
> As others already have said, it should evaluate to a generator, not to a
> tuple.
> 
> But other question is occurred now. Should it be equivalent to
> 
>    def gen(its):
>        for it in its:
>            for x in it:
>                yield x
> 
> or to
> 
>    def gen(its):
>        for it in its:
>            yield from it
> 
> ? There is a subtle difference between these codes.

Serhiy: could you explain the difference?

Eric


_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/FSMXM7SQSLCDHUFT344KJNG2IICOWPJU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to