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.

_______________________________________________
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/DQ6AB5LHQXOKTTVFV5LYXIJSXHL2EU3A/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to