[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    yield from () Was: Re: weirdness with list()
From:       Alan Gauld via Python-list <python-list () python ! org>
Date:       2021-02-28 23:47:04
Message-ID: s1ha1p$kd$1 () ciao ! gmane ! io
[Download RAW message or body]

On 28/02/2021 00:17, Cameron Simpson wrote:

> BUT... It also has a __iter__ value, which like any Box iterates over 
> the subboxes. For MDAT that is implemented like this:
> 
>     def __iter__(self):
>         yield from ()

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?

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


-- 
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic