Style question on recursive generators

Carlos Ribeiro carribeiro at gmail.com
Mon Oct 18 08:54:29 EDT 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
> --
> http://mail.python.org/mailman/listinfo/python-list

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
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com



More information about the Python-list mailing list