yield from () Was: Re: weirdness with list()

Marco Sulla Marco.Sulla.Python at gmail.com
Mon Mar 1 17:56:50 EST 2021


On Mon, 1 Mar 2021 at 19:51, Alan Gauld via Python-list
<python-list at python.org> wrote:
> Sorry, a bit OT but I'm curious. I haven't seen
> this before:
>
> yield from ()
>
> What is it doing?
> What do the () represent in this context?

It's the empty tuple.


More information about the Python-list mailing list