Re: Use generators instead of lists for resultsets?

Faber <[email protected]> Mon, 27 Jun 2005 03:26:03 +0200
Newsgroups gmane.comp.web.skunkweb
Organization FaberBox
Message-ID <[email protected]>
On Saturday 25 June 2005 05:28, Jacob Smullyan wrote:

> You are certainly right to question adding a new method and to
> consider options for getting the behavior desired out of the api
> already in existence, but in the end I'm not convinced by how it would
> work, and think a new method would be cleaner.  Both options, the
> getSome() return type parameter and the class attribute that
> determines the default return type, have some problems which seem
> pretty decisive for me.

[cut]

> The return type would be consistent, however.
>
> That's my point of view, at any rate.  I am susceptible to persuasion,
> given enough time, so don't hesitate to argue if you feel like it!

No problem, YOU have convinced me; in effects I was dubious because changing 
the return type with a paramether is not the maximum of the elegance, even 
with a dynamic language as Python.

+1 for the iterSome() solution, then  :)

-- 
Faber
http://www.faberbox.com/

Only wimps use tape backup: _real_ men just upload their important stuff on 
ftp and let the rest of the world mirror it  -- Linus Torvalds


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click