3 ms·
Knew about it, but didn't quite understand how to use send until I read through the link you posted. Thanks for that! Regarding that article specifically I thi
by memco 4y ago
Knew about it, but didn't quite understand how to use send until I read through the link you posted. Thanks for that!
Regarding that article specifically I think it could've done better service to 'yield from' had it mentioned recursive generators. One example would be flattening nested lists: have a flatten function that checks if its argument is iterable: if not just yield the thing else yield from flatten for every item in the iterable.