Re: Need advice on how to improve this function

2006-08-22 Thread Gabriel Genellina
At Monday 21/8/2006 12:03, Larry Bates wrote: > I wrote a function that converts a tuple of tuples into html. For > example: > I'd like to know ways to make it better (more efficient, able to deal > with enormous-size arguments, etc). How would I write this as a > generator? Before you put too

Re: Need advice on how to improve this function

2006-08-21 Thread Fredrik Lundh
Matthew Wilson wrote: > I'd like to know ways to make it better (more efficient, able to deal > with enormous-size arguments, etc). How would I write this as a > generator? what makes you think that a generator would be the right tool for this task? what's the use case? (btw, generating "enor

Re: Need advice on how to improve this function

2006-08-21 Thread Larry Bates
Matthew Wilson wrote: > I wrote a function that converts a tuple of tuples into html. For > example: > > In [9]: x > Out[9]: > ('html', > ('head', ('title', 'this is the title!')), > ('body', > ('h1', 'this is the header!'), > ('p', 'paragraph one is boring.'), >