[Zope-dev] Make objectValues return a generator?

Andreas Jung lists at andreas-jung.com
Fri Aug 5 14:09:21 EDT 2005



--On 4. August 2005 19:01:48 +0300 Petri Savolainen 
<petri.savolainen at iki.fi> wrote:

> Am I right in assuming that calls to objectValues etc. still return a
> real sequence of objects loaded in memory from ZODB? How about making
> object* calls return a generator instead? Has this been discussed
> somewhere already? I tried a bit of googling & list-searching but could
> not find much anything on this.
>

If you use objectValues() then you should be aware that it loads every 
object from the ZODB. In the rare cases where I use objectValues() I am 
usually interested in every object and not only in some objects. As Dieter 
noticed implementing the functionality as generator would implement in 
incompatible behaviour so -1 for the proprosal changing the method itself.
A dedicated method would be possible if you explain us some usecase where a 
generator would be more helpful.

-aj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20050805/26b2051b/attachment.bin


More information about the Zope-Dev mailing list