Style question on recursive generators

Carlos Ribeiro carribeiro at
Mon Oct 18 14:54:29 CEST 2004

On Mon, 18 Oct 2004 14:11:53 +0200, Daniel Dittmar
<daniel.dittmar at sap.corp> wrote:
> You must also consider the code that uses the iteration, at least if you
> want to walk the structure for multiple purposes
> <snip>
> Compare also os.path.walk with os.walk.
> Daniel
> --

Yes, that's a good point, and it's one of the reasons I tend to prefer
the generator now. But anyway, it's just me, or does the 'chained
yield' look ugly to someone else? It may be just a question of getting
used to it, but nevertheless it's bugging me...

Carlos Ribeiro
Consultoria em Projetos
mail: carribeiro at
mail: carribeiro at

More information about the Python-list mailing list